测试环境

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. 【maven】Maven将中央仓库修改为阿里云的仓库地址

    <mirror> <id>nexus-aliyun</id> <mirrorOf>*</mirrorOf> <name>Nexu ...

  2. 全方位绕过软WAF攻略

    0×00 前言 现在软waf较为多,就在今年夏天苦逼挖洞的日子里经常遇到360主机卫士,安全狗,云锁之类的软waf进行拦截,经常碰到如下拦截提示: 看到以上三个拦截提示就让人头疼不已,欲罢不能. so ...

  3. 我是如何通过CSRF拿到Shell的

    织梦内容管理系统(DedeCms) 以简单.实用.开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展,目前的版本无论在功能,还是在易用性方面,都有 ...

  4. BumpMapping [转]

    http://fabiensanglard.net/bumpMapping/index.php Fabien Sanglard's Website Home About FAQ Email Rss T ...

  5. Java第三次实验要求

    实验三 类与对象(一) 一. 实验目的 1. 掌握类与对象的基本概念: 2. 掌握类的声明.创建与用法: 3. 掌握类的构造方法的定义与用法 4. 掌握类的成员变量.成员方法的定义与用法: 5. 理解 ...

  6. JD笔试试题(凭记忆写的+人生感悟 try finally )

    京东笔试:技术篇(一套卷.包含測试.算法,研发) 一:填空题(4分 * 15) 15 个 涉及的面很广的选择题,可是比較側重基础.包含数据结构的.c++类的,操作系统的,计算机网络的. 二:编程题(2 ...

  7. windows平台简易直播系统搭建

    最近做直播系统的朋友很多,正好前端时间也在做这一块,写片文章分享下开发心得,以为后用. 直播系统我将它分为前堆推流,后台服务,客户端播放三大部分.前端推流基于ffmpeg,后台服务 使用crtmp服务 ...

  8. CentOS 6.4安装Puppet

    CentOS安装Puppet   环境介绍:centos6.4x64 採用CentOS-6.4-x86_64-minimal.iso最小化安装   puppet版本号3.6.2.ruby1.8.7,f ...

  9. Cadence SPB 16. 6 安装步骤

    1.首先下载Cadence Allegro SPB orCAD16. 6 安装包,单击我,下载之后运行其中的setup.exe,然后先安装第一项License Manager

  10. WPF 的 MVVM

    Model——View——ViewModel http://www.cnblogs.com/fdyang/p/3877309.html