Hi,
 
I want queues.conf to be stored on a MySQL database using dynamic realtime. I 
am using asterisk 11.2.1 and MySQL 5.1.67, the MySQL database is hosted on 
another server but I can access the database via ODBC.
 
I have created the following tables:
 
SQL> show tables;
+-----------------------------------------------------------------+
| Tables_in_asterisk                                                            
  |
+-----------------------------------------------------------------+
| QueueDialplanParameters                                                   |
| Queues                                                                        
         |
| queue_log                                                                     
        |
| queue_member_table                                                           |
+-----------------------------------------------------------------+
SQLRowCount returns 4
4 rows fetched

Each table has all of the required fields, some people suggested that 
queue_name is missing but it's not.

I am getting the following errors from the asterisk console:
 
node1*CLI> queue show support 
support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s 
talktime), W:0, C:0, A:0, SL:0.0% within 60s
   No Members
   No Callers
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' AND queue_name = ? ORDER BY interface' at line 1 (226)
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' AND queue_name = ? ORDER BY interface' at line 1 (226)
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' AND queue_name = ? ORDER BY interface' at line 1 (226)
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:645 ast_odbc_prepare_and_execute: 
SQL Execute returned an error -1: 42000: [MySQL][ODBC 5.1 
Driver][mysqld-5.1.67]You have an error in your SQL syntax; check the manual 
that corresponds to your MySQL server version for the right syntax to use near 
''\' AND queue_name = ? ORDER BY interface' at line 1 (226)
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:657 ast_odbc_prepare_and_execute: 
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: 
Connection is down attempting to reconnect...
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting 
asterisk
[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: 
Connected to asterisk [asterisk-connector]

 
The following error suggests that my syntax is incorrect, that syntax seems to 
be part of an SQL query. I do not have any SQL queries anywhere within my 
configuration.
You have an error in your SQL syntax; check the manual that corresponds to your 
MySQL server version for the right syntax to use near ''\' AND queue_name = ? 
ORDER BY interface' at line 1 (226)
 
Most of the other errors are related to ODBC, it keeps on connecting and 
disconnecting, apparently this is normal but I would like to fix it.
 
I would greatly appreciate any help. Thank you.
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to