[asterisk-dev] [Code Review] AGI script not being notified of call hangup.

Michel Verbraak michel at verbraak.org
Fri Apr 8 00:21:03 CDT 2011


Op 08-04-11 01:54, Russell Bryant schreef:
> This is an automatically generated e-mail. To reply, visit: 
> https://reviewboard.asterisk.org/r/1165/
>
>
> The changes look good to me on a first pass.  It would be good to let some of the people complaining about problems on mantis test this.
>
> /branches/1.8/res/res_agi.c 
> <https://reviewboard.asterisk.org/r/1165/diff/1/?file=16088#file16088line3381> 
> (Diff revision 1)
> static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi, int pid, int *status, int dead, int argc, char *argv[])
>
> 	
> 	3381 	
> ast_log(LOG_NOTICE, "BUGBUG %s hungup\n", chan->name);
>
> be sure to remove this debug stuff before merge
>
> - Russell
>
>
> On April 7th, 2011, 6:45 p.m., rmudgett wrote:
>
> Review request for Asterisk Developers and Russell Bryant.
> By rmudgett.
>
> /Updated 2011-04-07 18:45:06/
>
>
>   Description
>
> If the call that the dialplan started an AGI script for is hungup while
> the AGI script is in the middle of a command then the AGI script is not
> notified of the hangup.  There are many AGI Exec commands that this can
> happen with.  The reported applications have been: Background, Wait, Read,
> and Dial.  Also the AGI Get Data command.
>
> I have restored the AGI script's ability to return the AGI_RESULT_HANGUP
> value in run_agi().  It previously only could return AGI_RESULT_SUCCESS or
> AGI_RESULT_FAILURE after the DeadAGI and AGI applications were merged.
>
> Should the run_agi() give priority to AGI_RESULT_HANGUP code over the
> AGI_RESULT_FAILURE code?  The consequence is that the AGI application will
> return -1 with the AGI_RESULT_HANGUP code and 0 otherwise.
>
> I have some cleanup changes in this patch as well that I will commit
> separately.  The fix changes are in run_agi() and __ast_read().
>
>
>   Testing
>
> I have setup an AGI script to:
> exec Background tt-monkeys
> exec Dial SIP phone
>
> The AGI script stops running when expected with the patch and proceeds to
> dial the SIP phone without it.
>
> *Bugs: * 17954 <https://issues.asterisk.org/view.php?id=17954>, 18492 
> <https://issues.asterisk.org/view.php?id=18492>, 18935 
> <https://issues.asterisk.org/view.php?id=18935>
>
>
>   Diffs
>
>     * /branches/1.8/main/channel.c (313097)
>     * /branches/1.8/res/res_agi.c (313097)
>
> View Diff <https://reviewboard.asterisk.org/r/1165/diff/>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>     http://lists.digium.com/mailman/listinfo/asterisk-dev
Will test today..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110408/14a98f3f/attachment.htm>


More information about the asterisk-dev mailing list