Carlos, Thanks a lot for getting me started. That helps a great deal.<div><br></div><div>Currently, the <i><b>$agi-&gt;request[&#39;agi_extension&#39;];  </b><span class="Apple-style-span" style="font-style: normal;">returns the SIP channel info with IP and I want that to be the incoming DID number. </span></i></div>

<div><i><span class="Apple-style-span" style="font-style: normal;"><br></span></i></div><div><i><span class="Apple-style-span" style="font-style: normal;">My dialplan output is this for line one:</span></i></div><div><br>

</div><div><i><span class="Apple-style-span" style="font-style: normal;"></span></i>exten =&gt; _x.,1,NoOp(${EXTEN})</div><div><br></div><div><b>415444555</b></div><div><br></div><div>But with the agi_extension it comes back as:</div>

<div>NoOp(&quot;SIP/64.111.222.111-00000ca7&quot;, &quot;&quot;)</div><div><br></div><div>Where can I find the list of command requests that can be sent to Asterisk? Specially that for DID.</div><div><br></div><div>Thanks</div>

<div><br><br><div class="gmail_quote">On Mon, Jun 14, 2010 at 2:15 PM, Carlos Chavez <span dir="ltr">&lt;<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Mon, 2010-06-14 at 13:41 -0400, bruce bruce wrote:<br>
&gt; Hi Carlso,<br>
&gt;<br>
&gt;<br>
&gt; Thanks for the input. I have done this in php and am not familiar with<br>
&gt; phpagi.<br>
&gt; So, there is absolutely no way to temporarily solve this problem by<br>
&gt; getting the value back from php file?<br>
&gt;<br>
&gt;<br>
&gt; Wondering if it would require a lot of work to change the php file to<br>
&gt; phpagi?<br>
&gt; Thanks,<br>
&gt; Bruce<br>
&gt;<br>
</div>        Here is an example:<br>
<br>
exten =&gt; _x.,1,AGI(sample.agi)<br>
<div class="im">exten =&gt; _x.,n,NoOp(${var})<br>
<br>
</div>sample.agi:<br>
<br>
#!/usr/bin/php -q<br>
&lt;?php<br>
set_time_limit(30);<br>
require(&#39;phpagi/phpagi.php&#39;);<br>
$agi = new AGI();<br>
$exten = $agi-&gt;request[&#39;agi_extension&#39;]; //Dialed extension<br>
// the result is stored in $exten<br>
// do something with your data<br>
$agi-&gt;set_variable(&quot;var&quot;, $result);<br>
$agi-&gt;verbose(&quot;The result was: $result&quot;, 3);<br>
?&gt;<br>
<br>
        You can even send parameters to the AGI via the command line like:<br>
<br>
exten =&gt; _x.,1,AGI(sample.agi,param1,param2) //Use comma for 1.6 or |<br>
for 1.4 or below<br>
<br>
        And access them via $argv[1], $argv[2] is there is some extra<br>
information that you cannot get via the AGI variables.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">Telecomunicaciones Abiertas de México S.A. de C.V.<br>
Carlos Chávez Prats<br>
Director de Tecnología<br>
+52-55-91169161 ext 2001<br>
</div></div><br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</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></div>