Displaying 1 result from an estimated 1 matches for "insertbadg".
Did you mean:
insertbadge
2009 Mar 01
1
php agi and get_data errors.
...e_limit(99999999999999);
require('phpagi.php');
$agi = new AGI();
$agi->answer();
function printdebug($a) {
global $agi;
$agi->conlog(print_r($a, true));
}
// Prendo Badge
$isokbadge = false;
$tries = 1;
do {
$result = array();
$agi->exec('PLAYBACK',$audiofiles['insertbadge']);
$result = $agi->get_data('beep', 60000, 13);
printdebug($result);
$badge = str_replace('*', '.', $result['result']);
$agi->conlog("[$tries] Badge: $badge");
if (strlen($badge) != 13) {
if (($tries++) >= 3){
$agi->exec(...