welltime / phpagi

PHPAGI is a PHP class for the Asterisk Gateway Interface. The package is available for use and distribution under the terms of the GNU Public License.
GNU Lesser General Public License v2.1
58 stars 93 forks source link

Cannot redeclare class AGI_AsteriskManager #9

Closed ankur99999 closed 8 years ago

ankur99999 commented 8 years ago

We downloaded latest phpagi 2.2. But when we are excuting our php file we are getting this error.

Cannot redeclare class AGI_AsteriskManager in /var/lib/asterisk/agi-bin/phpagi-asmanager.php on line 867 Here is our php file code

!/usr/bin/php -q

<?php //set_time_limit(30); error_reporting(E_ALL); require('phpagi.php');

$agi = new AGI(); // $agi->answer(); $agi->say_number("1234"); // speaks the number 1234 $agi->say_digits("1234"); // speaks the digits 1, 2, 3 and 4. //$cid = $agi->parse_callerid(); $agi->text2wav("Hello"); $agi->text2wav('Goodbye'); // $agi->hangup(); ?>

ipoddubny commented 8 years ago

First, please note that the phpagi project is abandoned for quite a long time and I would not recommend to use it unless you have to. The version you mentioned (2.2) was released in 2010, and this repository is a fork made in 2013 for a product we had to maintain that depended on phpagi.

If you do really need phpagi, you can either use the master branch of this repository or install it with composer.