In order to upgrade Asterisk to a major version, for example asterisk 11 to 13 in this article, you can follow the steps below:
Backup
1. It is always recommended to backup /etc/asterisk and necessary modules before proceeding.
1 2 |
cp -rvp /etc/asterisk/ backup/asterisk.bak.v11 cp -rvp /usr/lib64/asterisk/modules backup/modules.bak.v11 |
2. Beside modules, you can also backup database just in case.
1 2 |
mysqldump -u root asterisk > backup/asterisk.bak.sql mysqldump -u root asteriskcdrdb > backup/asteriskcdrdb.bak.sql |
Upgrade
1. It is up to you whether to remove the previous version or not. If you would like to get rid of everything, then do the following:
1 2 3 4 5 |
cd /usr/src cd asterisk-11* make uninstall make dist-clean reboot |
Now we can start the upgrade.
2. To install the newer version of Asterisk, in this case Asterisk 13, just follow the usual installation procedures.
Note: for Asterisk after 13.8, you will need to include pjproject bundled.
1 2 3 4 5 6 7 8 |
cd /usr/src tar xvfz asterisk-13-current.tar.gz rm -f asterisk-13-current.tar.gz cd asterisk-* contrib/scripts/install_prereq install ./configure --libdir=/usr/lib64 --with-pjproject-bundled contrib/scripts/get_mp3_source.sh make menuselect |
You can refer to previous article for reference.
3. When doing make install, you might encounter errors as following:
WARNING WARNING WARNING
Installation is to:
/usr/lib
but there are asterisk shared libraries in:
/usr/lib64
or
/usr/lib64/asterisk/modulesIt is unlikely that asterisk will start.
If you see this error, do make uninstall first, then continue with the installation.
Or you might see this error:
WARNING WARNING WARNING
Your Asterisk modules directory, located at
/usr/lib/asterisk/modules
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.chan_mgcp.so
chan_oss.so
chan_phone.so
chan_skinny.so
chan_skype.so
codec_g729a.so
res_skypeforasterisk.so
Just delete /usr/lib64/asterisk/modules, and it should be fine.(Make sure the modules are already backuped)
4. When the installation is done, if asterisk is still running, stop it first.
1 2 |
asterisk -r core stop now |
Then start the new version of asterisk:
1 2 3 |
asterisk asterisk -r core show version |
and should see something like:
1 |
Asterisk 13.23.1 built by root @ localhost.localdomain on a x86_64 running Linux |
5. Finally, restart your server
1 |
fwconsole restart |
- Asteriskワーニング:Autodestruct on dialog - 2022-03-02
- Kamailioを設定しましょう - 2021-07-02
- AWSでKamailioを構築 - 2021-06-13
- XCALLYでVoice botを作ってみました【Dialogflow×AWS Polly×GoogleASR】 - 2020-12-01
- Creating Simple Graph/Table for XCALLY agent in Grafana - 2019-09-04