Media relay usage cases

S
Written by Sergiiy
Updated 1 year ago

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

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

In Flysip 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) then the media will be proxied.

Account Connection Effective
Never Never Never
Never When Necessary When Necessary *
Never Always Always
Always Never Always
Always When Necessary Always
Always Always Always
When Necessary Never When Necessary
When Necessary When Necessary When Necessary
When Necessary Always Always

* Media Relay would be triggered in case of Never setting on Account and When Necessary on Connection in case of NAT call only in >=5.0 versions.

The usage cases:

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

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

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

Case 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 would be inherited from Routing group and Connection.


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

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

Case it's 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 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.

Case it's 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 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].

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

Case it's set to Always/When Necessary, the RTP would be proxied.

If it's set to Never - the RTP would not be proxied (in >=5.0 version RTP would be proxied, see the table below)
The Preferred Media Relay 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].

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

Case it's 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 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.

Case it's 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 would be inherited from Routing group and Connection if the RTP is proxied.

9. Any newly created from web account/connection/trunk has Use Media Relay in the default value - When Necessary.

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

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

Case call is sent to Registered Account, the decision whether call should be proxied is taken based on Use Media Relay setting on account that was used to authenticate the call (Authenticated Account).

If call is sent to Trunk, Use Media Relay setting on Connection that is used for corresponding Destination (Main/Backup) configured on Trunk is considered for decision on whether proxy call or no.

The table above is applicable to onnet case as well.

* If based on the table call has to be proxied, the Media Relay setting from Routing Group of Authenticated Account would be checked for defined RTPProxy, which would be used for proxying the call

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

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

Did this answer your question?