Summary: | ASTERISK-06645: Problem with cdr_odbc | ||
Reporter: | alein (alein) | Labels: | |
Date Opened: | 2006-03-28 23:07:07.000-0600 | Date Closed: | 2011-06-07 14:08:28 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | CDR/cdr_odbc |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | My Asterisk doesn't write CDR's to database via ODBC. Asterisk succesfully writes CDR's into the text log. The 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] | ||
Comments: | By: Andrey S Pankov (casper) 2006-03-30 16:05:21.000-0600 Please issue "set verbose 11" on the console to see what's going on... (due to "if (option_verbose > 10)" check in the code) By: Tilghman Lesher (tilghman) 2006-03-30 16:50:19.000-0600 Does the astserver user have the appropriate permissions (INSERT) on the affected table? By: alein (alein) 2006-03-31 00:59:55.000-0600 Thanks, verbose output helped me. I placed "ReadOnly = No" to the odbc.ini, and now all works. |