Updating Asterisk

If this is your first installation, you can skip ahead to the section the section called “Base Configuration”. If you’re in the process of updating your system, however, there are a couple of things you should be aware of.


When we say updating your system, that is quite different from upgrading your system. Updating your system is the process of installing new minor versions of the same branch. For example, if your system is running Asterisk 1.8.2 and you need to upgrade to the latest bug fix version for the 1.8 branch, which was version 1.8.3, you’d be updating your system to 1.8.3. In contrast, we use the term upgrade to refer to changes between Asterisk branches (major version number increases). So, for example, an upgrade would be going from Asterisk 1.4.34 to Asterisk 1.8.0.

When performing an update, you follow the same instructions outlined in the section the section called “How to Install It”.


Additionally, if you’ve checked out a new directory for this version of Asterisk (versus running svn up on a checked-out branch), and previously used menuselect to tweak the modules to be compiled, you can copy the menuselect.makeopts file from one directory to another prior to running ./configure. By copying menuselect.makeopts from the old version to the new version, you save the step of having to (de)select all your modules again.

The basic steps are:

$ cd ~/src/asterisk-complete/asterisk/1.8.<your version number>/
$ ./configure
$ make
$ make install


You don’t need to run sudo make install because we’ve already set the directory ownership to the asteriskpbx user. You should be able to install new files directly into the appropriate directories.

Upon installation, however, you may get a message like the following:


 Your Asterisk modules directory, located at
 contains modules that were not installed by this
 version of Asterisk. Please ensure that these
 modules are compatible with this version before
 attempting to run Asterisk.



This warning message is indicating that modules installed in the /usr/lib/asterisk/modules/ directory are not compatible with the version you’ve just installed. This most often occurs when you have installed modules in one version of Asterisk, and then installed a new version of Asterisk without compiling those modules (as the installation process will overwrite any modules that existed previously, replacing them with their upgraded versions).

To get around the warning message, you can clear out the /usr/lib/asterisk/modules/ directory prior to running make install. There is a caveat here, though: if you’ve installed third-party modules, such as commercial modules from Digium (including chan_skype, codec_g729a, etc.), you will need to reinstall those if you’ve cleared out your modules directory.

It is recommended that you keep a directory with your third-party modules in it that you can reinstall from upon update of your Asterisk system. So, for example, you might create the /usr/src/asterisk-complete/thirdparty/1.8 directory as follows:

$ cd ~/src/asterisk-complete/
$ mkdir thirdparty/
$ mkdir thirdparty/1.8/

Downloading third-party modules into this directory allows you to easily reinstall those modules when you upgrade. Just follow the installation instructions for your module, many of which will be as simple as rerunning make install from the modules source directory or copying the precompiled binary to the /usr/lib/asterisk/modules/ directory.


Be sure to change the file permissions to match those of the user running Asterisk!