DirectRTP between 2 different subnets?

I have 4 sip clients and asterisk-freepbx system
Client A, B and Asterisk resides upper segment network
Client C,D resides lower segment network

I want sip clients send RTP packets eachother. How can i modify my asterisk or freepbx?Is there any solution?

If the sender and receiver are on different subnets, then a multicast routing protocol needs to be involved in setting up multicast forwarding state on the tree between the sender and the receivers. Check out your router and see what you need to do to implement PIM.


Hmm, weird and wrong answer above… It has nothing to do with multicast.

Look at the section “Media Handling” in the sip.conf documentation:

You will probably need to set up a combination of directmedia=yes and directmediadeny/directmediapermit to define the networks where the devices will send RTP directly.

Wasn’t intentional. Posted to the wrong forum… the other guy is probably scratching his head over the answer I left there…

Before I got my wires crossed - what I meant to post here was: is directrtpsetup=yes still available for use in sip.conf? Also… directmedia=yes on both sides that you want would probably be needed.

How asterisk will catch these ip subnets? Asterisk will catch this ip groups inside of the SDP packets? Connection information part of the SDP?

I do not use this; just wanted to point you to the configuration you can use to try it yourself. You will have to experiment to find the right settings for your network.

Which sip modules support direct rtp even if sip clients resides different subnets? I mean some of them under the nat, some of them on same subnets with asterisk and some of them are register from public ip.

It should work any time you are not crossing a NAT border.

I think i could not explain my configuration.
Some of sip clients in WAN side of the router ans some of them in LAN side of the router. So some of them under the router(under the NAT). I want to configure asterisk as each of sip clients can send RTP direct eachother. How can i achieve this?

You cannot do direct media across the NAT.

Asterisk is working network. There is a router between asterisk and sip clients. Asterisk is WAN side of the router.
Asterisk-------------- (WAN) Router (LAN)----------------- network
Asterisk is running There are sip clients in WAN side and LAN side. So how will i modify directmediapermit and directmediadeny in which file and how i will modify these parameters?

Will i modify like this?And Where is these parameters?

I already told you and surely you researched it too, as @billsimon just restated yiou cannot do that across a NAT box

Time to stop asking the same question over and over and just experiment and see what you can accomplish on your own. As was already stated a number of times, you should be able to get endpoints to do direct media when they are not crossing a NAT boundary. If your private subnets route to each other without NAT, it should work. If there is NAT between the 192 and the 10 network, then no. You can set SIP parameters in the Asterisk SIP Settings menu. Add them to the custom section at the bottom.

Thanks billsimon now i have understood everything.