Hi
I was trying to have realtime voicemail working with ODBC Driver.
Everything works fine with MySQL Realtime access, BUT as I want to implement ODBC Storage as well, it seems that everything should go through ODBC ( what I read on voip-info wiki page )
But I do not manage to make it work with ODBC.
Outside Asterisk, ODBC works fine, I can access my databases & tables !
Asterisk fails to start if I use "pre-connect = yes" in res_odbc.conf ( See errors below )
If I do not use it, then, I get another error message : "res_config_odbc.c: SQL Alloc Handle failed!" when I try to access the voicemail.
Any ideas would be more than welcome !
Thanks !
Here is my config
/etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc.so
Setup = /usr/lib/libodbcmyS.so
FileUsage = 1
/etc/odbc.ini
[MySQLast]
Description = MySQL ODBC Driver Testing
Driver = MySQL
#Socket = /var/run/mysqld/mysqld.sock
Trace = Yes
TraceFile = odbc_mysql.log
Server = localhost
User = asteriskuser
Password = amp109
Database = asteriskrealtime
#Option = 3
Port = 3306
isql -v MySQLast and then "help" shows me my Tables correctly,
SELECT queries work perfectly
/etc/asterisk/res_odbc.conf
[asterisk]
enabled = yes
dsn = MySQLast
username = asteriskuser
password = amp109
;pre-connect = yes
/etc/asterisk/extconfig.conf
[settings]
voicemail => odbc,asterisk,voicemail_users
Modules in Asterisk :
asterisk*CLI> show modules like odbc
Module Description Use Count
res_config_odbc.so ODBC Configuration 1
res_odbc.so ODBC Resource 0
cdr_odbc.so ODBC CDR Backend 0
3 modules loaded
Error Messages:
if "pre-connect = yes" is used in res_odbc.conf
Oct 29 16:23:21 VERBOSE[15016] logger.c: MySQL RealTime driver loaded.
Oct 29 16:23:21 VERBOSE[15016] logger.c: [res_adsi.so]Oct 29 16:23:21 VERBOSE[15016]
logger.c: [res_adsi.so] => (ADSI Resource)
Oct 29 16:23:21 VERBOSE[15016] logger.c: [res_odbc.so]Oct 29 16:23:21 VERBOSE[15016] logger.c: [res_odbc.so] => (ODBC Resource)
Oct 29 16:23:21 VERBOSE[15016] logger.c
: == Parsing '/etc/asterisk/res_odbc.conf': Oct 29 16:23:21 VERBOSE[15016] logger.c: == Parsing '/etc/asterisk/res_odbc.conf': Found
Oct 29 16:23:21 NOTICE[15016] res_odbc.c: registered database handle 'asterisk' dsn->[MySQLast]
Oct 29 16:23:21 NOTICE[15016] res_odbc.c: Connecting asterisk
And this is what I get on the standard error output:
*** glibc detected *** malloc(): memory corruption: 0x09f4daf0 ***
/usr/sbin/safe_asterisk: line 50: 14920 Aborted (core dumped) ${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY}
Asterisk ended with exit status 134
Asterisk exited on signal 6.
Automatically restarting Asterisk.
*** glibc detected *** malloc(): memory corruption: 0x0a023af0 ***
/usr/sbin/safe_asterisk: line 50: 15016 Aborted (core dumped) ${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY}
Asterisk ended with exit status 134
Asterisk exited on signal 6.
Automatically restarting Asterisk.
If no pre-connect, then I can start asterisk, but I get this error when I try to access VM:
Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Executing VoiceMail("IAX2/telegrupp-4", "
[EMAIL PROTECTED]|") in new stack
Oct 29 16:24:43 DEBUG[15178] channel.c: Avoiding initial deadlock for 'IAX2/telegrupp-4'
Oct 29 16:24:43 DEBUG[15178] channel.c: Avoiding initial deadlock for 'IAX2/telegrupp-4'
Oct 29 16:24:43 DEBUG[15178] channel.c: Avoiding initial deadlock for 'IAX2/telegrupp-4'
Oct 29 16:24:43 WARNING[15262] res_config_odbc.c: SQL Alloc Handle failed!
Oct 29 16:24:43 WARNING[15262] app_voicemail.c: No entry in voicemail config file for '200'
Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Executing Goto("IAX2/telegrupp-4", "exit-FAILED|1") in new stack
Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Goto (macro-vm,exit-FAILED,1)
Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Executing Playback("IAX2/telegrupp-4", "im-sorry&an-error-has-occured") in
_______________________________________________ --Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
