If you want to bridge before the remote side has been answered this is only available as of Asterisk 14. It’s called early bridging. You can find some more information on a blog post[1] that was done about it, but I’m not sure if ari4java has support for it yet.
Thanks Jcolp for the quick response.
I am still on asterisk 13 as it is the latest long term support version yet.
Is there any way where I can pass variables from my stasis application while returning to Dialplan?
Because if it is possible I can originate channel to internal SIP peer and as soon as the user picks up the call I can pass the external phone number in a variable to the dial plan to use standard DIAL app to dial an outbound call.
My stasis application will still be monitoring all the channels and bridges so if I want to take further actions on the bridge like a transfer for consult for a snoop I will be having bridge-Id to initiate that request.
I just want to know if this can work or not, given you can pass the local variables to dial plan ?
You can provide variables to the originate operation, or you can send the channel into your Stasis application and using the variables operation to set variables on it and then send it back into the dialplan.
Once the channel leaves your Stasis application you have limited control over it. You can initiate a snoop and hang it up. Maybe a few other things but that’s it.