[asterisk-bugs] [Asterisk 0012451]: join empty categories are not the same as leavewhenempty ones, joinempty probably wrong

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Apr 16 02:18:17 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12451 
====================================================================== 
Reported By:                davidw
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12451
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 114060 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-15-2008 11:14 CDT
Last Modified:              04-16-2008 02:18 CDT
====================================================================== 
Summary:                    join empty categories are not the same as
leavewhenempty ones, joinempty probably wrong
Description: 
Once one accounts for joinempty and leavewhenempty sort of having opposite
logical senses, one cannot match the effects of the values of these two
variables one for one.

joinempty = no matches leavewhenempty = yes

joinempty = yes matches leavewhenempty = no

However, joinempty = strict drops only for QUEUE_NO_REACHABLE_MEMBERS,
but

leavewhenempty = strict drops for both QUEUE_NO_MEMBERS and
QUEUE_NO_REACHABLE_MEMBERS.

====================================================================== 

---------------------------------------------------------------------- 
 davidw - 04-16-08 02:18  
---------------------------------------------------------------------- 
The key point is that they behave differently.  That violates the principle
of least astonishment, and makes it difficult to learn what the options
actually mean.

As a more concrete example.  If you have joinempty = strict and all the
memebers are paused, the call will still be queued, but if you have
leavewhenempty = strict and all the members are paused, the call will drop
out of the queue..  Both will reject calls when all agents are not logged
in (as long as they aren't also paused! - and assuming that all members are
agents.)

(A colleague says that 1.4.16 can have a member paused with the agent
logged out, but I haven't re-verified this for the current SVN version.)

If it is really intended that join and leave not have equivalent
capabilities, the very least that is needed is to document the intended
usages.

The behaviour that I think we would really like is both joining to fail
and leaving to be forced if there were no agents logged in, but not if all
the agents were paused (and logged in).  Given that we are not (yet) using
penalties and we don't intend to have members in "invalid" states,, the
current join = strict behaviour might actually be a step in the right
direction (the precedence of paused over logged out is still a problem,
unless there has been a recent change that forcibly resets paused on a
logout).  However we wouldn't have a corresponding leave option that dumped
the queue when the last agent logged out, which wouldn't also dump it when
all agents were paused.

Fully characterising these options does require that one accounts invalid
members and members that are blocked by penalty. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-16-08 02:18  davidw         Note Added: 0085539                          
======================================================================




More information about the asterisk-bugs mailing list