Thursday 10 September 2015

SIPP installation and testing Asterisk with SIPP stress test tool

By vm  |  06:36 4 comments

1. Install required packages
$ sudo apt-get install build-essential libncurses5-dev
2. Download, extract and compile SIPp
$ wget "http://downloads.sourceforge.net/project/sipp/sipp/3.2/sipp.svn.tar.gz?r=&ts=1314783436&use_mirror=puzzle" -O sipp.svn.tar.gz
$ tar -xzf sipp.svn.tar.gz
$ cd sipp.svn
$ make
3. Set up the SIP server
Note these instructions are for configuring the Asterisk open source PBX, for other platforms you will need to consult the documentation.
First, define the SIP peer by adding to the end of sip.conf:
[sipp]
type=friend
context=sipp
host=dynamic
port=6000
user=sipp
canreinvite=no
disallow=all
allow=alaw
allow=ulaw
Next set up some extensions that we will use to test by adding to the end of extensions.conf (this assumes a default Asterisk installation where the demo context exists, if not then point calls at some other context that has e.g. an IVR menu or similar):
[sipp]
exten => 1001,1,Answer
exten => 1001,n,SetMusicOnHold(default)
exten => 1001,n,WaitMusicOnHold(20)
exten => 1001,n,Hangup
exten => 1002,1,Answer
exten => 1002,n,Goto(demo,s,1)
exten => 1002,n,Hangup
Finally load the new configuration into asterisk:
$ asterisk -rx 'module reload'
4. Start testing
There are various simple tests that can be done without creating your own scenarios, such as:
1. Simple concurrent call test
$ ./sipp -sn uac -d 10000 -s 1001 <asterisk's IP address> -l 10
This will execute 10 concurrent calls (the -l parameter) with each call lasting 10s (the -d parameter in ms) to extension 1001. Note that this simple test does not actually establish an RTP connection, and thus does not actually place full load on the system.
2. Testing with media
$ ./sipp -sn uac -d 10000 -s 1002 <asterisk's IP address> -l 10 -mp 5606
This executes 10 concurrent calls, each lasting 10s to extension 1002 using the ulaw codec.
When running SIPp will display a screen showing various statistics such as the number of calls in progress, the number completed and some information about the SIP messages it has sent. It also shows any errors it has received. To stop a test, simply press ‘q’.
By playing around with the duration (-d) and limit (-l) parameters you can normally find the limit of your system’s scalability. It is also often an idea to leave the test running at a reasonable call level for a long period of time, this will help identify any memory leaks or similar that will likely cause problems over time.
Note that while SIPp will verify that an RTP connection is established, it will not check the quality – the simplest way to do this is to set up your call load using SIPp, then make a manual call through the system to check the quality is acceptable.
Notes
  • If the machine you are running SIPp on has multiple network interfaces, it may not correctly identify which interface to use for the outbound traffic – to correct this use the -bind_local option, e.g. to use the IP address 192.168.1.1 for outbound traffic you would add “-bind_local 192.168.1.1
  • If you stop a test without letting all the calls clean up, and then attempt to start another, the new one may report errors as it receives SIP messages from the server relating to calls initiated by the previous test – it’s always best to let a test fully clean up

Author: vm

Hello, I am Author, decode to know more: In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In commodo magna nisl, ac porta turpis blandit quis. Lorem ipsum dolor sit amet.

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Dear VM, thank you for useful info.

    Below is example how to use sipp to make single test call and print exit code of sipp. Exit code 0 means successfull call.

    This can be used with zabbix.

    sipp -sn uac -d 2000 -s called_num voip_server -mp 15000 -l 1 -m 1 -rtp_echo &> /dev/null; echo $?

    ReplyDelete
    Replies
    1. Hi Vlad,

      Did you manage to run it on zabbix?

      Delete

E-mail Newsletter

Sign up now to receive breaking news and to hear what's new with us.

Recent Articles

© 2014 VOIP4Learn. WP themonic converted by Bloggertheme9. Powered by Blogger.
TOP