SIPp for SIP traffic simulation
SIPp is a free Open Source SIP traffic generator. It allows to design call scenarios via xml file and then execute them. A call scenario described in an xml file is basically a SIP call flow, in which it is possible to define in detail the various SIP messages to be simulated, starting from a simple scenario with REGISTER - 200OK sequence, to more complex scenarios with re-INTIVE, REFER, etc…
It is a very light tool in terms of resource allocation, so it’s great for creating stress test scenarios with thousands of calls, but at the same time it can be used to create single call tests. SIPp can perform call scenarios working both as UAS (SIP Server) and as UAC (SIP Client), and also includes the possibility of managing media via RTP echo and RTP pcap play. In addition, it includes reporting functions needed to monitor the progress of the current scenario.
In short, it is an extremely configurable and easy to use tool in all those cases in which we have to go and test SIP traffic applications.
Setup
The installation is quite simple, here we see the steps on a CentOS server.
So let’s first install the necessary dependency
yum install gcc gcc-c++ ncurses-devel ncurses
Then we proceed with downloading the archive and generating the executable file.
cd /usr/local/src
curl -LO https://sourceforge.net/projects/sipp/files/sipp/3.4/sipp-3.3.990.tar.gz
tar -xvzf sipp-3.3.990.tar.gz
mv sipp-3.3.990 /opt/sipp
cd /opt/sipp
./configure
make
Once started, SIPp will display the following information on the screen
Call flow configuration
Obviously, here we will not go into detail about all the possibilities that SIPp offers for the execution of call flows (for this you can refer to the rich documentation available on the official site), but we will see how to activate a simple UAC-type scenario, where SIPp sends the INVITE, and one UAS-type, where instead SIPp receives the INVITE.
The two sample call flows are the following, you can download them directly from here.
- UAC: basic_uac.xml
- UAS: basic_uas.xml
Therefore, to start SIPp with the UAC type scenario, we execute the following command:
./sipp -l 1 -m 1 -s callednum -sf basic_uac.xml 10.0.1.215:5060
In this way the system starts loading the scenario basic_uac.xml and sends a single call for the destination callednum to the server 10.0.1.215:5060
- -l set the maximum number of simultaneous calls
- -m stop the test and exit when ‘calls’ calls are processed
- -s set the username part of the resquest URI, it is assigned to [service] variable inside the xml scenario
- -sf is the scenario to load
If we want to start SIPp with the UAS-type scenario, we execute the command:
./sipp -sf basic_uas.xml
In this way the system will load the basic_uas.xml scenario, waiting for incoming calls.
- -sf is the scenario to load
In this case no other options are needed, at least for a basic use of the system, given that in UAS mode SIPp is waiting to receive traffic.