From c0f0250a5c172920ef0c1ead58a1fc59982b1366 Mon Sep 17 00:00:00 2001 From: Nicolas Gudino Date: Fri, 3 May 2024 14:14:32 -0400 Subject: [PATCH] Remove asmanager requirement to issabel-pbx installer. Fixes creation of trunks.db tables --- issabel-pbx.spec | 2 +- setup/installer.php | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/issabel-pbx.spec b/issabel-pbx.spec index 5dd82cd..13fc620 100644 --- a/issabel-pbx.spec +++ b/issabel-pbx.spec @@ -2,7 +2,7 @@ Summary: Issabel PBX Module Name: issabel-pbx Version: 5.0.0 -Release: 1 +Release: 2 License: GPL Group: Applications/System Source0: issabel-%{modname}-%{version}.tar.gz diff --git a/setup/installer.php b/setup/installer.php index 36e11cf..1147c90 100755 --- a/setup/installer.php +++ b/setup/installer.php @@ -23,18 +23,20 @@ require_once "/var/www/html/libs/paloSantoDB.class.php"; require_once "/var/www/html/libs/misc.lib.php"; -require_once "/var/lib/asterisk/agi-bin/phpagi-asmanager.php"; +//require_once "/var/lib/asterisk/agi-bin/phpagi-asmanager.php"; $DocumentRoot = (isset($_SERVER['argv'][1]))?$_SERVER['argv'][1]:"/var/www/html"; $DataBaseRoot = "/var/www/db"; $tmpDir = '/tmp/new_module/pbx'; # in this folder the load module extract the package content +/* if (!file_exists("$DataBaseRoot/control_panel_design.db")) { $cmd_mv = "mv $tmpDir/setup/control_panel_design.db $DataBaseRoot/"; $cmd_chown = "chown asterisk.asterisk $DataBaseRoot/control_panel_design.db"; exec($cmd_mv); exec($cmd_chown); } +*/ createTrunkDB($DataBaseRoot); if (!file_exists("$DataBaseRoot/trunk.db")) { @@ -528,15 +530,19 @@ function do_reloadAll($data_connection, $arrAST, $arrAMP, &$pDB) $retrieve = $arrAMP['AMPBIN']['valor'].'/retrieve_conf'; exec($retrieve); + /* //reload MOH to get around 'reload' not actually doing that, reload asterisk $command_data = array("moh reload", "reload"); $arrResult = AsteriskManager_Command($data_connection['host'], $data_connection['user'], $data_connection['password'], $command_data); + */ + /* if (isset($arrAMP['FOPRUN']['valor'])) { //bounce op_server.pl $wOpBounce = $arrAMP['AMPBIN']['valor'].'/bounce_op.sh'; exec($wOpBounce.' &>'.$arrAST['astlogdir']['valor'].'/issabelpbx-bounce_op.log'); } + */ //store asterisk reloaded status $sql = "UPDATE admin SET value = 'false' WHERE variable = 'need_reload'"; @@ -554,6 +560,7 @@ function do_reloadAll($data_connection, $arrAST, $arrAMP, &$pDB) else return true; } +/* function AsteriskManager_Command($host, $user, $password, $command_data) { $salida = array(); @@ -574,4 +581,5 @@ function AsteriskManager_Command($host, $user, $password, $command_data) } return false; } +*/ ?>