From c968abc77205649707ae6874e5db833f1ee0e081 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 15:56:45 -0500 Subject: [PATCH 01/15] pbx/default/main.yml: Try Asterisk 21 and FreePBX 17 --- roles/pbx/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/pbx/defaults/main.yml b/roles/pbx/defaults/main.yml index 2cc6eece6..f7173c2b3 100644 --- a/roles/pbx/defaults/main.yml +++ b/roles/pbx/defaults/main.yml @@ -26,13 +26,13 @@ asterisk_url: https://downloads.asterisk.org/pub/telephony/asterisk -asterisk_src_file: asterisk-20-current.tar.gz +asterisk_src_file: asterisk-21-current.tar.gz asterisk_src_dir: "{{ iiab_base }}/asterisk" # /opt/iiab # freepbx_url: https://mirror.freepbx.org/modules/packages/freepbx/7.4 # freepbx_src_file: freepbx-16.0-latest.tgz # 2022-05-25 #3228: Filename has become bogus (as it's not really the latest!) Manually unpacking the latest .tar.gz for FreePBX 16.x from https://github.com/FreePBX/framework/tags to /opt/iiab/freepbx can work if absolutely nec. freepbx_git_url: https://github.com/FreePBX/framework -freepbx_git_branch: release/16.0 # EMERGING OPTION AS OF MAY 2022: https://github.com/FreePBX/framework/tree/release/17.0 +freepbx_git_branch: release/17.0 # EMERGING OPTION AS OF MAY 2022: https://github.com/FreePBX/framework/tree/release/17.0 freepbx_src_dir: "{{ iiab_base }}/freepbx" freepbx_install_dir: /var/www/html/freepbx From 5e127a7cd7f2d5e415d2aa7a52b08a1715e90f5d Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 16:00:36 -0500 Subject: [PATCH 02/15] default_vars.yml: 'asterisk_rpi_patch: False' safer --- vars/default_vars.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index 4f89f695a..b7a197cb0 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -692,7 +692,7 @@ pbx_enabled: False pbx_use_apache: False # 2023-04-03: Set to 'True' if nec -- please also pbx_use_nginx: True # read github.com/iiab/iiab/issues/2914 & #2916, THX! # 2023-04-03: For EXPERIMENTAL testing on Raspberry Pi... (#3489, PR #3523) -asterisk_rpi_patch: True +asterisk_rpi_patch: False asterisk_chan_dongle: False pbx_signaling_ports_chan_sip: 5160:5161 pbx_signaling_ports_chan_pjsip: 5060 From 409dace2e7263040e5ff7135afa3ba63b5f50f88 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 16:38:25 -0500 Subject: [PATCH 03/15] local_vars_unittest.yml: 'asterisk_rpi_patch: False' --- vars/local_vars_unittest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_unittest.yml b/vars/local_vars_unittest.yml index 9fd0605a6..59c80a0e2 100644 --- a/vars/local_vars_unittest.yml +++ b/vars/local_vars_unittest.yml @@ -425,5 +425,5 @@ pbx_enabled: False pbx_use_apache: False # 2023-04-03: Set to 'True' if nec -- please also pbx_use_nginx: True # read github.com/iiab/iiab/issues/2914 & #2916, THX! # 2023-04-03: For EXPERIMENTAL testing on Raspberry Pi... (#3489, PR #3523) -asterisk_rpi_patch: True +asterisk_rpi_patch: False asterisk_chan_dongle: False From 01bec789fb9aa139f29408ac4a982c2b6b543584 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 16:39:22 -0500 Subject: [PATCH 04/15] local_vars_small.yml: 'asterisk_rpi_patch: False' --- vars/local_vars_small.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_small.yml b/vars/local_vars_small.yml index be689cd52..6765c20d5 100644 --- a/vars/local_vars_small.yml +++ b/vars/local_vars_small.yml @@ -425,5 +425,5 @@ pbx_enabled: False pbx_use_apache: False # 2023-04-03: Set to 'True' if nec -- please also pbx_use_nginx: True # read github.com/iiab/iiab/issues/2914 & #2916, THX! # 2023-04-03: For EXPERIMENTAL testing on Raspberry Pi... (#3489, PR #3523) -asterisk_rpi_patch: True +asterisk_rpi_patch: False asterisk_chan_dongle: False From 4ca14a75fcaefc11a2afbc746dcb1a500de16529 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 16:40:05 -0500 Subject: [PATCH 05/15] local_vars_medium.yml: 'asterisk_rpi_patch: False' --- vars/local_vars_medium.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 829b6fb6c..4ed3e7e3e 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -425,5 +425,5 @@ pbx_enabled: False pbx_use_apache: False # 2023-04-03: Set to 'True' if nec -- please also pbx_use_nginx: True # read github.com/iiab/iiab/issues/2914 & #2916, THX! # 2023-04-03: For EXPERIMENTAL testing on Raspberry Pi... (#3489, PR #3523) -asterisk_rpi_patch: True +asterisk_rpi_patch: False asterisk_chan_dongle: False From 20e42b37224df77b1e243cc1468bc30571d2ccf5 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 16:40:51 -0500 Subject: [PATCH 06/15] local_vars_large.yml: 'asterisk_rpi_patch: False' --- vars/local_vars_large.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/local_vars_large.yml b/vars/local_vars_large.yml index 7b108429f..c679b30f9 100644 --- a/vars/local_vars_large.yml +++ b/vars/local_vars_large.yml @@ -425,5 +425,5 @@ pbx_enabled: False pbx_use_apache: False # 2023-04-03: Set to 'True' if nec -- please also pbx_use_nginx: True # read github.com/iiab/iiab/issues/2914 & #2916, THX! # 2023-04-03: For EXPERIMENTAL testing on Raspberry Pi... (#3489, PR #3523) -asterisk_rpi_patch: True +asterisk_rpi_patch: False asterisk_chan_dongle: False From 356c2bd1717b54ac9b83c10cf842d7d71f501e04 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 17:05:03 -0500 Subject: [PATCH 07/15] asterisk.yml w/o 'menuselect --enable app_macro' --- roles/pbx/tasks/asterisk.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/pbx/tasks/asterisk.yml b/roles/pbx/tasks/asterisk.yml index bc7638191..f5ce31b26 100644 --- a/roles/pbx/tasks/asterisk.yml +++ b/roles/pbx/tasks/asterisk.yml @@ -83,8 +83,8 @@ creates: menuselect.makeopts - name: Asterisk - Do a bit of menuselect configuration - command: menuselect/menuselect --enable app_macro --enable format_mp3 menuselect.makeopts - # 2021-08-06: Let's standardize (ABOVE) if 6 others (BELOW) aren't needed? + command: menuselect/menuselect --enable format_mp3 menuselect.makeopts + # 2021-08-06 & 2023-11-19: Let's standardize (ABOVE) if 6 others (BELOW) aren't needed? # command: > # menuselect/menuselect --enable app_macro --enable format_mp3 # --enable CORE-SOUNDS-EN-WAV --enable CORE-SOUNDS-EN-G722 From 93b381804ef65e093e2a4378ec2339cd2214b38b Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 17:20:23 -0500 Subject: [PATCH 08/15] pbx/tasks/install.yml: Install MySQL / MariaDB --- roles/pbx/tasks/install.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/pbx/tasks/install.yml b/roles/pbx/tasks/install.yml index ef9dea71d..5c49dfa14 100644 --- a/roles/pbx/tasks/install.yml +++ b/roles/pbx/tasks/install.yml @@ -22,6 +22,21 @@ # when: nodejs_version != "12.x" +- name: "Set 'mysql_install: True' and 'mysql_enabled: True'" + set_fact: + mysql_install: True + mysql_enabled: True + +- name: MYSQL - run 'mysql' role (attempt to install & enable MySQL / MariaDB) + include_role: + name: mysql + +- name: FAIL (STOP THE INSTALL) IF 'mysql_installed is undefined' + fail: + msg: "PBX install cannot proceed, as MySQL / MariaDB is not installed." + when: mysql_installed is undefined + + - name: Record (initial) disk space used shell: df -B1 --output=used / | tail -1 register: df1 From cf69b6438d5f8555503b5022de6b93c36683f4f7 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 17:26:34 -0500 Subject: [PATCH 09/15] default_vars.yml: Clarify PBX need for MySQL --- vars/default_vars.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vars/default_vars.yml b/vars/default_vars.yml index b7a197cb0..ea4130c3c 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -267,8 +267,8 @@ pi_swap_file_size: 1024 # 2023-11-05: MySQL (actually MariaDB) had been mandatory, installed on every # IIAB by 3-base-server. Now installed on demand -- as a dependency of Matomo, -# MediaWiki, Nextcloud, WordPress &/or Admin Console. SO BOTH VALUES BELOW ARE -# INITIALLY IGNORED: +# MediaWiki, Nextcloud, PBX (for FreePBX), WordPress &/or Admin Console. +# SO BOTH VALUES BELOW ARE INITIALLY IGNORED: mysql_install: False mysql_enabled: False mysql_service: mariadb From f2851ad9c4fa03c5945914f1551fabcb3e5570ec Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 17:28:27 -0500 Subject: [PATCH 10/15] 3-base-server: Clarify PBX need for MySQL --- roles/3-base-server/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/3-base-server/tasks/main.yml b/roles/3-base-server/tasks/main.yml index 96cee56a9..efe1c93e2 100644 --- a/roles/3-base-server/tasks/main.yml +++ b/roles/3-base-server/tasks/main.yml @@ -5,7 +5,7 @@ # 2023-11-05: MySQL (actually MariaDB) had been mandatory, installed on every # IIAB by 3-base-server. Now installed on demand -- as a dependency of Matomo, -# MediaWiki, Nextcloud, WordPress &/or Admin Console. +# MediaWiki, Nextcloud, PBX (for FreePBX), WordPress &/or Admin Console. # - name: MYSQL + CORE PHP # include_role: # name: mysql From 3d6450a1887b692dffe2486dadb19aab1c789aa1 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 17:42:53 -0500 Subject: [PATCH 11/15] pbx/tasks/asterisk.yml: Clarify 7 (not 6) --- roles/pbx/tasks/asterisk.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pbx/tasks/asterisk.yml b/roles/pbx/tasks/asterisk.yml index f5ce31b26..1721d69d2 100644 --- a/roles/pbx/tasks/asterisk.yml +++ b/roles/pbx/tasks/asterisk.yml @@ -84,7 +84,7 @@ - name: Asterisk - Do a bit of menuselect configuration command: menuselect/menuselect --enable format_mp3 menuselect.makeopts - # 2021-08-06 & 2023-11-19: Let's standardize (ABOVE) if 6 others (BELOW) aren't needed? + # 2021-08-06 & 2023-11-19: Let's standardize (ABOVE) if 7 others (BELOW) aren't needed? # command: > # menuselect/menuselect --enable app_macro --enable format_mp3 # --enable CORE-SOUNDS-EN-WAV --enable CORE-SOUNDS-EN-G722 From de1f5ed44ab0ce6f1c3c442f226d660ff9006650 Mon Sep 17 00:00:00 2001 From: A Holt Date: Sun, 19 Nov 2023 17:47:30 -0500 Subject: [PATCH 12/15] 3-base-server/README.rst: Clarify PBX needs MySQL --- roles/3-base-server/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/3-base-server/README.rst b/roles/3-base-server/README.rst index 579977f55..1f22db3a2 100644 --- a/roles/3-base-server/README.rst +++ b/roles/3-base-server/README.rst @@ -15,7 +15,7 @@ This 3rd `stage `_ installs base server infra that `Internet-in-a-Box (IIAB) `_ requires, including: -- |ss| `MySQL `_ (database underlying many/most user-facing apps). |se| |nbsp| *As of 2023-11-05, MySQL / MariaDB is NO LONGER INSTALLED by 3-base-server — instead it's installed on-demand — as a dependency of Matomo, MediaWiki, Nextcloud, WordPress &/or Admin Console.* This IIAB role (roles/mysql) also installs apt package: +- |ss| `MySQL `_ (database underlying many/most user-facing apps). |se| |nbsp| *As of 2023-11-05, MySQL / MariaDB is NO LONGER INSTALLED by 3-base-server — instead it's installed on-demand — as a dependency of Matomo, MediaWiki, Nextcloud, PBX (for FreePBX), WordPress &/or Admin Console.* This IIAB role (roles/mysql) also installs apt package: - **php{{ php_version }}-mysql** — which forcibly installs **php{{ php_version }}-common** - `NGINX `_ web server (with Apache in some lingering cases). This IIAB role also installs apt package: - **php{{ php_version }}-fpm** — which forcibly installs **php{{ php_version }}-cli**, **php{{ php_version }}-common** and **libsodium23** From 022569fc612d5bc0614d0c67e0095c73f6793076 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 20 Nov 2023 01:29:16 -0500 Subject: [PATCH 13/15] Revert to 'freepbx_git_branch: release/16.0' for now --- roles/pbx/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pbx/defaults/main.yml b/roles/pbx/defaults/main.yml index f7173c2b3..c93a9781a 100644 --- a/roles/pbx/defaults/main.yml +++ b/roles/pbx/defaults/main.yml @@ -32,7 +32,7 @@ asterisk_src_dir: "{{ iiab_base }}/asterisk" # /opt/iiab # freepbx_url: https://mirror.freepbx.org/modules/packages/freepbx/7.4 # freepbx_src_file: freepbx-16.0-latest.tgz # 2022-05-25 #3228: Filename has become bogus (as it's not really the latest!) Manually unpacking the latest .tar.gz for FreePBX 16.x from https://github.com/FreePBX/framework/tags to /opt/iiab/freepbx can work if absolutely nec. freepbx_git_url: https://github.com/FreePBX/framework -freepbx_git_branch: release/17.0 # EMERGING OPTION AS OF MAY 2022: https://github.com/FreePBX/framework/tree/release/17.0 +freepbx_git_branch: release/16.0 # EMERGING OPTION AS OF MAY 2022: https://github.com/FreePBX/framework/tree/release/17.0 freepbx_src_dir: "{{ iiab_base }}/freepbx" freepbx_install_dir: /var/www/html/freepbx From e9655ad79801f8ea50c4ddf64fee252897a4f6e6 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 20 Nov 2023 01:57:32 -0500 Subject: [PATCH 14/15] Revert to 'asterisk_src_file: asterisk-20-current.tar.gz' for now --- roles/pbx/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pbx/defaults/main.yml b/roles/pbx/defaults/main.yml index c93a9781a..2cc6eece6 100644 --- a/roles/pbx/defaults/main.yml +++ b/roles/pbx/defaults/main.yml @@ -26,7 +26,7 @@ asterisk_url: https://downloads.asterisk.org/pub/telephony/asterisk -asterisk_src_file: asterisk-21-current.tar.gz +asterisk_src_file: asterisk-20-current.tar.gz asterisk_src_dir: "{{ iiab_base }}/asterisk" # /opt/iiab # freepbx_url: https://mirror.freepbx.org/modules/packages/freepbx/7.4 From c82709eaba75d972c412fcc84de461695fdc62ba Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 20 Nov 2023 02:24:28 -0500 Subject: [PATCH 15/15] README.adoc: Comment out PR #3523 & var `asterisk_rpi_patch` --- roles/pbx/README.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/pbx/README.adoc b/roles/pbx/README.adoc index a9c8b3087..727118015 100644 --- a/roles/pbx/README.adoc +++ b/roles/pbx/README.adoc @@ -61,12 +61,14 @@ If using PBX intensively, please adjust `/etc/php/X.Y/apache2/php.ini`, `/etc/ph nginx_high_php_limits: True ---- + +//// As of April 2023 (https://github.com/iiab/iiab/pull/3523[PR #3523]) IIAB will patch Asterisk automatically (https://github.com/asterisk/asterisk/pull/32[PR asterisk/asterisk#32]) so it can be run experimentally on Raspberry Pi, so long as you keep this default settings: + ---- asterisk_rpi_patch: True ---- + +//// Optionally, you may want to enable https://github.com/wdoekes/asterisk-chan-dongle[chan_dongle], which is a channel driver for Huawei UMTS cards (e.g. 3G USB dongles) allowing regular voice calls over GSM mobile networks. You will need to configure a dongle post-install, for it to be recognized properly: + ----