概述

在VOIP软交换的开发过程中,必然需要对软交换进行批量压测。

SIP压测工具一般都是sipp,免费,开源,功能足够强大,配置灵活,优点多。

环境

centos7.9

cmake3.6

sipp v3.6.2_rc1

安装cmake

安装cmake,centos7默认的cmake版本过低。

sudo yum install -y gcc gcc-c++ make automake

sudo yum install -y wget

sudo wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gz

sudo tar -zxvf cmake-3.6.2.tar.gz

sudo cd cmake-3.6.2

./bootstrap

make -j4

sudo make install

sudo ln -s /usr/local/bin/cmake /usr/bin/cmake

安装sipp

centos7目前的lksctp版本为1.0.17,只能支持sipp.3.6.2,不支持3.7以上。

sudo yum list lksctp*

sudo yum install lksctp-tools-devel

##git clone https://github.com/SIPp/sipp.git ##当前最新版本是3.7.0

git clone --branch v3.6.2_rc1 --depth=1 https://github.com/SIPp/sipp.git

cd sipp

cmake . -DUSE_SSL=1 -DUSE_SCTP=1 -DUSE_PCAP=1 -DUSE_GSL=1

make

sudo make install

sudo ln -s /usr/local/bin/sipp /usr/bin/sipp

sipp -v

sipp --help

测试

使用sipp内置脚本测试基本功能。

服务端uas。

sipp -sn uas -i 127.0.0.1

 

 

 

客户端uac。

sipp -sn uac 127.0.0.1

 

 

 

总结

sipp的github地址:https://github.com/SIPp/sipp

后续会有更多的压测方案和脚本慢慢写。

 

空空如常

求真得真