CDR not working after upgrade

First of all, I hope this is the correct section to post my question. And also sorry for my English :wink:

A couple days ago we upgraded our from AsteriskNow 3.0.x distro to FreePBX distro 5.2 and from FreePBX distro 5.2 to the current FreePBX distro 6.12.65-24. After the upgrade everything looks fine, only today I notice that the CDR module isn’t working anymore. The latest data is before the upgrade.

On the internet I found some information but without a specific answer for our problem. So maybe that someone here has a solution. Below you will find some information about our system.

FreePBX distro: 6.12.65-24
Asterisk version: 11.15.0
FreePBX version: 12.0.36

[code]pbx*CLI> cdr show status

Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No

  • Registered Backends

    cdr-custom[/code]

[code]
yum list addon

Installed Packages
abrt-addon-ccpp.x86_64 2.0.8-26.el6.centos @base
abrt-addon-kerneloops.x86_64 2.0.8-26.el6.centos @base
abrt-addon-python.x86_64 2.0.8-26.el6.centos @base
asterisk11-addons.x86_64 11.15.1-1.shmz65.1.51 @pbx
asterisk11-addons-bluetooth.x86_64 11.15.1-1.shmz65.1.51 @pbx
asterisk11-addons-core.x86_64 11.15.1-1.shmz65.1.51 @pbx
asterisk11-addons-mysql.x86_64 11.15.1-1.shmz65.1.51 @pbx
asterisk11-addons-ooh323.x86_64 11.15.1-1.shmz65.1.51 @pbx
freepbx-digiumaddoninstaller.noarch 2.8.1-1_centos6 @anaconda-CentOS-201207061011.x86_64/6.3[/code]

Thanks for your help!

Small update. After some debugging I found the problem (I guess), the module module cdr_adaptive_odbc.so doesn’t exist anymore. When I try to reload this module, the following message appears:

pbx*CLI> module reload cdr_adaptive_odbc.so No such module 'cdr_adaptive_odbc.so'

Does someone has an idea how I can reinstall this module? The config files are still present on the server.

[[email protected] ~]# cd /etc/asterisk/cdr cdr_adaptive_odbc.conf cdr.conf cdr_mysql.conf cdr_mysql.conf.bak cdr_odbc.conf

[EDIT] Some extra information: in the directory /usr/lib64/asterisk/modules/ I find the following .so files. So I missing the files cdr_odbc.so & cdr_adaptive_odbc.so.

-rwxr-xr-x 1 root root 12352 Jan 29 01:24 cdr_csv.so -rwxr-xr-x 1 root root 11392 Jan 29 01:24 cdr_custom.so -rwxr-xr-x 1 root root 11488 Jan 29 01:24 cdr_manager.so -rwxr-xr-x 1 root root 32608 Jan 29 01:24 cdr_mysql.so -rwxr-xr-x 1 root root 15744 Jan 29 01:24 cdr_radius.so -rwxr-xr-x 1 root root 13728 Jan 29 01:24 cdr_syslog.so

[EDIT2] Copying the 2 .so files from my test VM (clean FreePBX distro install) to the production server didn’t do the trick. I already restart amportal, only module reload cdr_adaptive_odbc.so still giving the message ***No such module ‘cdr_adaptive_odbc.so’***.

[EDIT3] After install asterisk11-odbc.x86_64 (yum install asterisk11-odbc.x86_64) the ODBC module is loaded in Asterisk. The only thing I need to solve now is the database connection, because I got the following error message:

[2015-02-08 14:47:22] NOTICE[30081][C-00000001]: res_odbc.c:1537 odbc_obj_connect: Connecting asteriskcdrdb [2015-02-08 14:47:22] WARNING[30081][C-00000001]: res_odbc.c:1562 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Data source name not found, and no default driver specified [2015-02-08 14:47:22] WARNING[30081][C-00000001]: res_odbc.c:1377 _ast_odbc_request_obj2: Failed to connect to asteriskcdrdb [2015-02-08 14:47:22] ERROR[30081][C-00000001]: cdr_odbc.c:148 odbc_log: Unable to retrieve database handle. CDR failed.

The login details in /etc/asterisk/cdr_mysql.conf and /etc/asterisk/res_odbc_additional.conf are working…

[code]pbx*CLI> odbc show all

ODBC DSN Settings

Name: asteriskcdrdb
DSN: MySQL-asteriskcdrdb
Last connection attempt: 2015-02-08 14:47:22

pbx*CLI>[/code]

Maybe this tutorial can help You http://www.minestron.it/node/352

@eviegas, thanks for your reply! After chaning the file /etc/odbc.ini, the logging works!

Old config:

[MySQL-cel] Description=MySQL connection to 'asterisk' database driver=MySQL server=localhost database=asteriskcdrdb Port=3306 Socket=/var/lib/mysql/mysql.sock option=3

New config:

[MySQL-asteriskcdrdb] Description=MySQL connection to 'asterisk' database driver=MySQL server=localhost database=asteriskcdrdb username=USERNAME password=PASSWORD Port=3306 Socket=/var/lib/mysql/mysql.sock option=3