[asterisk-users] change AGI script return result

Danny Nicholas danny at debsinc.com
Fri May 15 16:01:35 CDT 2009


Have you tried 

Exit 1

??

 

  _____  

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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-bounces at lists.digium.com
[mailto:asterisk-users-bounces at 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-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Hristo Benev
Sent: Friday, May 15, 2009 3:15 PM
To: asterisk-users at 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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090515/c1532d39/attachment.htm 


More information about the asterisk-users mailing list