This time we will do installation for Asterisk 18.x on Raspbian Bullseye. current Asterisk version is 18.7.1.

Asterisk has been used for years as IP PBX and have many variant.

 

Update the system
sudo apt update

sudo apt -y upgrade 

sudo reboot 

Install dependencies
sudo apt update 

sudo apt -y install git curl wget libnewt-dev libssl-dev libncurses5-dev subversion libsqlite3-dev build-essential libjansson-dev libxml2-dev uuid-dev

Download Asterisk source
wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz tar xvfz asterisk-18-current.tar.gz cd asterisk-18*/ contrib/scripts/get_mp3_source.sh The output shall be A addons/mp3 A addons/mp3/MPGLIB_README A addons/mp3/common.c A addons/mp3/huffman.h A addons/mp3/tabinit.c A addons/mp3/Makefile A addons/mp3/README A addons/mp3/decode_i386.c A addons/mp3/dct64_i386.c A addons/mp3/MPGLIB_TODO A addons/mp3/mpg123.h A addons/mp3/layer3.c A addons/mp3/mpglib.h A addons/mp3/decode_ntom.c A addons/mp3/interface.c Exported revision 202. sudo contrib/scripts/install_prereq install the output shall be ############################################# ## install completed successfully #############################################
Build and install Asterisk

run below command

./configure

 

execute this command

make menuselect

select the features

 

Add-ons select

format_mp3

Codec select

codec_opus

codec_silk
Click Save & Exit

do make

make

Grab some coffee

Coffee is about half glass

 

run

make install

make progdocs

make samples 

make config 

ldconfig

 

Create Asterisk service
sudo groupadd asterisk 

sudo useradd -r -d /var/lib/asterisk -g asterisk asterisk 

sudo usermod -aG audio,dialout asterisk 

sudo chown -R asterisk.asterisk /etc/asterisk 

sudo chown -R asterisk.asterisk /var/{lib,log,spool}/asterisk 

sudo chown -R asterisk.asterisk /usr/lib/asterisk

Set default user to asterisk

$ sudo nano /etc/default/asterisk

AST_USER=”asterisk”

AST_GROUP=”asterisk”

 

$ sudo nano /etc/asterisk/asterisk.conf

runuser = asterisk ; The user to run as.

rungroup = asterisk ; The group to run as.

 

Start the Asterisk

sudo systemctl enable asterisk 

sudo systemctl start asterisk

 

Leave a Reply

Your email address will not be published. Required fields are marked *