0
Installation SIPP & Command SIPP (pengujian trafik generator)
Posted by Alfian Abdul Ghaffar
on
06.19
Have you ever wondered what were
the capabilities of your Asterisk server in terms of ability to call
processing ? Well here is a tool that allows you to get an overview of
hardware and software limits of your Asterisk server. The tool is called
open source SIPP and is available via Sourceforge.
SIPP is a testing tool and a traffic generator based on SIP. It uses scenarios based user agent SipStone (UAC et UAS) and helps establish and terminate calls using the standard SIP INVITE and methods BYE.
SIPP provides a dynamic display of
statistics to test execution. For example, we can see the call rate
during, the round trip delay between client and server, and statistics
on the SIP messages. Besides, tool allows the use of TCP and UDP
connections on multiple, and the dynamic management of the current call
rate.
Its advanced features include support
for IPv6, la transmission sécurisée TLS, l’authentification SIP, use of
conditional scenarios, UDP broadcasts, regular expressions for the
extraction and reinjection protocol data, actions on messages such as
newspapers, system calls and stop calls, and the injection of data to
emulate real users.
You can also make the tool with the
transmission media through RTP audio replay "ECHO RTP" and "RTP pcap".
The media may be audio only or audio and video.
Designed for testing traffic, Stress and
Performance, SIPP can also be used for the execution of a single call,
providing a result of failure or instant success.
We will therefore use SIPP to emulate a number of user agents calling our Asterisk server.
Installation
Download the source code for the latest version "3.1" by executing the following command lines:
cd /usr/src
wget http://sourceforge.net/projects/sipp/files/sipp/3.1/sipp.3.1.src.tar.gz/download
tar-zxvf sipp.3.1.src.tar.gz
rm –f sipp.3.1.src.tar.gz
cd sipp.svn
make
wget http://sourceforge.net/projects/sipp/files/sipp/3.1/sipp.3.1.src.tar.gz/download
tar-zxvf sipp.3.1.src.tar.gz
rm –f sipp.3.1.src.tar.gz
cd sipp.svn
make
Configuration
We now need to add some code that will
receive calls from SIPP and treat. For this, we define an extension
7447, SIPP is on the telephone keypad, who will answer the call, play
music on hold 20 seconds and finally end the call. To do, Simply edit
the file / etc / asterisk / extensions_custom.conf and add the following
lines :
[sipp]
exten => 7447,1,Answer
exten => 7447,2,SetMusicOnHold(default)
exten => 7447,3,WaitMusicOnHold(20)
exten => 7447,4,Hangup
exten => 7447,1,Answer
exten => 7447,2,SetMusicOnHold(default)
exten => 7447,3,WaitMusicOnHold(20)
exten => 7447,4,Hangup
You should now allow SIPP connect to
your server and to handle calls. To do, Simply edit the file / etc /
asterisk / sip_custom.conf and add the following lines :
[sipp]
type=friend
context=sipp
host=dynamic
port = 6000
user=sipp
canreinvite = no
disallow=all
allow=ulaw
type=friend
context=sipp
host=dynamic
port = 6000
user=sipp
canreinvite = no
disallow=all
allow=ulaw
Now, do not forget to reload the configuration of Asterisk by running the following command line:
asterisk -rx reload
Field Test
Caution: Do not perform this test on a production system in operation, this could compromise the quality of your service users.
Before starting the stress test in our
server Asterisk, look at the current activity on the server via the
interface FreePBX. We should see that the activity in terms of active
call is zero.
Now, perform the test by running the following command line:
./sipp -sn uac -d 20000 -with 7447 127.0.0.1 -l 120
This test will use a user agent to
connect to the extension 7447 on the local interface (127.0.0.1) our
Asterisk server for a period of 20 seconds (20000 milliseconds). The
maximum limit in terms of simultaneous calls will be 120 Call.
You may use the following buttons to control how the test:
- 0 9: To move from one screen to another
- + , – , * , / : To adjust the quantity of calls
- q: Exit
- p : To pause
You can see the test results by
analyzing data from various screens SIPP. To move from one screen to
another, simply press the numbers 1 to 9.
During the test, Do not forget to watch
the current activity on the server via the interface FreePBX. You should
see that the activity in terms of appeal is 120 and can also see the
current load on your processor at that time.
Make variances by changing the settings SIPP. Make your own conclusions about the capabilities of your server.
Command Pengujian :
sipp -sn uac -d 1000 -s 1111 10.4.74.74 -r 5
Posting Komentar