[asterisk-users] HELP! AGI AUTOHANGUP does not seem to hangup the channel.

Steve Edwards asterisk.org at sedwards.com
Thu May 27 00:52:53 CDT 2021


On Wed, 26 May 2021, Jonathan H wrote:

> It just causes AGI to send "HANGUP" and any audio to stop playing. It 
> does NOT hangup the channel, or even send any SIP event. The line just 
> goes silent.

I wouldn't expect the AGI() application to send a SIP event. The AGI()
application does not care what technology you use.

Receiving 'HANGUP' as text from Asterisk appears to be a FastAGI thing
which kind of makes sense -- if your FastAGI server is not localhost,
how could Asterisk send it a signal?

Are you supposed to close your TCP connection and exit your AGI when you 
receive the HANGUP text?

When I set autohangup in a 'normal' AGI, it looks like this:

<SIP/poly-77a1-000002a2>AGI Tx >> agi_request: null-agi.php
<SIP/poly-77a1-000002a2>AGI Tx >> agi_channel: SIP/poly-77a1-000002a2
<SIP/poly-77a1-000002a2>AGI Tx >> agi_language: en
<SIP/poly-77a1-000002a2>AGI Tx >> agi_type: SIP
<SIP/poly-77a1-000002a2>AGI Tx >> agi_uniqueid: 1622093977.1168
<SIP/poly-77a1-000002a2>AGI Tx >> agi_version: 13.14.1~dfsg-2+deb9u4
<SIP/poly-77a1-000002a2>AGI Tx >> agi_callerid: 5555555555
<SIP/poly-77a1-000002a2>AGI Tx >> agi_calleridname: Steve Edwards
<SIP/poly-77a1-000002a2>AGI Tx >> agi_callingpres: 0
<SIP/poly-77a1-000002a2>AGI Tx >> agi_callingani2: 0
<SIP/poly-77a1-000002a2>AGI Tx >> agi_callington: 0
<SIP/poly-77a1-000002a2>AGI Tx >> agi_callingtns: 0
<SIP/poly-77a1-000002a2>AGI Tx >> agi_dnid: *
<SIP/poly-77a1-000002a2>AGI Tx >> agi_rdnis: unknown
<SIP/poly-77a1-000002a2>AGI Tx >> agi_context: newline
<SIP/poly-77a1-000002a2>AGI Tx >> agi_extension: *
<SIP/poly-77a1-000002a2>AGI Tx >> agi_priority: 6
<SIP/poly-77a1-000002a2>AGI Tx >> agi_enhanced: 0.0
<SIP/poly-77a1-000002a2>AGI Tx >> agi_accountcode: 
<SIP/poly-77a1-000002a2>AGI Tx >> agi_threadid: 1945654064
<SIP/poly-77a1-000002a2>AGI Tx >> 
<SIP/poly-77a1-000002a2>AGI Rx << set autohangup 5
<SIP/poly-77a1-000002a2>AGI Tx >> 200 result=0
        > 0x73c3dba0 -- Strict RTP learning complete - Locking on source address 192.168.0.139:2254
(and then after 5 seconds)
     -- <SIP/poly-77a1-000002a2>AGI Script null-agi.php completed, returning 4

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
             https://www.linkedin.com/in/steve-edwards-4244281



More information about the asterisk-users mailing list