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

Reply via email to