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
directrtpsetup=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.

[URL=“http://www.filetolink.com/3b07901239”][/URL]

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

https://pastebin.com/ky88QZfk

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.

twilio-trunk
type=peer
context=from-twilio ;Which dialplan to use for incoming calls
dtmfmode=rfc2833
;canreinivite=yes
directmedia=yes
directrtpsetup=yes
insecure=port,invite

twilio0
host=dev-vsp-trunk.pstn.twilio.com ;Our Termination URI
remotesecret=XYZ ;password, if you are using
credentials
defaultuser=somebody ;username, if you are using
credentials

twilio1
host=54.172.60.2

twilio2
host=54.172.60.0

twilio3
host=54.172.60.1

twilio4
host=54.172.60.3

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/+9123243443@dev-vsp-trunk.pstn.twilio.com

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.

https://drive.google.com/file/d/1hKbaR87d-6zM-3XJgGMtqqQx6dP01eyB/view?usp=sharing