sipp basiccall xml script

3 篇文章 0 订阅

 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 'branchc' scenario.          -->
 20 <!--                                                           -->
 21 <!-- 首先发送SIP注册消息,Register。里面的From与To是注册的号码  -->
 22 <scenario name="basiccall">
 23 
 24   <send retrans="500">
 25     <![CDATA[
 26 
 27       INVITE sip:[field3]@[field1];transport=[transport] SIP/2.0
 28       Via: SIP/2.0/[transport] [local_ip]:[local_port];transport=[transport];branch=[branch]
 29       From: <sip:[field0]@[field1]>;tag=[call_number]
 30       To: <sip:[field3]@[field1]>
 31       Call-ID: [call_id]
 32       CSeq: 1 INVITE
 33       Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>
 34       Max-Forwards: 7
 35       Subject: Performance Test
 36       User-Agent: Sipp
 37       X-cid: [call_id]
 38       Content-Type: application/sdp
 39       Content-Length: [len]
 40 
 41       v=0
 42       o=[local_ip] 53655765 2353687637 IN IP[local_ip_type] [local_ip]
 43       s=-
 44       c=IN IP[local_ip_type] [local_ip]
 45       t=0 0
 46       m=audio [rtpstream_audio_port] RTP/AVP 0 8 101
 47       a=rtpmap:0 PCMU/8000
 48       a=rtpmap:8 PCMA/8000
 49       a=rtpmap:101 telephone-event/8000
 50       a=fmtp:101 0-16
51       a=sendrecv
 52     ]]>
 53   </send>
 54 
 55   <recv response="100" optional="true">
 56   </recv>
 57 
 58   <recv response="407" auth="true">
 59       <action>
 60         <ereg regexp="branch=(.*)"
 61               search_in="hdr"
 62               header="Via: "
 63               assign_to="8"/>
 64     </action>
 65   </recv>
 66 
 67   <!-- By adding rrs="true" (Record Route Sets), the route sets    -->
 68   <!-- are saved and used for following messages sent. Useful to test-->
 69   <!-- against stateful SIP proxies/B2BUAs.                     -->
 70   <!-- Packet lost can be simulated in any send/recv message by  -->
 71   <!-- by adding the 'lost = "10"'. Value can be [1-100] percent.-->
 72   <send>
 73     <![CDATA[
 74 
 75       ACK sip:[field3]@[field1]:[remote_port] SIP/2.0
 76       Via: SIP/2.0/[transport] [local_ip]:[local_port];[$8]
 77       From: <sip:[field0]@[field1]>;tag=[call_number]
 78       To:  <sip:[field3]@[field1]>[peer_tag_param]
 79       Call-ID: [call_id]
 80       CSeq: 1 ACK
 81       Contact: sip:[field0]@[local_ip]:[local_port]
 82       Max-Forwards: 7
 83       User-Agent: Sipp
 84       X-cid: [call_id]
 85       Subject: Performance Test
 86       Content-Length: 0
 87     ]]>
 88   </send>
 89 
 90 
 91   <send retrans="500">
 92     <![CDATA[
 93 
 94       INVITE sip:[field3]@[field1]:[remote_port];transport=[transport] SIP/2.0
 95       Via: SIP/2.0/[transport] [local_ip]:[local_port];transport=[transport];branch=[branch]
 96       From: <sip:[field0]@[field1]>;tag=[call_number]
 97       To: <sip:[field3]@[field1]>
 98       Call-ID: [call_id]
 99       CSeq: 2 INVITE
100       Contact: <sip:[field0]@[local_ip]:[local_port];transport=[transport]>

101       [field2]
102       Max-Forwards: 7
103       Subject: Performance Test
104       User-Agent: Sipp
105       X-cid: [call_id]
106       Content-Type: application/sdp
107       Content-Length: [len]
108       Expires: 600
109 
110       v=0
111       o=[local_ip] 53655765 2353687637 IN IP[local_ip_type] [local_ip]
112       s=-
113       c=IN IP[local_ip_type] [local_ip]
114       t=0 0
115       m=audio [rtpstream_audio_port] RTP/AVP 0 8 101
116       a=rtpmap:0 PCMU/8000
117       a=rtpmap:8 PCMA/8000
118       a=rtpmap:101 telephone-event/8000
119       a=fmtp:101 0-16
120       a=sendrecv
121     ]]>
122   </send>
123 
124 
125   <recv response="100" optional="true">
126   </recv>
127 
128   <recv response="183" optional="true">
129   </recv>
130 
131   <recv response="200" rrs="true">
132   </recv>
133 
134   <!-- Packet lost can be simulated in any send/recv message by -->
135   <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
136   <send>
137     <![CDATA[
138 
139       ACK [next_url] SIP/2.0
140       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
141       [routes]
142       From: <sip:[field0]@[field1]>;tag=[call_number]
143       To:  <sip:[field3]@[field1]>[peer_tag_param]
144       Call-ID: [call_id]
145       CSeq: 2 ACK
146       Contact: sip:[field0]@[local_ip]:[local_port]
147       Max-Forwards: 7
148       User-Agent: Sipp
149       X-cid: [call_id]
150       Subject: Performance Test

151       Content-Length: 0
152     ]]>
153   </send>
154 
155 <!--
156   <nop>
157     <action>
158       <exec play_pcap_audio="g711u.pcap"/>
159     </action>
160   </nop>
161 -->
162 
163   <nop>
164     <action>
165         <exec rtp_stream="hahaha.wav,-1,0" />
166     </action>
167   </nop>
168 
169 
170 
171   <!-- <pause distribution="normal" mean="80000" stdev="1000"/> -->
172   <pause milliseconds="60000"/>
173 
174 
175   <!-- The 'crlf' option inserts a blank line in the statistics report.-->
176   <send retrans="2000">
177     <![CDATA[
178 
179       BYE [next_url] SIP/2.0
180       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]-BYE
181       From: <sip:[field0]@[field1]>;tag=[call_number]
182       To:  <sip:[field3]@[field1]>[peer_tag_param]
183       [routes]
184       Call-ID: [call_id]
185       CSeq: 3 BYE
186       Contact: sip:[field0]@[local_ip]:[local_port]
187       Max-Forwards: 7
188       Subject: Performance Test
189       User-Agent: Sipp
190       X-cid: [call_id]
191       Content-Length: 0
192 
193     ]]>
194   </send>
195 
196   <recv response="200" crlf="true">
197   </recv>
198 
199 
200   <ResponseTimeRepartition value="1000, 2000, 3000, 5000, 10000, 32000"/>

201 
202   <!-- definition of the call length repartition table (unit is ms)     -->
203 
204   <CallLengthRepartition value="1000, 5000, 10000, 15000, 20000, 25000, 30000"/>
205 </scenario>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值