[asterisk-dev] Member order in RealTime dynamic queues

Atis Lezdins atis at iq-labs.net
Thu Jun 19 07:06:13 CDT 2008


On Wed, Jun 18, 2008 at 11:33 PM, Saúl Ibarra <saghul at gmail.com> wrote:
> Hi!
>
> I'm trying to figure out what order Asterisk follows for queue members
> if they are in RealTime Dynamic. I've set up a queue with rrmemory
> strategy and RealTime members (I do this by doing an insert in the
> queue_member_table) but I don't know what order asterisk preserves in
> memory so my roundrobin order doesn't run as I want. Any clues of what
> this order is? If I do queue show myqueue I can't see them ordered in
> the login order or in the table order...

Hello,

they are stored by hash of interface, that means - their order will
always be the same. I'm afraid there is currently no way how to go
round by login time. I have some patches that will allow to do this,
but i don't want to push them yet as they need some finishing.

For now i can suggest using leastrecent strategy and adding within
create_queue_member() the following:

cur->lastcall = time(NULL);

This will make just joined members to have lastcall set to current
date, and for leastrecent strategy it will mean that they should take
call last.

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-dev mailing list