[Asterisk-Users] Checking Return Codes

Umar Sear usedcanon at yahoo.co.uk
Fri Sep 10 00:39:52 MST 2004


On Tue, 2004-09-07 at 21:48, Glenn A. Thompson wrote:
> Hi,
> 
> I must be blind, how does one check then act upon the return code from 
> the previous command?
> For instance, "Answer" says it can return non zero.  How do I check for 
> that.  It doesn't set any other variables like Dial does.

Most commands return a 0 or non zero value, and jump to priority n+101
if the return value is non-zero.

> In this case, all I'm really trying to do is not answer if the line has 
> already been picked up.  Do I have to make sure the channel is available 
> before I issue the Answer cmd.
> 
> Thanks,
> Glenn
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list