Asterisk Upgrade: Difference between revisions

From KlavoWiki
Jump to navigationJump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
This upgrade is based on:
I've been using this bash script to upgrade my Asterisk versions, staying with the same release number.
* Asterisk 1.6.0.1 to 1.6.0.3
<pre>
** 1.6.0.3 to 1.6.0.5
#!/bin/bash
* DAHDI Linux 2.0.0 to 2.1.0.3
 
** 2.1.0.3 to 2.1.0.4
ASTER=12
* DAHDI Tools 2.0.0 to 2.1.0.2


<br>
= Prerequisite =
It is not necessary but I like doing it as a precaution.  I stop DAHDI and Asterisk before the upgrade.
<pre>
service asterisk stop
service dahdi stop
</pre>


= DAHDI =
cd /usr/src
== DAHDI Linux ==
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-$ASTER-current.tar.gz
<pre>
tar xvf asterisk-$ASTER-current.tar.gz
cd dahdi-linux-2.1.0.3
rm -f asterisk-$ASTER-current.tar.gz
make
make install
</pre>


== DAHDI Tools ==
if [ -d $(tar tvf asterisk-$ASTER-current.tar.gz | tail -n 1 | cut -d' ' -f11 | cut -d'/' -f1) ]
<pre>
then
cd dahdi-tools-2.1.0.2
  echo "Folder already Exists. Upgrade Aborted"
  exit 0
fi


cd $(ls -d /usr/src/asterisk-$ASTER* | tail -1 |  cut -d' ' -f8)
./configure
./configure
make menuselect
./contrib/scripts/get_mp3_source.sh
 
make menuselect.makeopts
menuselect/menuselect --enable format_mp3 --enable app_mysql --enable cdr_mysql --enable app_fax --enable app_meetme --disable pbx_ael --disable pbx_realtime --disable-category MENUSELECT_CDR --disable-category MENUSELECT_CORE_SOUNDS --disable-category MENUSELECT_MOH --disable-category MENUSELECT_EXTRA_SOUNDS menuselect.makeopts
 
if [ $ASTER -eq 12 ]
then
  menuselect/menuselect --disable res_ari --disable res_ari_model menuselect.makeopts
fi
 
make
make
make install
make install
</pre>
</pre>


= Asterisk =
 
manual commands
<pre>
<pre>
cd asterisk-1.6.0.3
./configure
./configure
make menuselect
./contrib/scripts/get_mp3_source.sh
make
 
make upgrade
make menuselect.makeopts
</pre>
 
menuselect/menuselect --enable format_mp3 --enable app_mysql --enable cdr_mysql --enable app_fax --enable app_meetme --disable pbx_ael --disable pbx_realtime --disable-category MENUSELECT_CDR --disable-category MENUSELECT_CORE_SOUNDS --disable-category MENUSELECT_MOH --disable-category MENUSELECT_EXTRA_SOUNDS menuselect.makeopts


== Asterisk Addons ==
menuselect/menuselect --disable res_ari --disable res_ari_model menuselect.makeopts
Even if there is not a newer version of the Asterisk addons you still need to recompile and install as  you will get errors like:
<pre>
WARNING[12164] loader.c: Module 'cdr_addon_mysql.so' was not compiled with the same compile-time options as this version of Asterisk.
</pre>


Install addons.
<pre>
cd asterisk-addons-1.6.0
./configure
make
make
make install
make install
</pre>
</pre>


= Start Services =
[[Category : Asterisk]] [[Category : Linux]]
If you stoped the services before the upgrade you now need to start them again.
<pre>
service dahdi start
service asterisk start
</pre>
 
 
[[Category : Asterisk]]

Latest revision as of 02:46, 3 June 2014

I've been using this bash script to upgrade my Asterisk versions, staying with the same release number.

#!/bin/bash

ASTER=12


cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-$ASTER-current.tar.gz
tar xvf asterisk-$ASTER-current.tar.gz
rm -f asterisk-$ASTER-current.tar.gz

if [ -d $(tar tvf asterisk-$ASTER-current.tar.gz | tail -n 1 | cut -d' ' -f11 | cut -d'/' -f1) ]
 then
   echo "Folder already Exists.  Upgrade Aborted"
   exit 0
 fi

cd $(ls -d /usr/src/asterisk-$ASTER* | tail -1 |  cut -d' ' -f8)
./configure
./contrib/scripts/get_mp3_source.sh

make menuselect.makeopts
menuselect/menuselect --enable format_mp3 --enable app_mysql --enable cdr_mysql --enable app_fax --enable app_meetme --disable pbx_ael --disable pbx_realtime --disable-category MENUSELECT_CDR --disable-category MENUSELECT_CORE_SOUNDS --disable-category MENUSELECT_MOH --disable-category MENUSELECT_EXTRA_SOUNDS menuselect.makeopts

if [ $ASTER -eq 12 ]
 then
  menuselect/menuselect --disable res_ari --disable res_ari_model menuselect.makeopts
 fi

make
make install


manual commands

./configure
./contrib/scripts/get_mp3_source.sh

make menuselect.makeopts

menuselect/menuselect --enable format_mp3 --enable app_mysql --enable cdr_mysql --enable app_fax --enable app_meetme --disable pbx_ael --disable pbx_realtime --disable-category MENUSELECT_CDR --disable-category MENUSELECT_CORE_SOUNDS --disable-category MENUSELECT_MOH --disable-category MENUSELECT_EXTRA_SOUNDS menuselect.makeopts

menuselect/menuselect --disable res_ari --disable res_ari_model menuselect.makeopts

make
make install