[asterisk-users] Dynamic realtime + queues

Leandro Dardini ldardini at gmail.com
Thu Apr 18 16:32:58 CDT 2013


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)
>
>  ----- 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;
>
> --
> _____________________________________________________________________
> -- 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/d96feaef/attachment.htm>


More information about the asterisk-users mailing list