[asterisk-bugs] [Asterisk 0010652]: advanced QUEUE_MEMBER_COUNT function

noreply at bugs.digium.com noreply at bugs.digium.com
Tue Oct 16 15:23:30 CDT 2007


email_notification_title_for_status_bug_ready_for_testing 
====================================================================== 
http://bugs.digium.com/view.php?id=10652 
====================================================================== 
Reported By:                wuwu
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   10652
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.4.11  
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 76801 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-05-2007 06:36 CDT
Last Modified:              10-16-2007 15:23 CDT
====================================================================== 
Summary:                    advanced QUEUE_MEMBER_COUNT function
Description: 
with r76801 (issue http://bugs.digium.com/view.php?id=10127) the application
queue was patched to now include
a variable membercount to keep track of the number of queue members.

As Michelson noted in the changelog - as a side effect the
QUEUE_MEMBER_COUNT function did also changed to return the number of
members regardless of their state.

I think that may people still want to use the old method, to get the real
member count (members which are logged on). (we are one of those
peoples....)

In my opinion there are 3 values which are from interest
    - the complete member count (as it gets now returned by
QUEUE_MEMBER_COUNT)
    - the logged in member count (as QUEUE_MEMBER_COUNT did it before the
change)
    - the free member count (how many logged in members do not have a
call)
There are two possible ways to implement this
    - Create an own function for each value of interest
(QUEUE_MEMBER_COUNT, QUEUE_AVAILABLE_MEMBERS, QUEUE_FREE_MEMBERS)
    - Add a parameter to the QUEUE_MEMBER_COUNT function to control which
value it should return (no parameter = current behaviour, parameter l = old
behaviour, parameter f = only free members)
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 10-16-07 15:23  
---------------------------------------------------------------------- 
I've uploaded the file "10652.patch" as a replacement for the earlier
version. This patch is functionally the same as the first, but with three
changes:

1. This one is adapted to use the astobj2 stuff which has been added to
app_queue since the original patch was written.

2. This uses a QUEUE_MEMBER function which takes arguments "logged",
"free", or "count" which correspond with the "l", "f", and "c" options from
the original patch.

3. The fix that wuwu pointed out in his bug note has been merged.

I've done some local testing, and it appears this works properly. It's not
a complicated patch, but I'm going to leave this up for a couple more days
to get feedback in case people have issues with it. I'll commit it at the
end of the week if there are no issues. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-16-07 15:23  putnopvut      Note Added: 0072113                          
10-16-07 15:23  putnopvut      Assigned To               => putnopvut       
10-16-07 15:23  putnopvut      Status                   new => ready for testing
======================================================================




More information about the asterisk-bugs mailing list