TUTORIAL NEWER Asterisk 13 Upgrade Scripts

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
Just to let you know that I've finished upgrading 13.14 to 13.15 on my test box and everything is ok
Update: 13.17.2 with pjsip 2.6 working great
 
Last edited:

rdoac

Member
Joined
Jun 29, 2014
Messages
45
Reaction score
4
Am trying to upgrade from 13.16 on ubuntu, it's building, as far as I can see, but not installing.

make install in /usr/src/asterisk-13.17.2 comes up with


[CC] res_pjsip/config_transport.c -> res_pjsip/config_transport.o
res_pjsip/config_transport.c: In function ‘transport_tls_file_handler’:
res_pjsip/config_transport.c:673:13: error: ‘pjsip_tls_setting’ has no member named ‘ca_list_path’
state->tls.ca_list_path = pj_str((char*)var->value);
^
make[1]: *** [res_pjsip/config_transport.o] Error 1
make: *** [res] Error 2

I edited the script to build pjsip 2.6 instead, but it makes no difference.
 

progs_00

Active Member
Joined
Jan 6, 2014
Messages
132
Reaction score
37
Hello rdoac

I've built version 13.17.2 (latest) with pjsip 2.6 successfully but I'm on Centos so there might be substancial differences. However you can try this. Open the upgrade script for Ubuntu and disable the following lines (you put the pound key in front of the line just as I have it below - sorry if I'm stating the obvious)

Line 96
Code:
#wget http://www.pjsip.org/release/2.3/pjproject-2.3.tar.bz2
Line 98
Code:
#tar jxvf pjproject-2.3.tar.bz2
Line 100
Code:
#rm -f pjproject-2.3.tar.bz2

And the entire section below from lines 103 to 110
Code:
#cd pjproj*
#if $arch64; then
# CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr --libdir=/usr/lib64
#else
# CFLAGS='-DPJ_HAS_IPV6=1' ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr --libdir=/usr/lib
#fi
#make dep
#make && make install

What we've actually done is remove the part that builds pjsip and we will let asterisk handle the build process. Now for the important part. Go to line 124
Code:
./configure
and replace it with
Code:
./configure --with-pjproject-bundled

Now try to build again and let me know how it goes. Remember to backup if it's a production server you are working on. I haven't tried the above on Ubuntu so it may break things beyond repair
 
Last edited:

dicko

Still learning but earning
Joined
Oct 30, 2015
Messages
1,633
Reaction score
841
I think you will find that

./configure --with-pjproject-bundled

works fine and saves all those pj* download and build steps for asterisk >= 13

edit: oops i see progs_00 got there before me
 
Last edited:

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,628
Reaction score
520
RPi image is out, how would we upgrade existing servers

updated Raspberry Pi 3
the script on @wardmundy post above, when un-tarred puts the upgrade-asterisk13-to-current-ubuntu script into your root directory. - currently have just upgraded my pi3 using this script.

Started with Incredible PBX 13-13.7 for Raspberry Pi 3B with asterisk 13.22.0 and upgraded to asterisk 13.30.0

Issues:
1) Error message:
" [InvalidArgumentException]
Command "kill" is not defined."

2) @wardmundy the script (for ubuntu) because debian (jessie) is 'like ubuntu'
uses the command asterisk -rx "core show version" to get the version and then separates the main version number checks for '13' and if so proceeds.

Problem in Asterisk 13.30.0 the command used for this is missing (or depreciated) and doesnot work; so the code to get version needs to be one that works - such as
Code:
root@incrediblepbx:~# asterisk -rx "core show version"
No such command 'core show version' (type 'core show help core' for other possible commands)
root@incrediblepbx:~#
root@incrediblepbx:~# asterisk -Vx  "core show version"
Asterisk 13.30.0

3) when the compile completes the script runs 'status' or 'pbxstatus' the script of which fails to get Asterisk version and having failed substitutes 'such'
FWIW I added an upper case -V to the script which worked ? eh? I'm not sure why.
Code:
root@incrediblepbx:~# astversion=`asterisk -Vx "core show version" | grep -m 2 ^ | tail -1 | cut -f 2 -d " "`
root@incrediblepbx:~# echo "Asterisk " $astversion
Asterisk  13.30.0
 
Last edited:

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,628
Reaction score
520
Code:
# next  sed -i    line fixes /etc/init.d/asterisk to include the -V option in the rc.asterisk.debian file
#cd /usr/src/asterisk-{$astversion}/contrib/init.d
#for astversion=13.30.0
cd /usr/src/asterisk-13.30.0/contrib/init.d
# sed -i "s|rx\ 'core show version'|Vx\ 'core show version'|" ./rc.debian.asterisk
# next line fixes pbxstatus to include the -V option (note upper case)
sed -i 's|rx\ "core show version"|Vx\ "core show version"|' /usr/local/sbin/pbxstatus
Code:
cd  /usr/src/
ls -al asterisk-13.*
nano asterisk-13.*.*/contrib/init.d/rc.debian.asterisk
# where 13.*.* is the version found here

follow this method starting-asterisk-on-boot-in-debian to make asterisk start on boot
But If you need to copy the rc.debian.asterisk int /etc/init.d then first,
at line 69 change the -rx "core show version" to read -Vx "core show version" note the upper case V


after reboot run
Code:
root@incrediblepbx:~# pbxstatus
Incredible PBX 13-13.7 for Raspberry Pi 3B

                 Asterisk: UP      Apache: UP  MariaDB: UP
                 SendMail: UP    IPtables: UP      SSH: UP
                 LAN port: UP    Fail2Ban: UP   Webmin: UP
                 GV OAUTH: UP   Chan-SCCP: UP   NR VPN: UP
                 FaxGetty: DN   IAX Modem: DN  HylaFax: DN

                 RAM:448976  Raspbian (Jessie)  Disk:74G

                 Asterisk 13.30.0  +  GUI ver. 13.0.120.10

                 Private IP: 192.168.xx.xxx 192.168.xx.xxx
success!
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
25,804
Messages
167,727
Members
19,232
Latest member
voiplads
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top