Skip to content

Instantly share code, notes, and snippets.

@worldadventurer
worldadventurer / freepbx13-post-install-optimize.sh
Last active April 16, 2024 10:50
FreePBX v13 Post-Install Script for Optimizing server
# This optimizes a fresh installed FreePBX 13 x64 Distro. Not tested on other versions.
echo This will optimize your server - only run this if you wont have hard phones.
echo Run this only for a virtual machine
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
#Install other needed packages:
yum install -y git gettext perl-CPAN lrzsz help2man
# Install other useful stuff from EPEL repository:
axel -n 8 https://dl.fedoraproject.org/pub/epel/6/x86_64/iperf3-3.0.12-1.el6.x86_64.rpm
@worldadventurer
worldadventurer / freepbx-install-codecs-encoders.sh
Last active August 20, 2024 02:56
FreePBX Install Codecs & Encoders: mpeg123, lame, ffmpeg, h264, g729
# Tested on Centos 6 x64
echo This will install some codecs and encoders.
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
# Update mpeg123 to newer version
echo This will tell you your current version of mpeg123 - note this
mpg123 --version
echo Installing a newer version now:
cd
# OLD: wget https://sourceforge.net/projects/mpg123/files/mpg123/1.23.8/mpg123-1.23.8.tar.bz2/download -O mpg123-1.23.8.tar.bz2
@worldadventurer
worldadventurer / freepbx-asterisk-install-ffmpeg-centos6.sh
Last active January 29, 2018 09:44 — forked from mustafaturan/latest-ffmpeg-centos6.sh
FreePBX Asterisk - install latest ffmpeg on Centos 6
# Tested on Centos 6 x64
echo This installs ffmpeg on your system.
echo This takes 20-60 minutes!
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
#
# source: https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
yum -y install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel
mkdir ~/ffmpeg_sources
@worldadventurer
worldadventurer / freepbx-asterisk-install-g729-g723-codec.sh
Last active May 28, 2021 04:53
FreePBX Asterisk 13 install g729 & g723.1 codecs - open source versions
# This is for x64 Intel CPU with SSSE4 instructions
# To check your CPU type, run: cat /proc/cpuinfo and look for "sse4_1" in the "flags" line then this script works
# To check x32 vs x64, run: getconf LONG_BIT
# If your CPU isnt an x64 or have sse4 support, then get your .so file version at: http://asterisk.hosting.lv/
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs the open source version of the g729 and g723.1 codecs
echo You may need to buy licenses to use these codecs - it is your responsibility.
echo -------
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
@worldadventurer
worldadventurer / change-ssh-port.sh
Last active January 15, 2024 07:13
Change SSH Port - prompts on command line for new port number
#!/bin/bash
# Copied from https://github.com/FreePBXHosting/freepbx-scripts/tree/master/sshport
#
# To run the script, login as root via SSH and run the following command:
# bash <(curl -Ls https://gist.github.com/worldadventurer/842f1a10762cba0ce27dc8f99a835377/raw)
#
#############################################
# FreePBXHosting.com - @freepbxhosting #
# VERSION 1.6 UPDATED JUN 25 2015 #
# DESC: CHANGES SSH PORT AND RESTARTS SSH #
# Tested on Centos 6 x64
echo This compiles and installs axel on your system
echo axel is a multi-threaded downloader
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
#
cd
git clone https://github.com/FiloSottile/axel.git
cd axel
./configure && make && make install
#Finished
@worldadventurer
worldadventurer / freepbx-asterisk13-install-opus.sh
Last active May 28, 2021 05:04
FreePBX Asterisk 13 Install Opus Codec
# This is for x64 only
# To check x32 vs x64, run: getconf LONG_BIT
# Tested on Centos x64 - on a FreePBX Distro 13 x64
echo -------
echo This installs opus codec from the Digium website
echo -------
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
cd ~
wget http://downloads.digium.com/pub/telephony/codec_opus/asterisk-13.0/x86-64/codec_opus-13.0_1.1.0-x86_64.tar.gz
@worldadventurer
worldadventurer / asterisksendmailmp3.sh
Created January 2, 2017 20:59
FreePBX Asterisk Send Voicemail as mp3 script
#! /bin/sh
# Asterisk voicemail attachment conversion script
# Revision history :
# 22/11/2010 - V1.0 - Creation by N. Bernaerts
# 07/02/2012 - V1.1 - Add handling of mails without attachment (thanks to Paul Thompson)
# 01/05/2012 - V1.2 - Use mktemp, pushd & popd
# 08/05/2012 - V1.3 - Change mp3 compression to CBR to solve some smartphone compatibility (thanks to Luca Mancino)
# 01/08/2012 - V1.4 - Add PATH definition to avoid any problem (thanks to Christopher Wolff)
# set PATH
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# This will upgrade your FreePBX install to the latest build.
# Tested on FreePBX 13 iso on CentOS
# Source: https://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66?focusedCommentId=69075041#comment-69075041
ugdir=/root/upgradescripts
if [ ! -d $ugdir ]
then
mkdir $ugdir
fi
version=`cat /etc/schmooze/pbx-version`
@worldadventurer
worldadventurer / freepbx14-post-install-optimize.sh
Last active August 2, 2021 20:32
FreePBX v14 Post-Install Script for Optimizing server
# This optimizes a fresh installed FreePBX 13 x64 Distro. Not tested on other versions.
echo NOTE - BE SURE THIS IS A CORRECT SERVER BEFORE RUNNING THIS
echo NOTE: This optimizes a fresh installed FreePBX 14 x64 Distro. Not tested on other versions.
echo This will optimize your server - only run this if you wont have hard phones.
echo Run this only for a virtual machine
read -rsp $'Press any key to continue OR CTRL-c to QUIT ...\n' -n1 key
#Install updates & other needed packages:
echo INSTALLING OS UPDATES-
yum update -y && yum upgrade -y