I am using Asterisk 13 certified version for implementing queue.
At initial stage all the callers are getting answered in an ordered way as i have chosen rrmemory for queue strategy. Later this ordering is getting affected as certain callers are maintained in queue for longer time (and getting disconnected due to timeout), and the most recent callers are getting answered.
This is my extension and queue conf settings
extensions.conf
exten =>333,1,Answer()
same =>n,Queue(queue_crm,,,,20)
same =>n,Hangup()
queues.conf
[queue_crm]
musicclass=default
strategy=rrmemory
joinempty=yes
leavewhenempty=no
ringinuse=no
timeout=5
retry=1
maxlen=0
wrapuptime=0
timeoutpriority=conf
autofill=yes
Queues are implemented by the caller attempting to get an agent every second. They only do this whilst they are idle in the queue. If you have any comfort message, etc., the caller will not be able to grab an agent. This is mitigated to some extent by there having to be enough free agents available t cover the top n entries, before the nth entry from the top can actually grab an agent.
However, if a member is in more than one queue ordering is not preserved between queues, and, in more complex cases the reservation of agents breaks down and the queue mechanism can overestimate the number of agents available.
I am not playing any comfort messages / announcements, but only Music On Hold
Queue members are only added in a single queue.
I will explain my case below
Currently i am having 10 callers waiting in queue.
Next second 3 agents became available and 5 new calls came.
Instead of assigning 3 calls from head of already available callers queue, asterisk is assigning 3 calls from newly generated 5 calls, and remaining 2 new calls are assigned to back of waiting callers queue.
I think the callers should be answered by queue agents in FIFO order even with autofill enabled. But it seems that the older calls have to wait more time whilst the recently arriving calls get answered. Those answered calls even not added in the caller FIFO.
I understood about autofill that it cause improper processing of the callers irrespective of the caller queue position from a few web pages.
You need to fix the device state so that in use devices show as in use. There is not enough information to know why you are getting a not in use status.