On Tue, 15 Jan 2008, Matt Riddell wrote: > Brian Hutchinson wrote: > | > | Using Asterisk 1.4.17. I'm calling a PHP script through AGI. No matter > | what my script returns (0 or -1), AGISTATUS always appears to be 0 = > | SUCCESS. > > Why don't you just set a variable from the AGI and then test for it in > the dialplan
>From UPGRADE.txt: * The exit behavior of the AGI applications has changed. Previously, when a connection to an AGI server failed, the application would cause the channel to immediately stop dialplan execution and hangup. Now, the only time that the AGI applications will cause the channel to stop dialplan execution is when the channel itself requests hangup. The AGI applications now set an AGISTATUS variable which will allow you to find out whether running the AGI was successful or not. Previously, there was no way to handle the case where Asterisk was unable to locally execute an AGI script for some reason. In this case, dialplan execution will continue as it did before, but the AGISTATUS variable will be set to "FAILURE". A locally executed AGI script can now exit with a non-zero exit code and this failure will be detected by Asterisk. If an AGI script exits with a non-zero exit code, the AGISTATUS variable will be set to "FAILURE" as opposed to "SUCCESS". I find the idea of a proliferation of inconsistently implemented AGI failure or success variables undesirable. As I read the above, if returning a non-zero exit code does not set AGISTATUS to "FAILURE," it's a bug that needs to be reported. Thanks in advance, ------------------------------------------------------------------------ Steve Edwards [EMAIL PROTECTED] Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
