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