测试环境

asterisk  192.168.106.170

版本astrisk1.8

sipp   192.168.106.141

sipp版本3.3

安装依赖包
yum install make gcc gcc-c++ ncurses ncurses.x86_64 ncurses-devel ncurses-devel.x86_64 openssl libnet libpcap libpcap-devel libpcap.x86_64 libpcap-devel.x86_64 gsl gsl-devel

asterisk配置

sip.conf

[general]
context=default
allowoverlap=no
allowguest=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
language=cn
callevents=yes
limitonpeers=no
jbenable=yes [sipp] host=192.168.106.141
type=friend disallow=all
allow=g729
allow=g723
allow=ulaw
allow=alaw
context=sipp

extension.conf

[general]
static=yes
writeprotect=no
clearglobalvars=no [globals] [sipp]
exten => ,,Answer
exten => ,,SetMusicOnHold(default)
exten => ,,WaitMusicOnHold()
exten => ,,Hangup

sipp客户端配置

uac-media.xml

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd"> <!-- This program is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU General Public License as -->
<!-- published by the Free Software Foundation; either version of the -->
<!-- License, or (at your option) any later version. -->
<!-- -->
<!-- This program is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
<!-- GNU General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU General Public License -->
<!-- along with this program; if not, write to the -->
<!-- Free Software Foundation, Inc., -->
<!-- Temple Place, Suite , Boston, MA - USA -->
<!-- -->
<!-- Sipp 'uac' scenario with pcap (rtp) play -->
<!-- --> <scenario name="Basic Sipstone UAC">
<!-- In client mode (sipp placing calls), the Call-ID MUST be -->
<!-- generated by sipp. To do so, use [call_id] keyword. -->
<send retrans="">
<![CDATA[ INVITE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp<sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut<sip:[field1]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: INVITE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards:
Subject: Performance Test
Content-Type: application/sdp
Content-Length: [len] v=
o=user1 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[local_ip_type] [local_ip]
t=
m=audio [media_port] RTP/AVP
a=rtpmap: G729 ]]>
</send> <recv response=""
optional="true">
</recv> <!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="" rtd="true">
</recv> <!-- Packet lost can be simulated in any send/recv message by -->
<!-- by adding the 'lost = "10"'. Value can be [-] percent. -->
<send>
<![CDATA[ ACK sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: ACK
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards:
Subject: Performance Test
Content-Length:
]]>
</send> <!-- Play a pre-recorded PCAP file (RTP stream) -->
<nop>
<action>
<exec play_pcap_audio="pcap/g711a.pcap"/>
</action>
</nop> <!-- Pause seconds, which is approximately the duration of the -->
<!-- PCAP file -->
<pause milliseconds=""/> <!--This delay can be customized by the -d command-line option -->
<!--or by adding a'milliseconds = "value" option here -->
<pause/> <!-- The 'crlf' option inserts a blank line in the statistics report. -->
<send retrans="">
<![CDATA[ BYE sip:[field1]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:[field0]@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[field1]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: BYE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards:
Subject: Performance Test
Content-Length:
]]>
</send> <recv response="" crlf="true">
</recv> <!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/> <!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> </scenario>

44.csv

SEQUENTIAL
;;[authentication username= password=]

之后执行命令

./sipp -sf uac-media.xml -inf .csv -p  -i 192.168.106.141 -m  192.168.106.170 -l 

显示

Last Error: Aborting call on UDP retransmission timeout for Call-ID '281...
------------------------------ Scenario Screen -------- [-]: Change Screen --
Call-rate(length) Port Total-time Total-calls Remote-host
10.0( ms)/.000s 313.57 s 192.168.106.170:(UDP) new calls during 0.952 s period ms scheduler resolution
calls (limit ) Peak was calls, after s
Running, Paused, Woken up
dead call msg (discarded) out-of-call msg (discarded)
open sockets Messages Retrans Timeout Unexpected-Msg
INVITE ---------->
<----------
<---------- E-RTD1
ACK ---------->
Pause [ :]
Pause [ 0ms]
BYE ---------->
<---------- ------------------------------ Test Terminated --------------------------------

asterisk服务器显示

SIP/sipp-00000cb7    @sipp:          Up      WaitMusicOnHold()
SIP/sipp-00000a18 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb4 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3e @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb5 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3d @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab4 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb2 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab5 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb3 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3f @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab6 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb0 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000a3a @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab7 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000cb1 @sipp: Up WaitMusicOnHold()
SIP/sipp-00000ab0 @sipp: Up WaitMusicOnHold()
active channels
active calls
calls processed
[root@test asterisk]# asterisk -rx"core show channels"
 -----------------------------------

Can't create thread to send RTP packets,翻译过来就是“无法创建线程发送RTP数据包”

大概知道是需要设置ulimit ,但设置好像没有生效。在龙舟兄弟的指导与提醒下,索性直接ulimit -s unlimited,设置为不限制了。

如此之后,rtp就不受限制了。

 

xml实例文件

https://github.com/saghul/sipp-scenarios

最新文章

  1. ComboBox,三级联动菜单,新入门点小白,有些代码有待优化,大神勿喷
  2. 【读书笔记《Bootstrap 实战》】1.初识Bootstrap
  3. 攻城狮在路上(叁)Linux(二十五)--- linux内存交换空间(swap)的构建
  4. js库写法
  5. 转载--CentOS 6.3下部署LVS(NAT)+keepalived实现高性能高可用负载均衡
  6. nginx 配置优化的几个参数
  7. 002. C#生成GUID
  8. MVC&amp;WebForm对照学习:传值方式
  9. GNU 网络程序
  10. VS2010发布、打包安装程序
  11. Preview of Spring-framework :Spring框架的预习和自我整理
  12. Java基础总结--异常处理机制
  13. python可用ORM之Pony
  14. chrome浏览器再次打开黑屏一段时间
  15. (NO.00001)iOS游戏SpeedBoy Lite成形记(十二)
  16. Java进阶(五十三)屡试不爽之正则表达式
  17. MySQL 8.0版本连接报错:Could not create connection to database server.
  18. [官网]How to use distributed transactions with SQL Server on Docker
  19. JavaWeb学习篇--Filter过滤器
  20. 〖Windows〗Linux的Qt程序源码转换至Windows平台运行,编码的解决

热门文章

  1. 【java】RC4加密转16进制获取长度为40的不重复优惠码字符串 【未优化版本】
  2. SilverLight:基础控件使用(6)-Slider控件
  3. sqlite数据库改动及升级
  4. HTML5、CSS3等新特性:
  5. C#应该掌握的一些东西
  6. nanoporetech/nanonet
  7. adb tcp 调试
  8. Dynamic Language Runtime (DLR) 初深
  9. Spring中的JDBC操作
  10. 九度OJ 1103:二次方程计算器 (解方程)