<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";
color:black;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com]
<b>On Behalf Of </b>Jonas Kellens<br>
<b>Sent:</b> Wednesday, February 12, 2014 3:46 AM<br>
<b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br>
<b>Subject:</b> [asterisk-users] Realtime Call Queues : call members in certain order<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Helvetica","sans-serif"">Hello,<br>
<br>
I'm using MySQL realtime Call Queues (table <i>queues</i> and table <i>queue_members</i>).<br>
<br>
I would like to ring the members of the call queue in a certain order. Therefore I use ring strategy
<i>lineair </i>and I put the members into the table <i>queue_members</i> in the order in which they have to be rang.<br>
<br>
<br>
So I have the queue :<br>
<br>
| 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 |<br>
+----------------+------------+----------+---------+---------+--------------+----------------+------------------+----------------+--------------------+----------------+---------------+---------------+----------------+----------------+------------------+--------------------+------------------------+-------------------+-------------------+-------+------------+--------+--------------+----------+-----------+----------------+-------------------+-----------------+----------------+-------------+--------+----------------+-------------------+-----------------------------+-----------+<br>
| 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 |<br>
+----------------+------------+----------+---------+---------+--------------+----------------+------------------+----------------+--------------------+----------------+---------------+---------------+----------------+----------------+------------------+--------------------+------------------------+-------------------+-------------------+-------+------------+--------+--------------+----------+-----------+----------------+-------------------+-----------------+----------------+-------------+--------+----------------+-------------------+-----------------------------+-----------+<br>
<br>
<br>
and queue members :<br>
<br>
+----------+----------------+----------------+--------------------+---------+--------+<br>
| uniqueid | membername | queue_name | interface | penalty | paused |<br>
+----------+----------------+----------------+--------------------+---------+--------+<br>
| 44 | queuemem4 | queue6 | SIP/queuemem4 | 0 | NULL |<br>
| 45 | queuemem2 | queue6 | SIP/queuemem2 | 0 | NULL |<br>
| 46 | queuemem5 | queue6 | SIP/queuemem5 | 0 | NULL |<br>
| 47 | queuemem1 | queue6 | SIP/queuemem1 | 0 | NULL |<br>
| 48 | queuemem10 | queue6 | SIP/queuemem10 | 0 | NULL |<br>
| 49 | queuemem18 | queue6 | SIP/queuemem18 | 0 | NULL |<br>
| 50 | queuemem17 | queue6 | SIP/queuemem17 | 0 | NULL |<br>
| 51 | queuemem12 | queue6 | SIP/queuemem12 | 0 | NULL |<br>
| 52 | queuemem16 | queue6 | SIP/queuemem16 | 0 | NULL |<br>
| 53 | queuemem13 | queue6 | SIP/queuemem13 | 0 | NULL |<br>
+----------+----------------+----------------+--------------------+---------+--------+<br>
<br>
<br>
<br>
You can see that the member <i>queuemem4</i> is first in line to be rang (has the first and lowest uniqueid in the table).<br>
<br>
But the first member that is being rang, is <i>queuemem1</i>. How come ??<br>
<br>
<br>
Kind regards,<br>
<br>
Jonas.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">Jonas,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">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 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-18480">
https://issues.asterisk.org/jira/browse/ASTERISK-18480</a> 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.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext">Steven Wheeler<o:p></o:p></span></p>
</div>
</body>
</html>