[asterisk-users] AGI - Getting the passed parameters

Yuan LIU yliu11 at hotmail.com
Wed Jan 10 22:29:12 MST 2007


>From: "Mike D'Ambrogia" <miked at jamagination.com>
>
>Need to figure out how to grab the passed variable in my php AGI script
>
>I pass it in via the Dialplan like this:
>
>exten => 420,1,Answer
>exten => 420,n,DigitTimeout(5)
>exten => 420,n,ResponseTimeout(10)
>exten => 420,n,Flite("enter the one digit code")
>exten => 420,n,Read(CODE,beep,1)
>exten => 420,n,AGI(yy.php|${CODE})
>
>Inside of yy.php how would I reference ${CODE} to expose it??  It
>doesn't seem to come in with the standard variables that asterisk passes
>to the AGI, at least the debugging loop that I have writing to log file
>doesn't expose it as part of the std variables

If you read the documentation, it says that parameters are passed like 
command line arguments.  So it's in the array that contains these arguments. 
  In fact, you can debug your AGI using command line.

Yuan Liu

>mike




More information about the asterisk-users mailing list