hitagi-entrada/hitagi-entrada.php

35 lines
817 B
PHP

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