Carlos, Thanks a lot for getting me started. That helps a great deal.<div><br></div><div>Currently, the <i><b>$agi->request['agi_extension']; </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 => _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("SIP/64.111.222.111-00000ca7", "")</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"><<a href="mailto:cursor@telecomabmex.com">cursor@telecomabmex.com</a>></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>
> Hi Carlso,<br>
><br>
><br>
> Thanks for the input. I have done this in php and am not familiar with<br>
> phpagi.<br>
> So, there is absolutely no way to temporarily solve this problem by<br>
> getting the value back from php file?<br>
><br>
><br>
> Wondering if it would require a lot of work to change the php file to<br>
> phpagi?<br>
> Thanks,<br>
> Bruce<br>
><br>
</div> Here is an example:<br>
<br>
exten => _x.,1,AGI(sample.agi)<br>
<div class="im">exten => _x.,n,NoOp(${var})<br>
<br>
</div>sample.agi:<br>
<br>
#!/usr/bin/php -q<br>
<?php<br>
set_time_limit(30);<br>
require('phpagi/phpagi.php');<br>
$agi = new AGI();<br>
$exten = $agi->request['agi_extension']; //Dialed extension<br>
// the result is stored in $exten<br>
// do something with your data<br>
$agi->set_variable("var", $result);<br>
$agi->verbose("The result was: $result", 3);<br>
?><br>
<br>
You can even send parameters to the AGI via the command line like:<br>
<br>
exten => _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>