Sipp cheatsheet

Sipp is a free test tool and traffic generator for the SIP protocol. It uses XML format files to define test scenarios.

General usage: sipp remote_host[:remote_port] [options]

Some important command-line options:

-sf filename
Load test scenario from specified file.
-inf filename
Use CSV file to insert data substituted for [field0], [field1], etc into XML scenario. First line of file describes order of inserting field sets (SEQUENTIAL/RANDOM/USE).
-sn name
Use one of the embedded, predefined scenarios like "uac", "uas".
-r rate
Scenario execution rate, default value = 10 times per period, default period = 1000 ms.
-rp period
Scenario execution period [ms], combined with execution rate. Execution rate is combined of rate and period parameters, i.e. if period = 3500 and rate = 7 there will be 7 calls in 3.5 s.
-t transport mode
Set the transport mode: "u1" - UDP, one socket (default), "un" - UDP, one socket per call, other modes (TCP and with compression) available.
-max_socket max
Set the limit for simultaneously used sockets (for one socket per call mode). If limit is reached, sockets are reused.
-m calls
Stop and exit after specified tests count.
-s service
Set user part of the request URI (default: 'service'). Replaces [service] tag in XML scenario file.
-ap pass
Set password used for auth challenges (default: 'password').
-l limit
Limit simultaneous calls (default: 3 * call_duration (s) * rate).
-trace_msg
Log sent and received SIP messages (file: scenario_pid_messages.log).
-trace_err
Log error message to file (like "Discarding message which can't be mapped to a known SIPp call").

Simple scenario files with usage

These scenario files were tested with sipp-win32-2009-06-06.

OPTIONS

Send OPTIONS message 5 times to 30@192.168.1.211.

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

Send OPTIONS message 30 times to 30@192.168.1.211 waiting 200 ms for 200/OK reply each time.

    sipp 192.168.1.211 -sf OPTIONS_recv_200.xml -m 30 -s 30
    

REGISTER

Register to 192.168.1.106 using parameters from CSV file. If CSV file has more than one entry you can increase simultaneous call limit (-l option).

    sipp 192.168.1.106 -sf REGISTER_client.xml
      -inf REGISTER_client.csv -m 1 -l 1 -trace_msg -trace_err    
    

REGISTER + SUBSCRIBE application/dialog-info+xml (BLF)

Register to 192.168.1.211 using parameters from CSV file and start dialog-info subscription (RFC4235).

    sipp 192.168.1.211 -sf REGISTER_SUBSCRIBE_client.xml
        -inf REGISTER_SUBSCRIBE_client.csv -m 100 -l 2 -r 2
    

REGISTER + INVITE

SIPp is simulating 3 UACs, each one of them is making outgoing call. This scenario expects calls to be answered. Call targets are 3 other UACs configured to auto answer and play wav file (single pjsua instance with 3 accounts).

sipp and pjsua
    pjsua_vc6d --local-port=5068
        --id sip:33@192.168.1.211 --registrar sip:192.168.1.211
        --proxy sip:192.168.1.211 --realm * --username 33 --password 33
        --next-account --id sip:34@192.168.1.211 --registrar sip:192.168.1.211
        --proxy sip:192.168.1.211 --realm * --username 34 --password 34
        --next-account --id sip:35@192.168.1.211 --registrar sip:192.168.1.211
        --proxy sip:192.168.1.211 --realm * --username 35 --password 35
        --play-file file.wav --auto-answer 200 --auto-play
    

Each call is disconnected after 30 s. Call limit is this time smaller than number of CSV entries to avoid multiple calls to single target.

    sipp 192.168.1.211 -sf REGISTER_INVITE_client.xml
        -inf REGISTER_INVITE_client.csv -m 100 -l 2 -r 1 -rp 10000
    

REGISTER UAS + SUBSCRIBE application/dialog-info+xml (BLF) UAS

Little tricky scenario that requires two actual scenario files. Sipp is simulating registration and BLF subscription server that immediately terminates subscription with reason=noresource.
1) With tested UAC create registration account 30@your_pc_ip_address, no password. Create dialog-info+xml subscription for 108@your_pc_ip_address.
2) Run UAS REGISTER scenario and wait for the phone to log in. 3) Break REGISTER scenario by hitting Ctrl+C and run UAS SUBSCRIBE scenario.

    sipp -sf uas_register.xml
    sipp -sf uas_subscribe.xml
    

 "Cookie monsters": 221914    Parse time: 0.234 s