Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ugly hack... works to install Asterisk 21 and FreePBX 17 Beta onto Debian 12 and Ubuntu 24.04 #3675

Merged
merged 5 commits into from Feb 25, 2024

Conversation

@holta holta added this to the 8.1 milestone Nov 20, 2023
@holta holta changed the title pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 (in later 2023 or early 2024, when FreePBX officially supports Asterisk 21!) pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 (later in 2023 or early 2024, when FreePBX officially supports Asterisk 21!) Nov 20, 2023
@EMG70
Copy link
Contributor

EMG70 commented Nov 20, 2023

I will try early December and update here.Thank you.

@holta holta changed the title pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 (later in 2023 or early 2024, when FreePBX officially supports Asterisk 21!) pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 (later in 2023 or early 2024, when FreePBX 17 officially supports Asterisk 21!) Nov 20, 2023
@holta
Copy link
Member Author

holta commented Nov 20, 2023

I will try early December and update here.Thank you.

No need to waste your time, until FreePBX 17 officially supports Asterisk 21.

Which you can monitor/confirm instantly here:

Useful tips hereunder when testing gets more serious...

@holta holta modified the milestones: 8.1, 8.2 Jan 1, 2024
@holta
Copy link
Member Author

holta commented Jan 13, 2024

The BETA of FreePBX 17 was released Dec 6 for PHP 8.2

So it's (possible!?) that if you configure your /etc/iiab/local_vars.yml correctly to install FreePBX 17 instead of 16 — this just might now work on modern OS's — similar to Debian 12 Bookworm:

https://freepbx.org/freepbx-17-beta-release-and-debian-future/

As an experiment, if you want to try this, set both lines below in your /etc/iiab/local_vars.yml file:

asterisk_src_file: asterisk-21-current.tar.gz
freepbx_git_branch: release/17.0

And keep an eye on their latest changes here:

Related:

@holta
Copy link
Member Author

holta commented Jan 13, 2024

Just like RonR (link above! very helpful guy!) I on Debian 12 and @EMG70 on Ubuntu 24.04 pre-release (https://sprunge.us/HXeeYb?en) got the same mysterious return code / exit status 1 right after it announced "You have successfully installed FreePBX" :

2024-01-13 11:05:27,521 p=2034 u=root n=ansible | TASK [pbx : FreePBX - WAIT 5 SECONDS TO SIMULATE './start_asterisk start' (REQUIRED DUE TO ABOVE ANSIBLE BUG) THEN... install FreePBX to /var/www/html/freepbx - FAST W/ GITHUB (OR freepbx-16.0-latest.tgz CAN TAKE 3-12 MIN OR LONGER!)] ***
2024-01-13 11:05:48,771 p=2034 u=root n=ansible | fatal: [127.0.0.1]: FAILED! => {"changed": true, "cmd": "sleep 5 && ./install -n --webroot /var/www/html/freepbx --dbuser asterisk --dbpass asterisk", "delta": "0:00:21.019477", "end": "2024-01-13 11:05:48.732190", "msg": "non-zero return code", "rc": 1, "start": "2024-01-13 11:05:27.712713", "stderr": " 0/8218 [>---------------------------] 0%\n 500/8218 [=>--------------------------] 6%\n 1100/8218 [===>------------------------] 13%\n 1500/8218 [=====>----------------------] 18%\n 2200/8218 [=======>--------------------] 26%\n 2800/8218 [=========>------------------] 34%\n 3400/8218 [===========>----------------] 41%\n 3900/8218 [=============>--------------] 47%\n 4500/8218 [===============>------------] 54%\n 5100/8218 [=================>----------] 62%\n 5700/8218 [===================>--------] 69%\n 6300/8218 [=====================>------] 76%\n 6800/8218 [=======================>----] 82%\n 7500/8218 [=========================>--] 91%\n 8000/8218 [===========================>] 97%\n 8218/8218 [============================] 100% 0 [>---------------------------]\n 2400 [-------------------->-------]", "stderr_lines": [" 0/8218 [>---------------------------] 0%", " 500/8218 [=>--------------------------] 6%", " 1100/8218 [===>------------------------] 13%", " 1500/8218 [=====>----------------------] 18%", " 2200/8218 [=======>--------------------] 26%", " 2800/8218 [=========>------------------] 34%", " 3400/8218 [===========>----------------] 41%", " 3900/8218 [=============>--------------] 47%", " 4500/8218 [===============>------------] 54%", " 5100/8218 [=================>----------] 62%", " 5700/8218 [===================>--------] 69%", " 6300/8218 [=====================>------] 76%", " 6800/8218 [=======================>----] 82%", " 7500/8218 [=========================>--] 91%", " 8000/8218 [===========================>] 97%", " 8218/8218 [============================] 100% 0 [>---------------------------]", " 2400 [-------------------->-------]"], "stdout": "Checking if SELinux is enabled...Its not (good)!\nReading /etc/asterisk/asterisk.conf...Done\nChecking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 21.0.2\nChecking if NodeJS is installed and we can get a version from it...Yes. Determined NodeJS version to be: 20.11.0\nPreliminary checks done. Starting FreePBX Installation\nChecking if this is a new install...Yes (No /etc/freepbx.conf file detected)\nDatabase installation checking credentials and permissions..Connected!\nEmpty asterisk Database going to populate it\nUpdating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications, cron_jobs...Done\nEmpty asteriskcdrdb Database going to populate it\nInitializing FreePBX Settings\n\tChanging AMPWEBROOT [/var/www/html] to match what was given at install time: /var/www/html/freepbx\n\tChanging AMPMGRUSER [admin] to match what was given at install time: f3a3545acd0cba95842107d13d8c932f\n\tChanging AMPMGRPASS [amp111] to match what was given at install time: 8ae6bb3fe325446c2fa0ca21bb27ac9a\nFinished initalizing settings\nCopying files (this may take a bit)....\n\nDone\nbin is: /var/lib/asterisk/bin\nsbin is: /usr/sbin\nSymlinking /var/lib/asterisk/bin/fwconsole to /usr/sbin/fwconsole ...Done\nSymlinking /var/lib/asterisk/bin/amportal to /usr/sbin/amportal ...Done\nFinishing up directory processes...Done!\nRunning variable replacement...Done\nCreating missing #include files...Done\nSetting up Asterisk Manager Connection...Done\nRunning through upgrades...\nChecking for upgrades..\nNo further upgrades necessary\nFinished upgrades\nSetting FreePBX version to 17.0.14.24...Done\nWriting out /etc/amportal.conf...Done\nWriting out /etc/freepbx.conf...Done\nChowning directories...\nSetting Permissions...\nSetting base permissions...Done in 0 seconds\nSetting specific permissions...\n\nFinished setting permissions\nDone\nInstalling framework...\nDone\nBuilding Packaged Scripts...Done\nTrusting FreePBX...Trusted\nGenerating default configurations...\nFinished generating default configurations\nYou have successfully installed FreePBX", "stdout_lines": ["Checking if SELinux is enabled...Its not (good)!", "Reading /etc/asterisk/asterisk.conf...Done", "Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 21.0.2", "Checking if NodeJS is installed and we can get a version from it...Yes. Determined NodeJS version to be: 20.11.0", "Preliminary checks done. Starting FreePBX Installation", "Checking if this is a new install...Yes (No /etc/freepbx.conf file detected)", "Database installation checking credentials and permissions..Connected!", "Empty asterisk Database going to populate it", "Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications, cron_jobs...Done", "Empty asteriskcdrdb Database going to populate it", "Initializing FreePBX Settings", "\tChanging AMPWEBROOT [/var/www/html] to match what was given at install time: /var/www/html/freepbx", "\tChanging AMPMGRUSER [admin] to match what was given at install time: f3a3545acd0cba95842107d13d8c932f", "\tChanging AMPMGRPASS [amp111] to match what was given at install time: 8ae6bb3fe325446c2fa0ca21bb27ac9a", "Finished initalizing settings", "Copying files (this may take a bit)....", "", "Done", "bin is: /var/lib/asterisk/bin", "sbin is: /usr/sbin", "Symlinking /var/lib/asterisk/bin/fwconsole to /usr/sbin/fwconsole ...Done", "Symlinking /var/lib/asterisk/bin/amportal to /usr/sbin/amportal ...Done", "Finishing up directory processes...Done!", "Running variable replacement...Done", "Creating missing #include files...Done", "Setting up Asterisk Manager Connection...Done", "Running through upgrades...", "Checking for upgrades..", "No further upgrades necessary", "Finished upgrades", "Setting FreePBX version to 17.0.14.24...Done", "Writing out /etc/amportal.conf...Done", "Writing out /etc/freepbx.conf...Done", "Chowning directories...", "Setting Permissions...", "Setting base permissions...Done in 0 seconds", "Setting specific permissions...", "", "Finished setting permissions", "Done", "Installing framework...", "Done", "Building Packaged Scripts...Done", "Trusting FreePBX...Trusted", "Generating default configurations...", "Finished generating default configurations", "You have successfully installed FreePBX"]}

And perhaps similar to RonR's fwconsole reload failing, mine also failed, but in a somewhat different way;

root@box:~# fwconsole reload
Reload Started

In DialplanHooks.class.php line 157:

  Undefined variable $funclist


reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]

@holta
Copy link
Member Author

holta commented Jan 13, 2024

I on Debian 12 and @EMG70 on Ubuntu 24.04 pre-release

Possibly we need to wait a few more weeks until FreePBX 17 stabilizes? FWIW my Debian 12 VM shows:

root@box:~# node -v
v20.11.0
root@box:~# php -v
PHP 8.2.7 (cli) (built: Jun  9 2023 19:37:27) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.7, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.7, Copyright (c), by Zend Technologies

Just FYI I and @EMG70 both used the same pbx.yml cloud-init scripts to try to install Asterisk 21 and FreePBX 17 BETA onto IIAB:

runcmd:
  - mkdir -p /etc/iiab
  - |
    cat >> /etc/iiab/local_vars.yml << EOF
    pbx_install: True
    pbx_enabled: True
    asterisk_src_file: asterisk-21-current.tar.gz
    freepbx_git_branch: release/17.0

    calibreweb_install: False
    calibreweb_enabled: False
    kalite_install: False
    kalite_enabled: False
    kiwix_install: False
    kiwix_enabled: False
    osm_vector_maps_install: False
    awstats_install: False
    awstats_enabled: False
    matomo_install: False
    matomo_enabled: False
    captiveportal_install: False
    admin_console_install: False
    admin_console_enabled: False
    EOF
  - curl iiab.io/risky.txt | bash &

I ran it on Debian 12 using:

multipass launch https://cloud.debian.org/images/cloud/bookworm/daily/latest/debian-12-generic-amd64-daily.qcow2 -n deb12 -c 2 -m 2G -d 20G --cloud-init pbx.yml --bridged

He ran it on Ubuntu 24.04 (pre-release) using:

multipass launch 24.04 -c 2 -m 2G -d 20G -n freepbx --cloud-init pbx.yml --bridged

@holta holta changed the title pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 (later in 2023 or early 2024, when FreePBX 17 officially supports Asterisk 21!) pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 now tolerates Asterisk 21!) Jan 13, 2024
@holta holta changed the title pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 now tolerates Asterisk 21!) pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 BETA now tolerates Asterisk 21!) Jan 14, 2024
@holta holta changed the title pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 BETA now tolerates Asterisk 21!) pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 BETA now tolerates Asterisk 21!] Jan 14, 2024
@holta
Copy link
Member Author

holta commented Feb 25, 2024

While ugly, this appears to work installing onto Debian 12 Bookworm (x86_64).

FWIW the 18+1 FreePBX modules appear to be unchanged (so far!?) as compared to 21 months ago...

root@deb12b:~# fwconsole ma list
No repos specified, using: [standard] from last GUI settings

+------------------+-----------+---------+---------+-----------+
| Module           | Version   | Status  | License | Signature |
+------------------+-----------+---------+---------+-----------+
| backup           | 17.0.5.12 | Enabled | GPLv3+  | Sangoma   |
| builtin          |           | Enabled |         | Unsigned  |
| callrecording    | 17.0.3.4  | Enabled | AGPLv3+ | Sangoma   |
| cdr              | 17.0.4.9  | Enabled | GPLv3+  | Sangoma   |
| conferences      | 17.0.3.1  | Enabled | GPLv3+  | Sangoma   |
| core             | 17.0.9.21 | Enabled | GPLv3+  | Sangoma   |
| customappsreg    | 17.0.1    | Enabled | GPLv3+  | Sangoma   |
| dashboard        | 17.0.4.2  | Enabled | AGPLv3+ | Sangoma   |
| featurecodeadmin | 17.0.2    | Enabled | GPLv3+  | Sangoma   |
| filestore        | 17.0.2.9  | Enabled | AGPLv3  | Sangoma   |
| framework        | 17.0.15.2 | Enabled | GPLv2+  | Sangoma   |
| infoservices     | 17.0.1    | Enabled | GPLv2+  | Sangoma   |
| logfiles         | 17.0.2    | Enabled | GPLv3+  | Sangoma   |
| music            | 17.0.4    | Enabled | GPLv3+  | Sangoma   |
| pm2              | 17.0.3    | Enabled | AGPLv3+ | Sangoma   |
| recordings       | 17.0.2.2  | Enabled | GPLv3+  | Sangoma   |
| sipsettings      | 17.0.6.2  | Enabled | AGPLv3+ | Sangoma   |
| soundlang        | 17.0.4    | Enabled | GPLv3+  | Sangoma   |
| voicemail        | 17.0.5.9  | Enabled | GPLv3+  | Sangoma   |
+------------------+-----------+---------+---------+-----------+\

@holta
Copy link
Member Author

holta commented Feb 25, 2024

This PR is an ugly hack, but FYI it works — e.g. not just on Debian 12 (http://sprunge.us/GYH536?en) but it also currently works to install Asterisk 21.1.0 and FreePBX 17.0.15.2 onto Ubuntu 24.04 with PHP 8.3:

http://sprunge.us/tWZLsY?en

@holta holta merged commit 81aca5f into iiab:master Feb 25, 2024
2 of 3 checks passed
@holta
Copy link
Member Author

holta commented Feb 25, 2024

@EMG70 now that this is merged, can you also test Raspberry Pi OS "Bookworm" — to see if Asterisk 21 and FreePBX 17 might possibly also work on Raspberry Pi too?

@holta holta changed the title pbx/defaults/main.yml: Try Asterisk 21 and FreePBX 17 again in Q1/Q2 2024? [GOOD NEWS: FreePBX 17 BETA now tolerates Asterisk 21!] Ugly hack... works to install Asterisk 21 and FreePBX 17 Beta onto Debian 12 and Ubuntu 24.04 Feb 25, 2024
@EMG70
Copy link
Contributor

EMG70 commented Feb 25, 2024

@EMG70 now that this is merged, can you also test Raspberry Pi OS "Bookworm" — to see if Asterisk 21 and FreePBX 17 might possibly also work on Raspberry Pi too?

Ok will do

@EMG70
Copy link
Contributor

EMG70 commented Feb 26, 2024

Freepbx installed on Ububtu 22.04 VM ,no issues observed.Freepbx working OK php 8.2
IIAB-DIAGNOSTICS http://sprunge.us/m3hDsS?en
Screenshot from 2024-02-26 00-54-08
Screenshot from 2024-02-26 00-53-52

@EMG70
Copy link
Contributor

EMG70 commented Feb 26, 2024

Asterisk 21 & Freepbx 17 installed on Raspberry Pi400 no issues observed.Freepbx working OK php 8.2
IIAB-DIAGNOSTICS - http://sprunge.us/uXiETb?en
IMG_2763

@holta
Copy link
Member Author

holta commented Feb 26, 2024

php 8.1.2

I think you mean PHP 8.2

Line 124 of http://sprunge.us/uXiETb?en says:

php_version = 8.2

@EMG70
Copy link
Contributor

EMG70 commented Feb 26, 2024

php 8.1.2

I think you mean PHP 8.2

Line 124 of http://sprunge.us/uXiETb?en says:

php_version = 8.2

I have corrected it to PHP 8.2.Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants