Tuesday, March 2, 2021

How to Install Asterisk 18 and FreePBX 15 on Ubuntu (Raspberry Pi 4)

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

8 comments:

  1. In this part you need to include, a libmariadb-dev package
    " # compile ODBC driver for aarch64 "

    apt-get install libmariadbd-dev

    ReplyDelete
  2. In section

    # 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"

    ReplyDelete
  3. in this section, some detail:

    wrong:

    alias s="watch -n1 'asterisk -rx \"dongle show devices\"'

    ok:

    alias s="watch -n1 'asterisk -rx \"dongle show devices\""

    ReplyDelete
  4. What 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.

    ReplyDelete
  5. Ante 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.

    ReplyDelete

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX ...