当前位置: 代码迷 >> 综合 >> sipp basic call 脚本
  详细解决方案

sipp basic call 脚本

热度:62   发布时间:2024-01-26 13:06:04.0

  1 <?xml version="1.0" encoding="ISO-8859-1" ?>
2 <!DOCTYPE scenario SYSTEM "sipp.dtd">

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 <scenario name="basiccall">
22   <send retrans="500">
23     <![CDATA[
24 
25       INVITE sip:[field3]@[field1] SIP/2.0
26       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
27       From: <sip:[field0]@[field1]>;tag=[call_number]
28       To: <sip:[field3]@[field1]>
29       Call-ID: [call_id]
30       CSeq: 1 INVITE
31       Contact: sip:[field0]@[local_ip]:[local_port]
32       Max-Forwards: 7
33       Subject: Performance Test
34       User-Agent: Sipp
35       X-cid: [call_id]
36       Content-Type: application/sdp
37       Content-Length: [len]
38 
39       v=0
40       o=[local_ip] 53655765 2353687637 IN IP[local_ip_type] [local_ip]
41       s=-
42       c=IN IP[local_ip_type] [local_ip]
43       t=0 0
44       m=audio [rtpstream_audio_port] RTP/AVP 8 0 101
45       a=rtpmap:0 PCMU/8000
46       a=rtpmap:101 telephone-event/8000
47       a=fmtp:101 0-16
48       a=sendrecv
49     ]]>
50   </send>
51 
52   <recv response="100" optional="true">
53   </recv>
54 
55   <recv response="407" auth="true">
56       <action>
57         <ereg regexp="branch=(.*)"
58               search_in="hdr"
59               header="Via: "
60               assign_to="8"/>
61     </action>
62   </recv>
63 
64   <!-- By adding rrs="true" (Record Route Sets), the route sets    -->
65   <!-- are saved and used for following messages sent. Useful to test-->
66   <!-- against stateful SIP proxies/B2BUAs.                     -->
67   <!-- Packet lost can be simulated in any send/recv message by  -->
68   <!-- by adding the 'lost = "10"'. Value can be [1-100] percent.-->
69   <send>
70     <![CDATA[
71 
72       ACK sip:[field3]@[field1]:[remote_port] SIP/2.0
73       Via: SIP/2.0/[transport] [local_ip]:[local_port];[$8]
74       From: <sip:[field0]@[field1]>;tag=[call_number]
75       To:  <sip:[field3]@[field1]>[peer_tag_param]
76       Call-ID: [call_id]
77       CSeq: 1 ACK
78       Contact: sip:[field0]@[local_ip]:[local_port]
79       Max-Forwards: 7
80       User-Agent: Sipp
81       X-cid: [call_id]
82       Subject: Performance Test
83       Content-Length: 0
84     ]]>
85   </send>
86 
87 
88   <send retrans="500">
89     <![CDATA[
90 
91       INVITE sip:[field3]@[field1]:[remote_port] SIP/2.0
92       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
93       From: <sip:[field0]@[field1]>;tag=[call_number]
94       To: <sip:[field3]@[field1]>
95       Call-ID: [call_id]
96       CSeq: 2 INVITE
97       Contact: <sip:[field0]@[local_ip]:[local_port]>; expires=600
98       [field2]
99       Max-Forwards: 7
100       Subject: Performance Test
101       User-Agent: Sipp
102       X-cid: [call_id]
103       Content-Type: application/sdp
104       Content-Length: [len]
105       Expires: 600
106 
107       v=0
108       o=[local_ip] 53655765 2353687637 IN IP[local_ip_type] [local_ip]
109       s=-
110       c=IN IP[local_ip_type] [local_ip]
111       t=0 0
112       m=audio [rtpstream_audio_port] RTP/AVP 8 0 101
113       a=rtpmap:0 PCMU/8000
114       a=rtpmap:101 telephone-event/8000
115       a=fmtp:101 0-16
116       a=sendrecv
117     ]]>
118   </send>
119 
120 
121   <recv response="100" optional="true">
122   </recv>
123 
124   <recv response="183" optional="true">
125   </recv>
126 
127   <recv response="200">
128   </recv>
129 
130   <!-- Packet lost can be simulated in any send/recv message by -->
131   <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
132   <send>
133     <![CDATA[
134 
135       ACK sip:[field3]@[field1]:[remote_port] SIP/2.0
136       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
137       From: <sip:[field0]@[field1]>;tag=[call_number]
138       To: <sip:[field3]@[field1]>[peer_tag_param]
139       Route: <sip:10.100.125.17:5060;lr>
140       Call-ID: [call_id]
141       CSeq: 2 ACK
142       Contact: sip:[field0]@[local_ip]:[local_port]
143       Max-Forwards: 7
144       Subject: Performance Test
145       User-Agent: Sipp
146       X-cid: [call_id]
147       Content-Length: 0
148     ]]>
149   </send>
150 
151 <!--
152   <nop>
153     <action>
154       <exec play_pcap_audio="g711u.pcap"/>
155     </action>
156   </nop>
157 -->
158 
159   <nop>
160     <action>
161         <exec rtp_stream="hahaha.wav,-1,0" />
162     </action>
163   </nop>
164 
165 
166 
167   <!-- <pause distribution="normal" mean="80000" stdev="1000"/> -->
168   <pause milliseconds="56000"/>
169 
170 
171   <!-- The 'crlf' option inserts a blank line in the statistics report.-->
172   <send retrans="2000">
173     <![CDATA[
174 
175       BYE sip:[field3]@[field1]:[remote_port]; SIP/2.0
176       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
177       From: <sip:[field0]@[field1]>;tag=[call_number]
178       To:  <sip:[field3]@[field1]>[peer_tag_param]
179       Route: <sip:10.100.125.17:5060;lr>
180       Call-ID: [call_id]
181       CSeq: 2 BYE
182       Contact: sip:[field0]@[local_ip]:[local_port]
183       Max-Forwards: 7
184       Subject: Performance Test
185       User-Agent: Sipp
186       X-cid: [call_id]
187       Content-Length: 0
188     ]]>
189   </send>
190 
191   <recv response="200" crlf="true">
192   </recv>
193 
194   <ResponseTimeRepartition value="1000, 2000, 3000, 5000, 10000, 32000"/>
195   <CallLengthRepartition value="1000, 5000, 10000, 15000, 20000, 25000, 30000"/>
196 </scenario>
197 

  相关解决方案