[Asterisk-Users] cdr_odbc with mysql on a remote server
brian
brian at bkw.org
Wed May 26 06:54:16 MST 2004
Its very clear why its not working. Visit www.voip-info.org for some
examples on how to set it up. If you didn't compile unixODBC and MyODBC
from src then you will need to do so. Installing via RPM or package has
proven in the past to not work.
bkw
> -----Original Message-----
> From: asterisk-users-admin at lists.digium.com [mailto:asterisk-users-
> admin at lists.digium.com] On Behalf Of Adam Goryachev
> Sent: Wednesday, May 26, 2004 3:22 AM
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] cdr_odbc with mysql on a remote server
>
> I'm trying to add cdr_odbc.so to log my CDR data to a mysql DB. I've
> managed to compile everything, and seem to almost be ready to head home.
> I've added a small debug line to cdr_odbc.c as follows:
> if((ODBC_res != SQL_SUCCESS) && (ODBC_res !=
> SQL_SUCCESS_WITH_INFO))
> {
> if(option_verbose > 10)
> ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error
> SQLConnect %d\n", ODBC_res);
> SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat,
> &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
> >> if(option_verbose > 10)
> >> ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error
> Details: %s\n", ODBC_msg);
> SQLFreeHandle(SQL_HANDLE_ENV, ODBC_env);
> connected = 0;
> return -1;
> }
>
> Lines marked with >> are lines I added. Here are the error messages I
> get on the console:
>
> asterisk*CLI> load cdr_odbc.so
> Loaded /usr/lib/asterisk/modules/cdr_odbc.so => (ODBC CDR Backend)
> == Parsing '/etc/asterisk/cdr_odbc.conf': == Parsing
> '/etc/asterisk/cdr_odbc.conf': Found
> 2004-05-26 18:13:54 NOTICE[6151]: cdr_odbc.c:336 odbc_load_module:
> cdr_odbc: Logging uniqueid
> > cdr_odbc: dsn is AsteriskCDR
> > cdr_odbc: username is asteriskcdr
> > cdr_odbc: password is [secret]
> > cdr_odbc: Error SQLConnect -1
> > cdr_odbc: Error Details: [MySQL][ODBC 3.51 Driver]Can't connect
> to local MySQL server through socket '/tmp/mysql.sock' (2)
> 2004-05-26 18:13:54 ERROR[6151]: cdr_odbc.c:363 odbc_load_module:
> cdr_odbc: Unable to connect to datasource: AsteriskCDR
> > cdr_odbc: Unable to connect to datasource: AsteriskCDR
>
> So, the problem I am having is that the mysql odbc driver seems to want
> to use a local socket, but I am not running mysql locally on the
> asterisk machine. I want it to connect to a remote host.
>
> I don't see anything in the source that indicates it can/should be able
> to do this. Can someone either tell me it isn't possible, or I need to
> hack the source, or it is already there and I am just blind...
>
> Thanks,
> Adam
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at 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
More information about the asterisk-users
mailing list