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 <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

使用pcap 模式发送RTP 包,效率并不高,会有大量的软中断,不能支持大并发测试,

因为使用pcap 发送RTP的模式中, SIPP client 协商出的RTP  端口号是一个(不管有多少路),也即auto_media_port

没有为每一路分配单独的RTP 端口。

而且为了操作方便,每一路通话,SIPP 都创建了一个RAW socket, 这些socket 都绑定在一个端口上,

在高并发中,例如2000路并发,就有2000个raw socket 绑定在一个端口收发,这个软中断非常高。

为什么软中断比较高,可以参考raw socket 接收数据流程理解。

所以使用rtp_stream 方式会好很多。使用这种方式, 每一路都有自己的单独的RTP 端口。还有一个好处是

如果使用pcap的话, 这个wireshark 包大小需要自己控制, sipp并不能循环播放这个pcap包,但是使用rtp_stream

的话,就可以测试长时间通话了。

sipp basic call 脚本相关推荐

  1. VBS是基于Visual Basic的脚本语言,全称是:Microsoft Visual Basic Script Edition

    VBS是基于Visual Basic的脚本语言.VBS的全称是:Microsoft Visual Basic Script Edition.(微软公司可视化BASIC脚本版). 其语言类似Visual ...

  2. sipp介绍与脚本撰写(一)

    1.1.SIPp简介 SIPp是一个测试SIP协议性能的工具软件.它包含了一些基本的用户代理工作流程(UAC和UAS:UAC负责发起SIP呼叫请求,UAS接收UAC的请求并负责对其做出响应),并可使用 ...

  3. Basic脚本解释器移植到STM32

    上次讲了LUA移植到STM32,这次讲讲Basic脚本解释器移植到STM32.在STM32上跑Basic脚本,同样可以跟穿戴设备结合,也可以作为初学者学习MCU的入门工具,当然前提是有人做好Basic ...

  4. sipp脚本撰写(二)

    1.1脚本撰写 进行脚本撰写之前需要熟悉一些默认的参数关键字: 关键词 默认值 说明 [service] service 由参数-s传递,一般用来指定单个主被叫 [remote_ip] 远端设备地址 ...

  5. PowerDesigner运行自定义VBS脚本,复制Name到Comment

    1.说明 PowerDesigner支持自定义一些命令与操作, 通过编写VBS(Visual Basic Script)脚本, 可以扩展出更多的功能. 下面开发一个自定义的VBS脚本, 实现复制Nam ...

  6. [144]如何用VBS编写一个简单的恶搞脚本

    windows系统的电脑, 首先右击桌面,选择新建-文本文档,在桌面上新建一个文本文档: 随后打开计算机或者是我的电脑,点击其中的组织(xp系统多为工具),选择下面的文件夹和搜索选项 在弹出的窗口中点 ...

  7. 汇编语言、高级语言(系统语言)、脚本语言的异同

    汇编语言.高级语言(系统语言).脚本语言的异同 高级语言主要指需要编译的语言.如C/C++,Java,C#.脚本语言主要指解释型语言,编写的代码无需编译器编译,直接使用解释器放入虚拟机执行. 高级语言 ...

  8. VBS--Microsoft Visual Basic Script Edition(一)

    VBS是基于Visual Basic的脚本语言. 开发工具:记事本(Notepad).(是的!你没有看错!)其实任何一种文本编辑器都可以用来开发VBS, 只不过记事本是由系统自带的, 比较方便好找(建 ...

  9. vbs(Visual Basic Script) 笔记

    vbs(Visual Basic Script) 笔记 VBS是基于微软公司可视化Visual Basic的脚本语言,不编译成二进制文件, 直接由宿主(host)解释源代码并执行. vbsVisual ...

  10. SAP软件Script脚本重复操作功能了解下(懒人必备)

    声明:本文仅代表原作者观点,文|Elsa.仅用于SAP软件的应用与学习,不代表SAP公司.注:文中SAP相关字或图片,相应著作权归SAP所有. 不知道大家有无遇到过这种场景,某一个事务代码标准功能没有 ...

最新文章

  1. 值得收藏!7个值得下载的软件,让人大开眼界!
  2. 设置为true有什么区别_腻子粉和腻子膏到底有什么区别,腻子粉厂家来为你讲解...
  3. python3 __repr__ __str__ 区别
  4. 人工智能AI、机器学习和深度学习之间的区别是什么?
  5. 嵌入式笔录(4)-LC并联电路选频和AM解调
  6. dev-c++官网位置和源码/库位置
  7. 关于Promise.all
  8. python处理字典的方法_python字典的常用操作方法小结
  9. node.js fs.open 和 fs.write 读取文件和改写文件
  10. 现任明教教主DM×××的3G链路备份
  11. ubuntu防火墙问题
  12. 胡侃学习计算机--理论之外-From南大小百合
  13. 台式计算机主板,小白解惑-台式机电脑的主板是什么?该如何选购主板(1)
  14. php代码生成折现统计图
  15. 网络交换机的主要作用是什么?
  16. libvirt 问题解决记录集
  17. SSI服务端包含技术
  18. Java写时复制CopyOnWriteArrayList
  19. viso绘制技巧(例,绘制太极图)
  20. 查询任何一门课程成绩在70分以上的姓名、课程名称和分数

热门文章

  1. 爱豆被“调包”?周杰伦:说好不哭
  2. 海明贴近度matlab,Matlab学习系列23.-模糊聚类分析原理及实现.docx
  3. linux 监听 ipv6,zabbix 监控 ipv6
  4. 改进网易云音乐的“音乐社交”构想
  5. 余世维《成功经理人讲座》之重要又紧急的事情
  6. m115b linux 驱动下载,m115b驱动下载
  7. 这些孩子对计算机游戏上瘾英语,沉迷网络游戏高中英语作文
  8. Ribbon界面开发:如何创建Ribbon样式的应用程序框架
  9. 10款最佳SQL Server服务器监控工具
  10. PDF转CAD怎么弄?可以尝试一下这两种方法