How to install Asterisk app mysql

From voipsupport
Revision as of 08:11, 12 June 2016 by John (talk | contribs)
Jump to navigation Jump to search

app_mysql is no longer the recommended way of connecting Asterisk to a MySQL database server. The recommended way is via ODBC (see this link for instructions on installing and configuring ODBC). Nevertheless many people prefer the simplicity of setting it up, though it does have limitations (such as no SSL support).

Installing asterisk from source

By default app_mysql will not be installed when compiling Asterisk from source code from version 1.8 and later. To include app_mysql in the compilation do the following after having run configure and before running make.

make menuselect

Go to the Add-ons menu and there choose app_mysql, save and Exit. Following this you may proceed with the normal compilation steps (make, make install).

Using the FreePBX distribution

When using the FreePBX distribution there is nothing to do since app_mysql is already installed. You can check it at the asterisk CLI (asterisk -r) with the following command:

core show applications

The output should contain something like this:

MYSQL: Do several mySQLy things

Using the Asterisk Now distribution

WARNING THIS HAS NOT BEEN VERIFIED ON THE LATEST VERSION OF ASTERISK NOW. The latest version looks like the FreePBX distribution, so this point may no longer be valid.

In the case of using a distribution like AsteriskNow, then there is no source code. You need to download the appropriate module. However, one of the prerequisites of asterisk-addons-mysql package conflicts with asterisk-res_digium_phone package. If you don't need res_digium_phone then you should be ok to do the following.

yum remove asterisk-res_digium_phone
yum install asterisk-addons-mysql