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.
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:
| Package | Purpose |
|---|---|
libssl-dev | TLS/SSL transport for SIP over TLS |
libpcap-dev | RTP media replay from PCAP files |
libncurses5-dev | Real-time statistics display in terminal |
libsctp-dev | SCTP transport support |
libgsl-dev | Statistical 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:
| Flag | Description |
|---|---|
-sn uac | Use built-in UAC (client) scenario |
-m 100 | Stop after 100 calls |
-r 10 | Call rate (calls per period) |
-rp 1000 | Rate period in ms (1000 = per second) |
-l 50 | Max concurrent calls (limit) |
-d 5000 | Pause 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:
| Flag | Description |
|---|---|
-l 1000 | Max 1000 simultaneous calls |
-d 20000 | Each call lasts 20 seconds |
-trace_stat | Write periodic statistics to CSV |
-trace_err | Log errors to file |
-stf stats.csv | Statistics output file |
-fd 1 | Dump 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:
| Command | Description |
|---|---|
sipp -sn uas -p 5060 | Start built-in UAS on port 5060 |
sipp -sn uac HOST:5060 | Run built-in UAC against target |
sipp -sf file.xml HOST | Run custom XML scenario |
sipp -sd uac | Dump built-in UAC scenario to stdout |
-m N | Stop after N calls |
-r N -rp M | N calls per M milliseconds |
-l N | Max N concurrent calls |
-d N | Pause N ms between INVITE and BYE |
-s SERVICE | Set SIP service/called number |
-ap PASS | SIP authentication password |
-au USER | SIP authentication username |
-t tn | Use TCP transport (default UDP) |
-tls_cert FILE | TLS client certificate |
-inf FILE | Inject data from CSV file |
-trace_stat | Dump periodic stats to CSV |
-trace_err | Log errors to file |
-bg | Run 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.