[asterisk-users] How to fail an AGI
Yuan LIU
yliu11 at hotmail.com
Sat Mar 3 17:15:31 MST 2007
>From: Lenz <lenz-ml at loway.it>
>Date: Sat, 03 Mar 2007 11:37:29 +0100
>
>You could set a dialplan variable in the AGI so that it's pretty easy to
>tell what happened in the AGI.
>About the code 0, the funny part is that you see "AGI Script completed,
>returning 0" even if the AGI does not exist, or is not executable. This
>should be a good candidate for improvement :-)
>l.
Thanks for the enlightenment. Now I know where to look, and found the
following from 1.2 show application agi:
"Returns -1 on hangup (except for DeadAGI) or if application requested
hangup, or 0 on non-hangup exit."
Apparently this AGISTATUS is a 1.4 thing, and probably still very
simplistic. Just wonder why all AGI commands carry sophisticated return
codes.
Yuan Liu
>On Sat, 03 Mar 2007 06:28:23 +0100, Yuan LIU <yliu11 at hotmail.com> wrote:
>
>>I mean how do I set failure condition in AGI? My script exits with code
>>0 upon success, and non-zero when problems occur - the standard *nix way.
>> But Asterisk always report "AGI Script completed, returning 0", and
>>AGISTATUS is always SUCCESS.
>>
>>Yuan Liu
>>
>--
>Loway Research - Home of QueueMetrics
>http://queuemetrics.com
More information about the asterisk-users
mailing list