[Asterisk-Dev] Multiple Pickup

Chris Wade clwade at sparco.com
Wed Nov 2 07:18:01 MST 2005


Chih-Wei Huang wrote:
> Hi guys,
> 
> I have modified the Pickup application (app_directed_pickup.c) to accept
> multiple pickup syntax, like
> 
> Pickup(extension1&extension2&...)
> 
> For example,
> 
> Pickup(601&602&603)
> 
> will try to pickup extension 601, 602, 603 sequentially, if one of them
> is in ringing state.
> 
> Is it a nice feature to be included in the source tree?
> If yes, I'd be happy to provide a patch to bugs.digium.com.
> 
> 

Cool.

> Furthermore, I'd like to add pickup any syntax to the application:
> 
> Pickup()  ; pickup any ringing extension
> 
> But it seems to be more difficult. I need to go through the entire
> channels list to find a ringing one, right?
> Could anyone give me a hint how to do this?
> 
> 

Isn't this already supported with the built-in callgroup/pickupgroup 
functionality?

> Besides, I still have one question to this application.
> According to description of bug 4865:
> 
> "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..."
> 
> But I cannot figure out how to use it. I have an extension block like
> 
> exten => _9[0-7]X,1,...
> 
> and I tried to pickup 90x by
> 
> exten => 790,2,Pickup(90)
> 
> Apparently it doesn't work.
> Can someone provide an example to explain how it works?
> 
> 

In the example you quoted, you would be looking at something like this:

exten => _20X,1,...          ; dial, etc.
exten => 720,1,Pickup(20)    ; the non-unique digits of the dialed
                                ; number

This example is a total of 11 dial-able numbers 200-209, and 720.  All 
extensions you might want to call pickup on have the common digits 20 
and one unique digit.  Pickup expects only the common digits when 
performing this type of action.

for your example:

exten => _9[0-7]X,1,...      ; dial, etc.
exten => 790,1,Pickup(9)     ; the non-unique digits of the dialed
                                ; number

This example is a total of 81 dial-able numbers, 900-979 and 790.  All 
extensions you might want to call pickup on have the common digit 9 and 
two unique digits.  Again, pickup only wants the common digits for this 
type of operation.

-- 
Christopher L. Wade, CCNA, CCDA, CQS-CIPTES, CQS-CWLSS




More information about the asterisk-dev mailing list