My Asterisk doesn’t write CDR’s to database via ODBC. Plz, anybody help
me to understand, what I am doing wrong.
Asterisk succesfully writes CDR’s into the text log.
Database exists, unixODBC installed and configured properly (I can use
database from isql, Asterisk reads sipusers from it…).
“cdr_odbc” occurances in my “full” log:
Mar 28 15:11:44 VERBOSE[8753] logger.c: [cdr_odbc.so]Mar 28 15:11:44 VERBOSE[8753] logger.c: [cdr_odbc.so] => (ODBC CDR Backend)
Mar 28 15:11:44 DEBUG[8753] config.c: Parsing /usr/local/asterisk/etc/asterisk/cdr_odbc.conf
Mar 28 15:11:44 DEBUG[8753] cdr_odbc.c: cdr_odbc: Logging uniqueid
Mar 28 15:11:44 DEBUG[8753] cdr_odbc.c: cdr_odbc: Not logging in GMT
Mar 28 15:11:44 VERBOSE[8753] logger.c: – cdr_odbc: dsn is asterisk
Mar 28 15:11:44 VERBOSE[8753] logger.c: – cdr_odbc: username is astserver
Mar 28 15:11:44 VERBOSE[8753] logger.c: – cdr_odbc: password is [secret]
Mar 28 15:11:44 VERBOSE[8753] logger.c: – cdr_odbc: table is cdr
(and that’s all!)
Asterisk’s configs:
cdr.conf
[general]
enable=yes
batch=no
safeshutdown=yes
cdr_manager.conf
[general]
enabled = no
cdr_odbc.conf
[global]
dsn=asterisk
username=astserver
password=12345
loguniqueid=yes
dispositionstring=yes
table=cdr;“cdr” is default table name
;usegmtime=no ; set to “yes” to log in GMT
res_odbc.conf
[asterisk]
enabled => yes
dsn => asterisk
username => astserver
password => 12345
pre-connect => yes
extconfig.conf
[settings]
sipusers => odbc,asterisk,sip_buddies
sippeers => odbc,asterisk,sip_buddies
modules.conf
[modules]
autoload=yes
preload => res_odbc.so
preload => res_config_odbc.so
load => cdr_odbc.so
noload => chan_iax2.so
noload => pbx_gtkconsole.so
noload => pbx_kdeconsole.so
noload => app_intercom.so
noload => chan_modem.so
noload => chan_modem_aopen.so
noload => chan_modem_bestdata.so
noload => chan_modem_i4l.so
load => res_musiconhold.so
noload => chan_alsa.so
[global]