Running a full-featured IP-PBX telephony server on a Raspberry Pi 4 provides small offices and lab environments with an enterprise telephone system at negligible power consumption. This comprehensive guide covers compiling Asterisk 18 LTS with DAHDI/libpri and configuring the FreePBX 15 web administration portal on Ubuntu Server (ARM64).
Hardware: Raspberry Pi 4 (4GB / 8GB recommended) • OS: Ubuntu 20.04 LTS aarch64 • Stack: Asterisk 18 LTS, FreePBX 15, MariaDB, Node.js
1. Installing Build Prerequisites and MariaDB
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y build-essential linux-headers-generic libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev uuid-dev mariadb-server mariadb-client libjansson-dev libedit-dev sox libsox-fmt-all
# Configure database
sudo mysql_secure_installation
2. Compiling Asterisk 18 LTS
cd /usr/src
sudo wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-18-current.tar.gz
sudo tar -zxf asterisk-18-current.tar.gz
cd asterisk-18.*
sudo contrib/scripts/get_mp3_source.sh
sudo contrib/scripts/install_prereq install
sudo ./configure --with-pjproject-bundled --with-jansson-bundled
sudo make menuselect.makeopts
sudo menuselect/menuselect --enable format_mp3 menuselect.makeopts
sudo make -j$(nproc)
sudo make install
sudo make samples
sudo make config
sudo ldconfig
3. Installing FreePBX 15
Install Node.js, Apache, PHP modules, and run the FreePBX install script pointing to Asterisk:
cd /usr/src
sudo wget http://mirror.freepbx.org/modules/packages/freepbx/freepbx-15.0-latest.tgz
sudo tar -zxf freepbx-15.0-latest.tgz
cd freepbx
sudo ./install -n
In this part you need to include, a libmariadb-dev package
ReplyDelete" # compile ODBC driver for aarch64 "
apt-get install libmariadbd-dev
In section
ReplyDelete# Installing chan_dongle
is "./configure --with-astversion=18.6 --with-asterisk=/usr/src/asterisk-18.6.0/include",
instead
"./configure --with-astversion=18.5 --with-asterisk=/usr/src/asterisk-18.5.0/include"
in this section, some detail:
ReplyDeletewrong:
alias s="watch -n1 'asterisk -rx \"dongle show devices\"'
ok:
alias s="watch -n1 'asterisk -rx \"dongle show devices\""
thanks for your effort.
ReplyDeleteWhat if one of the dongles somehow resets and disappears altogether from lsusb??? This just happened to me. I can't reset it back to announce/show up in the system.
ReplyDeleteAnte todo infinito agradecimiento por el post, excelente. Podrías por favor subir el código del script "tg.py" ??, nuevamente muy agradecido con sus publicaciones.
ReplyDeleteBrother please contect
ReplyDelete#1 Website Software Easy to Free Download
ReplyDeleteDownload Hik-Connect for PC for free with a direct link (2026)