Customers want a pickup-any-ringing-extension feature. Especially those with less than 10 employees. No matter how hard you argue about directed pickup they still want it. And you suck because you cant provide this feature (that all other pbx'es can do - according to the customer). So the 64 pickup groups limit is a problem to us - we could avoid lengthy discussions and have to deal with satified customers...
This script will do it:
exten => s,1,Pickup(${ARG1}${TL_DASH}${tenant}@PICKUPMARK&${ARG2}${TL_DASH}${tenant}@PICKUPMARK&${ARG3}${TL_DASH}${tenant}@PICKUPMARK&${ARG4}${TL_DASH}${tenant}@PICKUPMARK&${ARG5}${TL_DASH}${tenant}@PICKUPMARK&${ARG6}${TL_DASH}${tenant}@PICKUPMARK&${ARG7}${TL_DASH}${tenant}@PICKUPMARK&${ARG8}${TL_DASH}${tenant}@PICKUPMARK)
exten => s,n,Playback(privacy-incorrect)
exten => s,n,Hangup
Actually just a modified directed call pickup. Set ARG1-8 to the extensions you want to test for incoming call. Seems simple... whats the catch?
/Ole
A couple of tests shows that
A couple of tests shows that the first defined extension would be picked first (makes sense) no matter which one was ringing first. Anyway - the customers don't care. They just want to pickup any ringing phone from their own device, when the rest of the force at the office went, for coffee, gone smoking, at the can, fast asleep..
Though your suggestion is more "clean" and is easier to define/understand as a feature code, I would still prefer my own script because:
- Its an addon. No need to change anything else or add other scripts.
- It doesn't break Directed Pickup. Customer can use both features.
- You can define more groups.
/Ole
There's another way to get
There's another way to get around the 8 extension restriction.
have a look the tl-page script and the tl-ringgroup-base script. Both were written so that in a single ARG you could space-delimit a series of extensions in which the dialplan would loop through appending to the dial or page command. It seems that you could do the same with the Pickup command.
then your script could dynamically expand or shrink as needed. You'd still have the ability to do multiple groups with that. As an added benefit those small tenants of 4 or 5 extensions wouldnt have a script trying to do pickups on empty ARG entries.
btw, added later in the
btw, added later in the 1.6.x.x branches of asterisk there is a PickupChan command. No longer do you need to worry about context, you can simply specify the channel you want to pickup.
PickupChan(SIP/101-mytenant,SIP/102-mytenant,SIP/103-mytenant)
This gives it a behavior closer to the behavior of features.conf with one added benefit. features.conf pickup does not pickup members of other technologies.. a SIP channel could never pickup an IAX or DAHDI channel that was rining. PICKUPMARK was an attempt in that direction.
I think once pbxmanager gets written toward 1.8 (and ditching 1.4 support) this could be the right approach. Eliminate pickupgroup/callgroup support entirely out of the MTE variant and use the GUI to define groups. Perhaps it would even be a fit for the STE variant.
that only works when you have a small number of handsets. Have you considered whats going to happen if you have 2 calls ringing at the same time.. like a call to exten 101, and another call to 102?
have you considered it would be easier to build your own version of tl-userexten
instead of
exten => s,n,Set(__PICKUPMARK=${MACRO_EXTEN}${TL_DASH}${tenant})
try
exten => s,n,Set(__PICKUPMARK=${tenant})
then your pickup script would just be
Pickup(${tenant}@PICKUPMARK)