[Home]

Summary:ASTERISK-18233: Asterisk does not continue AGI code execution after the channel is hungup by caller.
Reporter:robert tang (rtang)Labels:
Date Opened:2011-08-07 13:47:46Date Closed:2018-01-02 08:44:28.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_agi
Versions:1.8.5.0 Frequency of
Occurrence
Related
Issues:
is related toASTERISK-17998 Hangup with active AGI connection does not work
Environment:Attachments:
Description:When executing an AGI script and the dial app is executed and then the channel is hungup by the caller the agi script immediately exits the script with out continuing to execute any further agi commands. So with this current behavior, it is not possible to retreive the "dialstatus", "hangup_cause".
Comments:By: Freddi Hansen (freddi_fonet) 2011-08-07 14:32:59.757-0500

Have you in your AGI script installed a callback that will catch the sigpipe, and is that callback called when caller hangs up ?.

Exec dial from within an agi script can use lot of exstra resources as you have a hanging process for each ongoing call.
I do normally recommend that you set a few channel variables in the AGI script, return and then let the dialplan do the dialing.
You can then in the h extension do housekeeping like retrieving "dialstatus", "hangupcause" a.s.o.    

By: robert tang (rtang) 2011-08-07 16:55:24.310-0500

Yes in my php AGI script I have a callback function that get trigger on SIGHUP but the dialstatus and hangup cause variables do not contain any data once the caller hangups, I guess the channel variables get destroyed. How come when caller hangs up the agi script immediately exits, but if the callee hangup first then it continues to execute the next agi code before exiting?

Since this agi script is written in php I find it more flexible to do database and call management task all in once place. It is currently working in asteirsk1.6.2.15, but not so in 1.8.5.0

By: Joshua C. Colp (jcolp) 2017-12-19 06:39:31.231-0600

Are you still experiencing this issue under the current supported version of Asterisk? I know of users who use AGI considerably and don't experience this.

By: Asterisk Team (asteriskteam) 2018-01-02 08:44:28.178-0600

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines