Hi, Has anyone made a successfull instalation of cdr_odbc?? I've install unixODBC-2.2.8 (made my own RPM) and then built the module. I'm trying to send the cdrs to a M$ SQL server. The sql connection works because I can do any query via isql. When I do the calls I get the following output on the asterisk console: -- Executing Hangup("SIP/test1-a5e1", "") in new stack == Spawn extension (test, h, 1) exited non-zero on 'SIP/test1-a5e1' > cdr_odbc: Connected to SQL1 > cdr_odbc: Error in Query -1 > cdr_odbc: Query FAILED Call not logged! > cdr_odbc: Connected to SQL1 > cdr_odbc: Reconnecting to dsn SQL1 > cdr_odbc: Trying Query again! > cdr_odbc: Error in Query -2 > cdr_odbc: Query FAILED Call not logged! -- Pablo Endres <epablo@comvoz.com> ComVoz Comunications
Don't install from RPM or even an RPM you built. It's going to suffer the same issues no matter what if you keep using an RPM. Also what FreeTDS version are you using? == Spawn extension (default, 999, 4) exited non-zero on 'SIP/10-6e46' > cdr_odbc: Query Successful! I'm using it with MySQL and MyODBC without issues. I wrote cdr_odbc.c using unixODBC 2.2.7 I don't think much as changed since then and current run it on 2.2.8 without any issues. You need to test using isql to see if you can even connect to the DSN. bkw> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of Pablo Endres > Sent: Tuesday, May 18, 2004 9:24 AM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] problem with cdr_odbc > > Hi, > > Has anyone made a successfull instalation of cdr_odbc?? > > I've install unixODBC-2.2.8 (made my own RPM) and then built the module. > I'm trying to send the cdrs to a M$ SQL server. The sql connection > works because I can do any query via isql. > > When I do the calls I get the following output on the asterisk console: > -- Executing Hangup("SIP/test1-a5e1", "") in new stack > == Spawn extension (test, h, 1) exited non-zero on 'SIP/test1-a5e1' > > cdr_odbc: Connected to SQL1 > > cdr_odbc: Error in Query -1 > > cdr_odbc: Query FAILED Call not logged! > > cdr_odbc: Connected to SQL1 > > cdr_odbc: Reconnecting to dsn SQL1 > > cdr_odbc: Trying Query again! > > cdr_odbc: Error in Query -2 > > cdr_odbc: Query FAILED Call not logged! > > > -- > Pablo Endres <epablo@comvoz.com> > ComVoz Comunications > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
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]
Apparently Analagous Threads
- MSSQL2000 + cdr_odbc.c fix (WAS: problem with cdr_odbc)
- cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.
- Problems compiling cdr_odbc.so
- cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.
- Asterisk cdr_odbc problems