[asterisk-users] PHP AGI

Kevin Smith kevin.smith at mercury.net
Sat Jul 8 15:41:24 MST 2006


I have tried both ways (with PHPAGI and without), and neither works I 
went back to a real simple test, and that doesn't even work.

 Here is the CLI:
- Executing AGI("SIP/9897943713-9e04", "VoiceMail.php") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/VoiceMail.php
    -- AGI Script VoiceMail.php completed, returning 0

Here is my code
#!/usr/bin/php -q
<?php
set_time_limit(0);
require('../phpagi/phpagi.php');

$agi = new AGI();
$agi->answer();

$agi->say_digits(1,2,3);
//$agi->stream_file('welcome.gsm');
?>

Both stream file and say digits did not work. The file is located in my 
/agi-bin/ directory. The PHPAGI files are located in in the a directory 
up called phpagi. So I don't see what is wrong with ../phpagi/phpagi.php

Any ideas?

Thanks,
Kevin

Time Bandit wrote:
>> Can someone post an example of how you read in a channel variable from
>> asterisk through PHP. I tried the ones voip-info.org but none of them
>> seem to work, or at least I am not doing something write, but I have no
>> problem setting variables and other functions, just reading variables
>> into my script. The variable I want to read in is a macro argument, and
>> just to be safe, I assign it to a channel variable within the macro.
>
> Use phpagi : http://phpagi.sourceforge.net/
>
> hth
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list