On Thu, 11 Jan 2007, Yuan LIU wrote:

AGI doesn't see the name "var"; all it sees is an array @ARGV (or whatever in the respective language). As the documentation says, values are passed like command line arguments.

But, in the interest of "more maintainable code," you can pass the option name and use "getopt_long()" in "C" or whatever language you use. For example,

        agi(block-ani,--ani=555555555,--dnis=8005551212,--debug,--verbose)

vs

        agi(block-ani|555555555|8005551212|y|y)

getopt_long() will do all the "heavy lifting" to parse the "command line" options for you.

Which one would you rather see in a dialplan you're trying to enhance or maintain?

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      [EMAIL PROTECTED]      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

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

Reply via email to