asterisk*CLI> odbc show
ODBC DSN Settings
-----------------
Name: asterisk
DSN: asterisk-connector
Last connection attempt: 1969-12-31 18:00:00
Number of active connections: 1 (out of 1)
I had a db problem: after working perfectly for many weeks, Asterisk would suddenly be unable to write to the database, even though it was connected through the odbc driver. Restarting Asterisk temporarily fixed the problem. I didn’t see the problem again after an upgrade, I’m currently on 13.22.
I recompiled Asterisk to version 15. The same with mariadb odbc. But no working.
Database is running ok. (remote connect)
From linux machine with odbc - no problem.
asterisk*CLI> odbc show
ODBC DSN Settings
-----------------
Name: asterisk
DSN: asterisk-connector
Number of active connections: 1 (out of 1)
asterisk*CLI>
asterisk*CLI> odbc read ODBC_POKUS 1 exec
Failed to execute query. [SELECT tel_cislo FROM last_listener LIMIT 1]
[Sep 9 11:33:45] WARNING[4024]: func_odbc.c:476 execute: SQL Execute returned an error -1: 42000: [ma-3.0.6][10.1.26-MariaDB-0+deb9u1]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT tel_cislo FROM last_listener LIMIT 1' at line 1 (230)
[Sep 9 11:33:45] WARNING[4024]: func_odbc.c:485 execute: SQL Exec Direct failed (-1)![SELECT tel_cislo FROM last_listener LIMIT 1]
asterisk*CLI>