The relay or proxying of media through an intermediary system is useful for such purposes as NAT helping and network topology masking.


Relaying media will increase requirements on the network, bandwidth consumption and demand on CPU resources of your system.


In Sippy there are 3 places to get the RTP proxy configured:


1. Account level

Use Media Relay:

- Never

- When Necessary

- Always


2. Connection level

Use Media Relay:

- Never
- When Necessary
- Always

Preferred Media Relay:

- Built-in RTPproxy (internal)

- SMG (external, if cluster is used)


3. Routing group level

Preferred Media Relay:

- Built-in RTPproxy (internal)

- SMG (external, if cluster is used)

- From Connection (inherits the setting on Connection)


The main rule here is that if 'Use Media Relay' is set to 'Always' on any level (Account or Connection), the media will be proxied.


AccountConnectionEffective
NeverNeverNever
NeverWhen NecessaryWhen Necessary *
NeverAlwaysAlways
AlwaysNeverAlways
AlwaysWhen NecessaryAlways
AlwaysAlwaysAlways
When NecessaryNeverWhen Necessary
When NecessaryWhen NecessaryWhen Necessary
When NecessaryAlwaysAlways


* Media Relay would be triggered if the "Never" setting is active on the Account, and 'When Necessary" is set on the Connection for NAT call (only in versions 5.0 and higher).


Usage cases:


1. Use Media Relay is set to Always on Account, then RTP would always be proxied even if on Connection the Use Media Relay options is set to Never.

The Preferred Media Relay option would be inherited from Routing Group and Connection.


2. Use Media Relay is set to When Necessary on Account [NAT network case]

If the call comes from NAT network, then RTP would be proxied no matter what the settings are on Connection for Use Media Relay.

The Preferred Media Relay option would be inherited from Routing group and Connection.


3. Use Media Relay is set to When Necessary on Account [global network case].

If the call comes from a global (not NAT) network, then the settings on Connection for Use Media Relay would be checked.

If Use Media Relay is set to Always, the RTP would be proxied, if it's set to Never/When Necessary - the RTP would not be proxied.
The Preferred Media Relay option would be inherited from Routing group and Connection if the RTP is proxied.


4. Use Media Relay is set to Never on Account.

The settings on Connection for Use Media Relay would be checked.

If Use Media Relay is set to Always, the RTP would be proxied, if it's set to Never/When Necessary - the RTP would not be proxied.
The Preferred Media Relay option would be inherited from Routing group and Connection if the RTP is proxied.


5. Use Media Relay is set to When Necessary on Connection [NAT network case].

If the call comes from NAT network, then the settings on Account for Use Media Relay would be checked.

If Use Media Relay is set to Always/When Necessary, the RTP would be proxied.

If it's set to Never - the RTP would not be proxied (in versions 5.0 or higher, RTP would be proxied, see the table below)
The Preferred Media Relay option would be inherited from Routing group and Connection if the RTP is proxied.


6. Use Media Relay is set to When Necessary on Connection [global network case].

If the call comes from a global (not NAT) network, then the settings on Account for Use Media Relay would be checked.

If Use Media Relay is set to Always, the RTP would be proxied, if it's set to Never/When Necessary - the RTP would not be proxied.
The Preferred Media Relay option would be inherited from Routing group and Connection if the RTP is proxied.


7. Use Media Relay is set to Always on Connection, then RTP would always be proxied even if on Account for Use Media Relay the Never option is set.
The Preferred Media Relay would be inherited from Routing group and Connection.


8. Use Media Relay is set to Never on Connection.

The settings on Account for Use Media Relay would be checked.

If Use Media Relay is set to Always, the RTP would be proxied, if it's set to Never/When Necessary - the RTP would not be proxied.
The Preferred Media Relay option would be inherited from Routing group and Connection if the RTP is proxied.


9. Any newly created Account/Connection/Trunk has When Necessary as the default value for Media Relay.


10. The Preferred Media Relay default for a newly created trunk is Built-In RTPProxy


Onnet Case (reflects refactored state starting from 5.2 version):


If the call is sent to a Registered Account, the decision whether the call should be proxied is made based on the Use Media Relay setting on the Account used to authenticate the call (Authenticated Account).


If the call is sent to a Trunk, the Use Media Relay setting on the Connection of the Destination (the Trunk) is considered in the decision of whether or not to proxy the call. 


The table above is applicable to the onnet case as well.

* If based on the table the call has to be proxied, the Media Relay setting from the Routing Group of the Authenticated Account would be checked for the RTPProxy, to be used to proxy the call
* If Media Relay is set to From Connection on Routing Group of the Authenticated Account and the call is sent to Trunk, the Media Relay setting from the Connection of the corresponding Trunk would be checked for the RTPProxy to be used to proxy the call.

* If Media Relay is set to From Connection on Routing Group of the Authenticated Account and the call is sent to a Registered Account, the call would be proxied using the Built-In RTPProxy.