No media mode is an SDP Passthrough feature that permits two endpoints that can see each other (no funky N.A.T.) to connect their media sessions directly while FreeSWITCH maintains control of the SIP signaling. This is useful if you have two end-points that need to use a codec that is currently not supported in FreeSWITCH (video) or if you are using FreeSWITCH in a high performance walled garden network and want to minimize the RTP handling FreeSWITCH is doing to maximize call traffic.
When set, the media (RTP) from the originating endpoint is sent directly to the destination endpoint and vice versa. The signaling (SIP) for both endpoints still goes through FreeSWITCH, but the media is point-to-point.
See also bypass_media_after_bridge
+------------+ | | ____| FreeSWITCH |___ / | | \ SIP / +------------+ \ SIP / 192.168.1.105 \ / \ +----------+ +----------+ | | | | | endpoint | <---- RTP ----> | endpoint | | A | Audio | B | +----------+ +----------+ 192.168.1.100 192.168.1.110
Before executing the bridge action you must set the "bypass_media" flag to true.
<action application="set" data="bypass_media=true"/>
If the endpoints are on a different IP than freeswitch, it is very easy. Just run wireshark on the machine running freeswitch and make sure you either see no traffic, or the RTP traffic is only going between the endpoints and not through freeswitch.
See also: Proxy Media Mode
Doing a broadcast command on a channel that is in "bypass media" mode will cause freeswitch to put itself back in the media path of both legs of the call, and then take itself out again once the playback has finished.
Probably not. If the endpoints send external IP/port of the RTP media streams it will increase the chances of this working.
Yes. There is a global variable that can be set (TODO: doc this) and "inbound no media" can be set on the SIP profile:
<param name="inbound-bypass-media" value="true"/>
(see example in conf/sip_profiles/internal.xml)
There is a media api command
will put freeswitch back in the media path and disable bypass media mode.
uuid_media off <uuid>
will take freeswitch out of the path and activate bypass media mode.
session_record will fail if the call is in bypass media or proxy media mode, you need to manually move the call into media.
Of course you can, all it takes is setting the bypass_media session variable to true before the bridge:
no, there are cases where this variable is unset, if you set it as a global it can never unset, and will result in unexpected behaviors.