[asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
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 => _3.,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

[asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
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 => _3.,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

[asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper
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 
To: Tommy Cooper ; Asterisk Users Mailing List - 
Non-Commercial Discussion  
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` 

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Leandro Dardini
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 

> 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|  namestrategy  *
> ***
>  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
> *

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Leandro Dardini
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 

> 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 
> *To:* Tommy Cooper ; Asterisk Users Mailing List -
> Non-Commercial Discussion 
> *Sent:* Thursday, April 18, 2013 11:04 PM
> *Subject:* Re: [asterisk-users] Dynamic realtime + queues
>
>  You need a "name" column. This is

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Tommy Cooper



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 
To: Tommy Cooper ; Asterisk Users Mailing List - 
Non-Commercial Discussion  
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 

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 

Re: [asterisk-users] Dynamic realtime + queues

2013-04-18 Thread Jose Flores Galicia
2013/4/18 Tommy Cooper :
>
>
> 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 
> To: Tommy Cooper ; Asterisk Users Mailing List -
> Non-Commercial Discussion 
> 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 
>
> 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)
>
>
>
>
> --
> _