PHP AGI Not working
Posted: Thu Feb 18, 2016 2:43 am
randomcid.php: Failed to execute '/var/lib/asterisk/agi-bin/randomcid.php': Exec format error
My configuration:
#!/usr/bin/php
<?php
include 'phpagi-2.20/phpagi.php';
$agi = new AGI();
$numbers = file('/var/lib/asterisk/agi-bin/cids-list.txt');
$cid = array_rand($numbers, 1);
//return trim($numbers[$cid[0]]);
$newCID = trim($numbers[$cid]);
//echo $newCID;
$agi->set_variable("CALLERID(num)", $newCID);
?>
Steps to Reproduce:
i also download phpagi-2.20 , than its move to /var/lib/asterisk/agi-bin/
but when we run this error coming.
Additional Information:
I just move this folder phpagi-2.20 not is it need to install.Please help us how
to resolve.
Asterisk version: 1.4.39.1-vici
astGUIclient version: 2.4 RC 1
My configuration:
#!/usr/bin/php
<?php
include 'phpagi-2.20/phpagi.php';
$agi = new AGI();
$numbers = file('/var/lib/asterisk/agi-bin/cids-list.txt');
$cid = array_rand($numbers, 1);
//return trim($numbers[$cid[0]]);
$newCID = trim($numbers[$cid]);
//echo $newCID;
$agi->set_variable("CALLERID(num)", $newCID);
?>
Steps to Reproduce:
i also download phpagi-2.20 , than its move to /var/lib/asterisk/agi-bin/
but when we run this error coming.
Additional Information:
I just move this folder phpagi-2.20 not is it need to install.Please help us how
to resolve.
Asterisk version: 1.4.39.1-vici
astGUIclient version: 2.4 RC 1