如何在Ubuntu 18.04/Ubuntu 16.04上安装SIPP测试工具
SIPP是一个开源SIP协议测试工具/流量生成器,包括一些基本的Sipstone用户代理场景(UAC和UA)。
它能够使用INVITE和BYE方法建立和发布多个呼叫。
SIPP还可以阅读从非常简单到复杂呼叫流程的自定义XML方案文件。
sipp.
动态显示关于运行测试的统计信息(呼叫速率,往返延迟和消息统计)定期CSV统计转储TCP和UDP在多个套接字上或者用重传管理IPv6,TLS,SCTP,SIP身份验证,条件方案的转发管理呼叫Ratessupport ,UDP重传,错误鲁棒性(呼叫超时,协议防御)支持呼叫特定变量,POSIX正则表达式以提取和重新注入任何协议字段,在消息RECEDIAPPORT上提取和重新注入任何协议字段,对现场注入的消息支持从外部CSV文件模拟直播用户。
它可以通过RTP echo和RTP/PCAP重播的媒体(RTP)流量。
支持音频或者视频媒体Filestit可以测试SIP代理,B2BUA,SIP媒体服务器等各种真实的SIP设备,SIP/x网关,SIP PBX,
在针对流量,压力和性能测试优化的同时,SIPP可用于运行一个单个呼叫并退出,提供传递/失败的验证。
我们可以轻松地模拟数千名用户代理商调用SIP系统
安装SIPP依赖包装
通过在终端上运行以下命令来安装sipp所需的依赖项。
sudo apt-get install -y pkg-config dh-autoreconf ncurses-dev build-essential libssl-dev libpcap-dev libncurses5-dev libsctp-dev lksctp-tools
完成下载后,继续在Ubuntu 18.04/Ubuntu 16.04服务器上下载和编译SIPP。
下载并安装sipp
我们将从GitHub Master分安装Sipp以获取最新版本。
确保在系统中安装Git。
sudo apt -y install git
从GitHub克隆项目
git clone https://github.com/SIPp/sipp.git
现在使用提供的脚本构建SIPP build.sh
。
这将摘掉GTEST子骨髓内蒙代托机池FilesRun ConfigureBuild并运行Test SuiteBuild Sipp
使用SSL,PCAP和SCTP支持构建SIPP,运行:
cd sipp ./build.sh --with-pcap --with-sctp --with-openssl
如果构建成功,你会得到一个 sipp
BINARS文件中的二进制文件。
将此文件复制到目录 /usr/local/bin
。
cp sipp /usr/local/bin/
你现在应该能够打电话 sipp
命令从任何目录。
一般用法
sipp remote_host[:remote_port] [options]
最重要的选择包括:
-sf filename : Load test scenario from a specified file. -sd : Dumps one of the default scenarios. Usage example: sipp -sd uas > uas.xml. -inf filename: Inject values from an external CSV file during calls into the scenarios -sn name : Use a default scenario (embedded in the SIPp executable). UAC scenario is loaded by default if no option is provided. -r rate : Set the call rate (in calls per seconds), default value = 10 times per period, default period = 1000 ms. -rp : Specify the rate period for the call rate. Default is 1 second and default unit is milliseconds -m calls : Stop and exit after specified tests count. -s service : Set user part of the request URI (default: 'service'). Replaces [service] tag in XML scenario file. -ap pass : Set password used for auth challenges (Default is: 'password'). -l limit : Limit simultaneous calls (default: 3 * call_duration (s) * rate). -recv_timeout : Global receive timeout. Default unit is milliseconds. If the expected message is not received, the call times out and is aborted. -trace_msg : Displays sent and received SIP messages in <scenario file name>_<pid>_messages.log -trace_err : Trace all unexpected messages in <scenario file name>_<pid>_errors.log.
要查看帮助页面和所有可用选项,请使用:
sipp --help
例子:
使用嵌入式服务器(UAS)方案运行sipp: sipp -sn uas
在同一主机上,使用嵌入式客户端(UAC)方案运行SIPP:
sipp -sn uac 127.0.0.1
发送10个选项邮件Hyman @ oniTorad
sipp 10.1.1.20 -sf OPTIONS.xml -m 10 -s 100