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