[asterisk-users] PHP AGI

Time Bandit timebandit001 at gmail.com
Sat Jul 8 18:51:05 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?

see http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+SayDigits
I think you should write it like this : $agi->say_digits(123);

for stream_file, Asterisk will look in /var/lib/asterisk/sounds/

b.t.w., you can tail asterisk log while running your AGI. also, set
your verbosity to something high like 50

or do as Michiel said

hth



More information about the asterisk-users mailing list