VOIP

Install SIPp SIP Testing Tool on Ubuntu 24.04 / Debian 13

SIPp is an open-source SIP protocol testing tool and traffic generator. It handles both UAC (client) and UAS (server) scenarios, making it the standard tool for load testing SIP proxies, PBXs, and media servers. SIPp supports TCP, UDP, TLS, and SCTP transport, IPv6, SIP authentication, RTP media playback from PCAP files, and custom XML scenarios for complex call flows.

Original content from computingforgeeks.com - post 4046

This guide covers building SIPp from source on Ubuntu 24.04 / 22.04 and Debian 13 with full TLS, SCTP, PCAP, and GSL support. We build from the main branch to always get the latest features, with an option to pin a stable release. We also cover UAC/UAS testing, custom scenarios, and load testing. The official SIPp GitHub repository is actively maintained with regular releases.

Prerequisites

  • Ubuntu 24.04 / 22.04 or Debian 13 / 12
  • Root or sudo access
  • A SIP server to test against (Kamailio, Asterisk, or SIPp’s built-in UAS)

Step 1: Install Build Dependencies

SIPp requires CMake, a C++ compiler, and several development libraries for TLS, PCAP capture, SCTP transport, and statistical distributions.

sudo apt update
sudo apt install -y build-essential cmake git pkg-config \
  libssl-dev libpcap-dev libncurses5-dev libsctp-dev \
  lksctp-tools libgsl-dev

Each library enables a specific SIPp feature:

PackagePurpose
libssl-devTLS/SSL transport for SIP over TLS
libpcap-devRTP media replay from PCAP files
libncurses5-devReal-time statistics display in terminal
libsctp-devSCTP transport support
libgsl-devStatistical distributions for call timing

Step 2: Build and Install SIPp from Source

Clone the SIPp repository from the main branch to get the latest features and fixes. Building from source gives you full control over enabled features.

cd /usr/local/src
sudo git clone https://github.com/SIPp/sipp.git
cd sipp

If you prefer a specific stable release instead of the latest development code, check out a tag:

sudo git tag --sort=-v:refname | head -5
sudo git checkout v3.7.7

Configure the build with SSL, SCTP, PCAP, and GSL support enabled. The CMAKE_POSITION_INDEPENDENT_CODE flag is required on modern Ubuntu to avoid linker errors:

sudo cmake . -DUSE_SSL=1 -DUSE_SCTP=1 -DUSE_PCAP=1 -DUSE_GSL=1 \
  -DCMAKE_POSITION_INDEPENDENT_CODE=ON

CMake detects all dependencies and generates the build files. Now compile and install:

sudo make -j$(nproc)
sudo make install

Step 3: Verify Installation

Check the installed version to confirm all features compiled correctly:

sipp -v

The output shows the version and enabled features. Building from main shows the latest development version with a commit hash, while a tagged release shows a clean version number like below:

 SIPp v3.7.7-TLS-SCTP-PCAP-SHA256.

Step 4: Run a Basic SIP Test (UAC/UAS)

SIPp includes built-in scenarios for basic INVITE/BYE call flows. Start a UAS (server) on one terminal, then run a UAC (client) against it to verify everything works.

Start the UAS (SIP server) in the background on port 5060:

sipp -sn uas -p 5060 -bg

Run the UAC (SIP client) to place 5 test calls at 1 call per second:

sipp -sn uac 127.0.0.1:5060 -m 5 -r 1

A successful test shows all 5 calls completed with 0 failures:

------------------------------ Test Terminated --------------------------------
  Successful call        |        0                  |        5
  Failed call            |        0                  |        0
------------------------------ Test Terminated --------------------------------

Step 5: Test Against a Real SIP Server

To test against a real Kamailio or Asterisk server, point SIPp at its IP address. This sends INVITE/BYE sequences to the target server:

sipp -sn uac 10.0.1.50:5060 -m 100 -r 10 -rp 1000

This sends 100 calls at a rate of 10 calls per 1000 milliseconds (10 cps). Key flags:

FlagDescription
-sn uacUse built-in UAC (client) scenario
-m 100Stop after 100 calls
-r 10Call rate (calls per period)
-rp 1000Rate period in ms (1000 = per second)
-l 50Max concurrent calls (limit)
-d 5000Pause duration in ms between INVITE and BYE

Step 6: Test with SIP Authentication

Most SIP servers require authentication. Use the -ap flag for password and -s for the SIP service/user:

sipp -sn uac 10.0.1.50:5060 -s 1001 -ap secretpass -m 10 -r 1

For digest authentication with a specific username different from the service, use the -au flag:

sipp -sn uac 10.0.1.50:5060 -s 1001 -au testuser -ap secretpass -m 10 -r 1

Step 7: Create Custom XML Scenarios

SIPp’s real power is custom XML scenarios. Dump a built-in scenario to use as a template:

sipp -sd uac > custom_uac.xml

Edit the scenario to customize headers, timing, or add additional SIP methods. A simple registration test scenario:

sudo vi register_test.xml

Add the following REGISTER scenario that sends a registration request and expects a 200 OK response:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="REGISTER Test">
  <send retrans="500">
    <![CDATA[
      REGISTER sip:[remote_ip] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number]
      To: sipp <sip:sipp@[remote_ip]:[remote_port]>
      Call-ID: [call_id]
      CSeq: 1 REGISTER
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Expires: 3600
      Content-Length: 0
    ]]>
  </send>

  <recv response="200" rtd="true" />
</scenario>

Run the custom scenario:

sipp -sf register_test.xml 10.0.1.50:5060 -m 10 -r 1

Step 8: Load Testing and Stress Testing

For serious load testing, increase the call rate and concurrent calls. This example simulates 1000 concurrent calls at 50 calls per second with CSV-based caller data:

sipp -sn uac 10.0.1.50:5060 \
  -r 50 -rp 1000 \
  -l 1000 \
  -m 10000 \
  -d 20000 \
  -trace_stat -trace_err \
  -stf stats.csv -fd 1

Key load testing flags:

FlagDescription
-l 1000Max 1000 simultaneous calls
-d 20000Each call lasts 20 seconds
-trace_statWrite periodic statistics to CSV
-trace_errLog errors to file
-stf stats.csvStatistics output file
-fd 1Dump stats every 1 second

Step 9: Inject Data from CSV Files

For realistic testing with different caller IDs, use CSV injection. Create a data file with caller information:

sudo vi users.csv

Add user data with semicolon-separated fields. The first line defines the field delimiter:

SEQUENTIAL
1001;password1001;User One
1002;password1002;User Two
1003;password1003;User Three
1004;password1004;User Four
1005;password1005;User Five

Reference the CSV fields in your scenario XML with [field0], [field1], etc., and run with the -inf flag:

sipp -sf custom_uac.xml 10.0.1.50:5060 -inf users.csv -m 50 -r 5

Step 10: Test with RTP Media

SIPp can replay RTP media from PCAP files during calls. This is critical for testing media servers and RTPProxy setups. Use the -mp flag to set the local RTP port:

sipp -sn uac 10.0.1.50:5060 -m 5 -r 1 -mp 6000

For PCAP-based media replay, your XML scenario needs a play_pcap_audio action referencing a G.711 PCAP file. SIPp includes a sample in its source tree at pcap/g711a.pcap.

SIPp Command Reference

Quick reference for the most commonly used SIPp commands and flags:

CommandDescription
sipp -sn uas -p 5060Start built-in UAS on port 5060
sipp -sn uac HOST:5060Run built-in UAC against target
sipp -sf file.xml HOSTRun custom XML scenario
sipp -sd uacDump built-in UAC scenario to stdout
-m NStop after N calls
-r N -rp MN calls per M milliseconds
-l NMax N concurrent calls
-d NPause N ms between INVITE and BYE
-s SERVICESet SIP service/called number
-ap PASSSIP authentication password
-au USERSIP authentication username
-t tnUse TCP transport (default UDP)
-tls_cert FILETLS client certificate
-inf FILEInject data from CSV file
-trace_statDump periodic stats to CSV
-trace_errLog errors to file
-bgRun in background (daemon mode)

Conclusion

SIPp is installed and tested on Ubuntu. The tool handles everything from simple connectivity checks to high-volume stress tests with thousands of concurrent calls. For production load testing, run SIPp on a separate machine from your SIP server to get accurate performance numbers. Use the -trace_stat flag to capture CSV statistics and analyze call success rates, response times, and failure patterns over time. Check the SIPp documentation for advanced scenario syntax and media handling.

Related Articles

Ubuntu How To Install AnyDesk on Ubuntu 24.04 Ubuntu Installing Nginx With PHP-FPM on Ubuntu 24.04|22.04 Ubuntu How To Install Drupal 9 CMS on Ubuntu 20.04 Debian How To Install NetBox on Ubuntu 18.04 LTS

Press ESC to close