[Home]

Summary:ASTERISK-16309: [patch] Cannot join a queue when all members are paused and "joinempty=no".
Reporter:Ramon Peek-Fares (ramonpeek)Labels:
Date Opened:2010-07-01 09:08:31Date Closed:2010-07-02 11:57:50
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) diff.txt
Description:It's not possible to join a queue when all members are paused and "joinempty" is set to no.

Pausing all members in a queue means the queue still has members, but they are not reachable. Which means that if "joinempty=no" is set, the queue should except callers. Only if "joinempty=strict" is set, should the call not be accepted.
Comments:By: Ramon Peek-Fares (ramonpeek) 2010-07-01 09:11:44

The reason for this problem is that when all queue members are paused the QUEUE_MEMBER_STATUS is not being set and stays set to it's default value of "QUEUE_NO_MEMBERS" which should be "QUEUE_NO_REACHABLE_MEMBERS".

The attached patch resolves this issue.

By: David Woolley (davidw) 2010-07-01 10:21:08

Please see ASTERISK-11857.   I believe this will be treated as a new feature and then rejected because trunk (and possibly 1.6.2?) already have a much more general mechanism that addresses this issue.

By: Ramon Peek-Fares (ramonpeek) 2010-07-02 02:57:45

That issue (ASTERISK-1238451) was closed with the argument that there is nothing wrong with the code.
I would like to argue that comment.
The documentation for the setting "joinempty" says:

; yes    - callers can join a queue with no members or only unavailable members
; no     - callers cannot join a queue with no members
; strict - callers cannot join a queue with no members or only unavailable
;          members

Which means; callers should be able to Join a queue when the setting "joinempty=no" is set and only paused members are assigned to the queue.

This is currently NOT the case, if all members are logged out and/or paused, the queue is currently considered to have NO_MEMBERS, which is incorrect.



I agree that the code has been changed quite a bit, especially for trunk and also 1.6.2 versions. But the 1.4.33 version is a maintained version that contains this "bug". I would think it wrong not the fix this in the maintained version of 1.4. And for the other versions it would be best to check whether this behavior is also present in those versions...

Besides..., the change is minimal and doesn't introduce other weird things.
Except for those users that are now taking "advantage" of the bug and might get confused after this fix. To them I would say "use joinempty=strict"



By: Digium Subversion (svnbot) 2010-07-02 10:46:27

Repository: asterisk
Revision: 273639

U   branches/1.4/apps/app_queue.c

------------------------------------------------------------------------
r273639 | tilghman | 2010-07-02 10:46:26 -0500 (Fri, 02 Jul 2010) | 8 lines

If all members are paused, the wrong status is indicated.

(closes issue ASTERISK-16309)
Reported by: ramonpeek
Patches:
      diff.txt uploaded by ramonpeek (license 266)
Tested by: ramonpeek

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=273639

By: Digium Subversion (svnbot) 2010-07-02 11:57:49

Repository: asterisk
Revision: 273715

_U  trunk/

------------------------------------------------------------------------
r273715 | tilghman | 2010-07-02 11:57:49 -0500 (Fri, 02 Jul 2010) | 14 lines

Blocked revisions 273639 via svnmerge

........
 r273639 | tilghman | 2010-07-02 10:46:27 -0500 (Fri, 02 Jul 2010) | 8 lines
 
 If all members are paused, the wrong status is indicated.
 
 (closes issue ASTERISK-16309)
  Reported by: ramonpeek
  Patches:
        diff.txt uploaded by ramonpeek (license 266)
  Tested by: ramonpeek
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=273715