Summary:ASTERISK-04743: [patch] Directed Call Pickup Support
Reporter:Joshua C. Colp (jcolp)Labels:
Date Opened:2005-07-31 15:58:25Date Closed:2008-01-15 15:48:41.000-0600
Versions:Frequency of
Environment:Attachments:( 0) app_directed_pickup.c
Description:What's this do you may ask... well, it allows you to pick up calls that are ringing a specific extension. The device need not have callgroup or pickupgroup set, you just need to know the extension. This application also allows you to specify partial extensions. For example, you have block 200 to 209 and you want to pick up any calls that my be ringing on those 10 phones, you just pickup 20 and it'll pick up the most recent ringing one. Another side effect is that you can pickup a call that a person might be making for an outbound call... rather cool. An example for the dialplan is below, and installation can be accomplished by using astxs or manually modifying the Makefile.

Example dialplan usage:
exten => _7.,1,Pickup(${EXTEN:1})
Comments:By: Joshua C. Colp (jcolp) 2005-07-31 16:15:14

Muffin points to drumkilla for telling me about a small non-threatening just fyi thingy...

By: philipp2 (philipp2) 2005-08-01 15:19:54

Just FYI: The "bristuff" patches come with apps like PickUp, PickUpChan, PickDown and Steal, might be worth a look and if only to gain inspiration... :-)


By: Andrew Lindh (andrew) 2005-08-01 22:19:35

Just what I need!!! I miss directed pickup from my old key system.

A problem: x380 calls x330....x330 answers and puts the call on hold.
All is well and the caller (x380) hears MOH. The x381 picks up the holding
call from x330. On the x330 phone the call goes away (as expected) but the old
caller (x380) still hears MOH and the pickup phone (x381) gets one way audio
(you can hear the picked up call, they still get MOH).

sip show channels shows the two calls connected but MOH is still running
on the caller's channel.

Picking up an "outbound" call is not cool....it's a problem, but not a big
one as real outbound calls tend to be phone numbers not extensions and
an "outbound" call to an extensions wants to be picked up anyway...

Also a problem for multi-tennant systems where extensions have the same
numbers in different contexts...so I guess it should be "pickup(channel)" or something like that since it's more channel based rather than dialplan
extension based.

Don't get me wrong, I like it. It's a nice app and simple, but the bristuff
has some good options too (but I have not tried it, I will).

By: Elwin Andriol (elwin) 2005-08-16 08:32:36

Nice app.

Just a reminder for anyone who tries this app in conjuction with a bristuff patch, and finds out that asterisk won't start anymore.

On a bristuff setup, the Pickup command is already in use in asterisk (app_pickup.so). To use this directed pickup command, use a noload on pickup.so or change the line:
  static char *app = "Pickup";'
  static char *app = "DirectedPickup";
if you don't wan't to give up bristuff's Pickup command. You have to use DirectedPickup in stead of Pickup of course.

Just another little thing. There has already been a directed pickup app/patch in the past (app_intercept.so/id=2692). This patch got broken after some restructuring of channel.c and the removal of channel_pvt.h. It appears that there are some differences in the approach this patch uses compared to the old one. As irony might have it, I've just finnished changing the old patch so it will compile again. I haven't had time to fully test it. The question I have is: would it be usefull to compare the inner working of both patches and create a "best of both worlds" solution (from a functional standpoint). I don't mind putting some time and effort in it, but only if there is some mutual interrest.

For those interrested, I'll also upload the diff for app_intercept.c so it will work again.

By: Andrew Lindh (andrew) 2005-08-16 13:34:30

I think it's worth getting something like this into CVS Head. It is an additional feature that old key systems have had for years. This feature would be one less reason to hold off on a move to asterisk. I have this issue in my office now, they want every feature they had before (on the old key system) and more.

By: Joshua C. Colp (jcolp) 2005-09-15 13:02:05

As per the phone conversation with Kevin this application has been updated to take advantage of a new API call that he put into place, and updated in general to be cleaner/work better. Syntax is now extension or extension@context! I also renamed a few channel pointers so as to make more sense when reading the code.

By: Michael Jerris (mikej) 2005-09-15 16:01:02

but does it work?

By: Joshua C. Colp (jcolp) 2005-09-15 16:05:50

Yes, yes it does... isn't that crazy? I actually tried it!

By: Kevin P. Fleming (kpfleming) 2005-09-15 16:30:36

Committed to CVS HEAD with some minor mods (basically formatting cleanups and ensuring that any step that fails causes the whole app to fail instead of trying to proceed). Thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:48:41.000-0600

Repository: asterisk
Revision: 6622

U   trunk/apps/Makefile
A   trunk/apps/app_directed_pickup.c

r6622 | kpfleming | 2008-01-15 15:48:41 -0600 (Tue, 15 Jan 2008) | 2 lines

add Pickup() application (issue ASTERISK-4743)