I am trying to get CDR logged to an Oracle DB.
I have downloaded and installed the instant clients in order as follows:
instantclient-basic-linux32-10.2.0.2-20060331.zip
instantclient-odbc-linux32-10.2.0.2-20060331.zip
instantclient-sqlplus-linux32-10.2.0.2-20060331.zip
into /usr/lib/instantclient_10_2
I added /usr/lib/instantclient_10_2 to /etc/ld.so.conf and then ran ldconfig
I have configured /etc/asterisk/cdr_odbc.conf as such:
;
; cdr_odbc.conf
;
[global]
dsn=Oracle-asterisk
username=asterisk
password=asterisk
loguniqueid=yes
table=cdr
/etc/odbc.ini (note ~/.odbc.ini is symbolically linked to it):
[Oracle-asterisk]
Description = Oracle ODBC Driver
Driver = Oracle_10g_ODBC_driver
Server = 192.168.0.9
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:
[Oracle_10g_ODBC_driver]
Description = Oracle ODBC driver for Oracle 10g
Driver = /usr/lib/instantclient_10_2/libsqora.so.10.1
Setup =
FileUsage =
CPTimeout =
CPReuse =
I am able to connect to the database using the command
usr/lib/instantclient_10_2/sqlplus asterisk/asterisk@//192.168.0.9:1521/live10g
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?
Thanks