Page tree
Skip to end of metadata
Go to start of metadata

Most of the available documentation suggests installing MariaDB 5.5 in Ubuntu FreePBX manual installs.  This not just a stability suggestion, but due to a bug in the MySQL ODBC that currently ships with Ubuntu, newer MariaDB releases may result in an unusable ODBC Connection which crashes Asterisk.

More on this bug can be found here and here.

This bug will present itself on FreePBX systems with a Segmentation Fault in Asterisk when res_odbc loads, due to the unusable ODBC Connection.  You can confirm this by running isql -v MySQL-asteriskcdrdb.  This will result in a Floating point exception error displayed.

The MariaDB folks have an ODBC connector available for download.  It is currently labeled "beta", and should be treated as such.  However, it does appear to work in production quite well.

Download and Install:

cd /tmp
sudo wget
sudo tar zxvf mariadb-connector-odbc-2.0.9-beta-linux-x86_64.tar.gz
sudo mv mariadb-connector-odbc-2.0.9-beta-linux-x86_64/lib/ /usr/lib/x86_64-linux-gnu/odbc/
sed -i s/libmyodbc/libmaodbc/ /etc/odbcinst.ini


Note: This comes with every disclaimer imaginable.  MariaDB 5.5 should be considered for production use.  However, if you have "accidentally" upgraded and found yourself with an unusable system, or wish to experiment, this should work just fine.