I’ve dabbled with the Pickup() application a little bit in the past, but I’m taking a closer look at it now to implement Call Pickup features.
It seems that Pickup() directly bridges two channels together without regard to the nature of the Dial() that was being executed. For instance, any time a phone rings, I have the G option set in dial to split the call upon answer. With call pickup, this doesn’t happen, which breaks the dialplan flow of my system so two channels are not supposed to be directly connected like that. The channels themselves get destroyed too as the hangup handlers execute as soon as Pickup() is called.
My end goal would be to have everything be exactly the same as if the intended station answered, except a different station answered instead, so at that point it’s like that was the channel dialed instead, but the G option, for instance, would still be obeyed: the caller going to the caller priority and the station using Pickup() going to the caller + 1 priority as usual.
I’m wondering if this is by design and, assuming that there isn’t a way to do this already, if it would be practical to modify the application to do this? This is for a regular undirected pickup, but the same would apply for a directed pickup.
Or would Pickup() be too unsuitable for achieving this, and I’d be better off writing my own Call Pickup code in dialplan, perhaps using ChannelRedirect(), etc.? Just want to make sure I didn’t overlook something basic here.