How to capture the whole SQL Insert in the Mysql CDR

I am with a error in the CDR modules is not entering data in cdr table.

How can I capture the whole INSERT to check by myself in the mysql database.

I tried enable the cdr debug on and nothing, core debug and verbose 10, and nothing…

I need the data with the information, not only the “?”

I’d recommend looking at how to enable logging through the ODBC connector, I believe unixodbc supports logging.

DiD you check the DB integrity, if table it is not corrupted?

The problem was a trigger that is called when one row is inserted in CDR table, but the problem is that almost impossible discover what is the problem without the whole line…

I need to solve by attempt and error. Will be very better if I have the Insert line.

Hi johnkiniston,
I tried to enable the trace feature in unixodbc but didn’t work in my server.

I made it…

You might need to debug selinux and filesystem permissions for the log file depending on where you put it.

I have it… I put the log output in /var/log

Hi, someone with a different idea?


First, I’d make sure that each field exists in the database (and is spelled correctly). I replicate my databases, but you could turn on the binlog in MySQL. If the insert is failing at the DB, you could see it in the binary log. You could also run “SHOW PROCESSLIST” at the MySQL CLI and keep refreshing (up arrow, Enter) while you end a call. You might catch it.

1 Like