#!/usr/bin/env php <?php session_start(); require __DIR__ . '/vendor/autoload.php'; require ('/var/lib/asterisk/agi-bin/phpagi.php'); $AGI = new AGI(); $AGI->verbose("------------------------------------------"); $datas = array( 'caller_id' => $AGI->request['agi_callerid'], 'called_ext' => $AGI->request['agi_extension'], ); global $ALVC; $ALVC = new AloVoice\AloVoiceConnector(); (new AloVoice\AloVoiceAgi($ALVC->configs))->run($datas); // $AGI->hangup(); // file_put_contents('/var/www/html/bx24/logs/agi_20211026.log', "VARS_".json_encode($argv)."\n", FILE_APPEND); // file_put_contents('/var/www/html/bx24/logs/agi_20211026.log', "CID_".$ani."\n", FILE_APPEND); exit(0); ?>