[asterisk-bugs] [Asterisk 0017814]: AGI Hangup does not hangup channel on FastAGI

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Aug 20 20:58:28 CDT 2010


The following issue has been CLOSED 
====================================================================== 
https://issues.asterisk.org/view.php?id=17814 
====================================================================== 
Reported By:                abeed
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17814
Category:                   Resources/res_agi
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Asterisk Version:           1.6.2.10 
JIRA:                       SWP-2025 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): 1.6.2 
SVN Revision (number only!): 281051 
Request Review:              
Resolution:                 reopened
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-08-08 22:30 CDT
Last Modified:              2010-08-20 20:58 CDT
====================================================================== 
Summary:                    AGI Hangup does not hangup channel on FastAGI
Description: 
Hi,

Channel only gets hungup when the FastAGI server terminates the
connection. Following commands don't hangup the channel:

agi: hangup
agi: hangup <channel>
exec: channel request hangup <channel>
====================================================================== 

---------------------------------------------------------------------- 
 (0126209) espiceland (administrator) - 2010-08-20 20:58
 https://issues.asterisk.org/view.php?id=17814#c126209 
---------------------------------------------------------------------- 
That is correct.  That is the expected behavior.  "Hanging up" and
destroying the channel happen at two different times.   What you are seeing
is a channel that is still up but cannot be used to do anything.  Your
FastAGI script is hanging up the channel, it is just not destroying the
channel.  Likewise, when you issue "channel request hangup" on the CLI, the
channel is hung up even if the channel is still up.  I believe you are
using the word "hangup" to describe destroying a channel.

When you issue the HANGUP command from within an AGI script, Asterisk
hangs up in software ("softhangup") and sends the AGI script a SIGHUP to
stop the script, which disconnects the AGI connection, which causes
Asterisk to destroy the channel.  Both the AGI HANGUP command and the CLI
command "channel request hangup" issue a soft hangup, which tells Asterisk
not to allow any more actions on the channel, like audio processing or
channel variable manipulation, but when using FastAGI the channel is not
destroyed until the FastAGI script disconnects, and this is done on
purpose.  Basically, this is a "best practice" scenario. The developer
should always disconnect from within the FastAGI server or script after
issuing the HANGUP command. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-20 20:58 espiceland     Note Added: 0126209                          
2010-08-20 20:58 espiceland     Status                   new => closed       
======================================================================




More information about the asterisk-bugs mailing list