CDR Reports not working after update

I’ve just updated from the old PiaF distro to FreePBX 10.13.66-17 distro.
When I go to the CDR Report page & search for the last week, I don’t see any data after the update.
But if I view the “cdr-csv/Master.csv” file I do see all the data for the last few days after the update.
How can I get the CDR report page to work again?

At the Asterisk CLI what is the result of:

cdr show status

Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No

Registered Backends

cdr-custom
csv
res_config_sqlite

This is what is should look like:

freepbx-a*CLI> cdr show status

Call Detail Record (CDR) settings
----------------------------------
  Logging:                    Enabled
  Mode:                       Simple
  Log unanswered calls:       No
  Log congestion:             No

* Registered Backends
  -------------------
    Adaptive ODBC

freepbx-a*CLI> module show like odbc
Module                         Description                              Use Count
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0
cdr_odbc.so                    ODBC CDR Backend                         0
cel_odbc.so                    ODBC CEL backend                         0
func_odbc.so                   ODBC lookups                             0
res_config_odbc.so             Realtime ODBC configuration              0
res_odbc.so                    ODBC resource                            0
6 modules loaded

Is there a config preventing your Asterisk modules from loading? Perhaps in Admin, Asterisk Modules.

Here’s what I have:



Should all of those be excluded?
“cdr_mysql.so” sounds like it would be needed…

Also…

What version of Asterisk are you running? Is it possible that the Asterisk service or config from the original install is still there?

Asterisk Version: 11.25.1.
I guess it’s posable that the old stuff is still there.
How would I tell?

What’s the result of:

yum list asterisk11*
root@pbx_alt2:/etc $ yum list asterisk11*
Loaded plugins: fastestmirror, kmod, refresh-packagekit
Loading mirror speeds from cached hostfile
base                                                                                                                                      | 2.0 kB     00:00
extras                                                                                                                                    | 1.3 kB     00:00
pbx                                                                                                                                       | 1.3 kB     00:00
schmooze-commercial                                                                                                                       | 1.3 kB     00:00
updates                                                                                                                                   | 1.3 kB     00:00
Installed Packages
asterisk11.i686                                                                       11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-addons.i686                                                                11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-addons-bluetooth.i686                                                      11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-addons-core.i686                                                           11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-addons-mysql.i686                                                          11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-addons-ooh323.i686                                                         11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-core.i686                                                                  11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-curl.i686                                                                  11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-dahdi.i686                                                                 11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-doc.i686                                                                   11.25.1-1.shmz65.1.113                                                 @pbx
asterisk11-flite.i686                                                                 11.24.1-1.shmz65.1.45                                                  @pbx
asterisk11-flite-debuginfo.i686                                                       11.24.1-1.shmz65.1.45                                                  @pbx
asterisk11-voicemail.i686                                                             11.25.1-1.shmz65.1.113                                                 @pbx
Available Packages
asterisk11-alsa.i686                                                                  11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-configs.i686                                                               11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-debuginfo.i686                                                             11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-devel.i686                                                                 11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-odbc.i686                                                                  11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-ogg.i686                                                                   11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-pgsql.i686                                                                 11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-res_digium_phone.i686                                                      2.1.1-1.shmz65.1.37                                                    pbx
asterisk11-resample.i686                                                              11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-snmp.i686                                                                  11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-speex.i686                                                                 11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-sqlite3.i686                                                               11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-tds.i686                                                                   11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-voicemail-imapstorage.i686                                                 11.24.1-1.shmz65.1.112                                                 pbx
asterisk11-voicemail-odbcstorage.i686                                                 11.24.1-1.shmz65.1.112                                                 pbx

A clue. You are missing an RPM for some reason. Run

yum install asterisk11-odbc.i686

Then:

fwconsole restart
asterisk -x "module show like odbc"

OK I got:

root@pbx_alt2:/etc $ asterisk -x "module show like odbc"
Module                         Description                              Use Count
cdr_adaptive_odbc.so           Adaptive ODBC CDR backend                0
cdr_odbc.so                    ODBC CDR Backend                         0
cel_odbc.so                    ODBC CEL backend                         0
func_odbc.so                   ODBC lookups                             0
res_config_odbc.so             Realtime ODBC configuration              0
res_odbc.so                    ODBC resource                            0
6 modules loaded

I searched the CDR reports, but didn’t see anything from the last few days.
Is I only logging from now on?

Best case is that is starts working now, you will see no MySQL records from prior to this change.

edit - there is a slim possibility that the missed calls are logged in /var/log/asterisk/cdr-csv as I believe that PIAF systems were once configured to write logs there.

I just did a test call, but still don’t see it in the report.

But I do see it in cdr-csv/Master.csv. Is PIAF still holding on?

Output from:

 asterisk -x "cdr show status"

root@pbx_alt2:/etc $ asterisk -x “cdr show status”

Call Detail Record (CDR) settings

Logging: Enabled
Mode: Simple
Log unanswered calls: No
Log congestion: No

Registered Backends

cdr-custom
csv
res_config_sqlite
Adaptive ODBC

How about:

cat /etc/asterisk/cdr_adaptive_odbc.conf

root@pbx_alt2:/etc $ cat /etc/asterisk/cdr_adaptive_odbc.conf
[asteriskcdrdb]
connection=asteriskcdrdb
loguniqueid=yes
table=cdr
alias start => calldate

I am running out of things to check …

 asterisk -x "odbc show asteriskcdrdb"

ODBC DSN Settings

Name: asteriskcdrdb
DSN: MySQL-asteriskcdrdb
Last connection attempt: 2017-01-24 17:32:41

So these ones are ok"

Registered Backends

cdr-custom
csv