FreePBX call logs are Empty

Problem: I had FreePBX reports working. Then I decided to dump CDR records into a CSV so that i could try out SAMReports. Now, when I click on reports tab in FreePBX, it says “No data found !!!”. I am trying to bring the data back to mysql and FreePBX.

So here is what i have tried:

  1. CLI> cdr show status

Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No

  • Registered Backends

    (none)

2)CLI> module show like cdr
Module Description Use Count
func_cdr.so Call Detail Record (CDR) dialplan functi 0
app_cdr.so Tell Asterisk to not maintain a CDR for 0
cdr_manager.so Asterisk Manager Interface CDR Backend 0
app_forkcdr.so Fork The CDR into 2 separate entities 0
cdr_syslog.so Customizable syslog CDR Backend 0
5 modules loaded

3)CLI> module load cdr_mysql.so
Unable to load module cdr_mysql.so
Command ‘module load cdr_mysql.so’ failed.

4)[root@***** modules]# ls | grep cdr
app_cdr.so
app_forkcdr.so
cdr_csv.so
cdr_custom.so
cdr_manager.so
cdr_mysql.so
cdr_syslog.so
func_cdr.so

that means the file is there. but asterisk wont load it for some reason.

  1. nano /etc/asterisk/cdr_mysql.conf
    [global]
    hostname = localhost
    dbname=asteriskcdrdb
    password = *******
    user = ******
    userfield=1
    ;port=3306

  2. i logged in with the credentials and into mysql and was able to connect to the database and did
    mysql> select * from cdr;
    Empty set (0.00 sec)

for some reason the table is completely empty.

  1. I have tried yum install asterisk-addons-mysql and that told me that files were conflicting with existing ones.

I have ran out of options. Does anyone see what am I missing???

Please help.

You don’t say anything about your platform,OS/Distro, how you built Asterisk etc.
But there is normally a csv file with the callrecords in it already:-

/var/log/asterisk/cdr-csv/Master.csv

Do you have that file? I am suspicious as at least the csv back-end should be registered. . . .

Yes,

I have CSV file. However, i thought that CSV was preventing my calls from being inserted into mysql so i unregistered/unloaded the cdr_csv.so.

Linux Distribution: (Redhat CentOS release 5.8 (Final))
FreePBX version: (2.9.0)
Asterisk: 1.8.10.1

so reload it while you try to remember what you changed to stop cdr_mysql.so from loading. The cdr backends can all work at once, Master.csv isprobably all you needed from the start.

But that is the problem. Any module i try to load, asterisk comes back with:

CLI> module load cdr_csv.so
Unable to load module cdr_csv.so
Command ‘module load cdr_csv.so’ failed.

should I restart asterisk?