SIPp is a free open source testing tool and traffic generator for the SIP protocol. It includes a few basic SipStone user agent scenarios (UAC and UAS), establishes and releases multiple calls with the INVITE and BYE methods, can read custom XML scenario files (describing simple to very complex call flows), and can be used to test various real SIP equipment (such as SIP proxies, B2BUAs, SIP media servers, SIP/x gateways, SIP PBX, and more). Finally, the SIPp tool can emulate thousands of simultaneous user agents, calling into your system, to see how your network and SIP system handles serious stress testing.

I want to show you how to install SIPp on Ubuntu Server 18.04 and then demonstrate some simple examples. Do note, this tool is command line only, so if you’re looking for a GUI for testing, look elsewhere.

SEE: Quick glossary: Software-defined networking (Tech Pro Research)

What you need

In order to make this work, you need a fully updated Ubuntu Server 18.04 installation and a SIP system to test. With that in place, let’s install SIPp.

Install dependencies

The first thing to do is install the necessary dependencies. Open a terminal window and issue the following command:

sudo apt-get install -y pkg-config dh-autoreconf ncurses-dev build-essential libssl-dev libpcap-dev libncurses5-dev libsctp-dev lksctp-tools

If you don’t already have git installed, do so with the command:

sudo apt-get install -y git

Install SIPp

Now we’ll download and install SIPp. To do this, we’ll make use of git with the command:

git clone https://github.com/SIPp/sipp.git

Change into the newly created directory with the command cd sipp. Build SIPp with the command:

./build.sh --with-pcap --with-sctp --with-openssl

Copy the SIPp binary with the command:

sudo cp sipp /usr/local/bin/

Using SIPp

You’re now ready to use SIPp to test your SIP. The general usage of SIPp is:

sudo sipp remote_host:port options

To run SIPp with an embedded server scenario (UAS), issue the command:

sudo sipp -sn uas

You should see the SIPp application running on your system (Figure A).

Figure A

Figure A

Running the UAS Scenario.

To quit the test, hit the q key on your keyboard.

You can also create XML scenarios (for testing puposes). A basic scenario file will start with:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Basic Sipstone UAC">

And end with:

</scenario>

To get a head start on scenario files, you can export the built in files with the sipp command. Say you want to edit the UAC_PCAP scenario. To do that, issue the command:

sudo sipp -sd uac_pcap >> integrated_uac_pcap_scenario.xml

You should now see the scenario file named integrated_uac_pcap_scenario.xml. Edit that file to fit your needs and then run it like so:

sudo sipp -i 192.168.1.203 -p 8832 -sf integrated_uac_pcap_scenario.xml -l 1 -m 1 -r 1 -s 111 192.168.1.162

The following describes the options used:

  • -l limit Limit simultaneous calls (default: 3 * call_duration (s) * rate).
  • -m calls Stop and exit after specified tests count.
  • -r rate Scenario execution rate, default value = 10 times per period, default period = 1000 ms.
  • -s service Set user part of the request URI (default: ‘service’). Replaces [service] tag in XML scenario file.

You could also create an OPTIONS.xml file with the following content:

<?xml version="1.0" encoding="us-ascii"?>
<scenario name="Options">
        <send>
                <![CDATA[
OPTIONS sip:[service]@[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 70
To: <sip:[service]@[remote_ip]>
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
Call-ID: [call_id]
CSeq: 1 OPTIONS
Contact: <sip:sipp@[local_ip]:[local_port]>
Accept: application/sdp
Content-Length: 0

]]>
        </send>
</scenario>

Save and close that file.

To send the OPTIONS message (using our OPTIONS.xml file) 5 times to 30@192.168.1.203 (assuming 192.168.1.203 is either a server or client making use of the SIP protocol), the command would be:

sudo sipp 192.168.1.211 -sf OPTIONS.xml -m 5 -s 30

To learn more about editing and creating your own scenarios, check out the SIPp documentation on the subject.

Scratching the surface

We’ve only scratched the surface of SIPp testing. It’s a fairly complicated testing tool and one that does require the administrator have plenty of knowledge of both the SIP protocol and the associated tools. I highly recommend going through the SIPp documentation, prior to using the tool. There’s a lot to read, but once you’ve gone through it, you’ll be able to use the command to stress test your SIP-enabled network to see how well it fares against heavy usage.

Also see

Image: Jack Wallen