System performance test/simulation using SIPp
SIPp is a traffic generator for the SIP protocol that can be used to generate a large number of calls on Asterisk and therefore simulate system load.
Official website: http://sipp.sourceforge.net/
This setup assumes a back-to-back setup, but this can be simulated on a single machine with multiple T1/E1s.
Configure Asterisk on both servers
Generate your Wanpipe configuration files, zaptel.conf and zapata.conf using the wancfg_zaptel utility and assign your spans to the from-zaptel context, and group 1. Modify your /etc/asterisk/sip.conf to accept incoming calls from SIPp.
The configuration files are identical on both Asterisk servers.
Example of sip.conf
--------------------------------------------
[general]
tos=none
dtmfmode=info
allow=alaw
allow=ulaw
[127.0.0.1]
type=friend
callerid=112
host=dynamic
canreinvite=no
context=from-sipp
dtmfmode=rfc2833
qualify=2000
--------------------------------------------
Example of extensions.conf
--------------------------------------------
[general]
static=yes
writeprotect=yes
autofallthrough=yes
clearglobalvars=yes
priorityjumping=yes
[globals]
;forward calls coming from SIPp to the Zaptel trunk.
[from-sipp]
exten => _X.,1,Answer
exten => _X.,2,Dial(Zap/g1/111)
exten => _X.,3,HangUp
;this is for incoming calls coming from the other server
[from-zaptel]
exten => _X.,1,Answer
exten => _X.,2,playback(demo-congrats)
exten => _X.,3,HangUp
--------------------------------------------
Start Asterisk on both servers and confirm that the spans come up on both sides.
Install SIPp
Download SIPp from http://sipp.sourceforge.net/
Untar and compile SIPp
#> tar xvfz sipp.1.0.tar.gz
#> cd sipp
#> make
Launch SIPp
./sipp -r 1 -l 1 -d 5000 -mo 1000009 -s 8989 -p 5061 -sn uac 127.0.0.1
For additional SIPp options and information, type ./sipp
Monitor your system
Open a separate session for each.
For system load: #>vmstat -n 20
For overruns (system misses interrupts): #> ifconfig <if_name>
And check 'overruns' counters.
For system log: #> tail -f /var/log/messages
For line errors: #> wanpipemon -i <if_name> -c Ta