Media Server Modes in 3CX Phone System

Introduction to the 3CX Media Server

The 3CX Phone System’s main job is to connect two (or more) entities together for transmission of audio between them. However, there are three different mechanisms which can be utilized for the delivery of audio streams between two endpoints:

  • Bypass Mode (Direct Mode)
  • Proxy Mode (Pass-Through Mode)
  • Transcoding Mode (Bound to Media Server Mode)

Audio streams are delivered by the 3CX Media Server. The inbuilt 3CX Media Server can recognize whether the call is an internal call, or an external call by making a calculation based on the comparison of the 3CX Phone System Local IP address and Subnet mask, it’s interfaces and those of the settings set on the phone or party. This is one of the 3CX Core services.

Bypass – Direct Mode

In this mode, the media server does not take any part in the RTP stream delivery between two SIP entities. Both entities will negotiate with the PBX to send the RTP stream directly to each other. Bypass mode comes into effect only when the entities or extensions are on the same subnet or network area:

The two endpoints reside on the same Local – for example:

  • Phone 1 IP Address: 10.172.0.57
  • Phone 2 IP Address: 10.172.0.23
  • PBX IP Address: 10.172.0.2

OR

The two endpoints are both external extensions, and the PBX has received signals from both endpoints over the same interface and directed to the same IP Address identity of the PBX Server:

  • Phone 1 IP Address: 212.56.129.153
  • Phone 2 IP Address: 194.158.237.54
  • PBX IP Address: 192.157.237.9 (STUN-Resolved)

Proxy – Pass Through Mode

In Proxy mode, the PBX server will act as a media router, leaving the media (RTP) untouched, and only changing the header information for routing purposes. The PBX decides to use Proxy mode when:

The two endpoints reside on different IP segments of the Local LAN – for example:

  • Phone 1 IP Address: 10.172.0.57
  • Phone 2 IP Address: 172.16.130.8
  • PBX IP Address: 10.172.0.2 (could be anything since Phones 1 and 2 have IP Addresses in different subnets)

OR

One endpoint is internal and the other endpoint is external – for example:

  • Phone 1 IP Address: 10.172.0.57
  • Phone 2 IP Address: 212.56.129.153
  • PBX IP Address: 10.172.0.2 / 192.157.237.9 (STUN-Resolved)

Other notes

  • All SDP media attributes are passed blindly from one entity to another by the Media server – therefore here the media server acts as an RTP proxy between the two end points.
  • All SDP media attributes are passed blindly from one entity to another by the Media server – therefore here the media server acts as an RTP proxy between the two end points.
  • In this mode both parties must have at least one common codec to communicate with each other. If you see <<incorrect media type>> in the logs, this is because the agents or phones are using different codecs – the translation is not taking place and therefore the RTP stream is not passing successfully – hence an incorrect intersection of codecs).
  • In this mode Media Server can be also described as an entity that is routing RTP traffic from one endpoint to its destination.

Transcoding – Bound Mode

In Transcoding mode, the PBX server will act as a media translator, decoding the incoming media from one endpoint, and re-encoding and delivering it to the second endpoint according to the second endpoint’s codec negotiation. The PBX decides to use Transcoding mode when:
One of the endpoints is forced to the option “PBX delivers Audio”:

  • In the “Edit Extension” screen, “Other” tab.
  • In the “Edit VoIP Gateway” screen, section “Other options”.
  • In the “Edit VoIP Provider” screen, section “Other options”.

OR

One of the endpoints does not support re-INVITES:

  • In the Extension Auto-Detection sequence for that phone.
  • In the “Edit Extension” screen, “Other” tab.
  • In the “Edit VoIP Gateway” screen, section “Gateway capabilities”.
  • In the “Edit VoIP Provider” screen, section “Provider capabilities”.

In these cases, the Media server completely handles negotiations with the participant. It provides its own SDP when it contacts the destination agent and not the SDP of the caller agent. Therefore in this mode each agent negotiates RTP messages directly with Media server and in turn the Media server encodes the audio stream for the agents. In other words, both agents send RTP to Media server and Media server delivers to each. This is very common when two agents are not using a common codec to each other. This is also the reason why this mode can be enforced by the PBX administrator.

Liked this article?


Get notified of new articles
or share
You might also be interested in: