Changing Major Asterisk Versions on the Fly

The FreePBX Distro has a built-in utility to allow you to change the Major Asterisk version you are using or even reinstall the same version of Asterisk. 

To change which Major Asterisk release you are using type;

asterisk-version-switch

 You will then be prompted to pick which Asterisk Version to install

        Current version:  Asterisk 18.15.1 is running           (LTS) = Long Term Support | (EOL) = End of Life | (S) = Standard           Press 1 for  Asterisk 13 (EOL)         Press 2 for  Asterisk 13 Certified (EOL)         Press 3 for  Asterisk 15 (EOL)         Press 4 for  Asterisk 16 (EOL)         Press 5 for  Asterisk 16 Certified (EOL)         Press 6 for  Asterisk 17 (EOL)         Press 7 for  Asterisk 18 (LTS)         Press 8 for  Asterisk 18 Certified (LTS)         Press 9 for  Asterisk 19 (EOL)         Press 0 for  Asterisk 20 (LTS)           Press q to exit and not change your Asterisk Version   This action below will cause Asterisk to stop and all calls in progress will be terminated   Please, select the Asterisk Version to change to :

Choosing a selection will prompt for confirmation then start the download and install

Please, select the Asterisk Version to change to : 7   Selected Asterisk 18. Confirm (y/N)? y   You picked asterisk18 - clearing yum cache

The install will proceed for several minutes, after which there is a confirmation of the installed version. All PBX services will then be restarted which can take another minute or more.

The PBX will then perform a reload and re-write all the configuration files based on the version of Asterisk you switch to.

You can verify the running version of Asterisk at the bash prompt with:

If the old Asterisk version is still shown, you can restart with:

The final step is to reload the system dial plan:

Starting in asterisk-version-switch ver. 6.1, a version check flag has been added:

For unattended mode, you can run the script with an argument specifying the Asterisk version index:

 

Unable to render {include} The included page could not be found.