,must visit this site for more info<br><a href="http://www.voip-info.org/wiki-Asterisk+AGI">http://www.voip-info.org/wiki-Asterisk+AGI</a><br><br>and also take help from google its a good source<br><br><br><div class="gmail_quote">
On Tue, Feb 24, 2009 at 5:08 AM, michel freiha <span dir="ltr">&lt;<a href="mailto:michofr@gmail.com" target="_blank">michofr@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div dir="ltr">Dear All,<br><br>I would really need to thank you all for the great help that I got here from all of you and specially Mr. Yawar hadi for his great assist and professionalism<br><br>Thanks<div><div></div><div>

<br><br><div class="gmail_quote">
On Mon, Feb 23, 2009 at 6:48 PM, Steve Edwards <span dir="ltr">&lt;<a href="http://asterisk.org" target="_blank">asterisk.org</a>@<a href="http://sedwards.com" target="_blank">sedwards.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>On Mon, 23 Feb 2009, Yawar Hadi wrote:<br>
<br>
</div><div>&gt; so if u want to read extension then supplu variable name like<br>
&gt; $myno=$AGI-&gt;get_variable(&#39;EXTEN&#39;);<br>
&gt; hope u get it<br>
<br>
</div>I think passing the variable &quot;on the command line&quot; is more flexible than a<br>
fixed variable, particularly the much more limiting ${EXTEN}.<br>
<br>
My preference is to use the &quot;getopt_long&quot; function to parse the command<br>
line passed to the AGI. I find<br>
<br>
        exten = _x.,n,agi(dial,--customer-id=112)<br>
<br>
to be more &quot;obvious&quot; than<br>
<br>
        exten = _x.,n,agi(dial,${EXTEN})<br>
<br>
or<br>
<br>
        exten = 112,n,agi(dial)<br>
<br>
This becomes even more obvious when you pass multiple variables:<br>
<br>
        exten = _x.,n,agi(dial\<br>
                ,--announce=winter-specials\<br>
                ,--customer-id=112\<br>
                ,--caller-id=ACME Widgets Inc\<br>
                ,--verbose\<br>
                ,--record\<br>
                )<br>
<br>
(line split for readability)<br>
<br>
rather than<br>
<br>
        exten = _x.,n,agi(dial,112,,,winter-specials,ACME Widgets,v,,r)<br>
<br>
or<br>
<br>
        exten = 112,n,agi(dial)<br>
<br>
Particularly since getopt_long does not care about the order of the<br>
options.<br>
<div><div></div><div><br>
Thanks in advance,<br>
------------------------------------------------------------------------<br>
Steve Edwards      <a href="mailto:sedwards@sedwards.com" target="_blank">sedwards@sedwards.com</a>      Voice: +1-760-468-3867 PST<br>
Newline                                             Fax: +1-760-731-3000<br>
<br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards <br><br>Yawar Hadi Noshahi<br>

  QAU Islamabad <br>(+92-0300-5504798)<br>