- On Linux, SIPp is provided in the form of source code. You will need to compile SIPp to actually use it.
- Pre-requisites to compile SIPp are (see ):
- C++ Compiler
- curses or ncurses library
- For authentication and TLS support: OpenSSL >= 0.9.8
- For pcap play support: libpcap and libnet
- For distributed pauses:
- You have four options to compile SIPp:
- Without TLS (Transport Layer Security) and
authentication support: This is the recommended setup if
you don't need to handle SIP authentication and/or TLS. In this
case, there are no depencies to install before
building SIPp. It is straight forward:
# gunzip sipp-xxx.tar.gz
# tar -xvf sipp-xxx.tar
# cd sipp
# make - With TLS and
support, you must have installed (>=0.9.8) (which
may come with your system). Building SIPp consist only in adding
the "ossl" option to the make command:
# gunzip sipp-xxx.tar.gz
# tar -xvf sipp-xxx.tar
# cd sipp
# make ossl - With and without
support:
# gunzip sipp-xxx.tar.gz
# tar -xvf sipp-xxx.tar
# cd sipp
# make pcapplay - With and
support:
# gunzip sipp-xxx.tar.gz
# tar -xvf sipp-xxx.tar
# cd sipp
# make pcapplay_ossl
以上原文,太要看看了。安装的时候就要决定你可以测试什么样的SIP系统。
只make无参数的话只能是测试无密码验证的sip系统;要测试正规的sip系统就需要带ossl。
第二步:配置文件
SIPP需要两个配置文件一个是xml文件里面是SIP包体框架,一个是csv文件里面是被测系统中用户名密码。
xml格式:
csv格式:SEQUENTIAL
User0001;[authentication username=joe password=schmo]
User0002;[authentication username=john password=smith]
User0003;[authentication username=betty password=boop]
网上一个好人提供里一段生成CSV文件的bash脚本(适用于注册),内容如下:
#!/bin/bash
i=3000
echo "SEQUENTIAL" > test.csv
while [ $i != 3100]
do
i=$(($i+1))
echo "$i;[authentication username=$i password=$i]" >> test.csv
done
第三步:执行
sipp -sf test.xml -inf test.csv -i 10.10.10.10(本机IP) -p 5000(本机端口) -m 1(测试次数) test.sip.com:5060(被测SIP系统地址或域名加端口号)
另外:-trace_**是个好东西,可以生成测试日志,其中_msg可以把SIP的收发包写成日值记录下来,便于调试。
以上仅仅是SIPP做为sip系统的测试工具的应用,做为测试sip终端的工具相关以后补上。