
Platform: WordPress; Technology: php/MySQL/Javascript/CSS (more…)
Asterisk AGI command, by which You can utilize various outside scripts, change channel variables, navigate trough the dialplan – is a great tool to work with.
Recently I was using AGI to pass several variables to php program. Within php program u reach those values by $argv[1], $argv[2], $argv[3], and so on.
To pass these to php program, your dialplan row looks something like this:
exten => extension_name, n, AGI(program.php, ${JOB_ID}, ${PROPERTY_ID})
Lets, for the sake of argument say, that JOB_ID = 1, and PROPERTY_ID= 2.
What are the values You will be getting in $argv[1] and $argv[2] – different than You think. (more…)