how to remove or uninstall asterisk

How to remove or uninstall asterisk

       It is sometimes necessary to completely remove asterisk ,for reasons like installing the latest version or reinstall the same version, below blog will lead you for the same.

*******************************

Step 1: Stopping the asterisk and unload its modules

*******************************

       The first thing you have to do is to stop asterisk and unload the modules 
the following commans will terminate the asterisk and kill all the ongoing conversation

killall -9 safe_asterisk
killall -9 asterisk

*******************************

Step 2 : deleting the asterisk files

*******************************

       By running the below command , you will delte with no possible recovery ,so if any thing important like asterisk dialplans, carriers settings, recordings, take a backup

rm -rf /etc/asterisk
rm -rf /var/log/asterisk
rm -rf /var/lib/asterisk
rm -rf /var/spool/asterisk
rm -rf /usr/lib/asterisk

Now asterisk has been removed completely from your system
note: if you want to uninstall or remove the DAHDI driver then follow this LINK

*******************************
Also see:(related post)

Steps to install asterisk ,freepbx in centos ClickHere
Sangoma cards configuration in asterisk ClickHere
Custom voicemail greetings setup ClickHere

chan_dongle for asterisk 13.9.x (works on GNU/Linux Ubuntu 16.04 LTS)

install asterisk 13.9.x:
apt-get install aclocal automake autoconf libsrtp-devel
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gz
aclocal
autoconf
automake -a
./configure
make
make menuselect #make sure res_srtp is enabled!
make install

Asterisk TLS/ZRTP setup:
Specifically for blink: https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial

install chan_dongle (hint: setting the branch “asterisk13” is crucial!):
git clone -b asterisk13 https://github.com/oleg-krv/asterisk-chan-dongle.git
cd asterisk-chan-dongle
aclocal
autoconf
automake -a
./configure
make install

Free SMS memory on USB dongle & SIM-card (SM=store messages on SIM, ME=store messages on dongle memory):
#store on dongle memory
asterisk -x "dongle cmd [gsm-device] AT+CPMS=\"ME\",\"ME\",\"ME\""

#delete all SMS messages:
asterisk -x “dongle cmd [gsm-device] AT+CMGD=1,4”

#store on sim:
asterisk -x “dongle cmd [gsm-device] AT+CPMS=\”SM\”,\”SM\”,\”SM\””

#delete all SMS messages:
asterisk -x "dongle cmd [gsm-device] AT+CMGD=1,4"

More Commands: Huawei AT Command Specification (PDF Download)
SMS specification (ETSI)
https://linux3dgameengine.googlecode.com/files/SMS_PDU-mode.pdf
http://mobiletidings.com/2009/02/18/combining-sms-messages/

ASTERISK FUNCTIONS:
http://www.voip-info.org/wiki/view/Asterisk+functions

SMS Tricks
http://www.voip-info.org/wiki/view/Asterisk+cmd+Sms

Werte für Mode und Submode ändern:

Beispiel für Modus Umschaltung:

Weitere AT Befehle:
http://www.lteforum.at/mobilfunk/at-command-execution-fuer-huawei-sticks.2235/

Extra :

Firist:

yum -y install tcl asterisk11-devel make automake binutils

usb_modeswitch-1.2.3-1.el6.rf.x86_64.rpm and usb_modeswitch-data-20120120-1.el6.rf.noarch.rpm

rpm -ivh usb_modeswitch-1.2.3-1.el6.rf.x86_64.rpm usb_modeswitch-data-20120120-1.el6.rf.noarch.rpm

cd /usr/src
wget https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip397

unzip asterisk11.zip
cd asterisk-chan-dongle-asterisk11
aclocal && autoconf && automake -a
./configure
make
make install
cp chan_dongle.so /usr/lib64/asterisk/modules/
cp etc/dongle.conf /etc/asterisk

vim /etc/udev/rules.d/92-dongle.rules and insert this => KERNEL==”ttyUSB*”, MODE=”0666″, OWNER=”asterisk”, GROUP=”uucp”

vim /etc/asterisk/asterisk.conf and insert this: rungroup = dialout

asterisk -vvvvvvvvr

CLI: module load chan_dongle.so

asterisk11 chan dongle

yum -y install tcl asterisk11-devel make automake binutils

usb_modeswitch-1.2.3-1.el6.rf.x86_64.rpm and usb_modeswitch-data-20120120-1.el6.rf.noarch.rpm

rpm -ivh usb_modeswitch-1.2.3-1.el6.rf.x86_64.rpm usb_modeswitch-data-20120120-1.el6.rf.noarch.rpm

cd /usr/src
wget https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip397

unzip asterisk11.zip
cd asterisk-chan-dongle-asterisk11
aclocal && autoconf && automake -a
./configure
make
make install
cp chan_dongle.so /usr/lib64/asterisk/modules/
cp etc/dongle.conf /etc/asterisk

vim /etc/udev/rules.d/92-dongle.rules and insert  =>

KERNEL==”ttyUSB*”, MODE=”0666″, OWNER=”asterisk”, GROUP=”uucp”

vim /etc/asterisk/asterisk.conf and insert this: rungroup = dialout

asterisk -vvvvvvvvr

CLI: module load chan_dongle.so