测试环境

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

sipp 对asterisk 进行压力测试的更多相关文章

  1. 使用SwingBench 对Oracle RAC DB性能 压力测试

    我们可以使用swingbench这个工具对数据库性能进行压力测试,得到一些性能指标作为参考. SwingBench下载: http://www.dominicgiles.com/downloads.h ...

  2. linux压力测试工具stress

    最近给PASS平台添加autoscaling的功能,根据服务器的负载情况autoscaling,为了测试这项功能用到了stress这个压力测试工具,这个工具相当好用了.具体安装方式就不说了.记录下这个 ...

  3. JMeter压力测试

    Apache JMeter是Apache组织开发的基于Java的压力测试工具.用于对软件做压力测试,它最初被设计用于Web应用测试但后来扩展到其他测试领域. 它可以用于测试静态和动态资源例如静态文件. ...

  4. kafka性能参数和压力测试揭秘

    转自:http://blog.csdn.net/stark_summer/article/details/50203133 上一篇文章介绍了Kafka在设计上是如何来保证高时效.大吞吐量的,主要的内容 ...

  5. 开发 ASP.NET vNext 续篇:云优化的概念、Entity Framework 7.0、简单吞吐量压力测试

    继续上一篇<开发 ASP.NET vNext 初步总结(使用Visual Studio 2014 CTP1)>之后, 关于云优化和版本控制: 我本想做一下MAC和LINUX的self-ho ...

  6. Jmeter教程 简单的压力测试

    Jmeter教程 简单的压力测试:http://www.cnblogs.com/TankXiao/p/4059378.html

  7. HTTP压力测试工具

    HttpTest4Net是一款基于C#实现的和HTTP压力测试工具,通过工具可以简单地对HTTP服务进行一个压力测试.虽然VS.NET也集成了压力测试项目,但由于VS自身占用的资源导致了在配置不高的P ...

  8. 微软压力测试工具 web application stress

    转自 http://www.cnblogs.com/tonykan/p/3514749.html lbimba  铜牌会员 这里给广大的煤油推荐一个web网站压力测试工具.它可以用来模拟多个用户操作网 ...

  9. 使用Microsoft Web Application Stress Tool对web进行压力测试

    Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试一些Web服务器的运行状态和响应时间等等,对于Web服务器的承受力测试是个非常好的手法.Web 压力测试通常是利用一些工具,例如微软 ...

随机推荐

  1. android_浅析canvas的save()和restore()方法

    <span style="font-size:18px;"> </span> <span style="font-size:18px;&qu ...

  2. 【OpenGL】OpenGL帧缓存对象(FBO:Frame Buffer Object) 【转】

    http://blog.csdn.net/xiajun07061225/article/details/7283929/ OpenGL Frame BufferObject(FBO) Overview ...

  3. POJ 3978(求素数)

    知识点:      1.求素数的test,从2~sqrt(n):           2.假设数据非常多,能够用素数表记录,然后sum=prime[m]-prime[n]求得! ! !! !!! !! ...

  4. [Python-tools]defaultdict的使用场景

    Python标准库中collections对集合类型的数据结构进行了非常多拓展操作.这些操作在我们使用集合的时候会带来非常多的便利.多看看非常有优点. defaultdict是当中一个方法,就是给字典 ...

  5. 整合Hibernate3.x

    As of Spring 3.0, Spring requires Hibernate 3.2 or later. Hibernate 3和Hibernate 4有一些区别,所以对于spring而已, ...

  6. vs项目添加链接文件

    在vs2012(或以后版本)中,从一个项目中拖拽文件到另一项目,并按住alt键,会生成链接文件. 项目文件中会生成link节点. <ItemGroup> <Compile Inclu ...

  7. SpringBoot学习之验证信息国际化

    以登录为例: 1.controller的登录方法: @RequestMapping("/SSOAuth/login") @ResponseBody public ResponseV ...

  8. 内核顶层Makefile相关3

    http://www.groad.net/bbs/simple/?f104.html 伪目标 .PHONY是一个特殊工作目标(special target),它用来指定一个假想的工作目标,也就是说它后 ...

  9. Python生成器定义

    通过列表生成式,我们可以直接创建一个列表.但是,受到内存限制,列表容量肯定是有限的.而且,创建一个包含100万个元素的列表,不仅占用很大的存储空间,如果我们仅仅需要访问前面几个元素,那后面绝大多数元素 ...

  10. Error (167005): Can't assign I/O pad "GX_TX" to PIN_AG27 because this causes failure in the placement of the other atoms in its associated channel

    1.同时在两个GX的bank,建立两GX ip core 会出现 两个IP的cal_blk_clk信号,要保持是同一个时钟