2024-12-12 19:27:10 +00:00
|
|
|
#!/usr/bin/php -q
|
2024-12-12 14:00:09 +00:00
|
|
|
<?php
|
2024-12-12 18:39:48 +00:00
|
|
|
require 'vendor/autoload.php';
|
|
|
|
require 'includes/wrapper-noswoole.php';
|
2024-12-12 14:00:09 +00:00
|
|
|
|
2024-12-14 01:14:11 +00:00
|
|
|
use Hitlabs\Hitagi\AGIEntrada;
|
|
|
|
|
2024-12-12 14:00:09 +00:00
|
|
|
$stdin = fopen('php://stdin', 'r');
|
|
|
|
$stdout = fopen('php://stdout', 'w');
|
2024-12-12 18:39:48 +00:00
|
|
|
$fgId = (isset($argv[1])) ? $argv[1] : ''; // DID
|
|
|
|
$logEnabled = true;
|
2024-12-14 01:14:11 +00:00
|
|
|
$isXampp = file_exists('C:\xampp');
|
|
|
|
$asteriskip = ''; // 177.107.205.248
|
2024-12-12 14:00:09 +00:00
|
|
|
$appdir = dirname(__FILE__);
|
|
|
|
chdir($appdir);
|
|
|
|
date_default_timezone_set('America/Bahia');
|
|
|
|
|
2024-12-14 01:14:11 +00:00
|
|
|
$agientrada = new AGIEntrada(
|
2024-12-12 14:00:09 +00:00
|
|
|
array(
|
|
|
|
'agiRunCmd' => agiRunCmdWrapper($stdin, $stdout),
|
2024-12-14 01:14:11 +00:00
|
|
|
'agiLog' => agiLogWrapper()
|
2024-12-12 14:00:09 +00:00
|
|
|
),
|
|
|
|
array(
|
2024-12-12 18:39:48 +00:00
|
|
|
'fgId' => $fgId,
|
2024-12-14 01:14:11 +00:00
|
|
|
'asteriskip' => $asteriskip,
|
2024-12-12 18:39:48 +00:00
|
|
|
'logEnabled' => $logEnabled,
|
|
|
|
'appdir' => $appdir,
|
|
|
|
'isXampp' => $isXampp
|
2024-12-12 14:00:09 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
$agientrada->run();
|
|
|
|
|
|
|
|
fclose($stdin);
|
|
|
|
fclose($stdout);
|
2024-12-12 19:27:10 +00:00
|
|
|
exit();
|