FreePBX:RTP packet to bypass asterisk server//Direct media

Hi Team,
FreePBX 15.0.16.81
Asterisk 16.13.0
Currently my SIP & RTP packets are routed through Asterisk server. I don’t want RTP to pass via Asterisk server. How to config RTP goes directly between caller & callee.
I hav ealready tried below steps but not working, Please help…

Setting changes in the SIP server, this is should be done via freepbx GUI
_ 1) Application -> Extensions -> ‘canreinvite=yes’ and ‘nat=no’_
_ 2) Settings -> Asterix SIP settings -> ‘NAT=no’ and ‘IPconfiguratoin=static IP’ and ‘Reinvite Behavior=yes’_
_ 3) Add below entries to Other SIP Settings_
_ --> ‘directrtpsetup=yes’ and_
_ --> ‘keepalive=yes’_
_ 4) Settings -> Advanced Settings -> “SIP canrenivite (directmedia)=yes” and “SIP nat=no”_
_ 5) Settings -> General Settings -> “Asterisk Dial command options:” should be empty_

unable to make the “Asterisk Dial command” option empty, getting an error “No media present” in my application, Currently the value in “Asterisk Dial Options=HhTtr”.

Please help me to reroute the RTP from Asterisk server.

This option has never been supported. Although there is code behind it, that code never worked reliably, and chan_sip now has a lame duck status.

Except possibly with dtmfmode=info, these are fundamentally incompatible with direct media, as they require Asterisk to inspect the media stream.

If this is coming from your SIP UAS, you really need to use “sip set debug on” and look at the SDP. However, it occurs to me that if the UAC is using late offer SDP, it is possible that directrtpsetup either also tries to use late offer, in which case, maybe your UAS doesn’t support it, or is completely broken. As I noted, above, directrtpsetup has never been officially supported.

Cisco UCM is one of the UACs that tends to use late offer.

1 Like

Thanks for the response.
So I couldn’t reroute my RTP packets with FreePBX, is that so?

Thanks,
Linu

I’m not saying that. I’m saying:

  1. don’t use directrtpsetup, as it is not supported.

  2. you will lose the ability to use FreePBX feature codes (although that is possibly not the case if the peers support DTMF over INFO, and you enable it.

  3. I suspect your failure could be related to directrtpsetup, but without the proper logs, it isn’t going to be possible to say why the call is failing.

Asterisk supports direct media, using, for chan_sip, directmedia=yes (directmedia is the correct current name for what you have as canreinvite), and don’t do anything that requires Asterisk to have access to the media stream (like features, recording, spying, etc.). Asterisk will start with the media stream passing through it, then attempt to get the peers to go direct.

One other point is that your instructions are based on a channel driver that is not supported by Sangoma. New systems should use chan_pjsip.

Using the Direct Media option on pjsip extensions and trunks, it can be made to work. But it requires that the endpoints correctly simulate being on a public IP address and it’s very difficult to make it work reliably.

Please explain why you want to do this (reduce latency, increase concurrent call capacity, limited bandwidth, expensive bandwidth, etc.) Give specific details. There is likely a better solution.

1 Like

Do you mean simulate being on mutually routable addresses? I can’t think why it wouldn’t work between two endpoints on the same intranet, providing all the routing infrastructure was there. I’d imagine that is where most people would use it, as I’m not sure many ITSPs would allow it, even if provided with a routable media address.

I created pjSIP extensions and enabled direct media(both in extensions and also in advanced settings). Also I disabled dialer option and DTMF signaing to auto ,devices are getting registered. but RTP packets are still passing via Freepbx,
Please suggest how can I reroute RTP away from freePBX ?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.