1:<?xml version="1.0" encoding="ISO-8859-1" ?>
   2:<!DOCTYPE scenario SYSTEM "sipp.dtd">
   3:
   4:<!-- This program is free software; you can redistribute it and/or      -->
   5:<!-- modify it under the terms of the GNU General Public License as     -->
   6:<!-- published by the Free Software Foundation; either version 2 of the -->
   7:<!-- License, or (at your option) any later version.                    -->
   8:<!--                                                                    -->
   9:<!-- This program is distributed in the hope that it will be useful,    -->
  10:<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
  11:<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
  12:<!-- GNU General Public License for more details.                       -->
  13:<!--                                                                    -->
  14:<!-- You should have received a copy of the GNU General Public License  -->
  15:<!-- along with this program; if not, write to the                      -->
  16:<!-- Free Software Foundation, Inc.,                                    -->
  17:<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
  18:<!--                                                                    -->
  19:<!--                 Sipp default 'regexp client' scenario.             -->
  20:<!--                                                                    -->
  21:
  22:<scenario name="Client with regexp scenario">
  23:  <send retrans="500">
  24:    <![CDATA[
  25:
  26:      INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
  27:      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
  28:      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
  29:      To: sut <sip:[service]@[remote_ip]:[remote_port]>
  30:      Call-ID: [call_id]
  31:      CSeq: 1 INVITE
  32:      Contact: sip:sipp@[local_ip]:[local_port]
  33:      Max-Forwards: 70
  34:      Subject: Performance Test
  35:      Content-Type: application/sdp
  36:      Content-Length: [len]
  37:
  38:      v=0
  39:      o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
  40:      s=-
  41:      c=IN IP[media_ip_type] [media_ip]
  42:      t=0 0
  43:      m=audio [media_port] RTP/AVP 0
  44:      a=rtpmap:0 PCMU/8000
  45:
  46:    ]]>
  47:  </send>
  48:
  49:  <recv response="100"
  50:        optional="true">
  51:  </recv>
  52:
  53:  <recv response="180" optional="true">
  54:  </recv>
  55:
  56:  <recv response="200" start_rtd="true">
  57:    <!-- Definition of regexp in the action tag. The regexp must follow -->
  58:    <!-- the Posix Extended standard (POSIX 1003.2), see:               -->
  59:    <!--                                                                -->
  60:    <!--   http://www.opengroup.org/onlinepubs/007908799/xbd/re.html    -->
  61:    <!--                                                                -->
  62:    <!-- regexp    : Contain the regexp to use for matching the         -->
  63:    <!--             received message                                   -->
  64:    <!--             MANDATORY                                          -->
  65:    <!-- search_in : msg (try to match against the entire message)      -->
  66:    <!--           : hdr (try to match against a specific SIP header    -->
  67:    <!--             (passed in the header tag)                         -->
  68:    <!--             OPTIONAL - default value : msg                     -->
  69:    <!-- header    : Header to try to match against.                    -->
  70:    <!--             Only used when the search_in tag is set to hdr     -->
  71:    <!--             MANDATORY IF search_in is equal to hdr             -->
  72:    <!-- check_it  : if set to true, the call is marked as failed if    -->
  73:    <!--             the regexp doesn't match.                          -->
  74:    <!--             OPTIONAL - default value : false                   -->
  75:    <!-- assign_to : contain the variable id (integer) or a list of     -->
  76:    <!--             variable id which will be used to store the        -->
  77:    <!--             result of the matching process between the regexp  -->
  78:    <!--             and the message. This variable can be re-used at   -->
  79:    <!--             a later time in the scenario using '[$n]' syntax   -->
  80:    <!--             where n is the variable id.                        -->
  81:    <!--             MANDATORY                                          -->
  82:    <action>
  83:      <ereg regexp="[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,3}[:][0-9]{1,5}" 
  84:            search_in="msg" 
  85:            check_it="true" 
  86:            assign_to="1"/>
  87:      <ereg regexp=".*" 
  88:            search_in="hdr" 
  89:            header="Contact:" 
  90:            check_it="true" 
  91:            assign_to="6"/>
  92:      <ereg regexp="o=([[:alnum:]]*) ([[:alnum:]]*) ([[:alnum:]]*)"
  93:            search_in="msg" 
  94:            check_it="true" 
  95:            assign_to="3,4,5,8"/>
  96:    </action>
  97:  </recv>
  98:
  99:  <send>
 100:    <![CDATA[
 101:      ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
 102:      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
 103:      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
 104:      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
 105:      Call-ID: [call_id]
 106:      CSeq: 1 ACK
 107:      retrievedIp: [$1]
 108:      retrievedContact:[$6]
 109:      retrievedSdpOrigin:[$3]
 110:      retrievedSdpOrigin-username:[$4]
 111:      retrievedSdpOrigin-session-id:[$5]
 112:      retrievedSdpOrigin-version:[$8]
 113:      Contact: sip:sipp@[local_ip]:[local_port]
 114:      Max-Forwards: 70
 115:      Subject: Performance Test
 116:      Content-Length: 0
 117:    ]]>
 118:  </send>
 119:
 120:  <!-- This delay can be customized by the -d command-line option       -->
 121:  <!-- or by adding a 'milliseconds = "value"' option here.           -->
 122:  <pause milliseconds = "1000"/>
 123:
 124:  <!-- The 'crlf' option inserts a blank line in the statistics report. -->
 125:  <send retrans="500">
 126:    <![CDATA[
 127:
 128:      BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
 129:      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
 130:      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
 131:      To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
 132:      Call-ID: [call_id]
 133:      CSeq: 2 BYE
 134:      Contact: sip:sipp@[local_ip]:[local_port]
 135:      Max-Forwards: 70
 136:      Subject: Performance Test
 137:      Content-Length: 0
 138:
 139:    ]]>
 140:  </send>
 141:
 142:  <recv response="200" crlf="true" rtd="true">
 143:  </recv>
 144:
 145:  <!-- definition of the response time repartition table (unit is ms)   -->
 146:  <ResponseTimeRepartition value="1000, 1040, 1080, 1120, 1160, 1200"/>
 147:
 148:  <!-- definition of the call length repartition table (unit is ms)     -->
 149:  <CallLengthRepartition value="1000, 1100, 1200, 1300, 1400"/>
 150:
 151:</scenario>
 152: