bx.php 683 Bytes
Newer Older
Kulya's avatar
Kulya committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/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);
?>