[Asterisk-Users] SIP and AGI crash...

Steven Critchfield critch at basesys.com
Tue Jan 13 12:06:26 MST 2004


On Tue, 2004-01-13 at 10:55, Tristan 'Minty' Colgate wrote:
> Hi,
> 
>   I'm trying to use the say-ani agi asterisk-perl script and am experiencing
> crashes, I am also experienceing problems with the test-agi scripts shipped
> with asterisk.
> 
>   The clearest demonstration of the problem is that if I dial extension 125
> configured as...
> 
> exten => 125,1,Ringing
> exten => 125,2,Wait(3)
> exten => 125,3,Answer
> exten => 125,4,Wait(2)
> exten => 125,5,AGI(agi-sayani.agi)
> exten => 125,6,Hangup
> 
>  I can crash the asterisk server by hanging up during the call, if I leave the
> call to complete and let * hang up then everything seems fine. Asterisk does
> not crash if I am running from the console, only if asterisk has been started
> in the background (it does still crash if I am attached via asterisk -r at the 
> time the call is hung up).
> 
>   Using the agi test script (on extension 126, same config as above) I get the
> following...
> 
> *CLI>     -- Executing Ringing("SIP/-08135e80", "") in new stack
>     -- Executing Wait("SIP/-08135e80", "3") in new stack
>     -- Executing Answer("SIP/-08135e80", "") in new stack
>     -- Executing Wait("SIP/-08135e80", "2") in new stack
>     -- Executing AGI("SIP/-08135e80", "agi-test2.agi") in new stack
>     -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-test2.agi
> AGI Environment Dump:
>  -- accountcode =
>  -- callerid = "SNOM Phone 1543" <8552>
>  -- channel = SIP/-08135e80
>  -- context = sip-gw
>  -- dnid = unknown
>  -- enhanced = 0.0
>  -- extension = 126
>  -- language = en
>  -- priority = 5
>  -- rdnis = unknown
>  -- request = agi-test2.agi
>  -- type = SIP
>  -- uniqueid = 1074011198.0
> 1.  Testing 'sendfile'...PASS (0)
> 2.  Testing 'sendtext'...PASS (0)
> 3.  Testing 'sendimage'...PASS (0)
>     -- Playing 'digits/1' (language 'en')
>     -- Playing 'digits/hundred' (language 'en')
>     -- Playing 'digits/90' (language 'en')
>     -- Playing 'digits/2' (language 'en')
>     -- Playing 'digits/million' (language 'en')
>     -- Playing 'digits/8' (language 'en')
>     -- Playing 'digits/hundred' (language 'en')
>     -- Playing 'digits/30' (language 'en')
>     -- Playing 'digits/7' (language 'en')
>     -- Playing 'digits/thousand' (language 'en')
> Jan 13 16:26:50 WARNING[1116941120]: chan_sip.c:471 retrans_pkt: Maximum
> retries exceeded on call 66123765-f5d1-aae7-70d5-a193afde1e68 at 10.10.3.6 for
> seqno 102 (Request)
>   == Spawn extension (sip-gw, 126, 5) exited non-zero on 'SIP/-08135e80'
>     -- Executing Hangup("SIP/-08135e80", "") in new stack
>   == Spawn extension (sip-gw, h, 1) exited non-zero on 'SIP/-08135e80'
> PASS (-1)
> 5.  Testing 'waitdtmf'...FAIL (unexpected result '')
> 6.  Testing 'record'...FAIL (unexpected result '')
> 6a.  Testing 'record' playback...FAIL (unexpected result '')
> ================== Complete ======================
> 7 tests completed, 4 passed, 3 failed
> ==================================================
> 
>   The test seems to stop half way through. I am not entirely sure that these
> two issues are actually related though as I don't see any of the warning from
> chan_sip if I hang up during a call to the say-ani script.
> 
>   I don't seem to be getting a core dump, are there any known issues with AGI
> at the moment? Voicemail, SayUnixTime and everything else is working fine.

Looks like the AGI script quoted above doesn't detect the hangup
condition and exit.

Is asterisk exiting on you after the quoted section? From what is quoted
it doesn't look like a crash, but an over simplistic example app that
didn't take hangup into account.

If asterisk is crashing as in exiting, issue the command 'ulimit -c
unlimited' and this should allow asterisk to drop a core file if it can.
-- 
Steven Critchfield  <critch at basesys.com>




More information about the asterisk-users mailing list