I tried to create a simple test setup using SIPp to test the call processing performance of the sipX SIP proxy server version 2.8.1.
This is what I thought:
The current un-authenticated call rate as stated by the sipX team is 15 cps. Comparing this number with SIP proxy servers such as SER suggest that this is rather low. However, sipX is a full IP PBX with all the features. For authentication purposes it consists of two proxies: the SIP proxy and the auth proxy. Still, is it possible that just because media-server, config-server as well as the postgres database, Apache and JBoss all run on the same server makes such a difference?
SIPp UAC ------------ sipX proxy -------------- SIPp UAS |
sipX test scenario: (to be developed)
Receiver: |
This basic setup should work without any configuration of sipX, but it does not for the reasons pointed out above. It is possible to use the transmitter UAC scenario and place calls to a regular phone registered with sipX. The phone (tested with a Polycom SoundPoint IP501) shows the correct user agent behaviour and allows for correct call completion. The reverse, however, does not work: Using a phone (tested with Pingtel xpressa URL calling) to place calls to the SIPp UAS receiver does not work. The phone never receives the 180-Ringing response, even though it is sent by SIPp UAS.
Configuration of sipX:
Create a user test with the password (PIN) 123 |
In order for authentication to work it seems that the standard UAC scenario XML file needs to be extended as follows (copied from the example in the manual):
<recv response="407" auth="true"> </recv> <send> <![CDATA[ ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port] From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number] To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> </send> <send retrans="500"> <![CDATA[ INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port] From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number] To: sut <sip:[service]@[remote_ip]:[remote_port]> Call-ID: [call_id] CSeq: 2 INVITE Contact: sip:sipp@[local_ip]:[local_port] [authentication username=foouser] Max-Forwards: 70 Subject: Performance Test Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP4 127.0.0.1 s=- t=0 0 c=IN IP4 [media_ip] m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> </send> |
Built in scenarios are part of the executable code. In order to dump an existing scenario into a file use the following command:
./sipp -sd uac >uac.xml |
External scenarios can be loaded using the -sf option
./sipp -sf file.xml ..... |
Example SER test scenario: taken from here
SIPp cmd lines: |
Receiver:
-sn uas default SipStone scenario |
Transmitter:
-r 200 call rate in calls per second (200 cps) |
Note: the option -l laptop_ip for both receiver and transmitter seems to be an error. The option -i laptop_ip could be meant, however, the default value already provides the correct value.
SIPp Version:
I am using sipp.1.1rc2. download here
Reference: http://sipp.sourceforge.net/doc1.1/reference.html#installing
Compiling: |
make clean (use this command if you built sipp without OpenSSL first)
make ossl (compile with the authentication option enabled, requires OpenSSL) |
Open Ports:
nmap -sT -O host |
Scenario Definition:
Invite as per the default SipStone UAC scenario:
INVITE sip:service@remote_ip:remote_port SIP/2.0 |
v=0
o=user1 53655765 2353687637 IN IP4 127.0.0.1 |
Note: The identifier service can be passed on the command line as -s service_name.
I assume that the user with the User ID service_name has to exist in sipX.
Authentication:
Reference: http://sipp.sourceforge.net/doc1.1/reference.html#authentication
Example Registration (w/Auth) test scenario:
Here's an example test scenario that can be used to test the sipx proxy and registrar. The scenario file register_client.xml simulates an authenticated registration and the external CSV file register_client.csv is used to substitute values for username, domain, and authentication credentials. The following command can be used to run this scenario:
sipp -sf register_client.xml -inf register_client.csv -r 10 -trace_err -trace_stat -nd -fd 1 -i sender_ip sipx_ip |
{{Box File| SIPp register scenario register_client.xml|
<?xml version="1.0" encoding="ISO-8859-1" ?> <scenario name="register_client"> <send retrans="500"> <![CDATA[ REGISTER sip:[remote_ip] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: <sip:[field0]@[field1]>;tag=[call_number] To: <sip:[field0]@[field1]> Call-ID: [call_id] CSeq: 1 REGISTER Contact: sip:[field0]@[local_ip]:[local_port] Max-Forwards: 5 Expires: 1800 User-Agent: SIPp/Linux Content-Length: 0 ]]> </send> <recv response="401" auth="true"> </recv> <send retrans="500"> <![CDATA[ REGISTER sip:[remote_ip] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] From: <sip:[field0]@[field1]>;tag=[call_number] To: <sip:[field0]@[field1]> Call-ID: [call_id] CSeq: 2 REGISTER Contact: sip:[field0]@[local_ip]:[local_port] [field2] Max-Forwards: 5 Expires: 1800 User-Agent: SIPp/Linux Content-Length: 0 ]]> </send> <recv response="200"> </recv> </scenario> |
}}
{{Box File| SIPp register scenario external value injection CSV register_client.csv|
SEQUENTIAL user0;example.com;[authentication username=user0 password=123]; user1;example.com;[authentication username=user1 password=456]; |
}}
sip log files in sipX: |
syslogviewer is a filter that removes the escaping for newlines and otherwise makes the log files more readable. Use it in a pipe:
grep <call-id> /var/log/sipxpbx/sipproxy.log | syslogviewer | less |
syslog2siptrace is a translator that is used to convert log files into a the xml format used by sipviewer, which displays calls in a very readable ladder diagram.
grep <call-id> /var/log/sipxpbx/sipproxy.log | syslog2siptrace > log.xml |
syslogviewer reformats sip logs a bit better, replacing '\r\n' with real carriage returns
USAGE: |
syslog2siptrace turns sip log into XML. Only consumers today of XML is sipviewer
USAGE: |
sipviewer is a graphical SIP message viewer
USAGE: |
sipp remote_host.remote_port options |
Available options:
-v : Display version and copyright information. |
-bg : Launch SIPp in background mode.
-p local_port : Set the local port number. Default is a |
-i local_ip : Set the local IP address for 'Contact:',
'Via:', and 'From:' headers. Default is |
-inf file_name : Inject values from an external CSV file during calls
into the scenarios. |
-d duration : Controls the length (in milliseconds) of
calls. More precisely, this controls |
-r rate (cps) : Set the call rate (in calls per seconds).
This value can be changed during test by |
-rp period (ms) : Specify the rate period in milliseconds for the call
rate. |
-max_socket max : Set the max number of sockets to open simultaneously.
This option is significant if you use one socket |
-base_cseq n : Start value of cseq for each call.
-sf filename : Loads an alternate xml scenario file. |
-sn name : Use a default scenario (embedded in
the sipp executable). If this option is omitted, |
'uac' : Standard SipStone UAC (default).
'uas' : Simple UAS responder. |
Default 3pcc scanerios (see -3pcc option):
'3pcc-C-A' : Controller A side (must be started |
-sd name : Dumps a default scenario (embeded in
the sipp executable) |
-t u1 : Set the transport mode:
u1: UDP with one socket (default), |
It appears that you installed the
sippcomp.so plugin. 2 additionnal |
c1: u1 + compression,
cn: un + compression. |
-trace_msg : Displays sent and received SIP messages in
<scenario file name>_<ppid>_messages.log |
-trace_screen : Dump statistic screens in the
<scenario_name>_<ppid>_screens.log file when |
-trace_timeout : Displays call ids for calls with timeouts in
<scenario file name>_<ppid>_timeout.log |
-trace_stat : Dumps all statistics in <scenario_name>_<ppid>.csv
file. Use the '-h stat' option for a detailed |
-stf file_name : Set the file name to use to dump statistics
-trace_err : Trace all unexpected messages in |
-trace_logs : Allow tracing of <log> actions in
<scenario file name>_<ppid>_logs.log. |
-trace_rtt : Allow tracing of all response times in
<scenario file name>_<ppid>_rtt.csv. |
-rtt_freq freq : freq is mandatory. Dump response times
every freq calls in the log file defined |
-s service_name : Set the username part of the resquest URI.
Default is 'service'. |
-ap password : Set the password for authentication challenges.
Default is 'password' |
-tls_cert name : Set the name for TLS Certificate file.
Default is 'cacert.pem' |
-tls_key name : Set the name for TLS Private Key file.
Default is 'cakey.pem' |
-f frequency : Set the statistics report frequency on screen
(in seconds). Default is 1. |
-fd frequency : Set the statistics dump log report frequency
(in seconds). Default is 60. |
-l calls_limit : Set the maximum number of simultaneous
calls. Once this limit is reached, traffic |
-m calls : Stop the test and exit when 'calls' calls are
processed. |
-mp local_port : Set the local RTP echo port number. Default
is none. RTP/UDP packets received on that |
-mi local_rtp_ip : Set the local IP address for RTP echo.
-3pcc ip:port : Launch the tool in 3pcc mode ("Third Party
|
-nr : Disable retransmission in UDP mode.
-nd : No Default. Disable all default behavior of SIPp
|
-rsa host:port : Set the remote sending address to host:port.
for sending the messages. |
Signal handling:
SIPp can be controlled using posix signals. The following signals |
Exit code:
Upon exit (on fatal error or when the number of asked calls (-m |
Example:
Run sipp with embedded server (uas) scenario: |
Ethereal needs to be started with root priviledges in order to get access to the network interface. This only works if the DISPLAY variable is set correctly.
export DISPLAY=:0.0 |
</html>