Upgrading from Asterisk 16 to Asterisk 20 or 22

I run the asterisk-version-upgrade script. A ton of messages go past my screen, then when Asterisk tries to reload I get the error message that I am still running version 16. What am I doing wrong?

HI @gregorywest Can you share the error message you get when you reload Asterisk? Also, what is your FreePBX version? FreePBX v16 supports up to Asterisk 20.

version is FreePBX 17.
error message is “Faital. Running unsupported version of asterisk. Supported versions are. 19,19, 20, 21 22, 23. Detected Asterisk Version 16.0

this is after running asterisk-version-update script

The FreePBX V17 system support asterisk V18 and above only . How come your system has the asterisk V16?

I restored from production environment.

is there a better way to migrate to curent version? production is Incredable PBX on top of Rocky 8. going to clean FreePBX on top of Debian.

Restored how and in what sense? A backup of FreePBX? An image of the system?

Because there is the “Manual Installation” process that has been around for years upon years. FreePBX v17 will work with Asterisk v16 but what won’t work is installing the packages from the Sangoma Debian 12 repos and trying to run asterisk-version-switch against a version of Asterisk that asterisk-version-switch doesn’t support.

The OP will need to manually update Asterisk from v16 to at least v18 before being able to run asterisk-version-switch to manage Asterisk versions. But then you run into having installed Asterisk by source but asterisk-version-switch will attempt to install packaged versions of Asterisk. Not sure how that will play out.

Was a backup of my IncredablePBX. Did a restore into the FreePBX 17 setup.

As for how well this will work, thank god for sandbox environments :slight_smile: Got some code to try to raise 16.0 to 18":

cd /root
rm -f upgrade-asterisk18-current
wget http://incrediblepbx.com/upgrade-asterisk18-current
chmod +x upgrade-asterisk18-current
./upgrade-asterisk18-current
sed -i 's|47|50|' /usr/local/sbin/pbxstatus

Trying this out now.   Will post in a few hours as to how everything went.
Greg

P.S.

Ran the scripts, ran asterisk-version-switch and tried to switch to version 18. Asterisk still thinks I am on version 16.0.
Question is where is it getting this version number from?

What was the last version of FreePBX that supported version 16? Maybe I should be doing the upgrades in steps.

How does one manually upgrade from Asterisk 16 to 18? I tried the script I sent before. Still does not work. Sigh….

IncrediblePBX gives you scripts in your /root directory to upgrade Asterisk to newer versions. If your system is older, you may have to edit the script for the version of Asterisk it will install.

Current IncrdiblePBX-2025 is on Debian-12, PHP 8.2, Asterisk 22.6 and FreePBX-17. If you’re trying to mix and match IncrediblePBX parts with different FreePBX upgrades, you’re not going to have good results.

If you’re wanting to go purely FreePBX distro, you are better off doing a FreePBX backup of your IncrediblePBX system and saving it to your desktop. Then create an all new FreePBX distro system and when it is up and running, restore the IncrediblePBX’s FreePBX backup to the new system. Do not use the Incrediblebackup2021 that is in your /root directory as it will break your new install.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.