What is the, or is there a, correct way of routing a call to another server?

One of the options in my application on asterisk is to route some incoming calls out to another server. The call should only be answered if it is answered at the other end.

The current implementation is to answer the call, originate a call out to the second server and put both channels in a bridge. This feels incredibly clunky and if the call isn’t answered at the other end then we have some cleaning up to do.

Just don’t answer the incoming call.


I knew something like that must exist! Do you know if that’s possible to do via ARI?

ARI will not answer unless you tell it to. What’s your application doing?

As for writing a true Dial() in ARI this is not yet completely possible but will be available in 14.

Oh, I’m definitely telling it to answer :slight_smile: it’s completely wrong, but solving a problem for me at the moment. i’ll carry on as I am until 14 comes out then

If you don’t care about early media you can defer answering until the outbound answers… that’s all handled in your application logic.

yes, that may solve the problem. I was holding out for a quick fix I think, hehe