[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
Tue May 20 11:45:25 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:              05-20-2008 11:45 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 - 05-20-08 11:45  
---------------------------------------------------------------------- 
I've had a look at queues.conf again and the documentation for joinempty
disagrees with both my reading of the code and the code seems to actually
work the way I read it.

I have just done a real test (1.4.20-rc3), to confirm this.  Pausing the
(last) agent, which causes the join to fail with the default joinempty=no,
doesn't compromise a join when strict is used, but strict does cause join
to fail if the agent is logged out.  Given that a paused agent is treated
like one that is not configured at all, the documentation would imply that
both these conditions would cause the join to fail.

I've also just tried this with there really being no members in the queue,
and one can still join the queue with strict, which is definitely in
violation of the queues.conf documentation.

Note that our application uses pause in normal operation, so the current
de facto behaviour of joinempty is more useful.  Our problem is that one
cannot configure a leavewhenempty that doesn't risk calls be dropped
prematurely because all agents are paused.  Also note that I got our best
compromise wrong in the additional information; I should have said "strict"
rather than "yes".

Either the code or the documentation is definitely wrong. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-20-08 11:45  davidw         Note Added: 0087075                          
======================================================================




More information about the asterisk-bugs mailing list