cdr_adaptive_odbc (mysql) date not populating

I’ve got my CDR records storing to a MySQL database via the cdr_adaptive_odbc method as outlined in the “definitive guide” O’reilly book.

I’m running 11.5 and all other fields seem to populate the records just find but when I went back and looked for something the other day I realized that all my calldate fields are set to 0000-00-00 00:00:00. This is the “default” for the field one would assume that would be overwritten by the proper time/date when the record is created right?

I looked at the CSV file and everything in there has the proper time/date stamp on it. Any ideas what gives?

Here’s my CDR table
CREATE TABLE IF NOT EXISTS cdr (
acctid bigint(20) NOT NULL AUTO_INCREMENT,
calldate datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
clid varchar(80) NOT NULL DEFAULT ‘’,
src varchar(80) NOT NULL DEFAULT ‘’,
dst varchar(80) NOT NULL DEFAULT ‘’,
dcontext varchar(80) NOT NULL DEFAULT ‘’,
channel varchar(80) NOT NULL DEFAULT ‘’,
dstchannel varchar(80) NOT NULL DEFAULT ‘’,
lastapp varchar(80) NOT NULL DEFAULT ‘’,
lastdata varchar(80) NOT NULL DEFAULT ‘’,
duration int(11) NOT NULL DEFAULT ‘0’,
billsec int(11) NOT NULL DEFAULT ‘0’,
disposition varchar(45) NOT NULL DEFAULT ‘’,
amaflags int(11) NOT NULL DEFAULT ‘0’,
accountcode varchar(20) NOT NULL DEFAULT ‘’,
uniqueid varchar(32) NOT NULL DEFAULT ‘’,
userfield varchar(255) NOT NULL DEFAULT ‘’,
peeraccount varchar(20) NOT NULL DEFAULT ‘’,
linkedid varchar(32) NOT NULL DEFAULT ‘’,
sequence int(11) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (acctid),
KEY calldate (calldate),
KEY calldate_2 (calldate),
KEY dst (dst),
KEY accountcode (accountcode)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=50512 ;

1 Like