[asterisk-dev] [Code Review] app_queue: Improvements to per member 'ringinuse' (formerly 'ignorebusy') option

Mark Michelson reviewboard at asterisk.org
Thu May 17 12:24:09 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1919/#review6239
-----------------------------------------------------------



/trunk/CHANGES
<https://reviewboard.asterisk.org/r/1919/#comment11573>

    You can sum this up as simply "the 'ignorebusy' option for queue members has been deprecated in favor of the option 'ringinuse'."



/trunk/CHANGES
<https://reviewboard.asterisk.org/r/1919/#comment11574>

    Don't mention that ignorebusy can still be used.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11565>

    Don't document deprecated option names.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11564>

    Hm, the "ringinuse" option is the first to ever be applicable both to a queue as a whole and to an individual member. As such, the name "QueueRingInUse" is a bit of a misnomer since it applies to members and not to a queue. Calling it something like "QueueMemberRingInUse" would be a better fit, even though it's a bit of a mouthful.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11566>

    Change the comment here since the description is both unclear and inaccurate.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11567>

    Log the interface instead of the state interface here.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11570>

    Remove the "ignorebusy" from this error message.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11569>

    You've got a bit of a problem here. For statically defined queues, it's possible that we will begin visiting member config settings before the ringinuse option has been set for the queue. This may result in an inaccurate setting for members of the queue.
    
    Note that this problem does not exist for realtime queues and queue members because all queue settings are applied first and then all queue member settings are applied. It works itself naturally this way since queues and queue members are separate tables.



/trunk/apps/app_queue.c
<https://reviewboard.asterisk.org/r/1919/#comment11568>

    You need to call ast_config_destroy() once you are finished with member_config.


- Mark


On May 15, 2012, 10:59 a.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1919/
> -----------------------------------------------------------
> 
> (Updated May 15, 2012, 10:59 a.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson, irroot, and Matt Jordan.
> 
> 
> Summary
> -------
> 
> The bug was simply the catalyst for this patch. There was another patch that actually resolved this bug...
> 
> Here's the summary:
> First, only the member setting for ringinuse is checked when determining whether to call the busy member or not.
> The default for this value is now determined by the queue's ringinuse option rather than being standalone.
> 
> additions
> Adds the ability to specify member ringinuse value as an argument
> Adds 'queue set ringinuse' CLI command for setting ringinuse for a member on the fly
> Adds AMI command QueueRingInUse for setting ringinuse for a member on the fly via AMI
> 
> changes
> 'ignorebusy' is now called 'ringinuse'
> Legacy support for old dialplans/scripts/etc will still be matched via the QUEUE_MEMBER function argument 'ignorebusy', but 'ringinuse' works as well and is the documented argument name.
> Legacy support for realtime 'ignorebusy' is in place, but at startup of the module if no instances of its use are present in the database or if a use of the 'ringinuse' field is detected, that will be used exclusively instead.
> 
> 
> This addresses bug ASTERISK-19536.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19536
> 
> 
> Diffs
> -----
> 
>   /trunk/CHANGES 366295 
>   /trunk/apps/app_queue.c 366295 
>   /trunk/configs/queues.conf.sample 366295 
> 
> Diff: https://reviewboard.asterisk.org/r/1919/diff
> 
> 
> Testing
> -------
> 
> I tested a number of configurations of ringinuse for queues and members both realtime and otherwise to make sure the setting went in correctly under each case.
> 
> There is an odd quirk though for realtime in that if all the values of a field for every entry are NULL, then it will be as though that field doesn't exist at all, so if ignorebusy is present without any deliberately entered values, ringinuse will still become the defacto field name in use.  I worked at it for a while but couldn't find a workaround that didn't involve having to change every single realtime database driver.  It's not that big of a deal since if a user isn't actually using that field at all, it's unlikely they ever intended to.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120517/f2dd0a23/attachment-0001.htm>


More information about the asterisk-dev mailing list