CEL and CDR not logging new events

Our disk filled and SQL database needed to be repaired. Repaired CDR and CEL tables and can view logs from before the failure now but no new events are being logged under CDR Reports.

CDR status

localhost*CLI> cdr show status

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

* Registered Backends
  -------------------
    Adaptive ODBC
    cdr-custom
    radius

CEL status

localhost*CLI> cel show status
CEL Logging: Enabled
CEL Tracking Event: ALL
CEL Tracking Event: CHAN_START
CEL Tracking Event: CHAN_END
CEL Tracking Event: HANGUP
CEL Tracking Event: ANSWER
CEL Tracking Event: APP_START
CEL Tracking Event: APP_END
CEL Tracking Event: BRIDGE_START
CEL Tracking Event: BRIDGE_END
CEL Tracking Event: CONF_START
CEL Tracking Event: CONF_END
CEL Tracking Event: PARK_START
CEL Tracking Event: PARK_END
CEL Tracking Event: BLINDTRANSFER
CEL Tracking Event: ATTENDEDTRANSFER
CEL Tracking Event: TRANSFER
CEL Tracking Event: HOOKFLASH
CEL Tracking Event: 3WAY_START
CEL Tracking Event: 3WAY_END
CEL Tracking Event: CONF_ENTER
CEL Tracking Event: CONF_EXIT
CEL Tracking Event: USER_DEFINED
CEL Tracking Event: LINKEDID_END
CEL Tracking Event: BRIDGE_UPDATE
CEL Tracking Event: PICKUP
CEL Tracking Event: FORWARD
CEL Tracking Application: all
CEL Event Subscriber: CEL Radius Logging
CEL Event Subscriber: CEL Custom CSV Logging
CEL Event Subscriber: ODBC CEL backend

ODBC Show

localhost*CLI> odbc show

ODBC DSN Settings
-----------------

  Name:   asteriskcdrdb
  DSN:    MySQL-asteriskcdrdb
    Last connection attempt: 1969-12-31 18:00:00
  Pooled: No
  Connected: Yes

Any help is greatly appreciated. I haven’t been able to figure this out and am at a loss for what’s going on.

Since you’re referred to your database, I’m going to assume that the backends you care about CDR/CEL are cdr_adaptive_odbc and cel_odbc, and ignore the other backends - although the fact that you have cdr-custom loaded means we may be able to use that to see what is happening. Here are things I would check:

  1. Since you have cdr-custom loaded, if it is configured to log CDRs to a file, are those being created? If so, that would at least tell you that Asterisk is attempting to log the CDRs still. If not, then I would reload CDRs/CEL using the module reload command. Note that you can always “trick” Asterisk into reloading a module by touch-ing a config file.

  2. If you can’t determine that there is an issue in Asterisk quickly, I’d start from the basics. Can your machine connect via ODBC to the database? Check using isql - see http://www.easysoft.com/developer/interfaces/odbc/linux.html#testing_dsns_unixodbc for more information on testing that.

  3. If your machine can connect, you can try re-freshing the ODBC connection by reloading res_odbc. After doing so, run the odbc show command and see if the Last connection attempt has been updated. (I will say that the datetime on that is obviously a little weird, so that’s worth an effort.)

I would imagine that after running through those three steps, something will have failed. If one of those steps fails, that will help you to isolate just where the disconnect is occurring.

Thanks for the assistance!

  1. I do not have a cdr_custom.conf file, and my cdr.conf is empty.

  2. I am able to connect to the database via ODBC.

  3. module reload res_odbc works and reconnects but odbc show still shows incorrect datetime as above.

I do have a cel_odbc.conf that does have that connection data in it.