[asterisk-users] Asterisk perl AGI confusing variables

Steve Edwards asterisk.org at sedwards.com
Mon Feb 13 11:17:39 CST 2012


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

> Steve Edwards wrote:

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

On Mon, 13 Feb 2012, Ron Bergin wrote:

> That is correct.  I forgot to clarify that by saying to dump it out to a 
> file or STDERR

My 'best practice' is using syslog(). You can leave the statements in 
place and enable or disable them using setlogmask().

I also add '--debug' and '--verbose' to my getopt_long() longopts so I can 
control the AGIs verbosity with options in my dialplan.

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