SIPp,VOIP并发测试、性能测试的神器。

本文记录一下常用的脚本文件。

一、reg.xml

此文件是sipp的执行的脚本流程。

<!-- -->
<!-- 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 default 'branchc' scenario. -->
<!-- -->
<scenario name="branch_client">
<send retrans="">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number]
To: [field0] <sip:[field0]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: REGISTER
Contact: sip:[field0]@[local_ip]:[local_port]
Content-Length:
Expires:
]]>
</send> <recv response="" auth="true" next="">
</recv> <!-- send invite with authentication messages -->
<label id=""/>
<send retrans="">
<![CDATA[
REGISTER sip:[field0]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
From: [field0] <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number]
To: [field0] <sip:[field0]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: REGISTER
Contact: sip:[field0]@[local_ip]:[local_port]
[field1]
Content-Length: [len]
Expires:
]]>
</send> <recv response="" >
</recv>
<pause milliseconds=""/> <!-- 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>

二、reg.csv

此文件是模拟注册的号码信息文件。

SEQUENTIAL
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]
;[authentication username= password=]

三、reg.sh

这是linux下的执行sipp的脚本文件。

./sipp -i 本地服务器地址 -sf reg.xml -inf reg.csv 注册服务器地址:端口 -l  -trace_msg -trace_screen -trace_err -p 本地服务器端口 -m  -aa

附、批量注册信息文件生成脚本

reg.csv的生成脚本
#!/bin/bash
i=
while [ $i != ]
do
i=$(($i+))
#echo “SEQUENTIAL” >test.csv
echo "$i;[authentication username=$i password=1234]" >>reg.csv
done

SIPp常用脚本之一:register注册的更多相关文章

  1. SIPp常用脚本之三:UAC

    UAC是作为SIP消息的发起端,可以控制消息速率什么的,方便极了. 一.uac.xml <?xml version="1.0" encoding="ISO-8859 ...

  2. SIPp常用脚本之二:UAS

    看名字就能猜出来,这是作为SIP消息服务端的存在,启动uas,等着接受SIP消息并且给出响应. 一.uas.xml <?xml version="2.0" encoding= ...

  3. Inno Setup的常用脚本

    Inno Setup的常用脚本 分类: VC++神奇理论 2012-12-06 10:07 3234人阅读 评论(2) 收藏 举报 安装不同的目录: [Files] Source: "我的程 ...

  4. [翻译]Component Registration in Script System 在脚本系统中注册组件

    Component Registration in Script System 在脚本系统中注册组件   To refer to our component from a script, the cl ...

  5. MS SQL 日常维护管理常用脚本(二)

    监控数据库运行 下面是整理.收集监控数据库运行的一些常用脚本,也是MS SQL 日常维护管理常用脚本(一)的续集,欢迎大家补充.提意见. 查看数据库登录名信息   Code Snippet SELEC ...

  6. 常用脚本语言Perl,Python,Ruby,Javascript一 Perl,Python,Ruby,Javascript

    常用脚本语言Perl,Python,Ruby,Javascript一 Perl,Python,Ruby,Javascript Javascript现阶段还不适合用来做独立开发,它的天下还是在web应用 ...

  7. shell常用脚本

    shell常用脚本 author:headsen chen  2017-10-17 15:36:17 个人原创,转载请注明,否则依法追究法律责任 1,vim  name.grep.sh 2,cat   ...

  8. Google常用脚本

    1.Tampermonkey 可下载常用脚本:https://greasyfork.org/zh-CN 2.常用FQSetupVPN 3.百度药丸屏蔽广告 4.百度文档可粘贴,下载 5.VIP视频可看

  9. 游戏编程之Unity常用脚本类的继承关系

    前言学习Unity开发引擎的初学者会接触大量的脚本类,而这些类之间的关系往往容易被忽略.本文对Unity引擎开发中的一些常用类及其关系进行了简单的归纳总结. 博文首发地址:http://tieba.b ...

随机推荐

  1. spring data 自定义查询

    spring data 自定义查询 https://www.cnblogs.com/airycode/p/6535635.html 在方法接口上面使用@Query

  2. Cognos 报表在列表上面显示汇总

    一直以来,Cognos Report Studio设计报表的时候,汇总默认显示在列表下方: 1如图,拖一个列表 2运行如下,数据显示正常按日期排序 3选中订单笔数.订单金额,添加自动汇总 4:运行,可 ...

  3. 同时安装不同版本JDK遇到的问题

    安装JDK1.8出现 Error opening registry key'software\Javasoft\Java Runtime Environment' java安装1.8后的问题:之前安装 ...

  4. PHP高级教程-Session

    PHP Session PHP session 变量用于存储关于用户会话(session)的信息,或者更改用户会话(session)的设置.Session 变量存储单一用户的信息,并且对于应用程序中的 ...

  5. c语言中static、extern、void的重载

    static:   1.在函数内部,表示该变量的值在各个调用间一直保持延续性:     2.在函数这一级,表示该函数只对本文件可见. extern: 1.用于函数定义,表示全局可见(属于冗余的):   ...

  6. “最大子序列和”算法 java

    maxSubSum各自是最大子序列和的4中java算法实现. 第一种算法执行时间为O(N^3),另外一种算法执行时间为O(N^2),第三种算法执行时间为O(nlogn),第四种算法执行时间为线性N p ...

  7. C语言的角落——C之很常使用特性(一)

    本文搜集整理了一些之前博客中没有提到的,C语言不经常使用的特性,算是对C系列的最后一次补充. 对C语言有兴趣的朋友能够浏览一下,查漏补缺. 变长參数列表 <stdarg.h> 头文件定义了 ...

  8. Linux不用使用软件把纯文本文档转换成PDF文件的方法

    当你有一大堆文本文件要维护的时候,把它们转换成PDF文档会好一些.比如,PDF更适合打印,因为PDF文档有预定义布局.除此之外,还可以减少文档被意外修改的风险. 要将文本文件转换成PDF格式,你要按照 ...

  9. C语言位域精解(转)

    有些信息在存储时,并不需要占用一个完整的字节, 而只需占几个或一个二进制位.例如在存放一个开关量时,只有0和1 两种状态,用一位二进位即可.为了节省存储空间,并使处理简便,C语言又提供了一种数据结构, ...

  10. servlet常用操作

      servlet常用操作 CreateTime--2017年9月7日09:36:43 Author:Marydon 1.获取当前应用程序对象 需要导入: import javax.servlet.S ...