<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 12-02-14 16:58, Steven Wheeler
      wrote:<br>
    </div>
    <blockquote
cite="mid:D6E8B735061DD64CA53A8336544556FD43C2C92E@USI-2K10EX01-MT.usicorp.usinternet.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <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]-->
      <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">
            <a class="moz-txt-link-abbreviated" href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>
            [<a class="moz-txt-link-freetext" href="mailto:asterisk-users-bounces@lists.digium.com">mailto:asterisk-users-bounces@lists.digium.com</a>]
            <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
              moz-do-not-send="true"
              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</span><br>
        </p>
      </div>
    </blockquote>
    <big><font face="Helvetica, Arial, sans-serif"><br>
        Hello,<br>
        <br>
        thank you for your reply.<br>
        <br>
        <br>
        Is it the "membername" or the "interface" that needs to be
        sorted to have a certain order in the call queue ?<br>
        <br>
        <br>
        How do you remove the prefix (integer) from a call queue member
        from dialplan ?<br>
        <br>
        If you call the queue in your dialplan as follow :<br>
        <br>
        exten => s,n,Queue(${queuename},,,,${timeout})<br>
        <br>
        How can you "edit" its members ??<br>
        <br>
        <br>
        <br>
        Kind regards,<br>
        <br>
        Jonas.<br>
        <br>
      </font></big><br>
  </body>
</html>