On Fri, 2 Nov 2007, James FitzGibbon wrote:

> I handle this (in Perl) using Getopt::Long, which knows nothing of AGI's 
> stdin/stdout mechanics:

The AGI variables are passed via stdin (similar to an HTTP GET request) 
and can be observed using "agi debug" at the Asterisk prompt. It's a fixed 
list you get whether you want them or not. It's a common mistake for the 
beginning AGI programmer to not read them (thus emptying stdin) and then 
wonder why their AGI's don't work correctly.

Arguments are passed to the AGI as elements of argv[] (for C, my native 
"tongue"). Thus, "Getopt:Long" (for Perl) or "getopt_long()" (for C) work 
as expected. Using a comma to separate the arguments is an "asteriskism."

Passing multiple arguments this way has worked for as long as I've been 
using Asterisk -- several years.

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      [EMAIL PROTECTED]      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to