1:<!--
   2:
   3:  This program is free software; you can redistribute it and/or modify
   4:  it under the terms of the GNU General Public License as published by
   5:  the Free Software Foundation; either version 2 of the License, or
   6:  (at your option) any later version.
   7:
   8:  This program is distributed in the hope that it will be useful,
   9:  but WITHOUT ANY WARRANTY; without even the implied warranty of
  10:  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11:  GNU General Public License for more details.
  12:
  13:  You should have received a copy of the GNU General Public License
  14:  along with this program; if not, write to the Free Software
  15:  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  16:
  17: (c)Copyright 2006 Hewlett-Packard Development Company, LP.
  18:
  19:-->
  20:
  21:<?xml version="1.0" encoding="ISO-8859-1" ?>
  22:<scenario>
  23:
  24:  <counter>
  25:    <counterdef name="transaction-counter" init="999"></counterdef>
  26:  </counter>
  27:
  28:  <traffic>
  29:
  30:<!---------------## ADD ##------------------>
  31:<!---------------Send ADD------------------->
  32:    <send channel="channel-1">
  33:      <action>
  34:        <inc-counter name="transaction-counter"></inc-counter>
  35:        <set-value name="transaction-id"
  36:            format="$(transaction-counter)"></set-value>
  37:      </action>
  38:      <message>
  39:        <!-- header -->
  40:        <![CDATA[!/1 [16.16.88.188\]:55554
  41:                T=18571]]>
  42:        <!-- body -->
  43:        <![CDATA[C=${A=${M{TS{SI=iv,BF=off},
  44:                ST=1{O{MO=sr,RV=off,RG=off},
  45:                R{m=audio 49152 RTP/AVP 3 97 98 8 0 101
  46:                  c=IN IP4 16.16.214.175
  47:                  a=rtpmap:3 GSM/8000
  48:                  a=rtpmap:97 iLBC/8000
  49:                  a=rtpmap:98 iLBC/8000
  50:                  a=fmtp:98 mode=20
  51:                  a=rtpmap:8 PCMA/8000
  52:                  a=rtpmap:0 PCMU/8000
  53:                  a=rtpmap:101 telephone-event/8000
  54:                  a=fmtp:101 0-11,16
  55:                 }}}}}}]]>
  56:      </message>
  57:      <action>
  58:        <!-- Store the transaction-id for following messages -->
  59:        <store name="TID" entity="transaction-id">
  60:          <regexp name="t-id"
  61:              expr="[Tt][[:space:]]*[=][[:space:]]*([0-9]+)"
  62:              nbexpr="2"
  63:              subexpr="1"></regexp>
  64:        </store>
  65:      </action>
  66:    </send>
  67:<!-------------Receive ADD reply------------>
  68:    <receive channel="channel-1">
  69:      <message>
  70:        <!-- header -->
  71:        <![CDATA[MEGACO/1 [16.16.88.188\]:55555
  72:                Reply=18571]]>
  73:        <!-- body -->
  74:        <![CDATA[Context=1{Add=T1{Media{TerminationState{ServiceStates=inservice,Buffer=off},
  75:                Stream=1{LocalControl{Mode=sendreceive,Reserve
  76:                dValue=off,ReservedGroup=off},Local{
  77:                  v=0
  78:                  o=user 0 0 IN IP4 16.16.88.188
  79:                  s=-
  80:                  t=0 0
  81:                  m=audio 3436 RTP/AVP 8 0 101
  82:                  c=IN IP4 16.16.88.188
  83:                  a=rtpmap:8 PCMA/8000/1
  84:                  a=rtpmap:0 PCMU/8000/1
  85:                  a=rtpmap:101 telephone-event/8000/1
  86:                },
  87:                Remote{
  88:                  v=0
  89:                  o=user 0 0 IN IP4 16.16.88.188
  90:                  s=-
  91:                  t=0 0
  92:                  m=audio 49152 RTP/AVP 3 97 98 8 0 101
  93:                  c=IN IP4 16.16.214.175
  94:                  a=rtpmap:3 GSM/8000
  95:                  a=rtpmap:97 iLBC/8000
  96:                  a=rtpmap:98 iLBC/8000
  97:                  a=fmtp:98 mode=20
  98:                  a=rtpmap:8 PCMA/8000
  99:                  a=rtpmap:0 PCMU/8000
 100:                  a=rtpmap:101 telephone-event/8000
 101:                  a=fmtp:101 0-11,16
 102:                }}}}}}]]>
 103:      </message>
 104:      <action>
 105:        <!-- Store the termination-id for following messages -->
 106:        <store name="TERMID" entity="termination-id"></store>
 107:        <!-- Store the context-id for following messages -->
 108:        <store name="CONTID" entity="context-id">
 109:          <regexp name="cont-id"
 110:              expr="Context[[:space:]]*[=]([[:digit:]]*)[[:space:]]*[{]"
 111:              nbexpr="2"
 112:              subexpr="1"></regexp>
 113:        </store>
 114:      </action>
 115:    </receive>
 116:<!-------------Send Ack--------------------->
 117:    <send channel="channel-1">
 118:      <action>
 119:        <restore name="TID" entity="transaction-id-in-body"></restore>
 120:      </action>
 121:      <message>
 122:        <!-- header -->
 123:        <![CDATA[!/1 [16.16.88.188\]:55554 
 124:            TransactionResponseAck]]>
 125:        <!-- body -->
 126:        <![CDATA[18571}]]>
 127:     </message>
 128:    </send>
 129:
 130:<!--------------## MODIFY ##---------------->
 131:<!------------Send MODIFY------------------->
 132:    <send channel="channel-1">
 133:      <action>
 134:        <inc-counter name="transaction-counter"></inc-counter>
 135:        <set-value name="transaction-id" format="$(transaction-counter)"></set-value>
 136:        <!-- Seagull's session ID was value of TID and is now value of transaction-id -->
 137:        <set-new-session-id name="TID" entity="transaction-id"></set-new-session-id>
 138:        <restore name="TERMID" entity="termination-id"></restore>
 139:        <restore name="CONTID" entity="context-id"></restore>
 140:      </action>
 141:      <message>
 142:        <!-- header -->
 143:        <![CDATA[!/1 [16.16.88.188\]:55554
 144:                Transaction=18572]]>
 145:        <!-- body -->
 146:        <![CDATA[C=1{MF=T1
 147:                  {SG{aasb/play
 148:                    {an="sid=<file://home/ocmpadm/tests_tools.d/prompts.d/welcome.wav>"}
 149:                   },
 150:                   E=100{g/sc}}}}]]> 
 151:      </message>
 152:      <action>
 153:        <!-- Store the transaction-id for following messages -->
 154:        <store name="TID" entity="transaction-id">
 155:          <regexp name="t-id"
 156:          expr="Transaction*[=][[:space:]]*([0-9]+)"
 157:          nbexpr="2"
 158:          subexpr="1"></regexp>
 159:        </store>
 160:      </action>
 161:    </send>
 162: <!----------Receive MODIFY response--------->
 163:    <receive channel="channel-1">
 164:      <message>
 165:        <!-- header -->
 166:        <![CDATA[MEGACO/1 [16.16.88.188\]:55555
 167:                Reply=18572]]>
 168:        <!-- body -->
 169:        <![CDATA[Context=1{Modify=T1}}]]>
 170:     </message>
 171:    </receive>
 172: <!-------------Send MODIFY Ack------------->
 173:    <send channel="channel-1">
 174:      <action>
 175:        <restore name="TID" entity="transaction-id-in-body"></restore>
 176:      </action>
 177:      <message>
 178:        <!-- header -->
 179:        <![CDATA[!/1 [16.16.88.188\]:55554
 180:                TransactionResponseAck]]>
 181:        <!-- body -->
 182:        <![CDATA[18572}]]> 
 183:     </message>
 184:    </send>
 185:
 186: <!--------------## SUBTRACT ##---------------->
 187: <!--------------Send SUBTRACT----------------->
 188:    <send channel="channel-1">
 189:      <action>
 190:        <inc-counter name="transaction-counter"></inc-counter>
 191:        <set-value name="transaction-id" format="$(transaction-counter)"></set-value>
 192:        <!-- Seagull's session ID was value of TID and is now value of transaction-id -->
 193:        <set-new-session-id name="TID" entity="transaction-id"></set-new-session-id>
 194:        <restore name="CONTID" entity="context-id"></restore>
 195:        <restore name="TERMID" entity="termination-id"></restore>
 196:      </action>
 197:      <message>
 198:        <!-- header -->
 199:        <![CDATA[!/1 [16.16.88.188\]:55554
 200:                 Transaction=18573]]>
 201:        <!-- body -->
 202:        <![CDATA[C=1{S=T1}}]]> 
 203:      </message>
 204:      <action>
 205:      <!-- Store the transaction-id for following messages -->
 206:        <store name="TID" entity="transaction-id">
 207:          <regexp name="t-id"
 208:              expr="Transaction*[=][[:space:]]*([0-9]+)"
 209:              nbexpr="2"
 210:              subexpr="1"></regexp>
 211:        </store>
 212:      </action>
 213:    </send>
 214: <!-----------Receive SUBTRACT reply---------->
 215:    <receive channel="channel-1">
 216:      <message>
 217:        <!-- header -->
 218:        <![CDATA[MEGACO/1 [16.16.88.188\]:55555
 219:                Reply=18573]]>
 220:        <!-- body -->
 221:        <![CDATA[Context=1{Subtract=T1}}]]>
 222:     </message>
 223:    </receive>
 224: <!---------------Send Ack-------------------->
 225:    <send channel="channel-1">
 226:      <action>
 227:        <restore name="TID" entity="transaction-id-in-body"></restore>
 228:      </action>
 229:      <message>
 230:        <!-- header -->
 231:        <![CDATA[!/1 [16.16.88.188\]:55554
 232:                TransactionResponseAck]]>
 233:        <!-- body -->
 234:        <![CDATA[18573}]]> 
 235:     </message>
 236:    </send>
 237:
 238:  </traffic>
 239:</scenario>