SIPp is a free and open source tool for load and performance testing of SIP-based networks and services. It can generate SIP traffic in various call scenarios defined in XML files and collect statistics on call success rates and response times. The document provides an overview of SIPp's features and capabilities, how to create SIPp scenarios using keywords to inject values, and examples of using SIPp to test registration and call setup.
3. Getting Started
Low-level knowledge of the SIP protocol and SIP
signalling inside IMS
Scenarios files are written using XML
Download from http://sipp.sourceforge.net/
"SIPp is a free Open Source test tool and traffic
generator for the SIP protocol "
- sipp.sourceforge.net
Used for performance testing and traffic
generation for IMT (and can be used for mIMS,
but not PoC) Integration & Verification
4. SIPp Features
Support for both IPv4 and IPv6
RTP media support (PCAP)
Call rate distributions
– Fixed
– Uniform
– Exponential
Support Authentication
High Performance and Reliable
Allows Complex Sceneries
Can be controlled remotely (or externally)
Reports Statistics
5. Running SIPp
SIPp has an interactive and real-time command
line interface
Quite safe and stable to be left alone, or run in
the background (try to always use latest build)
Various statistics and reporting screens are
available
Exit codes:
– 0 (zero) indicate that all calls were successful
– 1 indicates that at least one call failed
– 97 indicates an abnormal exit on internal command
– 99 indicating a normal exit without processing calls
– -1 used to indicate a fatal error
8. Useful Command Line Options
-sf,loads an alternate scenario file
-inf, loads an external CSV file to inject values from
-r, sets the call rate (calls per second)
-rp, specify the rate period (ms) for the call rate (above)
– Example: -r 15 -rp 1000, 15 calls every second
-l, maximum number of simultaneous calls
-m, stop and exit when set number of calls are
processed
-i, sets the local IP address
-p, sets the local port number
9. Useful Command Line Options
-auth_uri,forces the domain value of the URI for
authentication (for example, 401)
-trace_screen,logs the final screens to file
(<scenario>_<pid>_screen.log)
-trace_err, logs unexpected messages to file
(<scenario>_<pid>_errors.log)
-trace_stat, logs statistics to file
(<scenario>_<pid>.csv)
-fd, logs statistics at set interval (seconds)
-nd, disable SIPp’s default behaviors
Finally, we end all SIPp commands with the remote host
(and port), for example the P-CSCF
10. SIPp Supports Authentication
Two authentication algorithms are supported:
– Digest / MD5 ("algorithm="MD5"")
– Digest / AKA
When receiving:
– 401 (Unauthorized)
– 407 (Proxy Authentication Required)
Simply add auth="true" in the <recv> command to take
the challenge into account
The authorization header will then be re-injected in the next
message using [authentication] keyword
11. Creating your own Scenarios
Authored using XML notation <?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
Unfortunately has spaghetti
<scenario name="UAC Basic Registration">
flow <label id="0" />
<send retrans="500" start_rtd="true">
– Using labels and jumps <![CDATA[
(next attributes) REGISTER sip:[field1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:
Useful elements: [local_port];branch=[branch]
From: [field0] <sip:
– <send> [field0]@[field1]>;tag=[call_number]
To: [field0] <sip:[field0]@[field1]>
– <recv> Call-ID: [call_id]
CSeq: [cseq] REGISTER
– <pause>, speech time Contact: [field0] <sip:
[field0]@[local_ip]:
– <nop>, no operation [local_port]>;expires=691200
Max-Forwards: 70
– <label> Content-Length: 0
]]>
Registration scenario walk </send>
through with authentication ...to be continued
Always put optional responses
first
12. Creating your own Scenarios
<recv response="200" rtd="true" next="3" <recv response="400" rtd="true" next="2"
optional="true" /> optional="true" />
<recv response="403" rtd="true" next="2" <recv response="403" rtd="true" next="2"
optional="true" /> optional="true" />
<recv response="404" rtd="true" next="2" <recv response="404" rtd="true" next="2"
optional="true" /> optional="true" />
<recv response="401" rtd="true" next="1" <recv response="200" rtd="true" next="3"
auth="true" crlf="true" /> crlf="true" />
<label id="1" /> <label id="2" />
<send retrans="500" start_rtd="true"> <nop>
er e
<![CDATA[ <action>
ends h
REGISTER sip:[field1] SIP/2.0 <exec int_cmd="stop_call" /> enario
sc
ls and
Via: SIP/2.0/[transport] [local_ip]:
[local_port];branch=[branch]
</action> Call fai
</nop>
From: [field0] <sip:
[field0]@[field1]>;tag=[call_number] ends
<label id="3" /> enario
To: [field0] <sip:[field0]@[field1]>
s s f ul
<!-- Definition of the response time and sc
Call-ID: [call_id] repartition table ll(unit eis ms). re
a s uc c
CSeq: [cseq] REGISTER
C he -->
<ResponseTimeRepartition value="30, 50, 80,
Contact: [field0] <sip: 100, 150, 200, 300, 400, 500, 600, 700,
[field0]@[local_ip]: 1000, 1200, 1400, 1500" />
[local_port]>;expires=691200
[field2] <!-- Definition of the call length
Max-Forwards: 70 repartition table (unit is ms). -->
Content-Length: 0 <CallLengthRepartition value="30, 50, 80,
]]> 100, 150, 200, 300, 400, 500, 600, 700,
1000, 1200, 1400, 1500" />
</send>
</scenario>
14. Creating your own Scenarios
Keywords from SIPp
Magic cookie (z9hG4bK) +
"UDP" or "TCP"
call number +
message index
<scenario name="UAC Basic Registration">
<send retrans="500" start_rtd="true"> Starts from "1" and
<![CDATA[
incremented by 1 for each call
REGISTER sip:[field1] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[field1]>;tag=[call_number]
To: [field0] <sip:[field0]@[field1]>
Call-ID: [call_id]
CSeq: [cseq] REGISTER
Contact: [field0] <sip:[field0]@[local_ip]:[local_port]>;expires=691200
Max-Forwards: 70
Content-Length: 0
]]>
</send>
Automatically
Identifies a call and is generated by
generates the CSeq
SIPp for each new call (mandatory)
number starting at 1
15. Useful SIPp Keywords
[len], Computed length of the SIP body used
in "Content-Length" header
[call_number], index of the call starting at 1
and is incremented by 1 for each call
[authentication], is used to include the
authentication header
[msg_index], provides the message number
in the scenario
[cseq], provides (or generates) the CSeq value
of the last (or next) request received
19. Definition of a call
Successful call:
– Navigates a scenario file from start to finish
– Does not encounter a “stop_call” (or other)
command
Unsuccessful (failed) call:
– Encounters a “stop_call”, “stop_now”,
“stop_gracefully” or other?
20. Example Time
The scenario:
– User 46706560000000 calls user 46706560003000,
– User 46706560000001 calls user 46706560003001,
– User 46706560000002 calls user 46706560003002 and so on…
Again we will use CSV files to inject who should call who
We assume everyone is provisioned and successfully
registered
We will use two scenario files:
– A Caller scenario file (to send INVITEs, pauses and BYEs)
– A Callee scenario file (to answer the INVITEs and BYEs)
21. The Caller
CSV Injection File
The Caller The Callee
[field0] [field1] [field2] [field3]
27. The Callee
The Callee only
<recv request="BYE" />
<send>
needs to reply to
<![CDATA[
SIP/2.0 200 OK
SIP messges from
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Contact: [field0] <sip:[field0]@[local_ip]:
the Caller
[local_port]>
Content-Length: 0
]]>
The Callee has no
</send>
<!-- Keep call open in case the 200 is lost to
logic flow
The Caller has all
be
able to retransmit it if we receive the BYE
again. -->
the logic flow
<pause milliseconds="4000" />
<ResponseTimeRepartition value="10, 20, 30, 40,
50, 100, 150, 200" />
– Remember all the labels and
<CallLengthRepartition value="10, 50, 100, 500,
1000, 5000, 10000" /> jumps (next)?
</scenario>
28. The Callee If running both the caller and callee
on the same computer ensure that
they use different ports
The
Scenario
29. References
SIPp documentation
http://sipp.sourceforge.net/doc/reference.html
SIPp in action
http://sipp.sourceforge.net/doc/images/sipp-01
Using the Statistics output with Excel
http://sipp.sourceforge.net/doc/images/sipp-02
Editor's Notes
Response list must have at least ONE mandatory (not optional=&quot;true&quot;) response code!