[asterisk-bugs] [Asterisk 0016834]: [patch] [regression][patch] autofill=no always IGNORED.

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 17 10:16:38 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16834 
====================================================================== 
Reported By:                kebl0155
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16834
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.2.2 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-02-16 05:28 CST
Last Modified:              2010-02-17 10:16 CST
====================================================================== 
Summary:                    [patch] [regression][patch] autofill=no always
IGNORED.
Description: 
Autofill=yes allows calls to be placed to agents from callers who are not
at the front of the queue.

While this may be desirable in some cases, it causes the following
problems in others:

- Callers may get stuck in the queue (particularly with small teams of
agents)
- Wait times and position announcements may be upset if the queue is not
first-come-first-served.

The default behaviour is therefore autofill=no.  However, a bug was
introduced in Asterisk 1.4.25 which overrides this setting.
====================================================================== 

---------------------------------------------------------------------- 
 (0118155) mmichelson (administrator) - 2010-02-17 10:16
 https://issues.asterisk.org/view.php?id=16834#c118155 
---------------------------------------------------------------------- 
I had written up a really nice long note here, and then accidentally
navigated off the page and completely lost it :(

The gist of the note though is that it's not actually the
num_available_members() function that's causing the problem, but the
combination of it plus the "pending" status of queue_ent structures.

With autofill disabled, num_available_members correctly reports that only
1 member is available, even if multiple actually are. The problem is that
when determining if the queue_ent is close enough to the front of the line
to try calling a queue member, we do not increment the idx field if the
current queue_ent we are iterating over is in the "pending" state. This
state is entered when the caller is attempting to call a queue member but
has not yet actually been connected. As such, callers beyond the front of
the queue may attempt to call queue members if all callers ahead in the
queue are pending. The conclusion, based on reading the commit and issue
that caused the pending status to be introduced, is that the pending status
should only be honored when autofill is turned on.

As such, there are multiple ways to fix this. I had uploaded a fix of my
own, but when making the comparison to your patch, mine really isn't any
better. All of this is to say your patch looks fine by me. I just rambled
on here so that it's clear what is *really* the problem here, since
num_available_members is doing exactly what it is supposed to ;)

Anyway, expect this to be committed soon. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-17 10:16 mmichelson     Note Added: 0118155                          
======================================================================




More information about the asterisk-bugs mailing list