I have installed asterisk 188.8.131.52 and I have created the php script to call from the dialplan.
testAgi.php script :
[quote] #!/usr/local/bin/php -q<?php set_time_limit(0); require('phpagi.php'); $agi = new AGI(); $agi->answer(); // Play the tt-monkeys file from /var/lib/asterisk/sounds $agi->stream_file('tt-monkeys'); $agi->hangup(); ?>[/quote]
And the extension.conf :
[quote]exten => 6565,1,Answer
exten => 6565,2,AGI(testAgi.php)
exten => 6565,3,Hangup[/quote]
It gives the following error
[quote] #!/usr/local/bin/php -q
PHP Warning: include(phpagi.php): failed to open stream: No such file or directory in /var/lib/asterisk/agi-bin/testAgi.php on line 5
PHP Warning: include(): Failed opening ‘phpagi.php’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/lib/asterisk/agi-bin/testAgi.php on line 5
PHP Fatal error: Class ‘AGI’ not found in /var/lib/asterisk/agi-bin/testAgi.php on line 7[/quote]
Please give me some suggestion.
Thank you very much.