Skip to main content

Media Control

This document describes media gateway control in OmniMSC, covering MGCP and Megaco/H.248 gateway protocols, the Media Controller state machine, codec negotiation, conference bridging, and SDP generation.

For call flow diagrams showing media setup in context, see Call Flow Diagrams. For SIP trunk codec configuration, see SIP Trunking. For media gateway configuration parameters, see Configuration Reference. For MPTY conference bridging from the supplementary services perspective, see Supplementary Services.


MGCP Gateway Control

OmniMSC controls media gateways using the Media Gateway Control Protocol (MGCP) per RFC 3435. The MGCP Call Agent issues three primary commands to manage RTP connections on the gateway.

Commands

CommandPurposeDescription
CRCXCreate ConnectionAllocates a new RTP endpoint on the media gateway and returns the local IP address, port, and SDP for that endpoint.
MDCXModify ConnectionUpdates an existing connection's parameters, such as switching the media mode from receive-only to send-and-receive when a call is answered.
DLCXDelete ConnectionTears down an RTP connection and releases the associated endpoint resources on the gateway.

Endpoint Naming

Media gateway endpoints follow the naming convention rtpbridge/N@mgw, where N is a sequentially assigned endpoint number and mgw is the gateway domain name. Each call leg occupies one endpoint within a connection context on the gateway.


Media Controller States

The Media Controller manages the lifecycle of media resources for each call. It progresses through the following states as the call is established and released.


A-Leg (Subscriber Side)

The A-leg represents the media path between the media gateway and the subscriber's radio access bearer via the BSC or RNC.

When a call is initiated, the Media Controller sends a CRCX command to the media gateway to allocate the A-leg endpoint. The initial connection mode is set to RecvOnly, meaning the gateway accepts incoming media from the subscriber side but does not transmit. This prevents clipping and echo during the alerting phase.

When the call is answered, the Media Controller sends an MDCX command to change the A-leg mode to SendRecv, enabling bidirectional media flow.


B-Leg (Trunk Side)

The B-leg represents the media path between the media gateway and the remote trunk (SIP peer or ISUP circuit).

The B-leg is allocated via a second CRCX command within the same MGW connection context as the A-leg. By placing both legs in the same context, the media gateway internally bridges the two RTP streams, enabling voice path continuity without hairpinning media through the MSC.


Codec Negotiation

OmniMSC negotiates speech codecs based on the capabilities reported by the BSC in the BSSMAP Assignment Request response (speech version list) and the codec preferences of the outbound trunk.

Supported Codecs

CodecRTP PayloadDescription
AMR-FRdynamicAdaptive Multi-Rate Full Rate, octet-aligned mode (octet-align=1)
GSM-EFRdynamicGSM Enhanced Full Rate (6.60 kbit/s)
GSM-FR3GSM Full Rate (13.0 kbit/s)
AMR-HRdynamicAdaptive Multi-Rate Half Rate
GSM-HRdynamicGSM Half Rate (5.60 kbit/s)

The codec offer list is constructed from the intersection of the BSC's reported speech version capabilities and the MSC's configured codec preferences. The resulting SDP is included in the outbound SIP INVITE to the trunk peer, allowing the remote side to select the preferred codec from the offered set.


Conference Bridge (Multi-Party)

OmniMSC supports multi-party (MPTY) conference calls per 3GPP TS 24.083 by leveraging the media gateway's conference bridging capability.

When a subscriber invokes the MPTY supplementary service, the Media Controller allocates a conference context on the media gateway. Individual call legs are then added to or removed from the conference as participants join or leave.

Conference Operations

OperationDescription
Create ConferenceAllocates a new conference context on the media gateway with a dedicated mixing endpoint.
Add to ConferenceMoves an existing call leg into the conference context via MDCX, connecting the participant to the conference mixer.
Remove from ConferenceMoves a call leg out of the conference context back to a point-to-point connection.

The conference mixer on the media gateway handles media mixing for all participants. The MSC controls conference membership through signalling only and does not process media directly.


SDP Generation

OmniMSC generates SDP (Session Description Protocol) for outbound SIP messages using the following conventions:

SDP FieldValue
Origin (o=)OmniMSC as the session originator username
Connection (c=)IP address returned by the media gateway in the CRCX response
Media (m=)RTP port returned by the media gateway, with codec payload types from the negotiated offer
Attributes (a=)Codec-specific parameters such as fmtp for AMR octet-align mode

The connection address and port in the SDP always reflect the media gateway's allocated endpoint, ensuring that RTP flows directly between the media gateway and the remote peer without traversing the MSC signalling path.


Megaco/H.248 Support

As an alternative to MGCP, OmniMSC supports media gateway control via the Megaco/H.248 protocol per ITU-T Recommendation H.248. The choice between MGCP and Megaco is configurable per media gateway via the media mode setting.

Megaco uses a transaction-based command model with Add, Modify, Subtract, and Move commands that map conceptually to the MGCP CRCX, MDCX, and DLCX operations. The Megaco Controller manages H.248 transactions, context allocation, and termination lifecycle on the gateway.

Both MGCP and Megaco transports use UDP by default. The Media Controller abstracts the protocol differences so that the CC FSM and other call-handling components interact with a unified media control interface regardless of the underlying gateway protocol.


Gateway Configuration

Each media gateway is defined with the following identity parameters:

ParameterDescription
NameLogical gateway name used for identification in logs and the control panel
AddressIP address of the media gateway
PortMGCP or Megaco listening port on the gateway
DomainGateway domain name used in MGCP endpoint addressing (the @mgw portion of endpoint names)

For the full set of media configuration parameters, see Configuration Reference.


References

  • RFC 3435 -- Media Gateway Control Protocol (MGCP) Version 1.0
  • ITU-T H.248 -- Gateway Control Protocol (Megaco)
  • 3GPP TS 24.083 -- Call Waiting and Call Hold supplementary services (MPTY)
  • RFC 4566 -- Session Description Protocol (SDP)