[asterisk-dev] [Code Review] Extended maximum number of pickupgroups (callgroup/pickupgroup)

Tilghman Lesher reviewboard at asterisk.org
Tue Jul 17 16:58:38 CDT 2012


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



/trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/2043/#comment12729>

    It would be better if you used an ast_str object here, instead of a static buffer.  If you're concerned about the malloc/free each time, use a thread-based buffer.



/trunk/channels/misdn_config.c
<https://reviewboard.asterisk.org/r/2043/#comment12730>

    Why a pointer to a pointer and not just a pointer here?



/trunk/channels/misdn_config.c
<https://reviewboard.asterisk.org/r/2043/#comment12731>

    Seems like this is just an extra malloc().  We already have a pointer here, so why isn't it just a pointer to the container?  Why do you need the extra level of indirection?



/trunk/include/asterisk/channel.h
<https://reviewboard.asterisk.org/r/2043/#comment12732>

    Again, using an ast_str object here takes advantage of the existing string building API.



/trunk/main/channel.c
<https://reviewboard.asterisk.org/r/2043/#comment12733>

    Please use ast_strip() on each piece.  History tells us that people will place spaces after the comma and then be confused when it errors out.


- Tilghman


On July 13, 2012, 8:18 a.m., Guenther Kelleter wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2043/
> -----------------------------------------------------------
> 
> (Updated July 13, 2012, 8:18 a.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson, Matt Jordan, and Thomas Arimont.
> 
> 
> Summary
> -------
> 
> This patch adds the feature "Extended maximum number of pickupgroups (callgroup/pickupgroup)".
> 
> The feature is implemented as named pickup/call groups which can be used in parallel to but independent from the already known numbered call/pickup groups. Named groups will allow an unlimited number of pickup/call groups.
> Named groups are configured with the keywords "namedcallgroup" and "namedpickupgroup" (conforming to "callgroup" and "pickupgroup").
> A namedpickupgroup "4" does not match the callgroup number 4.
> 
> Additionally the behavior of the undirected pickup is changed so that the oldest ringing channel (creation time of the channel) is picked up when more than one channel could be picked up. This will be required by another new feature which is yet to be posted.
> 
> A few words to describe the implementation:
> Names of named groups are collected in a container at configuration time of a user. This container will be copied (in fact referenced) around to the channels in parallel with the numbered groups bitfield.
> When an undirected pickup is executed, the pickup and call groups are matched against each other, and the oldest target channel which matches is chosen. Notably there is almost no overhead for the named group handling when no pickup is executed, except referencing of the containers.
> 
> 
> Diffs
> -----
> 
>   /trunk/CHANGES 370052 
>   /trunk/channels/chan_dahdi.c 370052 
>   /trunk/channels/chan_misdn.c 370052 
>   /trunk/channels/chan_sip.c 370052 
>   /trunk/channels/misdn/chan_misdn_config.h 370052 
>   /trunk/channels/misdn_config.c 370052 
>   /trunk/channels/sip/include/sip.h 370052 
>   /trunk/configs/chan_dahdi.conf.sample 370052 
>   /trunk/configs/misdn.conf.sample 370052 
>   /trunk/configs/sip.conf.sample 370052 
>   /trunk/include/asterisk/channel.h 370052 
>   /trunk/main/channel.c 370052 
>   /trunk/main/channel_internal_api.c 370052 
>   /trunk/main/features.c 370052 
> 
> Diff: https://reviewboard.asterisk.org/r/2043/diff
> 
> 
> Testing
> -------
> 
> Call pickup tested for sip, dahdi and misdn channels. Reference counter handling of ao2_container (which includes the group names) checked with additional debug output.
> 
> 
> Thanks,
> 
> Guenther
> 
>

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


More information about the asterisk-dev mailing list