Created
June 15, 2020 20:19
-
-
Save afahitech/cf3c098da4af51437ed9a96ebc72141b to your computer and use it in GitHub Desktop.
How to install Asterisk on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Update system | |
sudo apt update && sudo apt upgrade | |
sudo apt install wget build-essential subversion | |
# Download Asterisk | |
cd /usr/src/ | |
sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16-current.tar.gz | |
sudo tar zxf asterisk-16-current.tar.gz | |
cd asterisk-16.*/ | |
# Installing Asterisk | |
sudo ./configure | |
sudo make menuselect | |
sudo make -j2 | |
sudo make install | |
sudo make samples | |
sudo make basic-pbx | |
sudo make config | |
sudo ldconfig | |
sudo nano /etc/default/asterisk | |
uncomment the following two lines: | |
AST_USER="asterisk" | |
AST_GROUP="asterisk" | |
sudo usermod -a -G dialout,audio asterisk | |
sudo chown -R asterisk: /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk | |
sudo chmod -R 750 /var/{lib,log,run,spool}/asterisk /usr/lib/asterisk /etc/asterisk | |
# Starting Asterisk | |
sudo systemctl enable asterisk | |
sudo systemctl start asterisk | |
asterisk -V | |
sudo asterisk -vvvr | |
# Configuring Firewall | |
sudo ufw allow 5060/udp | |
sudo ufw allow 10000:20000/udp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment