CDR Reports not working


I just installed FreePBX following step-by-step the guide ( Everything works fine so far except for the CDR Reports.

The CDR Reports in FreePBX are simply not getting displayed pressing the “Search” button does not bring anything. Although I have checked my MySQL database and the cdr and cel tables have some data.

Am I missing something? Or is this is known problem?

Any help would be greatly appreciated.



Have you loaded MySQL in Asterisk ? In debian it’s a new package.

Does FreePBX have permission to access the cdr DB?


Actually I have compiled Asterisk manually on Debian wheezy as described in the following guide so I do not have the asterisk-mysql debian package installed.

Yes it does, I have verified with “odbc show” on the asterisk cli and I get the following output:

hostname*CLI> odbc show

ODBC DSN Settings

Name: asteriskcdrdb
DSN: MySQL-asteriskcdrdb
Last connection attempt: 1970-01-01 01:00:00
Pooled: No
Connected: Yes

note here the “Connected: Yes”

The ODBC doesn’t have anything to do with the CDR’s or FreePBX. I did not ask if Asterisk could access to DB. It can, because you said that when you do a ‘select * from cdr’ you get records back.

The correct command is asterisk os ‘cdr mysql status’

FreePBX has to have permission to access the DB. You will find the settings in the advanced settings module.

Thanks for you answer. You are totally right the CDR MySQL module is not installed/enabled in my Asterisk.

I thought this module (cdr_mysql) was deprecated so I did not installed it. Furthermore the definitive Asterisk guide book (4th Ed.) explains in chapter 16 how to install the ODBC drivers for CDR ( and does not mention at all anything about the MySQL CDR. That’s why I went for ODBC.

Anyway, I will have a try at the CDR MySQL module although it is deprecated.

There seems to be a difference in what is deprecated - Digium sees MySQL as deprecated, while “FreePBX” doesn’t (taking from installing the two “ISOs” - and from a very tired memory)

Perhaps can help you in your quest ?

Great, Malcolm’s answer on that issue fixed my problem and now CDR works.

Indeed It looks like there is a clash here between FreePBX and Asterisk in the matter on how database connections are handled as you mention.

Thanks for helping!

I had the same issue, no CDR Report, but everything else working. When I did ‘cdr mysql status’ I also got ‘Not currently connected to a MySQLserver’

In my case, the passwords in ‘/etc/asterisk/cdr_mysql.conf’ did not match the one on ‘/etc/freepbx.conf’.

Once I corrected the password and restarted Freepbx (amportal restart), everything worked. ‘cdr mysql status’ now returns ‘Connected to asteriskcdrdb on socket file default using table cdr for 10 minutes, 49 seconds.
Wrote 1 records since last restart.’

I just figured I posted it here in the event someone else had the same issue.

After upgrade to 5.211.65-12 I got Asterisk 11.9, and CDR no reports anymore, but everything else working.
hostname = localhost
password = removedbyadmin
user = freepbxuser


<?php $amp_conf['AMPDBUSER'] = 'freepbxuser'; $amp_conf['AMPDBPASS'] = 'removedbyadmin'; $amp_conf['AMPDBHOST'] = 'localhost'; $amp_conf['AMPDBNAME'] = 'asterisk'; $amp_conf['AMPDBENGINE'] = 'mysql'; $amp_conf['datasource'] = ''; //for sqlite3 require_once('/var/www/html/admin/bootstrap.php'); Please your help!

In the Asterisk cli, what’s the output of

cdr show status