[asterisk-users] AGI exec command
Vieri
rentorbuy at yahoo.com
Wed Nov 28 02:12:31 CST 2012
Hi,
I'm trying to understand how AGI works.
I'm using php-agi library from sf.net.
*CLI> agi show commands
Yes exec Executes a given Application
*CLI> core show application set
My PHP-AGI script contains:
$AGI->exec("Set", "CUSTOM_VAR=2");
$AGI->exec("NoOp", "\"DEBUG - ${CUSTOM_VAR}\"");
An AGI debug from *CLI shows:
<SIP/4053-0000004d>AGI Rx << EXEC Set CUSTOM_VAR=2
-- AGI Script Executing Application: (Set) Options: (CUSTOM_VAR=2)
<SIP/4053-0000004d>AGI Tx >> 200 result=0
<SIP/4053-0000004d>AGI Rx << EXEC NoOp "DEBUG - "
-- AGI Script Executing Application: (NoOp) Options: (DEBUG - )
Why isn't CUSTOM_VAR set?
I know I could use agi command "set variable" but I'd like to know why the above code doesn't seem to work.
Also, there's no AGI-specific command for NoCDR(). So I did something like this:
$AGI->exec("NoCDR", "");
but the CDR was written to cdr-csv/Master.csv so I'm assuming I'm doing something wrong with the "agi exec command".
Any ideas?
Thanks,
Vieri
More information about the asterisk-users
mailing list