最近在做云平台SIP网关软件信令的压力测试,由于实际没有那么多真实的SIP终端用来测试,需要自己来写相关的SIP模拟软件,或者使用开源的SIP软件来测试,自己写SIP模拟软件成本太高,通过网上搜索相关资料,SIPP压力测试可以满足相关需求,最终决定使用该软件做为SIP压力测试软件。
SIPP软件源码下载和编译,这里使用的是SIPP-3.3版本,在linux下解压sipp-3.3.tar.gz,进入解压后的目录,进行编译,编译成功后会生成sipp的可执行二进制文件。
然后使用SIPP的help命令查看了相应的参数,执行压力测试,具体如下:
./sipp -aa -d 90000000 -max_sched_loops 2500 -sn uac -m 2500 -l 2500 -i 10.33.32.240 -p 6060 -s 01012345678 10.33.32.240
-aa : Enable automatic 200 OK answer for INFO, UPDATE and NOTIFY messages.
-d : Controls the length of calls. More precisely, this controls the duration of 'pause' instructions in the scenario, if they do not have a 'milliseconds' section.Default value is 0 and default unit is milliseconds.
-max_sched_loops : Set the maximum number of calsl run per event loop.Increase this value for high traffic level. The default value is 1000.
-sn : Use a default scenario (embedded in the sipp executable).
If this option is omitted, the Standard SipStone UAC
scenario is loaded.
Available values in this version:
- 'uac' : Standard SipStone UAC (default).
- 'uas' : Simple UAS responder.
- 'regexp' : Standard SipStone UAC - with regexp and
variables.
- 'branchc' : Branching and conditional branching in
scenarios - client.
- 'branchs' : Branching and conditional branching in
scenarios - server.
Default 3pcc scenarios (see -3pcc option):
- '3pcc-C-A' : Controller A side (must be started after
all other 3pcc scenarios)
- '3pcc-C-B' : Controller B side.
- '3pcc-A' : A side.
- '3pcc-B' : B side.
-m : Stop the test and exit when 'calls' calls are processed
-l : Set the maximum number of simultaneous calls. Once this
limit is reached, traffic is decreased until the number
of open calls goes down. Default:
(3 * call_duration (s) * rate).
-i : Set the local IP address for 'Contact:','Via:', and 'From:' headers. Default is primary host IP address.
-p : Set the local port number. Default is a random free port chosen by the system.
-s : Set the username part of the resquest URI. Default is 'service'.
其它参数可以使用sipp的help命令查看,这里不在一一列举。
每次测试我们自己的SIP网关软件,每次递增500个呼叫,最终测试软件的最高并发数。