How do I "split" and then "join" calls?

I have an unusual call handling requirement, and can use some guidance
on how to accommodate this.

An incoming call needs to be forwarded to a legacy network with a very
set-up delay (~20 seconds). So, while initiating call set-up on
the outgoing path we want to play a “please hold” message to the caller.
Then after a preset time we can bridge the incoming call with the
outgoing call.

The outgoing, slow, legacy network is a bat-phone circuit, so there is
no need to forward dialed digits.

My approach was to (1) park the incoming call in a conference and play a
"please wait" message; (2) initiate the outgoing call (using a Local
channel); (3) wait for outgoing call set-up delay; (4) add the outgoing
call (local channel) to the incoming call in the conference. However,
the dial plan won’t move past step (1).

FWIW, the outgoing (slow) legacy network is accessed via FXS/FXO;
incoming calls are via FXS/FXO as well as VoIP.

I guess I need to know how to (a) start the outgoing call while the
incoming call is parked and (b) join the two calls.

I’d be happy to use AGI scripts if that will do the job, but I’m not very
that familiar with them.

Any suggestions will be welcome.



Sounds like an application where you can use queues. Create a queue with the specific music on hold, and create the agent as the local channel that dials out to the other number, once it answers, they will be connected.