来自res_odbc的错误

时间:2016-01-26 12:45:05

标签: centos odbc asterisk pbx elastix

我已经将我的odbc连接到MSSQL服务器,我从中获取sip帐户和拨号方案,我也可以在两个对等方之间调用,但星号会出错:

'[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:649 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000: [FreeTDS][SQL Server]The invalid escape character "\\" was specified in a LIKE predicate. (89)
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:649 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000: [FreeTDS][SQL Server]The invalid escape character "\\" was specified in a LIKE predicate. (89)
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:649 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 42000: [FreeTDS][SQL Server]The invalid escape character "\\" was specified in a LIKE predicate. (89)
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:661 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to MSSQL [MSSQL]...
[Jan 26 16:43:16] WARNING[32715]: res_odbc.c:765 ast_odbc_sanity_check: Connection is down attempting to reconnect...
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1528 odbc_obj_connect: Connecting MSSQL
[Jan 26 16:43:16] NOTICE[32715]: res_odbc.c:1567 odbc_obj_connect: res_odbc: Connected to MSSQL [MSSQL]'

1 个答案:

答案 0 :(得分:0)

在星号documentation中明确说明你可以选择escape charaster,它可能在你的配置中设置错误。

示例配置文件中的

; Is the backslash a native escape character?  The default is yes, but for
; MS SQL Server, the answer is no.
;backslash_is_escape => yes