Asterisk 19.1.0 and FreePBX install

When starting the ./install -n command I get this error:
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Error!
Unsupported Version of 19.1.0
Supported Asterisk versions: 13, 14, 15, 16, 17, 18
Is there a file I can edit to allow to install to continue?

Hi @GentleRV Are you using framework 15 or 16? Edge release of 15 and16 framework should be good.

I am installing this on a Ubuntu server

What’s your Freepbx framework version?

The used Ubuntu version is 20.04.3.

Let’s try this again, what version of FreePBX are you trying to install? FreePBX 15 or FreePBX 16?

1 Like

See: [FREEPBX-23002] Add support for Asterisk 19 - Sangoma Issue Tracker

install.php and installlib/installcommand.class.php have not been updated to allow installation of Asterisk 19.

Until they are, the following modifications are required prior to running ‘./install -n’:

sed -i s’|“19”;|“20”;|’ /usr/src/freepbx/amp_conf/htdocs/admin/libraries/utility.functions.php
sed -i s’|“19”, “ge”|“20”, “ge”|’ /usr/src/freepbx/installlib/installcommand.class.php
sed -i s’|“19”, “ge”|“20”, “ge”|’ /usr/src/freepbx/install.php

Why aren’t we asking “Are Asterisk 19 and FreePBX compatible?”

Is there an assumption that they are fully compatible and the only hurdle is bypassing the Asterisk version test in the installer?

Am I wrong for thinking this would be a good assurance to have?

1 Like

Running Asterisk 19 with FreePBX 15/16 is largely compatible but not yet officially supported as there hasn’t been a lot of testing done yet. The latest edge versions of framework for FreePBX 15 and 16 will support Asterisk 19, but there are a few non-critical places still in FreePBX that touch deprecated Asterisk modules (i.e. app_mysql in CID Lookup module). We’ve had updated rpms for Asterisk 19 and the asterisk-version-switch utility in the dev repos for some time now, but have been delayed in promoting to the production repo due to internal scheduling priorities.

I’ve been running 19 on my test systems and opening tickets as I see things.

There are no ’ breaking changes to be aware of when upgrading from Asterisk 18 to Asterisk 19’ listed on the Asterisk Wiki.

Except for the fact the current releases of Asterisk have things like app_macro and chan_sip no longer compiling without telling it to during configuration. There is also, as @lgaetz mentioned, modules that are now removed that FreePBX depends on. This will happen again in 21 when it is released next year and things like chan_sip are completely removed.

The used Freepbx version is 15 latest
From the version 16 I only could find a beta and the distro

When executing the sed command I get with the first line:
sed -i s’|“19”;|“20”;|’ /usr/src/freepbx/amp_conf/htdocs/admin/libraries/utility.functions.php
-bash: syntax error near unexpected token `|’

With the second line I get:
sed -i s’|“19”, “ge”|“20”, “ge”|’ /usr/src/freepbx/installlib/installcommand.class.php
sed: -e expression #1, char 2: delimiter character is not a single-byte character
’: command not found
“20”,: command not found
“19”,: command not found

The third line give me:
sed -i s’|“19”, “ge”|“20”, “ge”|’ /usr/src/freepbx/install.php
sed: -e expression #1, char 2: delimiter character is not a single-byte character
“20”,: command not found
’: command not found
“19”,: command not found

You’re using the wrong single-quote character.

I tried even to type in all command by hand, still got errors with sed.
Modified with nano the mentioned files and added after , 18, 19, 20
This I did with the php files
after executing the ./install -n I see this:
sudo ./install -n
Assuming you are Database Root
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…Error!
Unsupported Version of 19.1.0
Supported Asterisk versions: 13, 14, 15, 16, 17, 18, 19, 20
After editing again and changed the test parameters to higher versions I get the error that Node.JS is not the right version and must be above version 8
npm -v give me 8.1.2

Maybe need to wait to the official release from FreePBX 16

I think you only modified the error messages. You also need to modify the test right before the error messages:

if (version_compare($astversion, "13", "lt") || version_compare($astversion, "20", "ge")) {

Using the installer tarballs is problematic because Sangoma almost never updates them until somebody complains that they’re out-of-date (which they currently are).

A much better way to install FreePBX is as follows (no tarball involved):

# Download And Install FreePBX
touch /etc/asterisk/{modules,statsd,smdi}.conf
cd /usr/src
git clone --branch release/16.0 --depth 1 https://github.com/FreePBX/framework.git
mv framework freepbx
cd /usr/src/freepbx
./start_asterisk start
./install --no-interaction
if [ $? -ne 0 ]; then
  echo ""
  echo "FreePBX installation failed!"
  echo ""
  exit 1
fi
fwconsole ma downloadinstall framework
fwconsole reload
fwconsole ma downloadinstall cdr conferences customappsreg dashboard featurecodeadmin infoservices music pm2 sipsettings voicemail
fwconsole ma downloadinstall announcement asteriskinfo blacklist callforward callrecording callwaiting configedit disa \
donotdisturb findmefollow hotelwakeup iaxsettings miscapps miscdests outroutemsg parking ringgroups superfecta

Thanks for you help, really appreciate it.
Created a script with your information and executed it
node --version give v16.13.2

The error I received is:
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: 19.1.0
Checking if NodeJS is installed and we can get a version from it…sh: 1: node: not found
NodeJS 8 or higher is not installed. This is now a requirement
./FreePBX16-Install.sh: 15: fwconsole: not found
./FreePBX16-Install.sh: 16: fwconsole: not found
./FreePBX16-Install.sh: 17: fwconsole: not found
./FreePBX16-Install.sh: 18: fwconsole: not found

When you attempt to install FreePBX, you have to have Asterisk and other prerequisites installed.

NodeJS is one of them:

  # Install nodejs
  curl -sL https://deb.nodesource.com/setup_16.x | bash -
  apt-get -y install nodejs

You might want to take a look at:

[PBX] FreePBX for the Raspberry Pi - VOIP Tech Chat | DSLReports Forums

This is a script that builds Asterisk+FreePBX from the ground up on a Raspberry Pi. It won’t run as-is on Ubuntu, but it should give you the overall picture of what’s involved.

Thank you but Node JS is installed.
Node --version = v16.13.2

I’m not sure what is going wrong. Here is what I get:

STARTING ASTERISK
Asterisk Started
Assuming you are Database Root
Checking if SELinux is enabled...Its not (good)!
No /etc/asterisk/asterisk.conf file detected. Installing...Writing /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: 19.1.0
Checking if NodeJS is installed and we can get a version from it...Yes. Determined NodeJS version to be: 16.13.2
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install...Yes (No /etc/freepbx.conf file detected)
Database Root 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
Changing AMPMGRPASS [amp111] to match what was given at install time: b60db852eee369662e0bd1cf9cc0e619
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 16.0.14...Done
Writing out /etc/amportal.conf...Done
Writing out /etc/freepbx.conf...Done
Chowning directories...
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 1 seconds
Setting specific permissions...
Finished setting permissions
Done
Installing framework...
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications, cron_jobs...Done
Determined Asterisk version to be: 19.1.0
No directory /var/www/html/admin/modules/framework/amp_conf/htdocs, install script not needed
Generating CSS...Done
Module framework version 16.0.14 successfully installed
Updating Hooks...Done
Chowning directories...Done
Updating tables admin, ampusers, cronmanager, featurecodes, freepbx_log, freepbx_settings, globals, module_xml, modules, notifications, cron_jobs...Done
Determined Asterisk version to be: 19.1.0
No directory /var/www/html/admin/modules/framework/amp_conf/htdocs, install script not needed
Generating CSS...Done
Module framework version 16.0.14 successfully installed
Updating Hooks...Done
Chowning directories...Done
Done
Building Packaged Scripts...Done
Trusting FreePBX...Trusted
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 1 seconds
Setting specific permissions...
Finished setting permissions
Taking too long? Customize the chown command, See http://wiki.freepbx.org/display/FOP/FreePBX+Chown+Conf
Setting Permissions...
Setting base permissions...Done in 1 seconds
Setting specific permissions...
Finished setting permissions
Generating default configurations...
Finished generating default configurations
You have successfully installed FreePBX

I searched on my system Ubuntu 20.04.3 for fwconsole, it is not present.
Will find a way to install this, fwconsole is not in the apt collection to find
According to the FreePBX documentation it must be a script, in the /usr/src/freepbx directory is nothing to find with this name.
Just see your answer, I think nothing is yet installed or it failed to install