On 11/2/07, <b class="gmail_sendername">Eric ManxPower Wieling</b> <<a href="mailto:eric@fnords.org">eric@fnords.org</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Sadly those docs cover the situation of this:<br><br> exten => 666,1,Set(MY_VAR=fred)<br> exten => 666,n,AGI(simple_c_prgm)<br><br>Not this:<br> exten => 666,1,AGI(simple_c_prgm|123|789)</blockquote><div><br>
Looking back over it, you're right.<br><br>However, multiple args passed to the AGI work fine; they come in the same way as any standard argc/argv program.<br><br>i.e.:<br><br>AGI(agentpause.agi,--mode=pause,--autopause,--agent=${AGENTCODE},--pausereason=${PAUSEREASON})
<br><br>I handle this (in Perl) using Getopt::Long, which knows nothing of AGI's stdin/stdout mechanics:<br><br>GetOptions(<br> \%opts,<br> 'mode=s',<br> 'agent=i',<br> 'pausereason=i',<br>
'autopause!',<br>) or die "can't parse command line";<br><br></div></div>