[asterisk-dev] [Code Review] Clean up AsyncAGI command loop.
Sean Bright
reviewboard at asterisk.org
Thu Dec 20 15:21:09 CST 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1183/#review7568
-----------------------------------------------------------
/branches/1.8/res/res_agi.c
<https://reviewboard.asterisk.org/r/1183/#comment14386>
This code is old and committed already, but this doesn't handle the situation where you want to call multiple AGIs in the 'h' extension:
exten => h,1,AGI(agi:async://whatever)
exten => h,2,AGI(agi:async://whatever2)
The second AGI will never be called because the hangup frame will be read during the first call. This is different than the behavior of the other AGI methods and I have yet to find a workaround.
- Sean
On April 14, 2011, 5:09 p.m., rmudgett wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1183/
> -----------------------------------------------------------
>
> (Updated April 14, 2011, 5:09 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> The AsyncAGI command loop is lax in the value it returns for the return status.
>
> This patch does the following:
>
> * Return correct status: SUCCESS/FAILED/HANGUP. Previously, abnormal exits from the command loop such as hangup would return SUCCESS.
>
> * The "asyncagi break" command now returns SUCCESS and is now the only way to break the command loop with that status. Previously, it returned FAILED.
>
> * The AMI event AsyncAGI End is no longer sent if the AsyncAGI Start event is not sent. Previously, this happened because of an error setting up the AGI pipes.
>
> * All executed AGI commands now get an AsyncAGI Exec result event. Previously, if the command returned failure (because of hangup), the command loop just exited with FAILURE and did not send the AsyncAGI Exec result event.
>
> * Makes sure that the channel frame queue is empty on hangup.
>
>
> Diffs
> -----
>
> /branches/1.8/res/res_agi.c 313821
>
> Diff: https://reviewboard.asterisk.org/r/1183/diff
>
>
> Testing
> -------
>
> Manually sent the following AGI commands from the CLI:
> wait for digit -1
> exec background tt-monkeys
> asyncagi break
>
> Got the expected return values and bahaviour when executed or hungup while executed.
>
>
> Thanks,
>
> rmudgett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121220/b475f7ad/attachment-0001.htm>
More information about the asterisk-dev
mailing list