Hi,
I am trying to store queues.conf to a MySQL database using dynamic realtime. I
have a working ODBC connection and the queueing system already works but I want
to store the queues.conf file to a database. I am following the guide from
Asterisk the definitive guide, the ebook can be found at:
http://ofps.oreilly.com/titles/9781449332426/asterisk-DB.html
I have a database called asterisk which contains 2 main tables: Queues and
queue_member_table, both tables have sample data.
mysql> select * from queue_member_table;
+----------+------------+------------+-----------+---------+--------+
| uniqueid | membername | queue_name | interface | penalty | paused |
+----------+------------+------------+-----------+---------+--------+
| 1 | SIP/1000 | support | SIP/1000 | NULL | 0 |
+----------+------------+------------+-----------+---------+--------+
SQL> select QueueID,name,strategy from Queues;
|QueueID| name strategy
1 support rrmemory
There are more fields but these are the most important
I keep getting this error:
node1*CLI> queue show
No queues.
[Apr 18 22:41:06] WARNING[18599]: 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
''\' ORDER BY name' at line 1 (202)
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657 ast_odbc_prepare_and_execute:
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check:
Connection is down attempting to reconnect...
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect: Connecting
asterisk
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect: res_odbc:
Connected to asterisk [asterisk-connector]
[Apr 18 22:41:06] WARNING[18599]: 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
''\' ORDER BY name' at line 1 (202)
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:657 ast_odbc_prepare_and_execute:
SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]...
[Apr 18 22:41:06] WARNING[18599]: res_odbc.c:761 ast_odbc_sanity_check:
Connection is down attempting to reconnect...
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1527 odbc_obj_connect: Connecting
asterisk
[Apr 18 22:41:06] NOTICE[18599]: res_odbc.c:1559 odbc_obj_connect: res_odbc:
Connected to asterisk [asterisk-connector]
extensions.conf:
[general]
autofallthrough=yes
[default]
exten => 1000,1, Dial (SIP/1000)
exten => 1001,1, Dial (SIP/1001)
[Queues]
exten => 1000,1,Verbose(1,Call entering queue named ${support)
same => n,Set(QueueParameters=${GET_QUEUE_DETAILS(support)})
same => n,Queue(${QueueParameters})
[LocalSets]
include => Queues
[sip-phone]
;This is the context setup for outgoing calls
exten => _3XXXX.,1,Dial(SIP/myprovider/${EXTEN:1},60) ;working config
[from-myprovider]
;This is the context setup for incoming calls
exten => *mynumber*,1,Answer
exten => *mynumber*,2,Queue(support)
exten => *mynumber*,4,Hangup
queues.conf
[general]
autofill=yes ; distribute all waiting callers to available members
shared_lastcall=yes ; respect the wrapup time for members logged into more
; than one queue
realtime_family = queue, Queues
Thank you and sorry for the long post
--
_____________________________________________________________________
-- 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