[asterisk-dev] Spring is here :: Test the Asterisk Spring Collection 2006!

Kristian Kielhofner kris at krisk.org
Mon Apr 10 13:07:25 MST 2006


Olle E Johansson wrote:
> Oh, I have no perfect configuration... The SIP accounts are minimal,  
> just names, passwords, contexts and IP address.
> 
> 
> This is the interesting part on both sides:
> 
> [enterprise]
> exten => _X.,1,set(number=$[${EXTEN} + 1])
> exten => _X.,n,verbose 
> (----------------------------------------------------------------------- 
> ------- ${EXTEN} ------------)
> exten => _X.,n,gotoif($[${number} = 250]?ready,1)
> exten => _X.,n,dial(SIP/enterprise/${number})
> exten => _X.,n,hangup
> exten => ready,1,answer
> exten => ready,n,wait(1)
> exten => ready,n,playback(tt-monkeys)
> exten => ready,n,wait(1)
> exten => ready,n,hangup
> 
> I start the call by calling 10 at enterprise from the console and then  
> wait until I either hear monkeys
> or see a total mess on the screen.
> 
> We should be able to create a svn repository with various test  
> configurations, that are fixed.
> - One SIP stress test
> - One IAX2 stress test
> - One Realtime stress test
> - Codec conversion tests
> 
> Good idea.
> /O


Olle,

	I see.  One of my scenarios uses a bash script to generate calls like so:

if [ ! $1 ]
then
echo "Usage:

$0 account calls delay

"
exit 1
fi

for i in `seq 1 $2`
do
echo "Channel: Local/$1 at call
MaxRetries: 1
RetryTime: 60
WaitTime: 30
Context: loadtest
Extension: $1
Priority: 1" > /tmp/scratch/$i.call && mv \
/tmp/scratch/*.call /tmp/scratch/spool/
sleep $3
done

	I'll find the related Asterisk config portions, but it allows me to 
test the number of calls (with a limit) as well as "calls per second". 
It doesn't have perfect resolution, but it has been accurate enough for 
my tests.

	/tmp/scratch is mounted as tmpfs, and /var/spool/asterisk/outgoing is 
symlinked to "/tmp/scratch/spool".

	I also try to record the audio stream to /tmp/scratch with Monitor or 
Record.  I have been able to get Record to work, but Monitor only writes 
out 160 bytes before stopping (while the RTP continues to flow).  Oh 
well, another issue, another thread.

--
Kristian Kielhofner



More information about the asterisk-dev mailing list