Esteban Guana-Jarrin
2006-Nov-23 17:54 UTC
[asterisk-users] Passing arguments to AGI script
Hi List, Can any one please let me know how to pass arguments to the agi script from the dialplan? I read that it is possible to pass arguments to an AGI script here, http://home.cogeco.ca/~camstuff/agi.html, by entering the variable followed by a vertical bar but it doesn't seem to work for me. I'm using a basic AGI script to query a database and then returns to specific contexts within the dialplan in asterisk, which are set by the AGI script depending on the results from the queries to the database. This works fine when I use the callerid variable passed from asterisk to the script however; I want to pass a variable to the script, which is a number entered by the caller and stored in a varialbe within the dialplan. Here is the part of the dialplan code calling the script, exten => s,8,Read(options3,Test/fnnconf,1) exten => s,9,Gotoif($[${options3} = 1]?13:10) exten => s,10,Gotoif($[${options3} = 2]?3:11) exten => s,11,Gotoif($[${options3} = 3]?6:12) exten => s,12,Gotoif($["foo${options3}" = "foo"]?t|1:i|1) exten => s,13,agi,query.agi|${options3} Kind Regards, Paul _________________________________________________________________ All-in-one security and maintenance for your PC. Get a free 90-day trial! http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://clk.atdmt.com/MSN/go/msnnkwlo0050000001msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail