[asterisk-dev] [Code Review] 3409: app_queue: Fix for queue members receiving calls when in call and with ringinuse=no

Matt Jordan reviewboard at asterisk.org
Sun Mar 30 13:44:56 CDT 2014


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


There are a large number of coding guideline violations in this patch. Please review the Coding Guidelines on the Asterisk wiki [1] and re-submit this patch.

Please also clean up any extraneous white space in your patch (which will show up as red blobs).

The comment explaining the added conditional could use some clean up for clarity, grammar, and spelling.

Finally, I'm not sure how this actually solves ASTERISK-16115. One of the major problems in that issue is that a Queue member in two queues will sometimes receive multiple calls. All this does is check the state of the member status more times:

(original): !(status == AST_DEVICE_NOT_INUSE || status == AST_DEVICE_UNKNOWN)
additional checks: state == AST_DEVICE_INUSE || state == AST_DEVICE_BUSY || state == AST_DEVICE_RINGING || state == AST_DEVICE_RINGINUSE || state == AST_DEVICE_ONHOLD

This is basically just checking the same state twice. You may be bypassing a race condition by checking the state additional times, but I'm not sure how this actually solves the problem in the issue, or how it solves it for multiple queues.


- Matt Jordan


On March 30, 2014, 9:59 a.m., Shlomi Gutman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3409/
> -----------------------------------------------------------
> 
> (Updated March 30, 2014, 9:59 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-16115
>     https://issues.asterisk.org/jira/browse/ASTERISK-16115
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> In some cases when member in talk (IN_USE) and you run "sip reload" or peer has connectivity problems (reachable->unreachable/lagged->reachable) the status of peer is set to NOT_INUSE, while he is still talking.
> The patch adds function that would check if member has any active channel. And would consider him IN_USE if does and if not, would do nothing, as you can't detect what is the state of member if he has no channel.
> 
> Originally patch was used on 1.8.23.0 (can apply it to reviewboard as well) and 11.6-cert1. As well as in my case all peers, queues, memebrs are realtime. But as David Brillert reported in bug, he is not using realtime peers, so it's used for all peers.
> 
> The patch works, the question is if it's the best solution and it would not introduce any regressions.
> 
> 
> Diffs
> -----
> 
>   /branches/11/apps/app_queue.c 411575 
> 
> Diff: https://reviewboard.asterisk.org/r/3409/diff/
> 
> 
> Testing
> -------
> 
> Used in production on 1.8 and 11 and customers having problems approved that problem was resolved.
> 
> 
> Thanks,
> 
> Shlomi Gutman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140330/b9623e2d/attachment.html>


More information about the asterisk-dev mailing list