[asterisk-dev] [Code Review]: Add directed pickup to features

wedhorn reviewboard at asterisk.org
Mon Mar 18 20:37:04 CDT 2013



> On March 18, 2013, 7:01 p.m., rmudgett wrote:
> > I am wondering about the use case for these new parameters since the feature seems to be skinny specific.
> > How could a user know what extension they are wanting to pickup?
> > Do they somehow get a list of ringing extensions to pick from?
> >

Couple of use cases.

You're away from your desk but in ear shot. A couple of phones are ringing in the direction of your desk. Use directed pickup to get the call if there is one.

The Boss is going to lunch and on his way out the door asks people in your area that he's expecting an important call and wants someone to pickup it up.

While group pickup may work in these cases, an additional call stuffs it all up. Getting the bosses secretary's friend with a group pickup when the important call is missed is less than ideal.


> On March 18, 2013, 7:01 p.m., rmudgett wrote:
> > /trunk/CHANGES, lines 74-77
> > <https://reviewboard.asterisk.org/r/2393/diff/3/?file=34808#file34808line74>
> >
> >     This is describing an Asterisk internal detail that a user is not going to care about.  The user will care about the new config parameters.
> >     
> >     Also blob.

The main part of this patch is actually for channel developers rather than users. In respect of skinny, we really haven't been documenting changes.


> On March 18, 2013, 7:01 p.m., rmudgett wrote:
> > /trunk/configs/skinny.conf.sample, lines 104-110
> > <https://reviewboard.asterisk.org/r/2393/diff/3/?file=34813#file34813line104>
> >
> >     blobs

Will fix.


> On March 18, 2013, 7:01 p.m., rmudgett wrote:
> > /trunk/main/features.c, line 8053
> > <https://reviewboard.asterisk.org/r/2393/diff/3/?file=34817#file34817line8053>
> >
> >     You might want to look at the Pickup application for finding the exten selects channels in ast_channel_iterator_by_exten_new()/ast_channel_by_exten_cb().  Your target may be in a macro.
> >     
> >     Passing in the exten to search for set in the channel does seem a bit awkward for more general use.  Probably should also specify a context or you may get more target matches than intended.

The idea is that the directed_callgroup will be set by (and only by) channel drivers. So to match callstate, callgroup, and exten should preclude any unwanted matches. Still, I'll have another look over the code.

Agree that passing in the chan with target exten already set is a bit awkward, but given that it's for developer use, seems reasonable.

I thought about including context (possibly even optionally). Given that they need to be in the same directed_callgroup, and that group pickup allows cross context pickups, thought this approach reasonable. Happy to include context, but would make it optional.


- wedhorn


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


On March 18, 2013, 3:22 p.m., wedhorn wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2393/
> -----------------------------------------------------------
> 
> (Updated March 18, 2013, 3:22 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Added ast_pickup_call_directed to features. Included some refactoring of ast_pickup_call to reuse same code.
> 
> In order to use ast_pickup_call, the chan passed in must have the exten set of the intended target. Will only pickup the target if the exten's match and the pickupgroupdirected and callgroupdirected of the chans match.
> 
> Also add ast_channel_callgroupdirected and ast_channel_pickupgroupdirected functions (and set functions) including code to set both of these in skinny and sip.
> 
> Code to actually do a directed pickup included in skinny.
> 
> 
> Diffs
> -----
> 
>   /trunk/CHANGES 383304 
>   /trunk/channels/chan_sip.c 383304 
>   /trunk/channels/chan_skinny.c 383304 
>   /trunk/channels/sip/include/sip.h 383304 
>   /trunk/configs/sip.conf.sample 383304 
>   /trunk/configs/skinny.conf.sample 383304 
>   /trunk/include/asterisk/channel.h 383304 
>   /trunk/include/asterisk/features.h 383304 
>   /trunk/main/channel_internal_api.c 383304 
>   /trunk/main/features.c 383304 
> 
> Diff: https://reviewboard.asterisk.org/r/2393/diff
> 
> 
> Testing
> -------
> 
> Directed pickup to non ringing skinny and non ringing sip device (with matching and unset groups). Returns without picking up.
> 
> Directed pickup to ringing skinny and ringing sip device, with matching groups, picks up call, with unmatching groups return without pickup.
> 
> 
> Thanks,
> 
> wedhorn
> 
>

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


More information about the asterisk-dev mailing list