[Asterisk-Users] * Stresstool Help required

Girish Gopinath gopinath_girish at hotmail.com
Fri Jan 2 07:24:15 MST 2004


Hi all,

I am trying to write a program that sends SIP requests to asterisk. My aim 
is to make asterisk record as many voicemails it can at a time. The design 
of the program is like this:
There are two processes: One main process and a child process (No flames 
pls. I have very little idea about pthreads and dl modules)

The main program asks the user to input the number of test instances. When 
the user inputs that (valid instances are: 1 - 50), it will spawn that many 
number of child processes that communicate with *. All of them get their own 
sip ports, rtp ports, and user names (for REGISTERing with *). There is a 
delay of 4 seconds before spawning each process. When i input 1, everything 
works fine (i guess). * records the voicemail (i am sending the contents of 
a .wav file to asterisk) .

Here is the screen capture:
*CLI>     -- Registered SIP 'gopi' at 192.168.68.15 port 5061 expires 120
  == Setting SIPDOMAIN to : 192.168.68.6
    -- Executing Dial("SIP/gopi-bddf", "SIP/stest|10|tr") in new stack
  == Everyone is busy at this time
    -- Executing Ringing("SIP/gopi-bddf", "") in new stack
    -- Executing Answer("SIP/gopi-bddf", "") in new stack
    -- Executing VoiceMail2("SIP/gopi-bddf", "u7777") in new stack
    -- Playing 'voicemail/default/7777/unavail' (language 'en')
    -- Playing 'vm-intro' (language 'en')
    -- Playing 'beep' (language 'en')
WARNING[15376]: File app_voicemail.c, Line 1236 (leave_voicemail): No more 
messages possible
    -- Executing Hangup("SIP/gopi-bddf", "") in new stack
  == Spawn extension (stresstest, 7777, 5) exited non-zero on 
'SIP/gopi-bddf'


The problem starts when i try to spawn more than one instance of the 
process. I tried with 2, both the instances got registered. The initial part 
of dialing is also ok. After that one of the child processes gets BYE 
request from *. The other child continues and * records voicemail for it.
Here is the screen capture of that:

    -- Registered SIP 'gopi' at 192.168.68.15 port 5061 expires 120
  == Setting SIPDOMAIN to : 192.168.68.6
    -- Executing Dial("SIP/gopi-7263", "SIP/stest|10|tr") in new stack
  == Everyone is busy at this time
    -- Executing Ringing("SIP/gopi-7263", "") in new stack
    -- Executing Answer("SIP/gopi-7263", "") in new stack
    -- Executing VoiceMail2("SIP/gopi-7263", "u7777") in new stack
    -- Playing 'voicemail/default/7777/unavail' (language 'en')
    -- Registered SIP 'nath' at 192.168.68.15 port 5062 expires 120
  == Setting SIPDOMAIN to : 192.168.68.6
    -- Executing Dial("SIP/nath-bedf", "SIP/stest|10|tr") in new stack
  == Everyone is busy at this time
    -- Executing Ringing("SIP/nath-bedf", "") in new stack
    -- Executing Answer("SIP/nath-bedf", "") in new stack
    -- Executing VoiceMail2("SIP/nath-bedf", "u7777") in new stack
    -- Playing 'voicemail/default/7777/unavail' (language 'en')
    -- Playing 'vm-intro' (language 'en')
    -- Playing 'vm-intro' (language 'en')
WARNING[5126]: File chan_sip.c, Line 469 (retrans_pkt): Maximum retries 
exceeded on call 00797B05-ADA8-4F6B-B0EC-51CA201E42DA at 192.168.68.15 for 
seqno 2 (Response)
WARNING[16400]: File file.c, Line 512 (ast_readaudio_callback): Failed to 
write frame
  == Spawn extension (stresstest, 7777, 4) exited non-zero on 
'SIP/gopi-7263'
    -- Playing 'beep' (language 'en')
WARNING[17425]: File app_voicemail.c, Line 1236 (leave_voicemail): No more 
messages possible
    -- Executing Hangup("SIP/nath-bedf", "") in new stack
  == Spawn extension (stresstest, 7777, 5) exited non-zero on 
'SIP/nath-bedf'

I gave the sip debug command, and one of the lines showed:"Ignoring this 
request"
Does that mean asterisk doesn't process 2 requests simultaneously, when it 
is sent from one machine? I know * is not a SIP proxy, it is a PBX. Is this 
problem related to that? If so, how * registered the two instances of the 
process? I tried with one instance of the test program from one machine, and 
SJPhone from another machine. Both worked fine.

Can anybody help me in figuring out the problem? I admit that there are many 
bugs in my program and i beleive that the problems are because of these bugs 
only. Still wanted to hear from you...

Warm Regards...

Girish

_________________________________________________________________
Gujarat Kite Fest at http://go.msnserver.com/IN/40247.asp 
www.gujaratkitefest.com




More information about the asterisk-users mailing list