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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/0a454252/attachment.htm>
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/c13aba8e/attachment.htm>
You need a "name" column. This is my queue table: CREATE TABLE IF NOT EXISTS `queue` ( `name` varchar(128) NOT NULL, `musiconhold` varchar(128) DEFAULT NULL, `announce` varchar(128) DEFAULT NULL, `context` varchar(128) DEFAULT NULL, `timeout` int(11) DEFAULT NULL, `monitor_join` tinyint(1) DEFAULT NULL, `monitor_format` varchar(128) DEFAULT NULL, `queue_youarenext` varchar(128) DEFAULT NULL, `queue_thereare` varchar(128) DEFAULT NULL, `queue_callswaiting` varchar(128) DEFAULT NULL, `queue_holdtime` varchar(128) DEFAULT NULL, `queue_minutes` varchar(128) DEFAULT NULL, `queue_seconds` varchar(128) DEFAULT NULL, `queue_lessthan` varchar(128) DEFAULT NULL, `queue_thankyou` varchar(128) DEFAULT NULL, `queue_reporthold` varchar(128) DEFAULT NULL, `announce_frequency` int(11) DEFAULT NULL, `announce_round_seconds` int(11) DEFAULT NULL, `announce_holdtime` varchar(128) DEFAULT NULL, `retry` int(11) DEFAULT NULL, `wrapuptime` int(11) DEFAULT NULL, `maxlen` int(11) DEFAULT NULL, `servicelevel` int(11) DEFAULT NULL, `strategy` varchar(128) DEFAULT NULL, `joinempty` varchar(128) DEFAULT NULL, `leavewhenempty` varchar(128) DEFAULT NULL, `eventmemberstatus` tinyint(1) DEFAULT NULL, `eventwhencalled` tinyint(1) DEFAULT NULL, `reportholdtime` tinyint(1) DEFAULT NULL, `memberdelay` int(11) DEFAULT NULL, `weight` int(11) DEFAULT NULL, `timeoutrestart` tinyint(1) DEFAULT NULL, `periodic_announce` varchar(50) DEFAULT NULL, `periodic_announce_frequency` int(11) DEFAULT NULL, `ringinuse` tinyint(1) DEFAULT NULL, `setinterfacevar` tinyint(1) DEFAULT NULL, PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 2013/4/18 Tommy Cooper <tomcooper83 at yahoo.com>> 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/d72a42b4/attachment.htm>
Thank you for your response ? I already have a name column but my primary key is 'QueueID' instead of name ? +-----------------------------+-----------------------+------+-----+------------+----------------+ | Field?????????????????????? | Type????????????????? | Null | Key | Default??? | Extra????????? | +-----------------------------+-----------------------+------+-----+------------+----------------+ | QueueID???????????????????? | mediumint(8) unsigned | NO?? | PRI | NULL?????? | auto_increment | | name??????????????????????? | varchar(128)????????? | NO?? | UNI | NULL?????? |??????????????? | | description???????????????? | varchar(128)????????? | YES? |???? | NULL?????? |??????????????? | | maxlen????????????????????? | tinyint(4)??????????? | YES? |???? | NULL?????? |??????????????? | | reportholdtime????????????? | varchar(3)??????????? | YES? |???? | no???????? |??????????????? | | periodic_announce_frequency | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | | periodic_announce?????????? | varchar(128)????????? | YES? |???? | NULL?????? |??????????????? | | strategy??????????????????? | varchar(20)?????????? | NO?? |???? | rrmemory?? |??????????????? | | joinempty?????????????????? | varchar(35)?????????? | YES? |???? | no???????? |??????????????? | | leavewhenempty????????????? | varchar(35)?????????? | YES? |???? | no???????? |??????????????? | | autopause?????????????????? | varchar(3)??????????? | YES? |???? | no???????? |??????????????? | | announce_round_seconds????? | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | | retry?????????????????????? | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | | wrapuptime????????????????? | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | | announce_holdtime?????????? | varchar(3)??????????? | YES? |???? | no???????? |??????????????? | | announce_frequency????????? | varchar(4)??????????? | YES? |???? | 0????????? |??????????????? | | timeout???????????????????? | varchar(4)??????????? | YES? |???? | 60???????? |??????????????? | | context???????????????????? | varchar(128)????????? | NO?? |???? | NULL?????? |??????????????? | | musicclass????????????????? | varchar(128)????????? | YES? |???? | default??? |??????????????? | | autofill??????????????????? | varchar(3)??????????? | YES? |???? | yes??????? |??????????????? | | ringinuse?????????????????? | varchar(45)?????????? | YES? |???? | no???????? |??????????????? | | musiconhold???????????????? | varchar(128)????????? | YES? |???? | yes??????? |??????????????? | | monitor_type??????????????? | varchar(128)????????? | YES? |???? | MixMonitor |??????????????? | | monitor_format????????????? | varchar(128)????????? | YES? |???? | wav??????? |??????????????? | | servicelevel??????????????? | varchar(4)??????????? | YES? |???? | 60???????? |??????????????? | | queue_thankyou????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_youarenext??????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_thereare????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_callswaiting????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_holdtime????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_minutes?????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_seconds?????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_lessthan????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | queue_reporthold??????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | | relative_periodic_announce? | varchar(4)??????????? | YES? |???? | yes??????? |??????????????? | +-----------------------------+-----------------------+------+-----+------------+----------------+ 35 rows in set (0.00 sec) ----- Forwarded Message ----- From: Leandro Dardini <ldardini at gmail.com> To: Tommy Cooper <tomcooper83 at yahoo.com>; Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Sent: Thursday, April 18, 2013 11:04 PM Subject: Re: [asterisk-users] Dynamic realtime + queues You need a "name" column. This is my queue table: CREATE TABLE IF NOT EXISTS `queue` ( ? `name` varchar(128) NOT NULL, ? `musiconhold` varchar(128) DEFAULT NULL, ? `announce` varchar(128) DEFAULT NULL, ? `context` varchar(128) DEFAULT NULL, ? `timeout` int(11) DEFAULT NULL, ? `monitor_join` tinyint(1) DEFAULT NULL, ? `monitor_format` varchar(128) DEFAULT NULL, ? `queue_youarenext` varchar(128) DEFAULT NULL, ? `queue_thereare` varchar(128) DEFAULT NULL, ? `queue_callswaiting` varchar(128) DEFAULT NULL, ? `queue_holdtime` varchar(128) DEFAULT NULL, ? `queue_minutes` varchar(128) DEFAULT NULL, ? `queue_seconds` varchar(128) DEFAULT NULL, ? `queue_lessthan` varchar(128) DEFAULT NULL, ? `queue_thankyou` varchar(128) DEFAULT NULL, ? `queue_reporthold` varchar(128) DEFAULT NULL, ? `announce_frequency` int(11) DEFAULT NULL, ? `announce_round_seconds` int(11) DEFAULT NULL, ? `announce_holdtime` varchar(128) DEFAULT NULL, ? `retry` int(11) DEFAULT NULL, ? `wrapuptime` int(11) DEFAULT NULL, ? `maxlen` int(11) DEFAULT NULL, ? `servicelevel` int(11) DEFAULT NULL, ? `strategy` varchar(128) DEFAULT NULL, ? `joinempty` varchar(128) DEFAULT NULL, ? `leavewhenempty` varchar(128) DEFAULT NULL, ? `eventmemberstatus` tinyint(1) DEFAULT NULL, ? `eventwhencalled` tinyint(1) DEFAULT NULL, ? `reportholdtime` tinyint(1) DEFAULT NULL, ? `memberdelay` int(11) DEFAULT NULL, ? `weight` int(11) DEFAULT NULL, ? `timeoutrestart` tinyint(1) DEFAULT NULL, ? `periodic_announce` varchar(50) DEFAULT NULL, ? `periodic_announce_frequency` int(11) DEFAULT NULL, ? `ringinuse` tinyint(1) DEFAULT NULL, ? `setinterfacevar` tinyint(1) DEFAULT NULL, ? PRIMARY KEY (`name`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/08301ef8/attachment-0001.htm>
Thanks again for replying, I got a wireshark capture with that command you provided. Please find attached the wireshark capture ----- Forwarded Message ----- From: Leandro Dardini <ldardini at gmail.com> To: Tommy Cooper <tomcooper83 at yahoo.com>; Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Sent: Thursday, April 18, 2013 11:32 PM Subject: Re: [asterisk-users] Dynamic realtime + queues Uhm ... I see the easy way will be to tcpdump the connection between the asterisk and the mysql database server and to dump the exact SQL syntax used. It will be something wrong... Leandro PS tcpdump -i any -n -s 1500 -w /tmp/data.pcap port 3306 2013/4/18 Tommy Cooper <tomcooper83 at yahoo.com> Thank you for your response>? >I already have a name column but my primary key is 'QueueID' instead of name >? >+-----------------------------+-----------------------+------+-----+------------+----------------+ >| Field?????????????????????? | Type????????????????? | Null | Key | Default??? | Extra????????? | >+-----------------------------+-----------------------+------+-----+------------+----------------+ >| QueueID???????????????????? | mediumint(8) unsigned | NO?? | PRI | NULL?????? | auto_increment | >| name??????????????????????? | varchar(128)????????? | NO?? | UNI | NULL?????? |??????????????? | >| description???????????????? | varchar(128)????????? | YES? |???? | NULL?????? |??????????????? | >| maxlen????????????????????? | tinyint(4)??????????? | YES? |???? | NULL?????? |??????????????? | >| reportholdtime????????????? | varchar(3)??????????? | YES? |???? | no???????? |??????????????? | >| periodic_announce_frequency | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | >| periodic_announce?????????? | varchar(128)????????? | YES? |???? | NULL?????? |??????????????? | >| strategy??????????????????? | varchar(20)?????????? | NO?? |???? | rrmemory?? |??????????????? | >| joinempty?????????????????? | varchar(35)?????????? | YES? |???? | no???????? |??????????????? | >| leavewhenempty????????????? | varchar(35)?????????? | YES? |???? | no???????? |??????????????? | >| autopause?????????????????? | varchar(3)??????????? | YES? |???? | no???????? |??????????????? | >| announce_round_seconds????? | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | >| retry?????????????????????? | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | >| wrapuptime????????????????? | varchar(4)??????????? | YES? |???? | NULL?????? |??????????????? | >| announce_holdtime?????????? | varchar(3)??????????? | YES? |???? | no???????? |??????????????? | >| announce_frequency????????? | varchar(4)??????????? | YES? |???? | 0????????? |??????????????? | >| timeout???????????????????? | varchar(4)??????????? | YES? |???? | 60???????? |??????????????? | >| context???????????????????? | varchar(128)????????? | NO?? |???? | NULL?????? |??????????????? | >| musicclass????????????????? | varchar(128)????????? | YES? |???? | default??? |??????????????? | >| autofill??????????????????? | varchar(3)??????????? | YES? |???? | yes??????? |??????????????? | >| ringinuse?????????????????? | varchar(45)?????????? | YES? |???? | no???????? |??????????????? | >| musiconhold???????????????? | varchar(128)????????? | YES? |???? | yes??????? |??????????????? | >| monitor_type??????????????? | varchar(128)????????? | YES? |???? | MixMonitor |??????????????? | >| monitor_format????????????? | varchar(128)????????? | YES? |???? | wav??????? |??????????????? | >| servicelevel??????????????? | varchar(4)??????????? | YES? |???? | 60???????? |??????????????? | >| queue_thankyou????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_youarenext??????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_thereare????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_callswaiting????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_holdtime????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_minutes?????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_seconds?????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_lessthan????????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| queue_reporthold??????????? | varchar(128)????????? | YES? |???? |??????????? |??????????????? | >| relative_periodic_announce? | varchar(4)??????????? | YES? |???? | yes??????? |??????????????? | >+-----------------------------+-----------------------+------+-----+------------+----------------+ >35 rows in set (0.00 sec) > > > >?-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/dc8bd483/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: data.pcap Type: application/octet-stream Size: 8343 bytes Desc: not available URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/dc8bd483/attachment.obj>
Thank you all for your help ? Mr. Jos? Flores Galicia, ? I already have the queue_member_table and it has 1 record in it. I m not sure what interface I have to enter in the interface field. mysql> explain queue_member_table; +------------+------------------+------+-----+---------+----------------+ | Field????? | Type???????????? | Null | Key | Default | Extra????????? | +------------+------------------+------+-----+---------+----------------+ | uniqueid?? | int(10) unsigned | NO?? | PRI | NULL??? | auto_increment | | membername | varchar(40)????? | YES? |???? | NULL??? |??????????????? | | queue_name | varchar(128)???? | YES? | MUL | NULL??? |??????????????? | | interface? | varchar(128)???? | YES? |???? | NULL??? |??????????????? | | penalty??? | int(11)????????? | YES? |???? | NULL??? |??????????????? | | paused???? | int(11)????????? | YES? |???? | NULL??? |??????????????? | +------------+------------------+------+-----+---------+----------------+ 6 rows in set (0.00 sec) ? Lach, "To me it looks like queue_name should be just name in your sql statement." Are you refering to queue_name column in the queue_member_table? ----- Forwarded Message ----- From: Lachlan Dunlop <lach at lach.net> To: Tommy Cooper <tomcooper83 at yahoo.com>; Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Sent: Friday, April 19, 2013 12:02 AM Subject: Re: [asterisk-users] Dynamic realtime + queues Tommy, To me it looks like queue_name should be just name in your sql statement. Lach This is what i m getting when i m in the asterisk console: node1*CLI> queue show 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 00:15:13] WARNING[57946]: 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 19 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]... [Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector] [Apr 19 00:15:13] WARNING[57946]: 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 19 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]... [Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector] [Apr 19 00:15:13] WARNING[57946]: 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 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]... [Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector] [Apr 19 00:15:13] WARNING[57946]: 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 00:15:13] WARNING[57946]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]... [Apr 19 00:15:13] WARNING[57946]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk [Apr 19 00:15:13] NOTICE[57946]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector] [Apr 19 00:16:09] WARNING[62511][C-00000008]: 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 00:16:09] WARNING[62511][C-00000008]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]... [Apr 19 00:16:09] WARNING[62511][C-00000008]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... [Apr 19 00:16:09] NOTICE[62511][C-00000008]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk [Apr 19 00:16:09] NOTICE[62511][C-00000008]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector] [Apr 19 00:16:09] WARNING[62511][C-00000008]: 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 00:16:09] WARNING[62511][C-00000008]: res_odbc.c:657 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asterisk [asterisk-connector]... [Apr 19 00:16:09] WARNING[62511][C-00000008]: res_odbc.c:761 ast_odbc_sanity_check: Connection is down attempting to reconnect... [Apr 19 00:16:09] NOTICE[62511][C-00000008]: res_odbc.c:1527 odbc_obj_connect: Connecting asterisk [Apr 19 00:16:09] NOTICE[62511][C-00000008]: res_odbc.c:1559 odbc_obj_connect: res_odbc: Connected to asterisk [asterisk-connector] [Apr 19 00:16:09] WARNING[62511][C-00000008]: app_queue.c:7035 queue_exec: Unable to join queue 'support'From: Tommy Cooper <tomcooper83 at yahoo.com> Reply-To: Tommy Cooper <tomcooper83 at yahoo.com>, Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> To: Asterisk Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] Dynamic realtime + queues Thanks again for replying, I got a wireshark capture with that command you provided. Please find attached the wireshark capture ----- Forwarded Message ----- From: Leandro Dardini <ldardini at gmail.com> To: Tommy Cooper <tomcooper83 at yahoo.com>; Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Sent: Thursday, April 18, 2013 11:32 PM Subject: Re: [asterisk-users] Dynamic realtime + queues Uhm ... I see the easy way will be to tcpdump the connection between the asterisk and the mysql database server and to dump the exact SQL syntax used. It will be something wrong... Leandro PS tcpdump -i any -n -s 1500 -w /tmp/data.pcap port 3306 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130418/7ff5a472/attachment.htm>