MediaRelay

Last modified by Buildbot on 2024/06/21 01:26

 Documentation based on repostory git version commit 2.4.0-alpha-210-ga478c649 

Module MediaRelay

The MediaRelay module masquerades SDP message so that all RTP and RTCP streams go through the proxy. When the client has set ICE candidates in the SDP offer, then the MediaRelay module will automatically add ICE relay candidates. The RTP and RTCP streams are then routed so that each client receives the stream of the other. MediaRelay makes sure that RTP is ALWAYS established, even with uncooperative firewalls.
----

Configuration options:

NameDescriptionDefault ValueDefault UnitType
enabled

Indicate whether the module is activated.

 true Boolean
filter

A request/response enters module if the boolean filter evaluates to true. Ex: from.uri.domain contains 'sip.linphone.org', from.uri.domain in 'a.org b.org c.org', (to.uri.domain in 'a.org b.org c.org') && (user-agent == 'Linphone v2'). You can consult the full filter documentation here : https://wiki.linphone.org/xwiki/wiki/public/view/Flexisip/Configuration/Filter%20syntax/

  BooleanExpr
nortpproxy

The name of the SDP attribute to set by the first proxy to forbid subsequent proxies to provide relay. Use 'disable' to disable.

 nortpproxy String
sdp-port-range-min

The minimal value of SDP port range

 1024 Integer
sdp-port-range-max

The maximal value of SDP port range

 65535 Integer
bye-orphan-dialogs

Sends a ACK and BYE to 200Ok for INVITEs not belonging to any established call. This is to solve the race condition that happens when two callees answer the same call at the same time. According to RFC3261, the caller is expected to send an ACK followed by a BYE to the loser callee. This is not the case in RFC2543, where the proxy was supposed to do this. When set to true, the MediaRelay module will implement the RFC2543 behavior. Note that it may sound inappropriate to bundle this property with the media relay feature. However the MediaRelay module is the only one in Flexisip that has the visibility of SIP dialogs, which is necessary to implement this feature.

 false Boolean
max-calls

Maximum concurrent calls processed by the media-relay. Calls arriving when the limit is exceed will be rejected. A value of 0 means no limit.

 0 Integer
force-relay-for-non-ice-targets

When true, the 'c=' line and port number are set to the relay ip/port even if ICE candidates are present in the request, while the standard behavior is to leave the c= line and port number as they are in the original offer sent by the client. This variation allows callees that do not support ICE at all to benefit from the media relay service.

 true Boolean
prevent-loops

Prevent media-relay ports to loop between them, which can cause 100% cpu on the media relay thread. You need to set this property to false if you are running test calls from clients running on the same IP address as the flexisip server

 true Boolean
early-media-relay-single

In case multiples '183 Early media' responses are received for a call, only the first one will have RTP streams forwarded back to caller. This feature prevents the caller to receive 'mixed' streams, but it breaks scenarios where multiple servers play early media announcement in sequence.

 true Boolean
max-early-media-per-call

Maximum number of relayed early media streams per call. This is useful to limit the cpu usage due to early media relaying on embedded systems. A value of 0 stands for unlimited.

 0 Integer
inactivity-period

Period of time after which a relayed call without any activity is considered as no longer running. Activity counts RTP/RTCP packets exchanged through the relay and SIP messages.

 3600 secondDurationS
force-public-ip-for-sdp-masquerading

Force the media relay to use the public address of Flexisip to relay calls. It not enabled, Flexisip will deduce a suitable IP address by basing on data from SIP messages, which could fail in tricky situations e.g. when Flexisip is behind a TCP proxy.

 false Boolean