On 11/2/07, <b class="gmail_sendername">Eric ManxPower Wieling</b> &lt;<a href="mailto:eric@fnords.org">eric@fnords.org</a>&gt; 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>&nbsp;&nbsp; exten =&gt; 666,1,Set(MY_VAR=fred)<br>&nbsp;&nbsp; exten =&gt; 666,n,AGI(simple_c_prgm)<br><br>Not this:<br>&nbsp;&nbsp; exten =&gt; 666,1,AGI(simple_c_prgm|123|789)</blockquote><div><br>
Looking back over it, you&#39;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&#39;s stdin/stdout mechanics:<br><br>GetOptions(<br>&nbsp; \%opts,<br>&nbsp; &#39;mode=s&#39;,<br>&nbsp; &#39;agent=i&#39;,<br>&nbsp; &#39;pausereason=i&#39;,<br>
&nbsp; &#39;autopause!&#39;,<br>) or die &quot;can&#39;t parse command line&quot;;<br><br></div></div>