FreePBX 15 to 16 Upgrade via CLI

Here are the commands to enter to complete an upgrade from FreePBX 15 to 16. In most of our installs where CHAN_SIP trunks and extensions were present, we converted all of them to PJSIP ahead of the upgrade. CHAN_SIP is still very much working in the new version of FreePBX, but Sangoma is slowly phasing it out.

I would recommend a VM snapshot or some sort of backup prior to starting the upgrade procedure. Source link.

yum upgrade -y
fwconsole ma upgradeall
fwconsole chown
fwconsole reload
fwconsole ma downloadinstall versionupgrade
fwconsole chown
fwconsole reload
fwconsole versionupgrade --check

Stop here and look at the check to make sure you are ready to go. Fix any issues presented. Here are several commands to remove modules that were problematic in our various installs.

fwconsole ma remove campon
fwconsole ma remove restapi
fwconsole ma remove digiumaddoninstaller

Use this command to execute the upgrade. INTERRUPT IT AT YOUR OWN PERIL!

fwconsole versionupgrade --upgrade

Keep an eye on the installer as you might need to fix some components. Users with endpoint manager may find the module disabled and awaiting an upgrade post installation.

fwconsole chown
fwconsole reload
fwconsole restart

Check the FreePBX Web UI for any issues or errors. Upgrade modules as instructed. For good measure reboot your system using:

reboot

In our experience some virtual environments needed a hard reset after the waiting for the reboot command to attempt a reboot.

Also you may receive a "Warning: RPMDB altered outside of yum." during OS upgrades as a result of the upgrade. To fix:

yum history sync