SIPp Introduction
SIPp Introduction
Agenda
SIPp Basics Running SIPp
Statistics and Screens Command Line Options
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
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
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
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
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>
Identifies a call and is generated by SIPp for each new call (mandatory)
<scenario name="UAC Basic Registration"> <send retrans="500" start_rtd="true"> <![CDATA[ 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>
Definition of a call
Successful call:
Navigates a scenario file from start to finish Does not encounter a stop_call (or other) command
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)
The Caller
CSV Injection File
The Caller
[field0]
[field1]
[field2]
The Caller
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE scenario SYSTEM "sipp.dtd"> <scenario name="UAC Basic Invite"> <label id="0" /> <send retrans="500" start_rtd="true"> <![CDATA[ INVITE sip:[field3]@[field1] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: [field0] <sip:[field0]@[field1]>;tag=[call_number]-INVUAC To: [field3] <sip:[field3]@[field1]> Call-ID: [call_id] CSeq: [cseq] INVITE Contact: [field0] <sip:[field0]@[local_ip]:[local_port]> Max-Forwards: 70 Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=SIPp-UAC c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> </send> <recv response="100" rtd="true" /> <recv response="180" rtd="true" /> <recv response="400" rtd="true" next="3" optional="true" /> <recv response="401" rtd="true" next="3" optional="true" /> <recv response="403" rtd="true" next="3" optional="true" /> <recv response="404" rtd="true" next="3" optional="true" /> <recv response="200" rtd="true" next="1" /> <label id="1" /> <send> <![CDATA[ ACK [next_url] SIP/2.0 [last_Via:] [last_From:] [last_To:] [last_Call-ID:] CSeq: [cseq] ACK Max-Forwards: 70 Subject: Performance Test Content-Length: 0 [routes] ]]> </send> <pause milliseconds="60000" next="2" /> optional="true" optional="true" rrs="true" rrs="true" rrs="true" rrs="true" rrs="true"
The Caller
<label id="2" /> <send retrans="500" start_rtd="true"> <![CDATA[ BYE [next_url] SIP/2.0 [last_Via:] [last_From:] [last_To:] [last_Call-ID:] CSeq: [cseq] BYE Max-Forwards: 70 Subject: Performance Test Content-Length: 0 [routes] ]]> </send> <recv response="400" rtd="true" optional="true" /> <recv response="401" rtd="true" optional="true" /> <recv response="403" rtd="true" optional="true" /> <recv response="404" rtd="true" optional="true" /> <recv response="408" rtd="true" optional="true" /> <recv response="200" rtd="true" crlf="true" /> next="3" next="3" next="3" next="3" next="3" next="4" <label id="3" /> <nop> <action> <exec int_cmd="stop_call" /> </action> </nop> <label id="4" /> <!-- Definition of the response time repartition table (unit is ms). --> <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200" />
<!-- Definition of the call length repartition table (unit is ms). --> <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000" />
</scenario>
The Caller
Call rate
P-CSCF or ACME
The Scenario
Message Counter
The Callee
CSV Injection File
The Callee
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE scenario SYSTEM "sipp.dtd"> <send retrans="500"> <![CDATA[
SIP/2.0 200 OK [last_Via:] [last_From:] [last_To:];tag=[call_number]-INV-UAS [last_Call-ID:] [last_CSeq:] [last_Record-Route:] Contact: [field0] <sip:[field0]@[local_ip]:[local_port]> Content-Type: application/sdp Content-Length: [len]
v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=SIPp-UAS c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> </send> <recv request="ACK" optional="true" crlf="true" />
The Callee
<recv request="BYE" /> <send> <![CDATA[ SIP/2.0 200 OK [last_Via:] [last_From:] [last_To:] [last_Call-ID:] [last_CSeq:] Contact: [field0] <sip:[field0]@[local_ip]:[local_port]> Content-Length: 0 ]]> </send> <!-- Keep call open in case the 200 is lost to be able to retransmit it if we receive the BYE again. --> <pause milliseconds="4000" /> <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200" /> <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000" /> </scenario>
The Callee only needs to reply to SIP messges from the Caller The Callee has no logic flow The Caller has all the logic flow
Remember all the labels and jumps (next)?
The Callee
If running both the caller and callee on the same computer ensure that they use different ports
The Scenario
References
SIPp documentation http://sipp.sourceforge.net/doc/reference.h tml SIPp in action http://sipp.sourceforge.net/doc/images/sip p-01.wmv Using the Statistics output with Excel http://sipp.sourceforge.net/doc/images/sip p-02.wmv