Hello, everyone.
How do I correctly upgrade asterisk. Currently I need to upgrade from 1.2.7 to 1.2.10. Will the configuration from 1.2.7 will work with 1.2.10? Will 1.2.10 understand the astdbfile backed up from 1.2.7? Where can I get this sort of information for the future (Are those kind of changes reviewed in Changelog?)? Please, share your experience. Thanks in advance.
you installed from source I hope
For Asterisk with freepbx if not using freepbx then just stop asterisk
amportal stop
cd /usr/src
wget ftp.digium.com/pub/zaptel/releas … 2.6.tar.gz
wget ftp.digium.com/pub/libpri/releas … 2.3.tar.gz
wget ftp.digium.com/pub/asterisk/rele … 2.9.tar.gz
wget ftp.digium.com/pub/asterisk/rele … 2.3.tar.gz
wget ftp.digium.com/pub/asterisk/rele … 2.1.tar.gz
tar -zxvf zaptel-1.2.6.tar.gz
tar -zxvf libpri-1.2.3.tar.gz
tar -zxvf asterisk-1.2.9.1.tar.gz
tar -zxvf asterisk-addons-1.2.3.tar.gz
tar -zxvf asterisk-sounds-1.2.1.tar.gz
cd zaptel-1.2.6
IF NO zAPTEL CARD
mv ztdummy.c ztdummy.c.orig
sed “s/if 0/if 1/” < ztdummy.c.orig > ztdummy.c
If you are on CentOS 4.3, the kernel source have a small bug you must fix.
sed -i s/rw_lock/rwlock/ /usr/src/kernels/uname -r
-uname -m
/include/linux/spinlock.h
cd /usr/src
find the zaptel (I do not have trixbox installed right now so)
make
make linux26
make install
make config
Run
modprobe zaptel
modprobe ztdummy
Then reboot your system: shutdown -r now.
Now log in as root again and type amportal stop and then genzaptelconf.
Reboot once more and you’re all set to go: shutdown -r now.
cd zaptel-1.2.6
make clean
make install
cd …
cd libpri-1.2.3
make clean
make install
cd …
cd asterisk-1.2.9.1
make clean
make install
cd …
cd asterisk-addons-1.2.3
make clean
make install
cd …
cd asterisk-sounds-1.2.1
make clean
make install
cd /root
amportal start
one big thing not mentioned by bubba - do this before you start compiling asteirsk:
rm /usr/lib/asterisk/modules/*
this will clear out the existing modules and prevent any deprecated files from loading on their own.
Thanks for your replies. I’m not using FreePBX. Also, I’m not using zaptel and libpri (it’s just sip). I have installed the asterisk and asterisk-sounds from source. My worries are:
- Would it be possible to use the old backed up astdb from 1.2.7 in 1.2.10? There is a lot of stuff there (in astdb).
- Will I have to edit something in the asterisk configs after installing the new version, or copying old configs to /etc/asterisk will do?
If those two issues are not really “issues” to worry about, I guess the upgrade procedure will look like this:
rm /usr/lib/asterisk/modules/*
mv /etc/asterisk /etc/asterisk.bakup
cp /var/lib/asterisk/astdb /var/lib/astdb.bakup
tar zxvf asterisk-1.2.10.taf.gz
cd asterisk-1.2.10
make && make install
cp /etc/asterisk.backup/* /etc/asterisk
cp /var/lib/astdb.backup /var/lib/asterisk/astdb
if only sip is used why do You want to compile
chan_mgcp, chan_iax2, chan_skinny modules ?
i would disable even pbx_dundi, app_queue, etc. in Makefile-s
if it has no use in my (my client) asterisk.
facha:
your existing configs should work fine, and your steps look really good. i’m not sure about the astdb portion, but i don’t see why that wouldn’t work…
fdragowski:
you pretty much have to compile all of the modules (unless you edit the makefile, which i would be loathe to do unless i needed to)…
but you DON’T have to load them - simply edit your modules.conf and add a noload => whatever.so
quick, easy, and if you ever DO need that module, you don’t need to recompile, just comment out the noload line and you’re done.
that’s how i’d do it, anyway.
modules.conf if useful, i agree
but if client didn’t (for example) ordered (and pay for) voicemail functionality
i don’t want to give posibbility to turning this of only by modyfing modules.conf.
I use postgresql as my cdr storage and i always need to modify /cdr/Makefile
it’s like custom kernel, user can choose what to add or remove and i like that.
in that case, simply remove the file from the /usr/lib/asterisk/modules directory - then it can’t be loaded.
it’s easier than editing the makefile for me…but if you can program, then the makefile might be a better option.