CEL Eventtime Incorrect, But CDR Times Are Correct – 1.8.11.0

Home » Asterisk Users » CEL Eventtime Incorrect, But CDR Times Are Correct – 1.8.11.0
Asterisk Users No Comments

I have a huge problem with a 1.8.11.0 Asterisk instance not logging CEL events with the correct eventtimes.

I’m logging via ODBC to MariaDB 15.1 Distrib 10.0.20-MariaDB

I’m logging into a MyISAM table.

If I start the Asterisk instance, logged times are correct, but the longer the box runs the more the eventtime in the CEL rows created by Asterisk via ODBC drift backwards.

E. g. the clock on the server says 08:15 for example (I enter the date “command” in the terminal) and if I run a query and check the most recent CELs immediately and about ten minutes after startup, they are correct.


However, from about 15 minutes onward the CEL eventtime starts regressing. It will be 08:30 according to the server clock, but the CELs logged will have a time of 08:20. The longer the asterisk instance runs the more time on the CEL eventtime field falls behind. After four hours, when real time on the server clock is 12:00 (for example) the CELs entered into the db by Asterisk are only up to 10:45… while CDRs are 100% correct and show times of 11:59, 12:00, 12:01, etc….

I thought this was load, but in normal use the CEL table entries will go idle was my users stop phoning – e. g. it is not as if the entries are lagging due to the table being too slow to write into from Asterisk’s side.

If a new user phones after, say, ten minutes of inactivity, his new CELs will still be behind, just as far as they were behind on eventime when calls stopped and CELs stopped being entered.

The only way to fix it is to stop and restart the Asterisk instance. Strangely, CDR times (logged to the same MariaDB db via ODBC) are 100%
correct and totally accurate no matter how long the Asterisk instance runs, or how high the load goes.

What causes this? How can I correct it?

Any replies appreciated!