How to Install FreePBX 15 on Debian 10 with Asterisk 16, PHP 7.3

No Comments


This manual-install method builds a FreePBX 15 with Asterisk 16 on Debian 10 system with the following specifications on google Cloud:

  • FreePBX 15
  • Asterisk 16 from the Debian Buster package repository
  • PHP 7.3, standard with Debian Buster
  • 64-bit Intel/AMD (x86_64) platform

Step-by-step guide

All commands are to be run as the root user, either by directly logging in as root or by using sudo su - .

Start from a base Debian 10 installation. All necessary packages will be installed through the following commands.

Prerequisite recommended OS update

Add the backports repo specifically so that the odbc-mariadb package is available. Then update the OS to current.

Install all the necessary packages

  • apt-get install -y build-essential linux-headers-`uname -r` openssh-server apache2 mariadb-server mariadb-client bison flex php php-curl php-cli php-pdo php-mysql php-pear php-gd php-mbstring php-intl php-bcmath curl sox libncurses5-dev libssl-dev mpg123 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git unixodbc-dev uuid uuid-dev libasound2-dev libogg-dev libvorbis-dev libicu-dev libcurl4-openssl-dev libical-dev libneon27-dev libsrtp2-dev libspandsp-dev sudo subversion libtool-bin python-dev unixodbc dirmngr sendmail-bin sendmail asterisk debhelper-compat cmake libmariadb-dev odbc-mariadb php-ldap

Install Node.js

Install this required Pear module

  • pear install Console_Getopt

Prepare Asterisk

  • systemctl stop asterisk
  • systemctl disable asterisk
  • cd /etc/asterisk
  • mkdir DIST
  • mv * DIST
  • cp DIST/asterisk.conf .
  • sed -i 's/(!)//' asterisk.conf
  • touch modules.conf
  • touch cdr.conf

Configure Apache web server

  • sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.3/apache2/php.ini
  • sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/7.3/apache2/php.ini
  • sed -i 's/^\(User\|Group\).*/\1 asterisk/' /etc/apache2/apache2.conf
  • sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
  • a2enmod rewrite
  • service apache2 restart
  • rm /var/www/html/index.html

Configure ODBC

  • cat <<EOF > /etc/odbcinst.ini
    [MySQL]
    Description = ODBC for MySQL (MariaDB)
    Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
    FileUsage = 1
    EOF
  • cat <<EOF > /etc/odbc.ini
    [MySQL-asteriskcdrdb]
    Description = MySQL connection to ‘asteriskcdrdb’ database
    Driver = MySQL
    Server = localhost
    Database = asteriskcdrdb
    Port = 3306
    Socket = /var/run/mysqld/mysqld.sock
    Option = 3
    EOF

Download FFMPEG static build for sound file manipulation

Install FreePBX

Get the rest of the modules

Only a very basic system is installed at this point. You will probably want to install all the modules on Debian 10 . Alternatively, you can skip this and pick-and-choose the individual modules you want later.

  • fwconsole ma installall

Uninstall digium_phones

Broken with PHP 7.3 (April 2020).

  • fwconsole ma uninstall digium_phones

Apply the current configuration

  • fwconsole reload

Set symlinks to the correct sound files

  • cd /usr/share/asterisk
  • mv sounds sounds-DIST
  • ln -s /var/lib/asterisk/sounds sounds

Perform a restart to load all Asterisk modules that had not yet been configured

  • fwconsole restart

Set up systemd (startup script)

  • cat <<EOF > /etc/systemd/system/freepbx.service
    [Unit]
    Description=FreePBX VoIP Server
    After=mariadb.service
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStart=/usr/sbin/fwconsole start -q
    ExecStop=/usr/sbin/fwconsole stop -q
    [Install]
    WantedBy=multi-user.target
    EOF
  • systemctl daemon-reload
  • systemctl enable freepbx

Asterisk and FreePBX 15 are installed on Debian 10 ! Go to the web interface at http://YOUR-IP to finish setup

About Me: I'm the digital marketing specialist, competent in SEO (Google, Yahoo & Bing), Google Adwords (Search, Display, Google Shopping etc.), Facebook & Instagram Advertising etc. I can work in all platforms of digital marketing & advertise the legitimate products/services in a specific country, city or all over the world. I am very confident, dynamic, energetic, enthusiastic & dedicated freelancer as I want to build my career as a full time professional freelancer for long time. I prefer quality work rather than quantity & hard working is my way to become successful. If you hire me, then I will provide you my best quality services for your project until you achieve your goal with complete satisfaction. Expertise I do have: ✓ Managed AdWords and PPC for diversity of companies with a budget up to $500,000 per annum. All campaigns with a positive ROI. ✓ Successfully increased organic (SEO) traffic for websites with 1,000,000+ unique visits every month. ✓ In-depth Google Analytics analysis (and other tools) to make appropriate suggestions and drive positive change. ✓ Easy to understand reports and full transparency on everything I do and everything your budget is spent on. Let's get started! Contact me to discuss your plans.

About us and this blog

We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.

Request a free quote

We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.

Subscribe to our newsletter!

More from our blog

See all posts

Leave a Comment