Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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;

Code Block
asterisk-version-switch

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

Code Block
        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

Code Block
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.

Code Block
asterisk18 has now been verified to be installed
Starting Asterisk...

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:

Code Block
#  asterisk -x "core show version"
Asterisk 13.9.1 built by mockbuild @ jenkins2.schmoozecom.net on a x86_64 running Linux on 2016-05-13 20:33:39 UTC

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

Code Block
fwconsole restart

The final step is to reload the system dial plan:

Code Block
fwconsole reload

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

Code Block
# asterisk-version-switch -v
Version     : 6.1
Release     : 25.sng7

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

Code Block
# asterisk-version-switch 7