CDR on Oracle

I am trying to get CDR logged to an Oracle DB.
I have downloaded and installed the instant clients in order as follows:

into /usr/lib/instantclient_10_2

I added /usr/lib/instantclient_10_2 to /etc/ and then ran ldconfig

I have configured /etc/asterisk/cdr_odbc.conf as such:
; cdr_odbc.conf


/etc/odbc.ini (note ~/.odbc.ini is symbolically linked to it):
Description = Oracle ODBC Driver
Driver = Oracle_10g_ODBC_driver
Server =
Port = 1521
Database = live10g
UserID = asterisk
DSN = Oracle-asterisk
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
CloseCursor = F
DisableDPM = F
DisableMTS = T
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = live10g
SQLGetData extensions = F
Translation DLL =
Translation Option = 0

/etc/odbcinst.ini as such:
Description = Oracle ODBC driver for Oracle 10g
Driver = /usr/lib/instantclient_10_2/
Setup =
FileUsage =
CPTimeout =
CPReuse =

I am able to connect to the database using the command
usr/lib/instantclient_10_2/sqlplus asterisk/asterisk@//

But tail -f /var/log/asterisk/messages produces:
Nov 14 15:09:20 NOTICE[20229] config.c: Registered Config Engine mysql
Nov 14 15:09:20 NOTICE[20229] cdr.c: CDR simple logging enabled.
Nov 14 15:09:20 NOTICE[20229] config.c: Registered Config Engine odbc
Nov 14 15:09:20 NOTICE[20229] res_odbc.c: res_odbc loaded.
Nov 14 15:09:20 ERROR[20229] cdr_odbc.c: cdr_odbc: Unable to connect to datasource: Oracle-asterisk
Nov 14 15:09:21 WARNING[20229] cdr_custom.c: Failed to load configuration file. Module not activated.

Anyone set CDR to log to Oracle and can help me? Anyone got any clues?


if you turn on debug logging in logger.conf, do you get a “better” error message ?

No, I get a /var/log/asterisk/debug file but nothing about odbc. Also no new messages, console or otherwise.