NEW upgrade-asterisk18 script for Oracle Cloud

ostridge

Guru
Joined
Jan 22, 2015
Messages
1,816
Reaction score
630
filename= upgrade-asterisk18-oraclecloud_VM.Standard.A1.Flex_aarch64
Picked thro @kenn10 script debian A16
Added the BEGIN to END lines
Okay it all kenn10's work but it installs or re-installs asterisk18-latest
and reinstall repairs early starter beta work.

Probably works on debian10 but no promises.

Bash:
#!/bin/bash

# Special thanks to @kenn10 for all his work on this script.

echo "This utility stops Asterisk and upgrades it to latest Asterisk 18."
read -p "Press Enter to proceed at your own risk or Ctrl-C to abort..."
echo "Upgrading FreePBX 15 modules to avoid potential disaster..."
fwconsole ma upgradeall
fwconsole reload
/root/sig-fix
/root/sig-fix
fwconsole stop
echo "Beginning Asterisk 18 install process..."
cd /usr/src
rm -rf /usr/lib/asterisk
rm -rf /usr/lib64/asterisk
rm -rf asterisk-18*
touch /etc/asterisk/stir_shaken.conf
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
tar zxvf asterisk-18*
rm -f asterisk-18*.tar.gz
cd asterisk-18*
contrib/scripts/get_mp3_source.sh
contrib/scripts/install_prereq install
make distclean
wget http://incrediblepbx.com/menuselect-incredible16-debian10.tar.gz
tar zxvf menuselect*.tar.gz
CFLAGS='-DENABLE_SRTP_AES_256 -DENABLE_SRTP_AES_GCM' ./configure  --libdir=/usr/lib64 --with-pjproject-bundled --with-jansson-bundled
make menuselect.makeopts
echo "Cleaning up missing modules noted above..."
menuselect/menuselect --enable-category MENUSELECT_ADDONS menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_CODECS menuselect.makeopts
menuselect/menuselect --disable-category MENUSELECT_TESTS menuselect.makeopts
menuselect/menuselect --enable CORE-SOUNDS-EN-GSM --enable MOH-OPSOUND-WAV --enable EXTRA-SOUNDS-EN-GSM --enable cdr_mysql menuselect.ma>
menuselect/menuselect --disable test_named_lock --disable test_res_pjsip_scheduler --disable test_file --disable test_bridging --disable>
menuselect/menuselect --disable test_res_rtp --disable app_voicemail_odbc --disable app_voicemail_imap menuselect.makeopts
menuselect/menuselect --enable app_macro menuselect.makeopts
#// BEGIN added since kenn10 'upgrade-asterisk18'

   menuselect/menuselect --disable codec_opus menuselect.makeopts
   menuselect/menuselect --disable codec_silk menuselect.makeopts
   menuselect/menuselect --disable codec_siren7 menuselect.makeopts
   menuselect/menuselect --disable codec_siren14 menuselect.makeopts
   menuselect/menuselect --disable codec_g729a menuselect.makeopts
   menuselect/menuselect --disable test_aeap menuselect.makeopts
   menuselect/menuselect --disable test_aeap_speech menuselect.makeopts
   menuselect/menuselect --disable test_aeap_transaction menuselect.makeopts
   menuselect/menuselect --disable test_aeap_transport menuselect.makeopts
#// END of added since kenn10 'upgrade-asterisk18'
menuselect/menuselect --disable test_mwi --disable test_res_pjsip_session_caps --disable test_stasis_state --disable test_res_prometheus>
make menuselect.makeopts
make menuselect
read -p "Press Enter to proceed at your own risk or Ctrl-C to abort..."
make && make install && ldconfig && make config
fwconsole restart
# fwconsole reload
read -p "All done. Press Enter key to load pbxstatus..."
pbxstatus



OCL-Ubuntu-updated.JPG
 
Last edited:
@ostridge: There's some missing code in the 3 lines starting at CORE-SOUNDS-EN-GSM. Also test_mwi line.
I reckon you mean those long lines have been truncated by editor because the lines were too b long?

The code I worked with was
This # wget http://incrediblepbx.com/menuselect-incredible16-debian10.tar.gz
and # wget http://incrediblepbx.com/IncrediblePBX2021-Oracle.sh

Do you have the missing. and can the catenated lines be wrapped with menu.select prefixes added?

How about about an index of downloads on ipbx.com ??

PS I'll be in the sticks for a few days from tomorrow.
 
Last edited:
FYI: I've commented out the following lines for this reason. If something goes wrong during the upgrade and these lines have removed all of the Asterisk components, you're dead in the water. Leaving them in is harmless because a successful upgrade will overwrite the ones that are still needed anyway.
Code:
#rm -rf /usr/lib/asterisk
#rm -rf /usr/lib64/asterisk
 
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.
Back
Top