MEGACO

MEdia GAteway COntrol

Protocol
Introduced in Rel-2
A master-slave protocol defined by IETF and adopted by 3GPP for controlling Media Gateways (MGWs) from a Media Gateway Controller (MGC). It separates call control intelligence from media processing, enabling scalable and flexible circuit-switched to packet-switched network interworking.

Description

MEGACO, also known as H.248, is a text-based application layer control protocol used for controlling Media Gateway (MGW) entities in a decomposed gateway architecture. Within the 3GPP architecture, it is used primarily in the context of the Media Gateway (MGW) and Media Gateway Controller (MGC) functional split, often associated with the MSC Server (MSC-S) and MGW in the circuit-switched core network. The protocol operates on a master-slave model, where the MGC (the master, e.g., MSC Server) issues commands to the MGW (the slave) to manipulate "contexts" and "terminations" that represent media streams and connections.

A "termination" in MEGACO is a source or sink of one or more media streams, such as a timeslot on a TDM trunk (circuit-switched side) or an RTP port on an IP interface (packet-switched side). Terminations have properties described by descriptors, which include signals (e.g., tones to play), events (e.g., detection of DTMF digits), and statistics (e.g., packets sent). A "context" is an association between multiple terminations where media mixing or switching occurs; an empty context indicates a null association. The MGC uses commands like Add, Modify, Subtract, Move, and AuditValue to instruct the MGW to create contexts, add terminations to them, modify stream parameters, or tear them down.

How it works: When a call is set up, the MSC Server (MGC) determines the need for media path establishment through an MGW. It uses MEGACO over an IP connection to command the MGW to create a new context, add a termination representing the circuit-switched leg (e.g., from a BSC), and add another termination representing the packet-switched leg (e.g., toward the IMS or another MGW). The MGW executes these commands, establishes the internal cross-connect or transcoding function between the terminations, and returns acknowledgments. The protocol also allows the MGW to notify the MGC of events detected on terminations, such as hook-flash or fax tones. This clear separation allows the MGC to focus on call state and signaling (e.g., ISUP, BICC), while the MGW handles the physical/media layer processing, enabling centralized control and distributed, scalable media processing.

Purpose & Motivation

MEGACO was developed to solve the problem of monolithic, proprietary, and inflexible telephony switches. Traditional circuit-switched switches (like Class-5 switches or early MSCs) integrated call control and the physical switching fabric (time-slot interchange) into a single, expensive, and vertically integrated platform. This made network scaling, introduction of new services, and interoperability between vendors difficult. The purpose of MEGACO is to enable a decomposed, open-standards architecture that separates call control (intelligence) from media switching/processing (the fabric).

This separation, driven by the move towards packet-switched backbones (like IP), allowed network operators to deploy cheaper, scalable media gateways from one vendor and sophisticated call control servers from another, fostering competition and innovation. It directly addressed the limitations of earlier control protocols like MGCP, which had less flexibility. In the 3GPP context, its adoption (starting in Release 2 for 3G UMTS) was motivated by the need to evolve the circuit-switched core network to support bearer-independent call control. This enabled operators to transition their core networks from traditional TDM-based switches to a more cost-effective and future-proof IP-based infrastructure while maintaining interoperability with legacy circuit-switched networks (PSTN, 2G GSM).

Key Features

  • Master-slave control protocol between MGC and MGW
  • Manipulation of abstract entities: Contexts and Terminations
  • Support for a wide range of media types and encoding
  • Event and signal packages for flexible service creation
  • Text-based encoding (ASN.1 text format) for readability
  • Robostic error handling and audit capabilities

Evolution Across Releases

Rel-2 Initial

Initially adopted the H.248/MEGACO protocol from IETF/ITU-T for controlling the Media Gateway (MGW) in the UMTS circuit-switched core network. Defined the basic interface (Mc interface) between the MSC Server (MGC) and the MGW, enabling the separation of call control from the media plane for 3G services.

Enhanced MEGACO usage with the introduction of the IMS. Defined its application for controlling the Media Resource Function Processor (MRFP) by the Media Resource Function Controller (MRFC) via the Mp interface, extending its role beyond trunking gateways to include media processing resources for conferencing and tones.

Further refinements and stability updates for the protocol's use in the context of LTE and the evolved packet core. While the focus shifted to all-IP and VoLTE, MEGACO remained relevant for legacy interworking and certain media gateway functions.

Defining Specifications

SpecificationTitle
TS 24.228 3GPP TS 24.228
TS 29.162 3GPP TS 29.162