Media Gateway Control Protocol (MGCP)

This protocol controls telephony gateways from external call control elements called media gateway controllers or call agents. Converting among the audio signals carried on telephone circuits and data packets carried over the Internet or over other packet networks is done by telephony gateway. According to the call control architecture assumption of the MGCP the call control intelligence is outside the gateways and handled by external call control elements and these call control elements, or Call Agents, will synchronize with each other to send coherent commands to the gateways under their control.[para] Thus essentially MGCP is a master/slave protocol, where the gateways are expected to execute commands sent by the Call Agents. The MGCP implements the media gateway control interface as a set of transactions. The transactions are composed of a command and a mandatory response.

MGCP is an implementation of the Media Gateway Control Protocol architecture for controlling Media Gateways on Internet Protocol (IP) networks and the public switched telephone network (PSTN). The general base architecture and programming interface is described in RFC 2805 and the current specific MGCP definition is RFC 3435 (obsoleted RFC 2705). It is a successor to the Simple Gateway Control Protocol (SGCP).

MGCP is a signaling and call control protocol used within Voice over IP (VoIP) systems that typically interoperate with the public switched telephone network (PSTN). As such it implements a PSTN-over-IP model with the power of the network residing in a call control center (softswitch, similar to the central office of the PSTN) and the endpoints being "low-intelligence" devices, mostly simply executing control commands. The protocol represents a decomposition of other VoIP models, such as H.323, in which the media gateways (e.g., H.323's gatekeeper) have higher levels of signalling intelligence.




MGCP uses the Session Description Protocol (SDP) for specifying and negotiating the media streams to be transmitted in a call session and the Real-time Transport Protocol (RTP) for framing of the media streams.

Another implementation of the Media Gateway Control Protocol architecture exists in the similarly named Megaco protocol, a collaboration of the Internet Engineering Task Force (RFC 3525) and International Telecommunication Union (Recommendation H.248.1). Both protocols follow the guidelines of the API Media Gateway Control Protocol Architecture and Requirements in RFC 2805. However, the protocols are incompatible due to differences in protocol syntax and underlying connection model.

The distributed system is composed of a Call Agent (or Media Gateway Controller), at least one Media Gateway (MG) that performs the conversion of media signals between circuits and packets, and at least one Signaling gateway (SG) when connected to the PSTN.

The Call Agent uses MGCP to tell the Media Gateway:

* what events should be reported to the Call Agent
* how endpoints should be connected together
* what signals should be played on endpoints.

MGCP also allows the Call Agent to audit the current state of endpoints on a Media Gateway.

The Media Gateway uses MGCP to report events (such as off-hook, or dialed digits) to the Call Agent.

(While any Signaling Gateway is usually on the same physical switch as a Media Gateway, this needn't be so. The Call Agent does not use MGCP to control the Signaling Gateway; rather, SIGTRAN protocols are used to backhaul signaling between the Signaling Gateway and Call Agent).

Every issued MGCP command has a transaction ID and receives a response.

Typically, a Media Gateway is configured with a list of Call Agents from which it may accept programming (where that list normally comprises only one or two Call Agents). In principle, event notifications may be sent to different Call Agents for each endpoint on the gateway (as programmed by the Call Agents, by setting the NotifiedEntity parameter). In practice however, it is usually desirable that at any given moment all endpoints on a gateway should be controlled by the same Call Agent; other Call Agents are available only to provide redundancy in the event that the primary Call Agent fails, or loses contact with the Media Gateway. In the event of such a failure it is the backup Call Agent's responsibility to reprogram the MG so that the gateway comes under the control of the backup Call Agent. Care is needed in such cases; two Call Agents may know that they have lost contact with one another, but this does not guarantee that they are not both attempting to control the same gateway. The ability to audit the gateway to determine which Call Agent is currently controlling can be used to resolve such conflicts.

MGCP assumes that the multiple Call Agents will maintain knowledge of device state among themselves (presumably with an unspecified protocol) or rebuild it if necessary (in the face of catastrophic failure). Its failover features take into account both planned and unplanned outages.

Media Gateway Control Protocol (MGCP), also known as H.248 and Megaco, is a standard protocol for handling the signaling and session management needed during a multimedia conference. The protocol defines a means of communication between a media gateway, which converts data from the format required for a circuit-switched network to that required for a packet-switched network and the media gateway controller. MGCP can be used to set up, maintain, and terminate calls between multiple endpoints. Megaco and H.248 refer to an enhanced version of MGCP.

The standard is endorsed by the Internet Engineering Task Force (IETF) as Megaco (RFC 3015) and by the Telecommunication Standardization Sector of the International Telecommunications Union (ITU-T) as Recommendation H.248. H.323, an earlier UTI-T protocol, was used for local area networks (LANs), but was not capable of scaling to larger public networks. The MCGP and Megaco/H.248 model removes the signaling control from the gateway and puts it in a media gateway controller, which can then control multiple gateways.

MGCP was itself created from two other protocols, Internet Protocol Device Control (IPDC) and Simple Gateway Control Protocol (SGCP). Defined in RFC 2705, the MGCP specifies a protocol at the Application layer level that uses a master-slave model, in which the media gateway controller is the master. MGCP makes it possible for the controller to determine the location of each communication endpoint and its media capabilities so that a level of service can be chosen that will be possible for all participants. The later Megaco/H.248 version of MGCP supports more ports per gateway, as well as multiple gateways, and support for time-division multiplexing (TDM) and asynchronous transfer mode (ATM) communication.