mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Fix patch for freepbx fix
This commit is contained in:
parent
fae81ca105
commit
4169db3080
2 changed files with 27 additions and 27 deletions
|
@ -35,7 +35,7 @@
|
|||
- name: FreePBX - Patch FreePBX source - IIAB Bug 1685
|
||||
patch:
|
||||
src: "roles/pbx/templates/71-freepbx-framework.patch"
|
||||
dest: "{{ downloads_dir }}/{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/BMO/Framework.class.php"
|
||||
dest: "{{ freepbx_src_dir }}/amp_conf/htdocs/admin/libraries/BMO/Framework.class.php"
|
||||
|
||||
- name: FreePBX - Disable & Stop asterisk service
|
||||
systemd:
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
--- Framework.class.php 2019-05-22 08:37:49.748899666 +0530
|
||||
+++ Framework.class.php.new 2019-05-22 08:38:04.968584018 +0530
|
||||
@@ -177,7 +177,7 @@
|
||||
dbug("aborting early because previous errors");
|
||||
return false;
|
||||
}
|
||||
- if ($this->freepbx->astman->connected()) {
|
||||
+ if ($this->freepbx->astman && $this->freepbx->astman->connected()) {
|
||||
$ast_ret = $this->freepbx->astman->Command('module reload manager');
|
||||
} else {
|
||||
unset($output);
|
||||
@@ -187,12 +187,12 @@
|
||||
$this->freepbx->Logger->log(FPBX_LOG_ERROR,_("Failed to reload AMI, manual reload will be necessary, try: [asterisk -rx 'module reload manager']"));
|
||||
}
|
||||
}
|
||||
- if ($this->freepbx->astman->connected()) {
|
||||
+ if ($this->freepbx->astman && $this->freepbx->astman->connected()) {
|
||||
$this->freepbx->astman->disconnect();
|
||||
}
|
||||
global $bootstrap_settings;
|
||||
|
||||
- if (!$res = $this->freepbx->astman->connect($this->freepbx->Config->get('ASTMANAGERHOST') . ":" . $this->freepbx->Config->get('ASTMANAGERPORT'), $this->freepbx->Config->get('AMPMGRUSER') , $this->freepbx->Config->get('AMPMGRPASS'), $bootstrap_settings['astman_events'])) {
|
||||
+ if (!$this->freepbx->astman || !$res = $this->freepbx->astman->connect($this->freepbx->Config->get('ASTMANAGERHOST') . ":" . $this->freepbx->Config->get('ASTMANAGERPORT'), $this->freepbx->Config->get('AMPMGRUSER') , $this->freepbx->Config->get('AMPMGRPASS'), $bootstrap_settings['astman_events'])) {
|
||||
// couldn't connect at all
|
||||
$this->freepbx->Logger->log(FPBX_LOG_CRITICAL,"Connection attmempt to AMI failed");
|
||||
return false;
|
||||
--- Framework.class.php 2019-05-22 08:37:49.748899666 +0530
|
||||
+++ Framework.class.php.new 2019-05-22 08:38:04.968584018 +0530
|
||||
@@ -177,7 +177,7 @@
|
||||
dbug("aborting early because previous errors");
|
||||
return false;
|
||||
}
|
||||
- if ($this->freepbx->astman->connected()) {
|
||||
+ if ($this->freepbx->astman && $this->freepbx->astman->connected()) {
|
||||
$ast_ret = $this->freepbx->astman->Command('module reload manager');
|
||||
} else {
|
||||
unset($output);
|
||||
@@ -187,12 +187,12 @@
|
||||
$this->freepbx->Logger->log(FPBX_LOG_ERROR,_("Failed to reload AMI, manual reload will be necessary, try: [asterisk -rx 'module reload manager']"));
|
||||
}
|
||||
}
|
||||
- if ($this->freepbx->astman->connected()) {
|
||||
+ if ($this->freepbx->astman && $this->freepbx->astman->connected()) {
|
||||
$this->freepbx->astman->disconnect();
|
||||
}
|
||||
global $bootstrap_settings;
|
||||
|
||||
- if (!$res = $this->freepbx->astman->connect($this->freepbx->Config->get('ASTMANAGERHOST') . ":" . $this->freepbx->Config->get('ASTMANAGERPORT'), $this->freepbx->Config->get('AMPMGRUSER') , $this->freepbx->Config->get('AMPMGRPASS'), $bootstrap_settings['astman_events'])) {
|
||||
+ if (!$this->freepbx->astman || !$res = $this->freepbx->astman->connect($this->freepbx->Config->get('ASTMANAGERHOST') . ":" . $this->freepbx->Config->get('ASTMANAGERPORT'), $this->freepbx->Config->get('AMPMGRUSER') , $this->freepbx->Config->get('AMPMGRPASS'), $bootstrap_settings['astman_events'])) {
|
||||
// couldn't connect at all
|
||||
$this->freepbx->Logger->log(FPBX_LOG_CRITICAL,"Connection attmempt to AMI failed");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue