<div dir="ltr">Hello,<div>I start using realtime queue and while all queue types perform great, I find not usable the linear strategy. In the linear strategy, order of the agents matters. The problem is due to the fact it is not possible (in a clean way) to list the agents in the desired order. There is no field in the queue_member table to use for ordering the agents and the order is done using the interface name.</div>
<div><br></div><div>The query performed by Asterisk while retrieving the agents for a queue is the following:</div><div><br></div><div>SELECT * FROM queue_member WHERE interface LIKE '%' AND queue_name = '13' ORDER BY interface<br>
</div><div><br></div><div>I'd like to add a new column "inorder" and have the queue members to be retrieved in the order given by that column.</div><div><br></div><div>I check the apps/app_queue.c and in the function "find_load_queue_rt_friendly" there is the retrieval of the queue members:</div>
<div><br></div><div><div>                queue_vars = ast_load_realtime("queues", "name", queuename, SENTINEL);</div><div>                if (queue_vars) {</div><div>                        member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, SENTINEL);</div>
<div>                        if (!member_config) {</div><div>                                ast_debug(1, "No queue_members defined in config extconfig.conf\n");</div><div>                                member_config = ast_config_new();</div>
<div>                        }</div><div>                }</div></div><div><br></div><div>I haven't fully understood the ast_load_realtime_multientry syntax, but it seems it apply an "order by" on the first column used as filter. Unfortunately the first column filtered is also the one used to specify the value to retrieve.</div>
<div><br></div><div>Is there a way to specify which column use for ordering while getting the value from another one?</div><div><br></div><div>Leandro</div><div><br></div><div><br></div></div>