From 7a4b016719d9b8f02955bdb5e12d5a949ec75b52 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 6 Nov 2021 11:05:04 -0400 Subject: [PATCH 1/3] roles/pbx/tasks/freepbx.yml: TEMPORARILY force FreePBX 16 to work with Asterisk 19 --- roles/pbx/tasks/freepbx.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/pbx/tasks/freepbx.yml b/roles/pbx/tasks/freepbx.yml index a71cfba1c..cb81caf10 100644 --- a/roles/pbx/tasks/freepbx.yml +++ b/roles/pbx/tasks/freepbx.yml @@ -96,6 +96,18 @@ extra_opts: [--strip-components=1] creates: "{{ freepbx_src_dir }}/install" +- name: 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 -- patch /opt/iiab/freepbx/install.php + replace: + path: /opt/iiab/freepbx/install.php + regexp: 'version_compare\(\$astversion, "19", "ge"\)\) \{$' + replace: 'version_compare($astversion, "20", "ge")) {' + +- name: 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 -- patch /opt/iiab/freepbx/installlib/installcommand.class.php + replace: + path: /opt/iiab/freepbx/installlib/installcommand.class.php + regexp: 'version_compare\(\$astversion, "19", "ge"\)\) \{$' + replace: 'version_compare($astversion, "20", "ge")) {' + # 2021-08-04: FreePBX 16 no longer needs this FreePBX 15 patch # - name: FreePBX - Patch FreePBX source - IIAB Bug 1685 # patch: From 463cf892f64724aa695a9f750276712c5315b2ee Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 6 Nov 2021 11:12:25 -0400 Subject: [PATCH 2/3] roles/pbx/tasks/freepbx.yml: Fix & clean Ansible output --- roles/pbx/tasks/freepbx.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/pbx/tasks/freepbx.yml b/roles/pbx/tasks/freepbx.yml index cb81caf10..0c3618b09 100644 --- a/roles/pbx/tasks/freepbx.yml +++ b/roles/pbx/tasks/freepbx.yml @@ -96,13 +96,13 @@ extra_opts: [--strip-components=1] creates: "{{ freepbx_src_dir }}/install" -- name: 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 -- patch /opt/iiab/freepbx/install.php +- name: "FreePBX - 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 - patch /opt/iiab/freepbx/install.php" replace: path: /opt/iiab/freepbx/install.php regexp: 'version_compare\(\$astversion, "19", "ge"\)\) \{$' replace: 'version_compare($astversion, "20", "ge")) {' -- name: 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 -- patch /opt/iiab/freepbx/installlib/installcommand.class.php +- name: "FreePBX - 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 - patch /opt/iiab/freepbx/installlib/installcommand.class.php" replace: path: /opt/iiab/freepbx/installlib/installcommand.class.php regexp: 'version_compare\(\$astversion, "19", "ge"\)\) \{$' From 9020ae18a7301cc22580b87c3ef67829803263be Mon Sep 17 00:00:00 2001 From: A Holt Date: Sat, 6 Nov 2021 11:32:01 -0400 Subject: [PATCH 3/3] roles/pbx/tasks/freepbx.yml: Fix 2nd regex patch for FreePBX 16 w/ Asterisk 19 --- roles/pbx/tasks/freepbx.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/pbx/tasks/freepbx.yml b/roles/pbx/tasks/freepbx.yml index 0c3618b09..8e4497618 100644 --- a/roles/pbx/tasks/freepbx.yml +++ b/roles/pbx/tasks/freepbx.yml @@ -105,8 +105,8 @@ - name: "FreePBX - 2021-11-06: TEMPORARILY force FreePBX 16 to work with Asterisk 19 - patch /opt/iiab/freepbx/installlib/installcommand.class.php" replace: path: /opt/iiab/freepbx/installlib/installcommand.class.php - regexp: 'version_compare\(\$astversion, "19", "ge"\)\) \{$' - replace: 'version_compare($astversion, "20", "ge")) {' + regexp: 'version_compare\(\$matches\[1\], "19", "ge"\)\) \{$' + replace: 'version_compare($matches[1], "20", "ge")) {' # 2021-08-04: FreePBX 16 no longer needs this FreePBX 15 patch # - name: FreePBX - Patch FreePBX source - IIAB Bug 1685