Odbc issues


I have some issues connecting to an ODBC data source.

I have freeTDS & unixODBC set up correctly (i can test from tsql & isql)
I have configured:

  • cdr.conf
  • cdr_odbc.conf
  • res_odbc.conf

Now, my cdr’s seem to get logged correctly to my remote MS SQL Server database. BUT:

  1. when I run

on my CLI, i get:

[quote]ODBC DSN Settings

Pooled: Yes
Limit: 1
Connections in use: 1
- Connection 1: connected

[Nov 17 15:38:45] WARNING[2721]: res_odbc.c:400 ast_odbc_sanity_check: Connection is down attempting to reconnect…
[Nov 17 15:38:45] NOTICE[2721]: res_odbc.c:834 odbc_obj_connect: Connecting PBXDB
[Nov 17 15:38:45] NOTICE[2721]: res_odbc.c:862 odbc_obj_connect: res_odbc: Connected to PBXDB [PBXDB]
Why is it telling me “Connection is down attempting to reconnect” every time?

  1. I have configures a very simple query in func_odbc.conf

readsql=SELECT COUNT(*) as a FROM cdr’
When I run this from my dialplan I get:

Obviously not good…

Anybody able to help me a bit…?


Solved the second part myself, typing error had to remove a quote…