Created
June 23, 2020 05:37
-
-
Save CloudLinuxDeveloper/5a391ee32876e19b437330cdc32ba89a to your computer and use it in GitHub Desktop.
How to setup 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