[asterisk-bugs] [Asterisk 0015168]: [patch] Add ability to use extension state as well as device state when adding queue memebers

Asterisk Bug Tracker noreply at bugs.digium.com
Fri May 29 15:40:35 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15168 
====================================================================== 
Reported By:                p_lindheimer
Assigned To:                mmichelson
====================================================================== 
Project:                    Asterisk
Issue ID:                   15168
Category:                   Applications/app_queue
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-05-20 15:43 CDT
Last Modified:              2009-05-29 15:40 CDT
====================================================================== 
Summary:                    [patch] Add ability to use extension state as well
as device state when adding queue memebers
Description: 
The new ability to add a device state associated with a Queue member when
configuring a queue or adding a member with AddQueueMembers solves a lot of
problems. However, it would be EXTREMELY valuable to use extension state
information as well (e.g. hints).

hints are extensively used in may dialplans to track extension state of a
system. This ability becomes even more important when you have a pbx that
supports 'hot-desking' where a user can log into and out of one or multiple
devices.

It would be extremely valuable, and from what I understand, relatively
straight forward, to add this ability such that conceptually you could an
entry such as:

member => Local/3000 at default,0,John Smith,HINT:3000 at default

and the queue would parse that this is a hint instead of a device, and use
ast_extension_state() instead of ast_device_state()


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

---------------------------------------------------------------------- 
 (0105757) mmichelson (administrator) - 2009-05-29 15:40
 https://issues.asterisk.org/view.php?id=15168#c105757 
---------------------------------------------------------------------- 
Hi Philippe. I took some time to look at your patch and I have some
suggestions.

1. First off, for us to consider including this into Asterisk, you need to
create the patch against trunk. The main difference between trunk and 1.4
is the way the device state and extension state callbacks work. In trunk,
there is an event API that is used to subscribe to the changes. Otherwise,
it's mostly the same.

2. The TODO comments regarding parsing out the "HINT:" are really good
ideas. I think this should be done before committing the change.

3. There are many coding guidelines violations here. Most of them deal
with using spaces instead of tabs to indent lines, use of C++ style
comments, and lack of spaces around punctuation (e.g. spaces after commas,
and spaces before and after binary operators). Check out
doc/CODING-GUIDELINES for all the details.

4. You've created a lot of work for yourself by not registering an
extension state callback. You can use ast_extension_state_add in order to
subscribe to extension state changes. This way, you won't have to try to
parse devices out of the hints manually. You can leave that job to the pbx
core instead.

Those were the big things I noticed. Other than that, great work! 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-29 15:40 mmichelson     Note Added: 0105757                          
======================================================================




More information about the asterisk-bugs mailing list