Unnable to Setup SQL Server Connectivity

Hi all,

ODBC INST

odbcinst.ini
[FreeTDS]
Description = ODBC for Microsoft SQL
Driver =/usr/lib64/libtdsodbc.so.0
UsageCount =1
Threading =2

odbc.ini
[asterisk-connector]
Description = MS SQL
Driver = FreeTDS
Database = testing
Server = ipaddress
UserName = xxxxx (this has no impact on the connection)
Password = xxxxx
Trace = No
TDS_Version = auto
Port =1433

res_odbc.conf
[asterisk]
enabled => yes
dsn => asterisk-connector
username => xxxxx
password => xxxx
pooling => no
limit => no
pre-connect => yes

func_odbc.conf
[IsCallerExists]
dsn=asterisk
readsql=SELECT IF(COUNT(1)>0,1,0) FROM CallerType WHERE CallerNum = ‘${SQL_ESC(${ARG1})}’

If run
isql -v asterisk-connector
giving error on connection

when i run
isql -v asterisk-connector username password
it is giving result

when i run clicmd
cli > odbc show
no dns

cli > odbc read IsCallerExists 123 exec
Execution failed SELECT IF(COUNT(1)>0,1,0) FROM CallerType WHERE CallerNum =

Please help me on this

is “dns” a typo? should it be “dsn”?

It started working after I removed limit
removed this limit => no

Limit should be an integer value but for some reason the value 0 is seen as a Boolean which causes the error.

https://issues.asterisk.org/jira/browse/ASTERISK-18546