ARI mixing bridge media bypass doesn't work

I have Asterisk configured with Twilio SIP trunk. It receives calls from twilio network. I have configured ARI application for the extension. Hence my ARI Application receives the STASIS_START event. Then I create second channel with calling the B-party number. On response from B-party, ARI Application creates a mixing bridge and adds both the channels to it. The call works fine.

The problem is, I don’t want Asterisk to handle the media. Basically, I want to RE-INVITE both the parties after creating bridge so that media is totally bypassed from my asterisk box.

I tried directmedia=yes

But I couldn’t see RE-INVITE from asterisk hence media couldn’t be bypassed.

Please help.

You’ll need to bump up the core debug (core set debug 5) and have it go to the console in logger.conf to look at the output of bridge_native_rtp to see why it thought it couldn’t do such a thing.

Thanks for the suggestions. Apologies I couldn’t make out the reason from logs. Here is the logs at this link. Thanks in advance for the help.


Please make it available using a pastebin or something else. I’m not going to log into a third party site I’ve never heard of using my Facebook or other account.

Here is the one on pastebin

The two channels successfully moved to the bridge_native_rtp module, so the core was able to be bypassed for traffic to some extent. I’m not sure why chan_sip didn’t allow remote to occur. I’d suggest providing the full configuration for both peers and the SIP traffic.

context=from-twilio ;Which dialplan to use for incoming calls

twilio0 ;Our Termination URI
remotesecret=XYZ ;password, if you are using
defaultuser=somebody ;username, if you are using





Your outgoing call is not using any of those, though. Is there another SIP peer or are you dialing the hostname as-is? If so then the settings in general would be in effect.

I am creating second leg using ARI Originate API. There I provide endpoint as SIP/

And on successfully answer, I just bridge both the channels using create Bridge and addChannel.

General settings also has directmedia=yes and directrtpsetup=yes

I haven’t dealt with chan_sip in years now so I don’t really have anything else to add. Someone would have to dig into the code further to understand why not.

Here is the PCAP also in google drive. Hope you could peruse it at your will.