Jonas Kellens
2014-Feb-12 09:46 UTC
[asterisk-users] Realtime Call Queues : call members in certain order
Hello, I'm using MySQL realtime Call Queues (table /queues/ and table /queue_members/). I would like to ring the members of the call queue in a certain order. Therefore I use ring strategy /lineair /and I put the members into the table /queue_members/ in the order in which they have to be rang. So I have the queue : | name | musicclass | announce | context | timeout | monitor_type | monitor_format | queue_youarenext | queue_thereare | queue_callswaiting | queue_holdtime | queue_minutes | queue_seconds | queue_lessthan | queue_thankyou | queue_reporthold | announce_frequency | announce_round_seconds | announce_holdtime | announce_position | retry | wrapuptime | maxlen | servicelevel | strategy | joinempty | leavewhenempty | eventmemberstatus | eventwhencalled | reportholdtime | memberdelay | weight | timeoutrestart | periodic_announce | periodic_announce_frequency | ringinuse | +----------------+------------+----------+---------+---------+--------------+----------------+------------------+----------------+--------------------+----------------+---------------+---------------+----------------+----------------+------------------+--------------------+------------------------+-------------------+-------------------+-------+------------+--------+--------------+----------+-----------+----------------+-------------------+-----------------+----------------+-------------+--------+----------------+-------------------+-----------------------------+-----------+ | queue6 | default | NULL | | 12 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | 30 | NULL | No | yes | 5 | 10 | 0 | NULL | linear | strict | strict | NULL | NULL | NULL | NULL | NULL | no | | 0 | no | +----------------+------------+----------+---------+---------+--------------+----------------+------------------+----------------+--------------------+----------------+---------------+---------------+----------------+----------------+------------------+--------------------+------------------------+-------------------+-------------------+-------+------------+--------+--------------+----------+-----------+----------------+-------------------+-----------------+----------------+-------------+--------+----------------+-------------------+-----------------------------+-----------+ and queue members : +----------+----------------+----------------+--------------------+---------+--------+ | uniqueid | membername | queue_name | interface | penalty | paused | +----------+----------------+----------------+--------------------+---------+--------+ | 44 | queuemem4 | queue6 | SIP/queuemem4 | 0 | NULL | | 45 | queuemem2 | queue6 | SIP/queuemem2 | 0 | NULL | | 46 | queuemem5 | queue6 | SIP/queuemem5 | 0 | NULL | | 47 | queuemem1 | queue6 | SIP/queuemem1 | 0 | NULL | | 48 | queuemem10 | queue6 | SIP/queuemem10 | 0 | NULL | | 49 | queuemem18 | queue6 | SIP/queuemem18 | 0 | NULL | | 50 | queuemem17 | queue6 | SIP/queuemem17 | 0 | NULL | | 51 | queuemem12 | queue6 | SIP/queuemem12 | 0 | NULL | | 52 | queuemem16 | queue6 | SIP/queuemem16 | 0 | NULL | | 53 | queuemem13 | queue6 | SIP/queuemem13 | 0 | NULL | +----------+----------------+----------------+--------------------+---------+--------+ You can see that the member /queuemem4/ is first in line to be rang (has the first and lowest uniqueid in the table). But the first member that is being rang, is /queuemem//1/. How come ?? Kind regards, Jonas. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140212/33c47482/attachment.html>
Steven Wheeler
2014-Feb-12 15:58 UTC
[asterisk-users] Realtime Call Queues : call members in certain order
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas Kellens Sent: Wednesday, February 12, 2014 3:46 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Realtime Call Queues : call members in certain order Hello, I'm using MySQL realtime Call Queues (table queues and table queue_members). I would like to ring the members of the call queue in a certain order. Therefore I use ring strategy lineair and I put the members into the table queue_members in the order in which they have to be rang. So I have the queue : | name | musicclass | announce | context | timeout | monitor_type | monitor_format | queue_youarenext | queue_thereare | queue_callswaiting | queue_holdtime | queue_minutes | queue_seconds | queue_lessthan | queue_thankyou | queue_reporthold | announce_frequency | announce_round_seconds | announce_holdtime | announce_position | retry | wrapuptime | maxlen | servicelevel | strategy | joinempty | leavewhenempty | eventmemberstatus | eventwhencalled | reportholdtime | memberdelay | weight | timeoutrestart | periodic_announce | periodic_announce_frequency | ringinuse | +----------------+------------+----------+---------+---------+--------------+----------------+------------------+----------------+--------------------+----------------+---------------+---------------+----------------+----------------+------------------+--------------------+------------------------+-------------------+-------------------+-------+------------+--------+--------------+----------+-----------+----------------+-------------------+-----------------+----------------+-------------+--------+----------------+-------------------+-----------------------------+-----------+ | queue6 | default | NULL | | 12 | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | 30 | NULL | No | yes | 5 | 10 | 0 | NULL | linear | strict | strict | NULL | NULL | NULL | NULL | NULL | no | | 0 | no | +----------------+------------+----------+---------+---------+--------------+----------------+------------------+----------------+--------------------+----------------+---------------+---------------+----------------+----------------+------------------+--------------------+------------------------+-------------------+-------------------+-------+------------+--------+--------------+----------+-----------+----------------+-------------------+-----------------+----------------+-------------+--------+----------------+-------------------+-----------------------------+-----------+ and queue members : +----------+----------------+----------------+--------------------+---------+--------+ | uniqueid | membername | queue_name | interface | penalty | paused | +----------+----------------+----------------+--------------------+---------+--------+ | 44 | queuemem4 | queue6 | SIP/queuemem4 | 0 | NULL | | 45 | queuemem2 | queue6 | SIP/queuemem2 | 0 | NULL | | 46 | queuemem5 | queue6 | SIP/queuemem5 | 0 | NULL | | 47 | queuemem1 | queue6 | SIP/queuemem1 | 0 | NULL | | 48 | queuemem10 | queue6 | SIP/queuemem10 | 0 | NULL | | 49 | queuemem18 | queue6 | SIP/queuemem18 | 0 | NULL | | 50 | queuemem17 | queue6 | SIP/queuemem17 | 0 | NULL | | 51 | queuemem12 | queue6 | SIP/queuemem12 | 0 | NULL | | 52 | queuemem16 | queue6 | SIP/queuemem16 | 0 | NULL | | 53 | queuemem13 | queue6 | SIP/queuemem13 | 0 | NULL | +----------+----------------+----------------+--------------------+---------+--------+ You can see that the member queuemem4 is first in line to be rang (has the first and lowest uniqueid in the table). But the first member that is being rang, is queuemem1. How come ?? Kind regards, Jonas. Jonas, We encountered the same problem. It is a bug in the Queue application. The Queue application actually orders members by their interface value. Here is the bug report I opened https://issues.asterisk.org/jira/browse/ASTERISK-18480 which was closed as "Not A Bug" by Digium. We worked around this by prepending an integer (001__, 002__, ...) to the interface in the database table and then removing it later in the dial plan. Hope this helps. Steven Wheeler -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140212/baeb7a3c/attachment.html>