No reports in FreePBX but there are recors in cdr db-table

Hi,
We use the Asterisk 1.6.2.20, the FreePBX 2.9.0.12. The records are stored in the cdr database table. But the reports show no entries. Does somebody know the reason?

Below are the details:

mysql> select count() from cdr;
±---------+
| count(
) |
±---------+
| 48 |
±---------+
1 row in set (0.00 sec)


asteriskCLI> cdr mysql status
Connected to asterisk on socket file default using table cdr for 22 minutes, 14 seconds.
Wrote 0 records since last restart.


asteriskCLI> cdr show status
Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No

  • Registered Backends

    mysql


    The cdr_mysql.conf:
    [global]
    hostname=localhost
    dbname=asterisk
    password=asterisk
    user=asterisk
    userfield=1
    loguniqueid=yes
    ;port=3306
    ;sock=/tmp/mysql.sock

I’ve solved the problem.
First I’ve set the correct values in the /etc/freepbx.conf.
Second I’ve replaced in the /var/www/html/admin/bootstrap.php the string:
‘database’ => $amp_conf[‘CDRDBNAME’] ? $amp_conf[‘CDRDBNAME’] : ‘asteriskcdrdb’,
with the:
‘database’ => $amp_conf[‘CDRDBNAME’] ? $amp_conf[‘CDRDBNAME’] : $amp_conf[‘AMPDBNAME’],
Third I’ve replaced in the /var/www/html/admin/cdr/lib/defines.php the string:
define (“DBNAME”, (( (!isset($amp_conf[“CDRDBNAME”]) || !$amp_conf[“CDRDBNAME”]) ? “asteriskcdrdb” : $amp_conf[“CDRDBNAME”] )) );
with the:
define (“DBNAME”, (( (!isset($amp_conf[“CDRDBNAME”]) || !$amp_conf[“CDRDBNAME”]) ? $amp_conf[‘AMPDBNAME’] : $amp_conf[“CDRDBNAME”] )) );