Foniva Contact Center Software
Asterisk Experts Support

Configure asterisk 1.4 and odbc/mysql, ubuntu

Since asterisk 1.4, and mysql new licence,

cdr_mysql has been disabled from asterisk default source code.

However, you can still use ODBC to connect to mysql and update your cdr for example.

You will get here a great article about steps to follow to do so

Basicly, you need to install libmyodbc and unixodbc  packages.

Then edit /etc/odbcinst.ini

Description     = MySQL driver
Driver          = /usr/lib/odbc/
Setup           = /usr/lib/odbc/
CPTimeout       =
CPReuse         =

Then create an ODBC resource in /etc/odbc.ini

Description     = Asterisk MySQL ODBC
Driver          = MySQL
Socket          = /var/run/mysqld/mysqld.sock
Server          = localhost
User            = user
Password        = password
Database        = asterisk
Option          = 3
#Port           =

Now, you need to configure asterisk to use those ressources :

Edit /etc/asterisk/res_odbc.conf

enabled => yes
dsn => MySQL-asterisk
username => user
password => password
pre-connect => yes

and /etc/asterisk/cdr_odbc.conf

table=cdr               ;”cdr” is default table name
usegmtime=no             ; set to “yes” to log in GMT

Run again

make menuselect

from asterisk source directories.

Go to “Call Details Recording”

and select cdr_odbc

If, you cannot select cdr_odbc, this means that libmyodbc devel package is not install.

You may need to download the source and compile them.

To do so :

- download or the latest one

- extract it

- run :


make install

You should see header files like in /usr/include/sql.h

Return to asterisk source directory and run

./configure –with-odbc=/usr/

make menuselect

Now, you should be able to select cdr_odbc

When done, just run ‘make install’ and will be compile.

Hope this help.

Allison, Digium and Cepstral

Cepstral a well recognized text to speech engine now use Allison voice (she is the one that record all asterisk prompts).

So, you can make here read a text and it will look natural all the users who are already hearing others prompts.

The voice is a little bit choppy but it works.

Asterisk as your buddy

You know what happens when a PSTN call land on a SOFT switch and that server has a LAN card also ?

This just opens the whole Internet/Services word to telephony.

As an example, Asterisk PBX can now be integrated to any XMPP network.

Imagine that you can have any asterisk server in the same friends list as your mom and your girl friend.

You can get a message on your MSN when you have a call, be sent your last voice message etc… Then asterisk can now speak with any other application or service on your LAN.

For more informations about asterisk and Jabber integration :

Our sponsors

Asterisk Experts Support