[asterisk-users] How to pass variable back and forth from dialplan to php file?

Steve Edwards asterisk.org at sedwards.com
Mon Jun 14 17:44:48 CDT 2010


On Mon, 14 Jun 2010, bruce bruce wrote:

> Thanks for the input. I actually did use verbose() and that is when I 
> noticed that my path to phpagi was not right since nothing was coming 
> through. For return value prior to fixing phpagi path, I was getting:
> 
> NoOp("SIP/64.111.222.111-00000ca7", "")
> 
> which actually is just right because if you notice the last three 
> charecters of that line is ""). So, when the phpagi path is correct, it 
> looks like:  "415444555").

Which is why enabling AGI debugging and posting actual console code can 
speed problem resolution. Sometimes it's just another set of eyes on the 
same output :)

If you're going to be developing a significant bit of AGI code, there is a 
"not immediately obvious" technique of feeding a text file into the STDIN 
of your AGI so you can debug completely external to Asterisk -- even 
within an IDE like emacs+gdb. (Or whatever the PHP equivalence is.)

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list