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