Media Gateway Control Protocol (MGCP) Technology
Overview
MGCP - Media Gateway Control Protocol - is the most important protocol in next- generation networks because it is responsible for implementing the migration from PSTN to IP telephony at large enterprises, ISPs, and carriers by converting today's TDM circuits into tomorrow's voice packets.
Media Gateway Controller Protocol (MGCP) is a device control protocol developed by IETF and destined to control devices, like Media Gateways and Integrated Access Devices (IADs), by using text format messages to set up, manage, and terminate multimedia communication sessions in a centralized communications system. The difference between MGCP and other multimedia control protocol systems is that MGCP allows the endpoints in the network to control the communication session.
MGCP is a protocol that operates between a Media Gateway (MG) and a Media Gateway Controller (MGC) - (also known as Call Agents or Soft Switches), allowing the Media Gateway Controller to control the Media Gateway. MGCP enforces the Media Gateway as the fundamental component of multipoint, next generation, converged networks. MGCP was developed as part of the convergence movement, which brings voice and data together on the packet-switched Internet.
MGCP Architecture
MGCP provides a general description of the Media Gateway/Media Gateway Controller model. It describes an architecture in which call control intelligence is outside the Media Gateways and handled by Media Gateway Controllers. These elements synchronize with one another to send coherent commands to the Media Gateways under their control. A control protocol is used to control VoIP gateways from the external call agents.
The Media Gateway (MG) is a basic device that terminates PSTN switched circuits (trunks and local loops) and converts from pulse code modulated information to packetized information and vice versa. It also handles RTP media streams across the IP network.
Examples of gateways:
- Trunking gateways - interface between the telephone network and a VoIP network. Such gateways typically manage a large number of digital circuits.
- Voice over ATM gateways - operate much the same way as VoIP trunking gateways, except that they interface to an ATM network.
- Residential gateways - provide a traditional analog interface to a VoIP network.
- Access gateways - provide a traditional analog or digital PBX interface to a VoIP network.
- Business gateways - provide a traditional digital PBX interface or an integrated "soft PBX" interface to a VoIP network.
- Network Access Servers - can attach a modem to a telephone circuit and provide data access to the Internet.
- Circuit switches (packet switches) - can offer a control interface to an external call control element.
The Media Gateway Controller (MGC) handles registration, management, and control functionality of resources in the Media Gateway. It performs protocol conversion between PSTN signaling protocols and IP telephony. It gathers information about IP and circuit flows and provides that information to billing and management systems.
The MGCP model consists of endpoints and connections:
- Endpoints are sources or sinks of data and could be physical or virtual. An example of a virtual endpoint is an audio source in an audio-content server. Creation of physical endpoints requires hardware installation, while creation of virtual endpoints can be done by software
- A connection is an association between endpoints over which data is transmitted. Point-to-point and multipoint connections are possible. Connections may exists over IP networks, ATM networks, or internal connections such as TDM backplanes or gateway backplanes. For point-to- point connections, the endpoint of a connection could be in separate gateways or in the same gateway
A basic network architecture is shown below:

Figure 1. Basic network architecture.
This architecture allows for specialization of function and economies of scale and is expected to become the architecture of choice in next generation converged voice/ data IP networks.
MGCP Call Setup
In a classic call scenario between two endpoints, the call agent(s) controlling the endpoints will establish two connections: C1 and C2. Each connection will be designated locally by a connection identifier, and will be characterized by connection attributes.
Assume that User A wants to call User B. User A is located within the IP network, served from a residential gateway and User B is located off-net via the PSTN. When User A picks up the phone, a notify off hook message is sent from the residential gateway to the Call Agent. The Call Agent asks the gateway to create a connection on the endpoint that went off hook by sending a create connection command. The gateway acknowledges to the Call agent the create connection command plus provides a session description. The session description contains information required by a third party, in this case the trunking gateway (G6), to send packets toward the newly created connection. The Session Description Protocol (SDP) is used for this and contains such things as User A's IP address, the UDP port to identify the session, packetization parameters such as compression techniques, and a media type such as RTP audio (voice). The trunking gateway responds to the Call Agent providing its own session description.
The Call Agent uses a modify connection to provide the session description from the trunking gateway to the residential gateway. A two-way full duplex communication can now be set up between the residential gateway (IAD, MTA) and the trunking gateway (G6). When a connection is set up between endpoints, RTP (Real-time Transport Protocol) is used. RTP is an IETF standard that provides end- to-end network transport functions for real time applications such as voice, video, and multimedia. RTP runs on top of UDP because it has multiplexing capabilities, and acknowledgement of packet delivery is not required.
When two endpoints are located on gateways that are managed by the same call agent, the creation is done via the following steps:
- The Call Agent asks the first gateway (MG 1) to create a connection on the first endpoint. The gateway allocates resources to that connection, and respond to the command by providing a session description that contains IP address, UDP port, etc.
- The Call Agent asks the second gateway to create a connection on the second endpoint. The command carries the session description provided by the first gateway. The gateway allocates resources to that connection, and respond to the command by providing its own session description.
- The Call Agent uses a ModifyConnection command to provide this second session description to the first endpoint. Once this is done, communication can proceed in both directions.
The Call Agent removes a connection by sending to the gateway a DeleteConnection command. The gateway may also, under some circumstances, inform a gateway that a connection could not be sustained.

Figure 2. MGCP call setup.
MGCP Applications
MGCP architecture allows for specialization of function and economies of scale and is expected to become the architecture of choice in next generation converged voice/data IP networks.
Currently, MGCP and Session Initiation Protocol (SIP) are the two carrier-class interoperability protocols with the most promise of becoming industry standards. The inherent simplicity of these protocols makes them easy to deploy in networks, and numerous industry vendors already are implementing MGCP and SIP into Voice-over-Internet Protocol (VoIP) solutions.
MGCP is central to VoIP solutions and may be integrated into products such as:
- Central Office Switches
- Gateways
- Network Access Servers
- Cable Modems
- PBXs, etc., in order to develop a convergent voice and data solution
MGCP Advantages/ Disadvantages
There are several advantages of using MGCP and IP-based communications systems over traditional telephony engineering models:
- Provides simplicity and reliability.
- Programming difficulties are concentrated on MGCs and not on the protocol.
- Service providers can develop reliable and cheap local access system.
- Provides synchronization through MGC.
- There are carrier class MGCP/Megaco media servers available today and deployed in the field. SIP lags MGCP/ Megaco in this respect.
- MGCP/Megaco is the only alternative possible today for tasks requiring signals and events, such as business conferencing or facsimile or more complex features. MGCP/Megaco's event packages are mature, tested, and deployed, whereas SIP's event packages have not yet been defined.
- Softswitches already use MGCP/ Megaco and event packages for Media Gateway control, and can reuse much of this functionality for media server control.
SIP versus MGCP:
- The SIP protocol is better specified than MGCP. Work on the MGCP protocol was distracted by the introduction of Megaco, and the MGCP specification is consequently not as solid as it might be. But although Megaco itself is better specified than MGCP, its media server events packages lag MGCP's.
- As a result of SIP's popularity as an end-to-end signaling protocol, there are more powerful development tools available for SIP. This results in shorter development times and less expensive development.
- Application servers already have need to support SIP for signaling and HTTP for Web interfaces, and so don't need to add additional protocols in order to support SIP media servers.
IxVoice Solution
MGCP bulk test library is included in the Ixia's IxVoice framework being designed to simulate the Media Gateways functionality and test the Media Gateway Controllers. This module contains functions that implement the MGCP v0.1 as described in RFC 3435.
The endpoints simulated by the MGCP module are registered at startup time, and the internal state-machine treats and responds to Caller Agent requests during the test execution.
On a MGCP connection established using the test library functions, media streaming can be generated/ received using the functions from the RTP Module.
Key features
- Fully automates the MGCP functionality testing.
- Simulates multiple Call Agents and Media Gateways.
- Generates and receives MGCP messages.
- Predefined test scenarios.
Test types
The most important testing issues that can be performed using IxVoice:
- Conformance & Functionality testing - conformance to the standards, determine if the events detected at the Media Gateway are correctly passed to the call agent.
- Interoperability - compatibility with the existing implementations.
- Load testing (BHCC) - because MG must support high density calls.
- Quality of Voice (QoV) - for the media streaming generated using RTP.
- System integration testing - because MG must be integrated in the existing infrastructure.
As devices that support the converged carrier networks, Media Gateways are designed to support higher densities. These densities are measured as either digital signal per rack, per square foot, or per dollar.
Devices under test
- Media Gateway.
- Media Gateway Controller (Call Agent).
Applications

Figure 3. Basic network architecture.
References
Glossary
- ATM - Asynchronous Transfer Mode
A high-speed network technology that is designed for LANs, WANs, carrier and service provider networks, and Internet core networks. It is a connection-oriented switching technology, as opposed to a connectionless technology such as IP.
- Codec
Voice encoding/decoding mechanism. Codecs are used to compress the voice signal into data packets. Each codec has different bandwidth requirements.
- DSL
Digital Subscriber Line - a digital technology for transporting faster bit streams over the ordinary copper telephone lines.
- Endpoint
An H.323 terminal, gateway or Multipoint Controller Unit (MCU). An endpoint can call and be called and it can generate or end information streams.
- G6 - Generation 6
IBM's sixth generation of 9672 mainframe models, introduced in May, 1999.
- HTTP - Hypertext Transfer Protocol
The client/server application-level protocol specifically designed to support hypermedia information systems. Web browsers use HTTP to connect with Web servers and access information on those servers. The protocol sets up a connection between Web browser and Web server, and then manages the exchange of information.
- IAD - Integrated Access Device
A device through which both data and voice can be accessed over a DSL network.
- IP - Internet Protocol
One of a large family of specifications that define the transmission of information over data networks. It tracks the Internet addresses of nodes, routes outgoing messages, and recognizes incoming messages.
- IP Telephony - (Internet Protocol telephony, also known as Voice over IP Telephony)
A general term for the technologies that use the Internet Protocol's packet-switched connections to exchange voice, fax, and other forms of information that have traditionally been carried over the dedicated circuit-switched connections of the public switched telephone network (PSTN).
- ISPs - Internet Service Providers
Provide connections into the Internet for home users and businesses. There are local, regional, national, and global ISPs. An ISP is usually a local service provider that is in the business of providing customers with Internet access and customer support.
- Media Gateway
A basic device that terminates PSTN-switched circuits (trunks and local loops) and converts from pulse code modulated information to packetized information, and vice versa. It also handles RTP media streams across the IP network.
- Media Gateway Controller
Handles registration, management, and control functionality of resources in the Media Gateway. It performs protocol conversion between PSTN signaling protocols and IP telephony. It gathers information about IP and circuit flows and provides that information to billing and management systems.
- MTA - Multimedia Terminal Adapter
A device using which video and voice (multimedia) can be transmitted over cable data networks.
- Packet-switched networks
Networks that break up a message into smaller packets before switching the packets to their required destination. Each packet contains a destination address so all packets in a single message do not have to travel by the same path. The destination computer reassembles the packets back into their proper sequence.
- PBX - Private Branch Exchange
A telephone switch located on the premises of a company. It allows telephone users to set up circuit- switched voice calls among other users in the same company or to set up calls across the public-switched telephone network.
- PSTN - Public Switched Telephone Network
The worldwide voice telephone network that traditionally routes voice calls from one location to another.
- RTP - Real Time Transport Protocol
A protocol that is optimized in various ways for the delivery of real-time data such as live and/or interactive audio and video over IP packet-switched networks. RTP runs over UDP and uses its multiplexing and error-checking features.
- SDP - Session Description Protocol
A protocol that describes a format for conveying descriptive information about multimedia sessions. This information includes session name and purpose, session time, type of media (voice or video), media format (MPEG, for example), transport protocol and port number, bandwidth requirements, and contact information.
- SIP - Session Initiation Protocol
An ASCII-based protocol that provides telephony services similar to H.323, but is less complex and uses less resource. It creates, modifies, and terminates sessions with one or more participants. SIP is a request-response protocol, dealing with requests from clients and responses from servers.
- SS7 - Signaling System 7
An out-of-band signaling system used by the carriers to set up telephone calls. It is a protocol standard defined by the ITU. Network elements in the public- switched telephone network use SS7 to exchange information used not only to set up calls but to control the network. Part of SS7's call setup process is to create a circuit for the call through the telephone network and then to place the call on the circuit.
- UDP - User Datagram Protocol
A transport-layer protocol that has no error checking, flow control, or reliability mechanism. It is a best- effort, connectionless transport of voice, video, and data. This is used as a faster means of transport for voice calls.
- VoIP - Voice over IP
The capability to carry normal telephony-style voice over an IP-based Internet or data links with POTS-like functionality, reliability, and voice quality. VoIP enables a router to carry voice traffic (for example, telephone calls and faxes) over an IP network.