[asterisk-bugs] [Asterisk 0009985]: Premature Channel Hangup on AGI

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Aug 20 16:14:30 CDT 2007


The following issue has been RESOLVED. 
====================================================================== 
http://bugs.digium.com/view.php?id=9985 
====================================================================== 
Reported By:                cbkihong
Assigned To:                qwell
====================================================================== 
Project:                    Asterisk
Issue ID:                   9985
Category:                   Resources/res_agi
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:            1.2.18  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             06-14-2007 23:21 CDT
Last Modified:              08-20-2007 16:14 CDT
====================================================================== 
Summary:                    Premature Channel Hangup on AGI
Description: 
After we upgraded Asterisk from 1.2.9.1 we seem to have some issues about
the combination of AGI and Dial(). As the same configuration was fine when
all the servers were Asterisk 1.2.9.1, I guess that would probably be a bug
somewhere. I have read previous bug trackers and did not find anything
similar. 

We are required to set up 2 separate servers (and thus 2 Asterisk
instances) for incoming call reception and termination.

After executing the dialplan at reception server, a Dial() call would be
made over IAX2 to the termination server. The termination server, on
connection, will also execute a dialplan which involves some AGI calls
among other things.

For testing, I was able to reproduce the issue with as simple as the
following:

On the reception server, the context looks like this:

[testing-in]
exten => 111,1,Answer()
exten => 111,n,Dial(IAX2/user:secret at 192.168.10.163/02555)
exten => 111,n,Hangup

On the termination server (192.168.10.163 above), the context looks like
this:

[testing-in]
exten => _02.,1,Answer
exten => _02.,n,AGI(empty.sh)
exten => _02.,n,Wait(5)
exten => _02.,n,Playback(demo-congrats)
exten => _02.,n,Hangup

In the test, I used SIP to register to the reception server.

When the call comes in from the reception server, the empty.sh shell
script is executed. In our test, the script is executable but is empty (no
executable statements inside, with just the shebang line). But the channel
seems to hangup shortly after the AGI script completes. Wait() no longer
waits anymore, and the Playback() was skipped. But if I remove the AGI()
call, this channel hangup no longer occurs.

The actual AGI script (Perl) itself is a pretty complex one, but we have
ascertained there is no error or even warnings generated from the script,
and the logging system implemented in the script itself also did not record
any abnormal status. "agi debug" also does not show anything unusual too.

Note that it is the AGI() call that apparently cause the channel to
hangup, so I suppose it is not related to the SIGHUP issue to Perl AGI
scripts previously mentioned here. There is no apparent premature
termination of the AGI script in my specific case. It's the channel hangup
that appears mysterious.
====================================================================== 

---------------------------------------------------------------------- 
 qwell - 08-20-07 16:14  
---------------------------------------------------------------------- 
Closing, since this is fixed in 1.4. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
08-20-07 16:14  qwell          Status                   feedback => resolved
08-20-07 16:14  qwell          Resolution               open => fixed       
08-20-07 16:14  qwell          Assigned To               => qwell           
08-20-07 16:14  qwell          Note Added: 0069111                          
======================================================================




More information about the asterisk-bugs mailing list