3 # Generates DATA burst sequence for provided order number (1: first, 2: second, etc.)
4 # We will generate a simple scenario with initial, two updates and termination, that is to say: four messages:
5 # 1,2,3,4 5,6,7,8 9,10,11,12 etc.
7 # Category = ((Number-1) % 4) + 1 = 1 for initial, 2 for first update, 3 for second update and 4 for termination
20 [[ ! -f $1 ]] && salir "Template file ($1) not found!"
24 cat $1 | sed 's/__HBH_ETE__/'$HBH_ETE'/g' | sed 's/__SID_SUFFIX__/'$SID_SUFFIX'/' \
25 | sed 's/__MSISDN__/'$MSISDN'/' | sed 's/__NTPTIMESTAMP__/'$NTP'/' \
26 | sed 's/__SID_DI__/'$SID_DI'/' | sed 's/__SID_HIGH__/'$SID_HIGH'/' | sed 's/__SID_LOW__/'$SI_LOW'/'
30 [[ "$SEQN" = "" ]] && salir "Use: $0 <sequence number: 1..N>"
31 check_template data-initial.msk
32 check_template data-update1.msk
33 check_template data-update2.msk
34 check_template data-termination.msk
36 # Session-Id: '<DiameterIdentity>;<high 32 bits>;<low 32 bits>[;<optional value>="">]'
37 # <avp name="Session-Id" data="module-2.PTS2-BOG.sandvine.com;1287115741;0;49"/>
38 # We will sequence the otional value with __SID_SUFFIX__, low and high will be constant.
40 # Sequence values at templates:
41 # __HBH_ETE__: 1, 3, 5, etc. (hop-by-hop and end-to-end)
42 # __SID_SUFFIX__: It could be MSISDN, but we put OFFSET (0, 1, 2, 3, etc.). It's the Session-Id optional part.
43 # __MSISDN__: 50583211675, 50583211676, 50583211677, etc. Used for User-Name and Subscription-Id-Data
44 # __NTPTIMESTAMP__: Four values for initial, update1, update2 and termination: 3548171033, 3548171136 (103+), 3548171136(idem), 3548171524(388+)
45 # This initial time (aproximately 8 Jun 2012 at 19:00).
47 HBH_ETE=$((1 + 2*OFFSET))
49 # Example if you want to fix to two sockets (-sessionIdPartForClientSocketIdSelection must be 'optional'): SID_SUFFIX=$((CUARTO%2))
50 MSISDN=$((50583211675+CUARTO))
51 NTP=$((3548171033+CUARTO))
53 # Helpers to guide derivery (fixed at the moment)
54 # __SID_DI__: Session-Id diameter identity
55 # __SID_HIGH__: Session-Id high part
56 # __SID_LOW__: Session-Id low part
57 SID_DI=module-2.PTS2-BOG.sandvine.com
62 1) parse data-initial.msk
65 parse data-update1.msk
68 parse data-update2.msk
71 parse data-termination.msk