CDR Report is Blank

I have installed the latest FreePBX 13 Distro. All is working fine with the exception of CDR reports. They are coming back blank. I am not sure what to look for regarding setup. I do see this in the console if it helps.

[2016-04-06 13:47:27] WARNING[1657]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)

Thanks in advance for any help!

Rob

My CDR reports are not working also. I tested the following instructions 3 times: http://wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+7#InstallingFreePBX13onCentOS7-InitialSystemSetup

After alot of testing, I found that the mysql database is not getting updated when a call is made. (CDR reports work when you manually add records to the cdr database). Here are the contents of cdr_adaptive_odbc.conf:

[asteriskcdrdb]
connection=asteriskcdrdb
loguniqueid=yes
table=cdr
alias start => calldate

Also cdr_radius.so, cdr_custom.so, and cdr_mysql.so modules are excluded.

Any help is appreciated.

Can anyone help us in resolving our issue?

Look in the /var/log/asterisk/full file for errors that involve ‘asteriskcdrdb’. My guess is that one of your connectors (perhaps the ODBC connector) is not getting wired into MySQL correctly.

Thanks i will start there and if i get stuck i will report back

Here are the errors in /var/log/asterisk/full:

[2016-04-07 12:56:44] NOTICE[11752] res_odbc.c: Connecting asteriskcdrdb
[2016-04-07 12:56:44] WARNING[11752] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib64/libmyodbc5.so’ : file not found
[2016-04-07 12:56:44] WARNING[11752] res_odbc.c: Failed to connect to asteriskcdrdb
[2016-04-07 12:56:44] NOTICE[11752] res_odbc.c: Registered ODBC class ‘asteriskcdrdb’ dsn->[MySQL-asteriskcdrdb]

[2016-04-07 12:56:44] WARNING[11752] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib64/libmyodbc5.so’ : file not found
[2016-04-07 12:56:44] WARNING[11752] res_odbc.c: Failed to connect to asteriskcdrdb
[2016-04-07 12:56:44] WARNING[11752] cel_odbc.c: No such connection ‘asteriskcdrdb’ in the ‘cel’ section of cel_odbc.conf. Check res_odbc.conf.

Contents of res_odbc_conf:
[asteriskcdrdb]
enabled=>yes
dsn=>MySQL-asteriskcdrdb
pooling=>no
limit=>1
pre-connect=>yes
username=>freepbxuser
password=>********
database=>asteriskcdrdb

Thanks

Is your machine a 32 bit or a 64 bit machine?

post your results from a shell :-

uname -a
cat /proc/cpuinfo |grep address
updatedb
locate libmyodbc

64 bit.

[[email protected] ~]$ uname -a
Linux domainname.com 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]$ updatedb
updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db’
[[email protected] ~]$ locate libmyodbc
[[email protected] ~]$

[[email protected] ~]$ cat /proc/cpuinfo |grep address
address sizes : 46 bits physical, 48 bits virtual

You need to have root privileges to run that updatedb command.
On what “hardware platform” are you running this?

I ran updatedb under root and no message was generated. Amazon aws is the hardware platform.

But you originally said

2 different posters on the thread with same problem of CDR not working, it looks like bruce installed freepbx on his own distro install, I installed from the latest freepbx distro. i will do the steps and post here, have not had time.

So i searched my /var/log/asterisk/full log for asteriskcdrdb and there were not matches in the file.

here is the results of what you asked for dicko: 64 bit machine
`[[email protected] ~]# uname -a
Linux odtlpbx.voip.odleasing.lan 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# cat /proc/cpuinfo |grep address
address sizes : 42 bits physical, 48 bits virtual
address sizes : 42 bits physical, 48 bits virtual
[[email protected] ~]# updatedb
[[email protected] ~]# locate libmyodbc
/usr/lib64/libmyodbc5-5.1.5.so
/usr/lib64/libmyodbc5.so

`

@rtaggart14 - It looks like your problem is in the initialization of Asterisk. Something in your config is not set up correctly and (guessing here) your CDR subsystem isn’t starting at all. Other strings to look for in …/full include “CDR”. “cdrdb” and “asteriskuser”.

At some point, the problem will probably boil down to a “No” that should be “Yes” or a semicolon in front of a context that needs to be included in one of the CDR connection tables.

If it helps, I’m having the same problem right now with my CDR, but mine is a missing ODBC connection string somewhere. Of course, this system hasn’t had a proper “reinstall” since Asterisk 1.4 was cutting edge, so I have to wade through a lot of deprecated config files and files full of stuff that is long since OBE. I’ll get it figured out one of these days - it’s just not a critical error for me at this time.

@brucej1111 - your problem is a missing installation package. The simplest solution (for us) is to recommend you use one of the standard installation packages, since rolling your own seems to be presenting you with significant challenges.

If that isn’t a reasonable solution for you, then you need to start doing YUM updates and installs until you get all of the required packages installed. You are, for sure, missing at least one; if you are missing one, chances are you are missing more.

Good luck - we’re pulling for both of you.

Is that the “distro” with that kernel really ?

Follow

http://www.voipsupport.it/pmwiki/pmwiki.php?n=Freepbx.HowtoODBC

Thank you Dave. Could you provide specific command line instructions so that the following article can be updated:

wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+7

I will then test and advise of my results.

Under the Asterisk CLI

*CLI> odbc show status

ODBC DSN Settings

Report back what it says.

Have you done this Installing MyODBC on Asterisk yet? That’s a pretty detailed description of the basic steps.

Here are the results:
ODBC DSN Settings

I have not followed the instructions on that link, just on this link: wiki.freepbx.org/display/FOP/Installing+FreePBX+13+on+CentOS+7

It looks like some comments were made about *CLI> odbc show status, but no solution to the issue. Is your link the solution?

I don’t know if this will solve your problem, since we’re still not sure what your ACTUAL problem is. There are lots of places where CDR can go wrong, but if you haven’t done the basics, it’s going to be hard to know what else might be going on.

Try doing what I suggested - I don’t search the Internet for possible solutions, read through them looking for possible solutions, and then post the stuff that doesn’t seem to apply.

If you rather go back to just doing all of this yourself, just let us know and we won’t waste any more time on you.