[Home]

Summary:ASTERISK-16616: ODBC connection to mssql does not work
Reporter:wurstsalat (wurstsalat)Labels:
Date Opened:2010-08-25 09:00:41Date Closed:2010-08-25 11:14:10
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_odbc
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Using sip peers and users in realtime via res_odbc and unixodbc does not work anymore with mssql using freetds driver.

my extconfig.conf
sipusers => odbc,mssql,t_sip_buddies
sippeers => odbc,mssql,t_sip_buddies

my res_odbc.conf
[mssql]
enabled => no
dsn => servername
share_connections => no
limit => 5
username => public
password => public
pre-connect => yes
sanitysql => select count(*) from t_extensions
backslash_is_escape => no

This used to work in 1.6.1.20 but does not work anymore with 1.8.0 beta4.
Trying to start Asterisk i receive.

[Aug 24 16:28:34] NOTICE[6825]: cdr.c:1567 do_reload: CDR simple logging enabled.
[Aug 24 16:28:34] NOTICE[6825]: loader.c:1098 load_modules: 193 modules will be loaded.
[Aug 24 16:28:34] WARNING[6825]: loader.c:387 load_dynamic_module: Error loading module 'res_config_odbc.so': /usr/lib/asterisk/modules/res_config_odbc.so: undefined symbol: ast_odbc_clear_cache
[Aug 24 16:28:34] NOTICE[6825]: res_odbc.c:1471 odbc_obj_connect: Connecting mssql
asterisk: net.c:348: tds_select: Assertion `timeout_seconds >= 0' failed.

and asterisk does not start.

With the preloads of res_odbc.so and res_config_odbc.so in modules.conf I receive

[Aug 24 16:29:25] NOTICE[6857]: loader.c:1098 load_modules: 2 modules will be loaded.
[Aug 24 16:29:25] NOTICE[6857]: res_odbc.c:1471 odbc_obj_connect: Connecting mssql
asterisk: net.c:348: tds_select: Assertion `timeout_seconds >= 0' failed.

and asterisk does not start either.

Only if I set my DSN 'mssql' to enabled => no in res_odbc.conf asterisk starts, but then it can't access my sip users config of course.
Comments:By: Digium Subversion (svnbot) 2010-08-25 11:12:41

Repository: asterisk
Revision: 283561

U   branches/1.8/res/res_odbc.c

------------------------------------------------------------------------
r283561 | tilghman | 2010-08-25 11:12:41 -0500 (Wed, 25 Aug 2010) | 5 lines

Initialize connect timeout on each time through the loop.

(closes issue ASTERISK-16616)
Reported by: wurstsalat

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=283561

By: Digium Subversion (svnbot) 2010-08-25 11:14:10

Repository: asterisk
Revision: 283562

_U  trunk/
U   trunk/res/res_odbc.c

------------------------------------------------------------------------
r283562 | tilghman | 2010-08-25 11:14:09 -0500 (Wed, 25 Aug 2010) | 12 lines

Merged revisions 283561 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
 r283561 | tilghman | 2010-08-25 11:12:43 -0500 (Wed, 25 Aug 2010) | 5 lines
 
 Initialize connect timeout on each time through the loop.
 
 (closes issue ASTERISK-16616)
  Reported by: wurstsalat
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=283562