测试环境

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. 【Tensorflow】tf.argmax函数

    tf.argmax(input, axis=None, name=None, dimension=None) 此函数是对矩阵按行或列计算最大值   参数 input:输入Tensor axis:0表示 ...

  2. SilverLight:布局(2)GridSplitter(网格分割)垂直分割、水平分割

    ylbtech-SilverLight-Layout: 布局(2)GridSplitter(网格分割)垂直分割.水平分割 A, Splitter(分割)对象之 GridSplitter(网格分割)1: ...

  3. python 列表结构更新的奇妙问题

    使用python + plt 画图遇到了一个奇怪的问题 应该出来的是这样: 结果做出来以后是这样: 为什么画到一起了...... 这个锅python列表背 a=[1,2]b=a  这样  改变b ,a ...

  4. spring security开发步骤

    1.web.xml中加载spring ,spring security 2.spring security配置文件中配置好.... 3.自己写一个myFilter代替原有的FilterSecurity ...

  5. Odoo10尝鲜: 采购协议

    Odoo10 对 call for bid 进行了 改进, 作为 '采购协议' 进入 采购, 选择 'Purchase agreement' 在 agreement 列表 建立新的 协议 选择 协议类 ...

  6. 新建 .NET Core 控制台项目 C# 数组深拷贝

    新建 .NET Core 控制台项目 1. 安装 .NET Core SDK 1.0 参考微软官方网站 https://www.microsoft.com/net/download/windows 2 ...

  7. hdu3251 最小割

    题意: 给n个城市,m条有向边.每条边有权值,如今有些城市能够选择得到.可选的城市有一个价值.可是要满足从1到达不了这些城市,为了满足要求能够去掉一些边,须要花费边的权值,问终于得到的最大价值是多少, ...

  8. initializer_list、初始化列表、列表初始化

    什么是列表初始化 使用一个花括号来初始化变量,表现形式如下: std::vector<int>a{1,2,3,4,5}; 或者 std::vector<int>a = {1,2 ...

  9. Ubuntu16.04上安装mongoDB

    安装MongoDB 现在最新版本是3.4 1: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F37303 ...

  10. 误用了 react-scripts eject 命令

    react 小白编程 由于使用 create-react-app 脚手架构建项目的时候,会给几个命令用 其中一个命令吸引了我的注意力  yarn eject,因为构建完成后特别提示说“你不会想要用到这 ...