<div>Sorry to re-post, but as noone has answered me ...</div>
<div>Maybe somebody will this time :o)</div>
<div> </div>
<div>Thanks !</div>
<div> </div>
<div>JM<br><br> </div>
<div><span class="gmail_quote">On 10/29/06, <b class="gmail_sendername">Jean-Marc Salsa</b> <> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<p>Hi</p>
<p>I was trying to have realtime voicemail working with ODBC Driver.<br>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 )
<br>But I do not manage to make it work with ODBC.<br>Outside Asterisk, ODBC works fine, I can access my databases & tables !</p>
<p>Asterisk fails to start if I use "pre-connect = yes" in res_odbc.conf ( See errors below )<br>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.
</p>
<p>Any ideas would be more than welcome !</p>
<p>Thanks !</p>
<p><strong>Here is my config</strong></p>
<p>/etc/odbcinst.ini<br>[MySQL]<br>Description = ODBC for MySQL<br>Driver = /usr/lib/libmyodbc.so<br>Setup = /usr/lib/libodbcmyS.so<br>FileUsage = 1</p>
<p>/etc/odbc.ini<br>[MySQLast]<br>Description = MySQL ODBC Driver Testing<br>Driver = MySQL<br>#Socket = /var/run/mysqld/mysqld.sock<br>Trace = Yes<br>TraceFile = odbc_mysql.log<br>Server = localhost
<br>User = asteriskuser<br>Password = amp109<br>Database = asteriskrealtime<br>#Option = 3<br>Port = 3306</p>
<p><br>isql -v MySQLast and then "help" shows me my Tables correctly,<br>SELECT queries work perfectly</p>
<p>/etc/asterisk/res_odbc.conf<br>[asterisk]<br>enabled = yes<br>dsn = MySQLast<br>username = asteriskuser<br>password = amp109<br>;pre-connect = yes</p>
<p><br>/etc/asterisk/extconfig.conf<br>[settings]<br>voicemail => odbc,asterisk,voicemail_users</p>
<p><br>Modules in Asterisk :<br>asterisk*CLI> show modules like odbc<br>Module Description Use Count<br>res_config_odbc.so ODBC Configuration 1
<br>res_odbc.so ODBC Resource 0<br>cdr_odbc.so ODBC CDR Backend 0<br>3 modules loaded</p>
<p><br><strong>Error Messages:</strong></p>
<p><em><u>if "pre-connect = yes" is used in res_odbc.conf</u></em><br>Oct 29 16:23:21 VERBOSE[15016] logger.c: MySQL RealTime driver loaded.<br>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)<br>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)<br>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<br>Oct 29 16:23:21 NOTICE[15016] res_odbc.c: registered database handle 'asterisk' dsn->[MySQLast]
<br>Oct 29 16:23:21 NOTICE[15016] res_odbc.c: Connecting asterisk</p>
<p><u><em>And this is what I get on the standard error output:</em></u><br>*** glibc detected *** malloc(): memory corruption: 0x09f4daf0 ***<br>/usr/sbin/safe_asterisk: line 50: 14920 Aborted (core dumped) ${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY}
<br>Asterisk ended with exit status 134<br>Asterisk exited on signal 6.<br>Automatically restarting Asterisk.<br>*** glibc detected *** malloc(): memory corruption: 0x0a023af0 ***<br>/usr/sbin/safe_asterisk: line 50: 15016 Aborted (core dumped) ${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY}
<br>Asterisk ended with exit status 134<br>Asterisk exited on signal 6.<br>Automatically restarting Asterisk.</p>
<p><br><u><em>If no pre-connect, then I can start asterisk, but I get this error when I try to access VM:</em></u><br>Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Executing VoiceMail("IAX2/telegrupp-4", "
<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:200@default" target="_blank">200@default</a>|") in new stack<br>Oct 29 16:24:43 DEBUG[15178] channel.c: Avoiding initial deadlock for 'IAX2/telegrupp-4'
<br>Oct 29 16:24:43 DEBUG[15178] channel.c: Avoiding initial deadlock for 'IAX2/telegrupp-4' <br>Oct 29 16:24:43 DEBUG[15178] channel.c: Avoiding initial deadlock for 'IAX2/telegrupp-4'<br>Oct 29 16:24:43 WARNING[15262] res_config_odbc.c: SQL Alloc Handle failed!
<br>Oct 29 16:24:43 WARNING[15262] app_voicemail.c: No entry in voicemail config file for '200' <br>Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Executing Goto("IAX2/telegrupp-4", "exit-FAILED|1") in new stack
<br>Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Goto (macro-vm,exit-FAILED,1)<br>Oct 29 16:24:43 VERBOSE[15262] logger.c: -- Executing Playback("IAX2/telegrupp-4", "im-sorry&an-error-has-occured") in
<br></p></blockquote></div><br>