может, время позднее, но я ничо не понимаю, что происходит
Код: Выделить всё
localhost*CLI> odbc show
ODBC DSN Settings
-----------------
Name: asterisk
DSN: asterisk-connector
Last connection attempt: 1970-01-01 03:00:00
Pooled: No
Connected: Yes
localhost*CLI>
Код: Выделить всё
[root@localhost ~]# echo "SELECT phone FROM dialer WHERE id = 1 LIMIT 1" | isql -v asterisk-connector
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT phone FROM dialer WHERE id = 1 LIMIT 1
+----------------+
| phone |
+----------------+
| 123 |
+----------------+
SQLRowCount returns 1
1 rows fetched
Код: Выделить всё
[Feb 18 03:30:51] NOTICE[15722] res_odbc.c: Connecting asterisk
[Feb 18 03:30:51] NOTICE[15722] res_odbc.c: res_odbc: Connected to asterisk [asterisk-connector]
[Feb 18 03:30:51] NOTICE[15722] res_odbc.c: Registered ODBC class 'asterisk' dsn->[asterisk-connector]
Код: Выделить всё
[CLIENT_NAME]
dsn=asterisk-connector
readsql=SELECT phone FROM dialer WHERE id = ${ARG1} LIMIT 1
Код: Выделить всё
localhost*CLI> odbc read ODBC_CLIENT_NAME 1 exec
[b]Failed to execute query.[/b] [SELECT phone FROM dialer WHERE id = 1 LIMIT 1]
Код: Выделить всё
res_odbc.c: Class 'asterisk-connector' not found!