[asterisk-users] Asterisk perl AGI confusing variables

Steve Edwards asterisk.org at sedwards.com
Mon Feb 13 01:30:51 CST 2012


On Mon, 13 Feb 2012, Sammy Govind wrote:

> Hi again,Just to update I fixed the issue. I read through your reply and 
> the URL in it and tried alot to make things working but in vain- then I 
> took the tough way and started looking at the production AGI from the 
> first line and amended all the warning and unwanted stuff, finally I 
> figured out that the agi->verbose() function just a few lines above the 
> problematic code was having a warning and once that was fixed all the 
> code started working fine.
> 
> I still wonder what do variable assignments has to do with verbose 
> function warning, but its all working fine now. Thanks for the help.

It's a good idea to track down all warnings and errors even when they seem 
unrelated to the problem at hand.

Keep in mind executing an AGI completely external from Asterisk can be a 
valuable debugging aid. Just create a text file containing all the proper 
responses and feed it to the AGI's STDIN. I do this frequently with the 
AGIs I write in C so I can use GDB to step through my code and figure out 
what's going on.

> On Sat, Feb 11, 2012 at 11:20 PM, Ron Bergin <rkb at i.frys.com> wrote:

> Finally, add a couple debugging statements after the get_variable 
> statements to verify/dump the vars.

Doing any I/O on STDIN or STDOUT will violate the AGI protocol.

-- 
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