Asterisk have a problem with MSSQL ODBC


I’m trying to use MSSQL ODBC connector to put some data into database when something occured. But right now I know nothing.

ODBC probably is configured correctly - I can use isql application to make an connection to database and execute, so this is why I think this is not ODBC issue.

[2021-11-16 09:49:13] WARNING[6631][C-0000000e]: func_odbc.c:486 execute: SQL Exec Direct failed (-1)![insert into dbo.tableName ([Phone Number],starttime,CallResult,[Duration],stoptime,[DNIS]) values ('999888777','08:33:23','OK', '76','09:31:49','987654321')]

When I copy whole query which is prepared by Asterisk and past into isql it also works, in logs of MSSQL server also I am able to see that Asterisk sends query to server. But why this is not works? I have no idea.


Asterisk res_odbc was configured with pre_connect yes, so after changes in /etc/odbc.ini I should restart also Asterisk to get new settings work

1 Like