No ODBC CDR logging to MySQL without cdr_mysql module

Hello!

I have CDR logging configured to write to MySQL using ODBC.
If cdr_mysql module is not loaded there is no logging. It’s really simple to check:

module unload cdr_mysql

No logging

module load cdr_mysql.so

Logging ok

Asterisk version: 11.17.1

> odbc show all

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

  Name:   asteriskcdrdb
  DSN:    MySQL-asteriskcdrdb
  Last connection attempt: 1970-01-01 03:00:00
  Pooled: No
  Connected: Yes

BTW, why last connection attempt is so old?

What is the question?

(That date is the earliest time that a POSIX system like Unix or Linux can represent. I essentially means “never”.)

The question is: “Is that ok that ODBC logging needs cdr_mysql module to work?”

I’m getting an error:

odbc_log: Unable to retrieve database handle. CDR failed.

Looks like that “Connected” info from “odbc show all” is not really true.