TUTORIAL Original Asterisk Upgrade Script

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
By popular request, here is the latest, all-purpose upgrade script for Asterisk 11 and 13.

WARNING: Your server must already be running PIAF-Green or Incredible PBX 11 or 13 with some version of Asterisk 11 or 13.

NOTE: This script has been upgraded repeatedly since its initial introduction. For Asterisk 13, it now includes support to upgrade Google Voice to OAUTH after the upgrade IF you already have applied the Google Voice OAUTH patch.

Code:
cd /root
wget http://incrediblepbx.com/upgrade-asterisk-to-current.tar.gz
tar zxvf upgrade-asterisk-to-current.tar.gz
rm -f upgrade-asterisk-to-current.tar.gz
yum -y install expect
./upgrade-asterisk-to-current
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
how do I edit this on a mac sorry for my ignorance!
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
I wish thee was a guide like before, in the srcipt I see the missing make menuconfig and also when I ran this one I enden up somehow with asterisk version 1.8.22.0 and asterisk source version 1.8.21.0 I had to recompile and ended finally with the same version but got back to 1.8.21.0, in the past I have done update-source but ended up without being able to recompile for some reason so I am a bit afraid to do it again, any advise??? please if someone could be so kind to post the diy procedure to update asterisk like there was one before the piaf forums were crashed, I would be very thankfull.
 

moodinsk

New Member
Joined
Oct 12, 2011
Messages
14
Reaction score
1
I have always used this as a guideline (freepbx.org/forum/freepbx/installation/asterisk-1-8-installation)
All console commands are in bold

Go to your src directory
cd /usr/src
Download current Asterisk 1.8
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.8-current.tar.gz
Unpack it
tar zxvf asterisk-1.8-current.tar.gz
backup current source
mv asterisk asteriskold
rename new source to asterisk
mv asterisk-1.8.22.0 asterisk
Go down to asterisk unpacked files directory
cd asterisk
Download mp3 support files
contrib/scripts/get_mp3_source.sh
Run configure
./configure
Start menu based configuration
make menuconfig
select app_mysql, app_saycountpl, cdr_mysql, format_mp3, res_config_mysql
go to Extras Sound Packages
Select EXTRAS-SOUNDS-EN-GSM
Save & Exit
Run make
make
Then run the installer
make install
Stop running Asterisk
amportal stop
And start the new Asterisk 1.8
amportal start
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
Furst of all, thanks for the reply, i have donde that but ended up (in status screen) with different sorce and asterisk version why? Best regards.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Don't worry about the status screen. It merely reflects where your system started out.
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
Isnt the flite comilation part missing on the text above? That is what i remeber on the diy precedure it was a post wich said how to update asterisk 1.8.15.0 thanks for your help you have been great.
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
yes and I managed to edit them to the correct version, and got the different asterisk version wich you told me is fine, I would also say that the script would be great as well I corrected it form my side if instead of amportal stop it would be better if you would put "amportal kill" because when you make amportal stop sometime I get in 3 different servers asterisk died with code 1, or gracefully stoping asterisk wich can never get done that would be better for some of us wich have that problem but it works great, on the first server i managed to get the same versions running and on the other 2 i had the version difference but anyway they are running the latest version wich is the same on i wanted, thank you very much for your time and patience.
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
another question why is the latest purple on 1.8.22.0? is it better than 1.8.21.0? why did you chose to change the new installs to this version, just because is the latest version?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
another question why is the latest purple on 1.8.22.0? is it better than 1.8.21.0? why did you chose to change the new installs to this version, just because is the latest version?

yep. Also a security issue.
 

kdaffef02

Member
Joined
Apr 29, 2011
Messages
114
Reaction score
8
By popular request, here are sample upgrade scripts for Asterisk 1.8 and 11. You'll need to change the versions in the scripts to meet your own requirements.

Code:
cd /root
gunzip upgrade-green-11.1.2.gz
chmod +x upgrade-green-11.1.2
./upgrade-green-11.1.2

Hi Ward,
if my current asterisk version is 1.8.21.0 and the last one in http://downloads.asterisk.org/pub/telephony/asterisk/releases/ would be
: asterisk-1.8.22.0.tar.gz
Is that means, in your purple script, that i have to change all "1.8.19.1" by "1.8.22.0" ??

Thanks for help,

Kamel
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
Yes change where it says 1.8.19.1 to 1.8.22.0 gunzip it chomd it nano it and when edited ./ it and you are set, but when i says also in the sript amportal stop you should place amportal kill instead. And you are set!
 

kdaffef02

Member
Joined
Apr 29, 2011
Messages
114
Reaction score
8
Yes change where it says 1.8.19.1 to 1.8.22.0 gunzip it chomd it nano it and when edited ./ it and you are set, but when i says also in the sript amportal stop you should place amportal k-i-l-l instead. And you are set!

Thanks for help, will try that.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Here's a script to upgrade PIAF-Green servers to Asterisk 11.5.0.

WARNING: Change pbxinaflash.com to pbxinaflash.us in the script before running it!
 

Attachments

  • upgrade-green-11.5.0.gz
    849 bytes · Views: 117

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
There is a new version of asterisk 1.8.23.0 has anyone tried it yet? Is it woth it to update?
 

taylormia

New Member
Joined
May 22, 2009
Messages
9
Reaction score
0
Here's a script to upgrade PIAF-Green servers to Asterisk 11.5.0.

I'm on PIAF 2.0.6.3 and Cent OS 6.3 32bit with Asterisk 11.3.0-rc1. I ran this script and got the following errors:

Code:
ranlib libmxml.a
make[2]: Leaving directory `/usr/src/asterisk-11.5.0/menuselect/mxml'
gcc  -o menuselect menuselect.o strcompat.o menuselect_stub.o mxml/libmxml.a
make[1]: Leaving directory `/usr/src/asterisk-11.5.0/menuselect'
Generating input for menuselect ...
menuselect/menuselect --check-deps menuselect.makeopts
 
***********************************************************
  The existing menuselect.makeopts file did not specify 
  that 'cdr_radius' should not be included.  However, either some
  dependencies for this module were not found or a     
  conflict exists.                                     
                                                       
  Either run 'make menuselect' or remove the existing   
  menuselect.makeopts file to resolve this issue.       
***********************************************************
 
 
***********************************************************
  The existing menuselect.makeopts file did not specify 
  that 'cel_radius' should not be included.  However, either some
  dependencies for this module were not found or a     
  conflict exists.                                     
                                                       
  Either run 'make menuselect' or remove the existing   
  menuselect.makeopts file to resolve this issue.       
***********************************************************
 
 
***********************************************************
  The existing menuselect.makeopts file did not specify 
  that 'res_srtp' should not be included.  However, either some
  dependencies for this module were not found or a     
  conflict exists.                                     
                                                       
  Either run 'make menuselect' or remove the existing   
  menuselect.makeopts file to resolve this issue.       
***********************************************************
 
make: *** [menuselect.makeopts] Error 255
menuselect/menuselect --check-deps menuselect.makeopts
 
***********************************************************
  The existing menuselect.makeopts file did not specify 
  that 'cdr_radius' should not be included.  However, either some
  dependencies for this module were not found or a     
  conflict exists.                                     
                                                       
  Either run 'make menuselect' or remove the existing   
  menuselect.makeopts file to resolve this issue.       
***********************************************************
 
 
***********************************************************
  The existing menuselect.makeopts file did not specify 
  that 'cel_radius' should not be included.  However, either some
  dependencies for this module were not found or a     
  conflict exists.                                     
                                                       
  Either run 'make menuselect' or remove the existing   
  menuselect.makeopts file to resolve this issue.       
***********************************************************
 
 
***********************************************************
  The existing menuselect.makeopts file did not specify 
  that 'res_srtp' should not be included.  However, either some
  dependencies for this module were not found or a     
  conflict exists.                                     
                                                       
  Either run 'make menuselect' or remove the existing   
  menuselect.makeopts file to resolve this issue.       
***********************************************************
 
make: *** [menuselect.makeopts] Error 255
rm -f app_flite.o app_flite.so .*.d
gcc -pipe -fPIC -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -D_REENTRANT -D_GNU_SOURCE -g -O2 -c -o app_flite.o app_flite.c
app_flite.c: In function ‘flite_exec’:
app_flite.c:99: warning: missing initializer
app_flite.c:99: warning: (near initialization for ‘args.text’)
gcc -shared -Xlinker -x -o app_flite.so app_flite.o -lflite -lflite_cmulex -lflite_usenglish -lflite_cmu_us_kal
+--------- app_flite Build Complete --------+
+ app_flite has successfully been built,    +
+ and can be installed by running:          +
+                                          +
+              make install                +
+-------------------------------------------+
install -m 755 -d /usr/lib/asterisk/modules
install -m 755 app_flite.so /usr/lib/asterisk/modules
+---- app_flite Installation Complete ------+
+                                          +
+ app_flite has successfully been installed.+
+ If you would like to install the sample  +
+ configuration file run:                  +
+                                          +
+              make samples                +
+-------------------------------------------+
 
Fetching FreePBX settings with gen_amp_conf.php..
 
SETTING FILE PERMISSIONS
chown: changing ownership of `/var/www/html/index.php': Operation not permitted
Permissions OK
Removing any dangling symlinks
Dangling symlinks removed
 
STARTING ASTERISK
Asterisk Started
Asterisk 11.5.0 upgrade has been completed.

Any suggestions ? Thanks
 

miguel

Member
Joined
May 22, 2013
Messages
276
Reaction score
8
Any recommendation as to upgrade asterisk 1.8.23.0 to asterisk 11?
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
I'm on PIAF 2.0.6.3 and Cent OS 6.3 32bit with Asterisk 11.3.0-rc1. I ran this script and got the following errors:

Any suggestions ? Thanks


Uncomment the make menuconfig command in the script, run it again, and press X when the menuselect dialog appears.
 

taylormia

New Member
Joined
May 22, 2009
Messages
9
Reaction score
0
Uncomment the make menuconfig command in the script, run it again, and press X when the menuselect dialog appears.

Thanks. That worked. Except for - instead of pressing X at the menuselect dialog...I had to select "Save and Exit" to continue the script.
I also ran "update-programs" and "update-fixes" but my PIAF Installed version remains at 2.0.6.3 instead of being upgraded to 2.0.6.4.4

Code:
-------------------SYSTEM INFORMATION *VERIFIED*---------------------+
                        |  Asterisk  = ONLINE  | Zap/Dahdi = UNKNOWN | MySQL    = ONLINE    |
                        |  SSH        = ONLINE  | Apache    = ONLINE  | Iptables  = ONLINE    |
                        |  Fail2ban  = ONLINE  | Internet  = ONLINE  | Ip6Tables = ONLINE    |
                        |  Disk Free  = ADEQUATE| Mem Free  = ADEQUATE| NTPD      = ONLINE    |
                        |  SendMail  = ONLINE  | Samba    = OFFLINE | Webmin    = ONLINE    |
                        |  Ethernet0  = ONLINE  | Ethernet1 = N/A    | Wlan0    = N/A      |
                        |                                                                    |
                        |  PIAF Installed Version  = 2.0.6.3 under *VMWARE*                  |
                        |  FreePBX Version          = 2.11.0.10                              |
                        |  Running Asterisk Version = 11.5.0                                  |
                        |  Asterisk Source Version  = 11.3.0-rc1                              |
                        |  Zap/Dahdi Source Version = N/A                                    |
                        |  Libpri Source Version    = 1.4.12                                  |
                        |  IP Address              = 10.10.10.235 on eth0                    |
                        |  Operating System        = CentOS release 6.3 (Final)              |
                        |  Kernel Version          = 2.6.32-358.2.1.el6.i686 - 32 Bit        |
                        |
 

Members online

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
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