[asterisk-bugs] [Asterisk 0013442]: wait_for_answer never receives HANGUP frame sent via ast_queue_hangup

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 8 17:38:06 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13442 
====================================================================== 
Reported By:                gui
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13442
Category:                   Applications/app_dial
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.21.2 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-08 14:24 CDT
Last Modified:              2008-09-08 17:38 CDT
====================================================================== 
Summary:                    wait_for_answer never receives HANGUP frame sent via
ast_queue_hangup
Description: 
1) A user calls into our Asterisk pbx via one of our PSTN lines and dials
   a SIP extension.
2) The caller hangs up the PSTN line before anyone answers the SIP
extension.
3) Our channel driver calls ast_queue_hangup to inform Asterisk of the
hangup.
4) Asterisk never acknowledges the hangup and the call eventually times
out.

====================================================================== 

---------------------------------------------------------------------- 
 (0092199) putnopvut (administrator) - 2008-09-08 17:38
 http://bugs.digium.com/view.php?id=13442#c92199 
---------------------------------------------------------------------- 
Hmm, I have a feeling that there's nothing broken, per se, but that
documentation regarding expected return values of certain functions is
lacking.

For instance, you've stated that the AST_CONTROL_HANGUP frame is not
detected properly in app_dial's wait_for_answer function. Here's something
important to note. If a channel is ever returned by ast_waitfor_n and then
an ast_read of that channel returns NULL, then you can safely take that to
mean that the channel has hung up.

For an example, look at app_dial's wait_for_answer function. If you look
at the 1.4.21.2 tag and look at line 563, you'll see that a null frame
pointer is taken to mean that a hangup has occurred. Another example of
this is on line 703.

I hope this has been helpful. If it hasn't and I'm completely missing the
point of this bug report, let me know. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-08 17:38 putnopvut      Note Added: 0092199                          
======================================================================




More information about the asterisk-bugs mailing list