<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto">Hi,</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">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.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">I have created the following tables:</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">SQL> show tables;<BR>+-----------------------------------------------------------------+<BR>| Tables_in_asterisk <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> </SPAN></SPAN></SPAN></SPAN> |<BR>+-----------------------------------------------------------------+<BR>| QueueDialplanParameters <SPAN style="RIGHT: auto"
class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> </SPAN></SPAN></SPAN> |<BR>| Queues <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto"
class=tab> </SPAN></SPAN></SPAN></SPAN></SPAN></SPAN>|<BR>| queue_log <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> </SPAN></SPAN></SPAN></SPAN></SPAN></SPAN> |<BR>|
queue_member_table <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> <SPAN style="RIGHT: auto" class=tab> </SPAN></SPAN></SPAN></SPAN>|<BR>+-----------------------------------------------------------------+<BR>SQLRowCount returns 4<BR>4 rows fetched<BR></div>
<div style="RIGHT: auto">Each table has all of the required fields, some people suggested that queue_name is missing but it's not.<BR style="RIGHT: auto"></div>
<div style="RIGHT: auto">I am getting the following errors from the asterisk console:</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">node1*CLI> queue show support <BR>support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 60s<BR> No Members<BR style="RIGHT: auto"> No Callers</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">[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)<BR>[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]...<BR>[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect...<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect:
res_odbc: Connected to asterisk [asterisk-connector]<BR>[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)<BR>[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]...<BR>[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect...<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector]<BR>[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)<BR>[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]...<BR>[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect...<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector]<BR>[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)<BR>[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]...<BR>[Apr 19 22:37:05] WARNING[18366]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect...<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk<BR>[Apr 19 22:37:05] NOTICE[18366]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector]<BR style="RIGHT: auto"></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">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.</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">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)</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">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.<VAR id=yui-ie-cursor></VAR></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"> </div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto">I would greatly appreciate any help. Thank you.</div></div></body></html>