[asterisk-users] change AGI script return result
How I can change AGI script return status to failure from within the script? It always return AGI Script completed, returning 0 Thanks, Hristo ___ -- 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
Re: [asterisk-users] change AGI script return result
Set a variable in the dialplan like this Exten = s,1,set(AGI_RET=good) Exten = s,n,AGI(test.agi) exten = s,n,Gotoif($[${AGI_RET} = GOOD]?good) exten = s,n,Gotoif($[${AGI_RET} = BAD]?bad) in the AGI, put this line to generate the return print STDOUT SET VARIABLE AGI_RET \BAD\ ; _ From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Hristo Benev Sent: Friday, May 15, 2009 3:15 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] change AGI script return result How I can change AGI script return status to failure from within the script? It always return AGI Script completed, returning 0 Thanks, Hristo ___ -- 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
Re: [asterisk-users] change AGI script return result
Thanks for the answer. I came up to this solution, but is there a way to change the AGISTATUS variable to FAILURE - We have it always SUCCESS Hristo From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Danny Nicholas Sent: Friday, May 15, 2009 4:39 PM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: Re: [asterisk-users] change AGI script return result Set a variable in the dialplan like this Exten = s,1,set(AGI_RET=good) Exten = s,n,AGI(test.agi) exten = s,n,Gotoif($[${AGI_RET} = GOOD]?good) exten = s,n,Gotoif($[${AGI_RET} = BAD]?bad) in the AGI, put this line to generate the return print STDOUT SET VARIABLE AGI_RET \BAD\ ; From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Hristo Benev Sent: Friday, May 15, 2009 3:15 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] change AGI script return result How I can change AGI script return status to failure from within the script? It always return AGI Script completed, returning 0 Thanks, Hristo ___ -- 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
Re: [asterisk-users] change AGI script return result
On Friday 15 May 2009 03:49:05 pm Hristo Benev wrote: I came up to this solution, but is there a way to change the AGISTATUS variable to FAILURE - We have it always SUCCESS if the script you use exits successfully (without an error), AGISTATUS will always be SUCCESS even if it didn't do what you wanted. you need to have your script exit with something other than 0 if you'd like to have AGISTATUS not be SUCCESS. -- Anthony - http://messinet.com - http://messinet.com/~amessina/gallery 8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E signature.asc Description: This is a digitally signed message part. ___ -- 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
Re: [asterisk-users] change AGI script return result
Have you tried Exit 1 ?? _ From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Hristo Benev Sent: Friday, May 15, 2009 3:49 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] change AGI script return result Thanks for the answer. I came up to this solution, but is there a way to change the AGISTATUS variable to FAILURE - We have it always SUCCESS Hristo From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Danny Nicholas Sent: Friday, May 15, 2009 4:39 PM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: Re: [asterisk-users] change AGI script return result Set a variable in the dialplan like this Exten = s,1,set(AGI_RET=good) Exten = s,n,AGI(test.agi) exten = s,n,Gotoif($[${AGI_RET} = GOOD]?good) exten = s,n,Gotoif($[${AGI_RET} = BAD]?bad) in the AGI, put this line to generate the return print STDOUT SET VARIABLE AGI_RET \BAD\ ; _ From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Hristo Benev Sent: Friday, May 15, 2009 3:15 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] change AGI script return result How I can change AGI script return status to failure from within the script? It always return AGI Script completed, returning 0 Thanks, Hristo ___ -- 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