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. 十个WEB开发人员不可不知的HTML5工具

    Initializr 这是一个HTML5模板创建工具,帮助你得到持续的最新的HTML5样板文件. XRAY XRAY目前支持Safari, Firefox和IE浏览器,XRAY使用了CSS3的多个酷炫 ...

  2. MongoDB学习笔记(五)--复制集 && sharding分片

    主从复制                                                                                       主从节点开启 主节 ...

  3. 邮件发送(C#)

    using System;using System.Collections.Generic;using System.Text;using System.Net.Mail;using System.N ...

  4. 【小程序】wxs使用

    wxs使用 WXS(WeiXin Script)是小程序的一套脚本语言,结合WXML,可以构建出页面的结构. wxs可以说就是为了满足能在页面中使用js存在的,在wxml页面中,只能在插值{{ }}中 ...

  5. 织梦DeDeCms会员登录或退出跳转到首页的修改方法

    会员在主页登陆后,默认会跳转到会员中心,如果我们想登陆后,跳转到网站主页,那么就请参考下面的方法实现织梦DeDeCms会员登录或退出跳转到首页. 1.在根目录的member目录中找到index_do. ...

  6. Jmeter相关

    关于Jmeter,这里有一篇文章可以看看:http://www.cnblogs.com/TankXiao/p/4045439.html 给有需要的同学.

  7. Inside GDALAllRegister之四: 跳过driver

    这个函数很短小: /** * \brief This method unload undesirable drivers. * * All drivers specified in the space ...

  8. w3cschool菜鸟教程离线版chm手册正式发布

    w3cschool菜鸟教程是一个提供了最全的的web技术基础教程网站.网站包含了HTML教程.CSS教程.Javascript教程.PHP教程等各种建站基础教程.同时也提供了大量的在线实例,通过实例, ...

  9. storm0.9.0.1升级安装

    来自:http://blog.csdn.net/liuzhoulong/article/details/21112101 1,下载0.9.0.1 http://storm.incubator.apac ...

  10. css before和after伪元素应用

    1.说明 ":before" 伪元素可以在元素的内容前面插入新内容. ":after" 伪元素可以在元素的内容之后插入新内容. 伪元素默认展示为inline, ...