A step by step process to install Asterisk.
I have tested on Ubuntu 16.04, nevertheless, it will work on another distro with few changes.
Update and Upgrade the system
sudo apt-get update
sudo apt-get upgrade -yInstall some dependent packages
sudo apt-get install xmlstarlet libpt-dev -yExport Environment Viarable
export PTLIB_CONFIG=/usr/share/ptlib/make/ptlib-configConfiguring the directory to download and save Asterisk
cd /usr/local
sudo chmod -R 777 src
cd srcDownload asterisk. If you want another version the go here, and replace the below link accordingly.
Please Note: For webrtc to work we need atleast 13.15.0 or 14.4.0 version of Asterisk.
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-13-current.tar.gzUntar the downloaded file, if you have downloaded other version please the change the name accordingly.
tar -xvzf asterisk-13-current.tar.gzGoing Inside the Directory
cd asterisk-13.17.2/contrib/scriptsInstall dependent package for Asterisk. You are asked to confirm and Enter the Country code, For Nepal, I had used 977.
sudo ./install_prereq installConfiguring Asterisk with pjsip, if you are using sip please omit --with-pjproject-bundled
cd ../../
./configure --with-pjproject-bundledYou can select relevent option via GUI mode, for this use make menuselect. Here we need to select opus codec and I used the cli.
make menuselect.makeopts
menuselect/menuselect --enable codec_opus menuselect.makeoptsMaking and Installing
make
sudo make installCreate Sample and Config
sudo make samples
sudo make configTo open the asterisk
sudo asterisk -cvvvvvTo reload Asterisk
sudo asterisk -rvvvvv