I have Asterisk 1.4.32 and I would like save all VoiceMail to MSSQL 2008 database. I configured ODBC, but I receive this errors.
<div> [Jun 18 14:00:37] NOTICE[19914] res_odbc.c: Connecting sqlserver<br> [Jun 18 14:00:37] NOTICE[19914] res_odbc.c: res_odbc: Connected to sqlserver [kupalaodbc]<br> [Jun 18 14:00:37] WARNING[19914] app_voicemail.c: SQL Prepare failed![SELECT COUNT(*) FROM pbx_VoiceMail WHERE dir = '/var/spool/asterisk/voicemail/default/390/INBOX']<br>
[Jun 18 14:00:37] WARNING[19914] res_odbc.c: SQL Prepare failed. Attempting a reconnect...<br> [Jun 18 14:00:37] WARNING[19914] res_odbc.c: Unable to deallocate database handle? 0 errno=0 [unixODBC][Driver Manager]Function sequence error<br>
</div>
<div> </div>
<div>I have configured in voicemail.conf</div>
<div> [general]<br> format=wav49<br> odbcstorage=sqlserver<br> odbctable=pbx_VoiceMail<br></div>
<div>odbc.ini</div>
<div> [kupalaodbc]<br> Description = ODBC connection<br> Driver = ms-sql<br> Servername = ms-sql<br> UID = TestDatabaseDemo<br> database = TestDatabaseDemo<br> Port = 1364<br>
</div>
<div> </div>
<div>odbcinst.ini</div>
<div> [ms-sql]<br> Description = TDS connection<br> Driver = /usr/lib/odbc/libtdsodbc.so<br> Setup = /usr/lib/odbc/libtdsS.so<br> UsageCount = 1<br> FileUsage = 1<br></div>
<div>freetds.conf</div>
<div> [ms-sql]<br> host = 192.168.1.10<br> port = 1364<br> tds version = 8.0<br> dump file = /var/log/freetds.log<br></div>
<div><br>I reloaded module and restarted asterisk also, but with no success.<br>What can be wrong?</div>
<div> </div>
<div>Regards Andraž</div>