A call (A) arrives on Asterisk. It is picked up by our dialplan and routed to the php file whose mission is to manage the call. The call is put on hold with the MusicOnHold function. So far it's ok.
The objective is during this wait, to make an outgoing call (B) to the customer and ask them if they wish to take the call or not (via DTMF).
If we do the Dial function directly, as soon as the outgoing call (B) is picked up by the customer, then call A and B are connected. What we don't want.
How do I initiate a call on a new channel without call A being connected immediately? Do we have to go through the AMI?
We used the AGI php and the dialplan with Gosub.
Since PHP is synchronous, you cannot make a call B while call A is on hold.