CDR Reports not showing any calls

EDIT: Forgot to inform you guys that I am running the latest version of asterisk and FreePBX Distro. I used the easy installer from freepbx.org and burned it do a cd then installed it on a new computer. Everything else works great, this seems to be the only real problem.

Hello everyone,
I have run into a bit of a annoying problem with my first install of FreePBX. When I try to use CDR reports , it shows no calls have been made. I did some basic troubleshooting.

1.“md*CLI> module show like mysql” shows that there are 0 modules running so

2.I followed this “http://www.freepbx.org/support/documentation/howtos/howto-add-asterisk-addons-for-asterisknow-1-7” exactly and restarted my server but I still don’t have any history for CDR reports when I make calls.

3.I ran "md*CLI> module show like mysql "again and it STILL shows there are 0 modules running.

3.This may mean something though, under End Point Configuration Manager, I used to have big red letters saying that it is unable to save the confirguration file or something but after doing step two , the warning was gone. At least I mistakenly solved something lol.

any ideas?

the latest distro of freepbx doesnt require you to install any additional modules. However there is a bug reported for this.
CDR reports in the distro version (2.10) are not working because the default (autogenerated) password to connect to the mysql server is different in the /etc/asterisk/cdr_mysql.conf file. It should be the same as the one in /etc/freepbx.conf.
SSH into the machine, and copy the password in /etc/freepbx.conf and paste it in the /etc/asterisk/cdr_mysql.conf file. CDR reports should start functioning.
I had the same problem - got help from #freepbx on IRC to sort it out.

Hi, I’m having the same problem…
Users and Passwords look the same on my “/etc/freepbx.conf” and “/etc/asterisk/cdr_mysql.conf”… No change required…

Now, do “AMPDBENGINE” and “dbname” should also match!?

/etc/freepbx.conf
"

<?php $amp_conf['AMPDBUSER'] = 'freepbx'; $amp_conf['AMPDBPASS'] = 'fpbx'; $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'); " /etc/asterisk/cdr_mysql.conf " [global] hostname = localhost dbname=asteriskcdrdb password = fpbx user = freepbx userfield=1 ;port=3306 ;sock=/tmp/mysql.sock " Thanks!

Issue: No CDR reports
Installation: FreePBX 2.10.1.9
Asterisk 1.8.14.0
Linux (Amazon AMI - CentOS like)
History: Has never worked
Other Problems: None

Troubleshooting

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

and

module show like mysql
Module Description Use Count
res_config_mysql.so MySQL RealTime Configuration Driver 0
1 modules loaded

any advice on the next troubleshooting/investigation steps I should be taking is greatly appreciated. Thank you all.

How did you install asterisk?

If from scratch then, enable it in the addons section when you make menuselect.

Here is what I find about cdr_mysql.so

[root@phone /]# find -iname “cdr_mysql.so”
./usr/lib/asterisk/modules/cdr_mysql.so
[root@phone /]#

and


[root@phone /]# asterisk -r
Asterisk 1.8.14.0, Copyright © 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer [email protected]
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.

Connected to Asterisk 1.8.14.0 currently running on phone (pid = 1556)
Verbosity is at least 3
phoneCLI> module load cdr_mysql.so
Unable to load module cdr_mysql.so
Command ‘module load cdr_mysql.so’ failed.
[2013-04-11 17:57:30] WARNING[27309]: loader.c:398 load_dynamic_module: Error loading module ‘cdr_mysql.so’: libmysqlclient.so.16: cannot open shared object file: No such file or directory
[2013-04-11 17:57:30] WARNING[27309]: loader.c:850 load_resource: Module ‘cdr_mysql.so’ could not be loaded.
phone
CLI>

It came to me from a different department. As a measure of last resort I can go that route but there are other people who depend upon this server and would frown upon me attempting to rebuild it myself. I do believe that they installed it from scratch however. It was just not me personally.

. . .: libmysqlclient.so.16: cannot open shared object file: No such file or directory

I believe that is part of mysqlclient

But I don’t have libmysqlclient.so.16

My version of mysql55 is 5.5.29 and provides libmysqlclient.so.18

[root@phone /]# find -iname "libmysqlclient.so*" ./usr/lib64/mysql/libmysqlclient.so.18.0.0 ./usr/lib64/mysql/libmysqlclient.so ./usr/lib64/mysql/libmysqlclient.so.18

I wonder if someone updated MySQL after Asterisk was installed and it broke a dependency? Is it possible to re-compile the modules - rather, is it safe?

Yes it is possible. Is it safe?, well I would defer that decision to the folks who built your system for you.

It seems quite likely that your asterisk modules , however compiled, do not match your 64 bit kernel and your mysql deployment, chances are they need to rebuild asterisk to match whatever the rest of the system is.

It is usually a good idea to have control over your WHOLE system, good luck :wink:

I’m assuming this is a 64bit OS since you have /usr/lib64/mysql/libmysqlclient.so

Your mysql module is in /usr/lib/asterisk/modules. Technically you are supposed to have asterisk stuff in /usr/lib64/asterisk/modules for 64bit. With Asterisk 11 you now have to do it this way or Asterisk won’t work properly. I’ve always been able to get away with it on Asterisk 1.8 but maybe try put the module in the lib64 directory or create a symlink and see what happens.

Not sure how you are installing this but if you are compling from scratch you should start to compile asterisk like this for 64bit OS.
./configure --libdir=/usr/lib64 && make menuselect. You also have to change to that directory once you do this in /etc/asterisk/asterisk.conf and there is one setting in Advanced settings when you enable hidden that you have to change to that directory as well.

I’ve never seen a mysql update break any of these things so I wouldn’t spend any time looking at that if I were you.