what is mgcp protocol

What is MGCP Protocol?

The MGCP full form is the Media Gateway Control Protocol. To understand the MGCP protocol. In this tutorial, first, we will describe the signaling and media paths in a call.  MGCP protocol provides specifications to control the media gateway. Next comes in mind, what is media gateway and who controls it? The answer is Media Gateway is a device or node, which terminates the voice trunks in the telecom network. Voice trunks can be of multiple types e.g E1/T1, VoIP, ISDN, analog lines, etc.  Call control is an application that handles the singling message for the call and sends the command to the media gateway over the MGCP protocol to reserve/release/modify the voice trunks using the MGCP protocol.  There may be commands or events from Media Gateway to the Call Control.

What is MGCP
What is MGCP protocol

Here we will explain in very simple terms the use of MGCP then we will discuss in detail the MGCP protocol. In another tutorial for the ss7 protocol, we have discussed the signaling flow for the Call control.  Here we will discuss media gateway call flow during a call.

What is Media Gateway?

Media is a stream, which can be for voice, fax, etc. Media Gateway is the device with connects two streams in each direction. One direction is towards calling number and other towards called number. During a call, mobile device samples voice into a stream of data packets.  Call originating exchange sends the packets to the media gateway and media gateway sends packets to the called exchange. Before sending any packet, a voice circuit is set up in each direction from the gateway.

Media Gateway does format conversion too. For example, a PSTN subscriber dials a number in the VoIP network. In this case, the media gateway does the conversion from PSTN (E1/T1) media format to the VoIP format and vice versa.

Example Call Flow for MGCP:

In this example, we will describe the signaling and corresponding handling and media gateway over MGCP.

Call Flow with MGCP
Call Flow with MGCP

The above example shows full call flow with signaling. Once call control receives a signaling message for the call, it reserves a media channel in the incoming direction. Then forwards the call message towards the terminating switching center and reserves media channel in an outgoing direction. Once a call is answered, both channels are connected to each other. Connecting channels called switching.   Once switching is done, both calling and called can listen to each other.

MGCP protocol specification:

Till now we have talked about the general use of MGCP protocol. Now here we will describe the exact protocol specifications.  The specifications are in MGCP RFC.  The communication between Call Control and Media Gateway is over UDP or TCP.  MGCP uses standard port 2427 on media gateway and 2727 on-call control application. Means, when a call control sends a request to media gateway destination MGCP port is 2427 and when opposite,  destination MGCP port is 2727. The format of the command is the SDP protocol type.

MGCP Commands :

To set up the call, both ends issues commands to each other. The following are the commands that are present in the MGCP protocol.

  1. End Point Configuration, call control issues this command to set coding standards for an endpoint for the call termination.
  2. Create Connection, call control sends this command to the media gateway to create a connection to terminate in an endpoint.
  3. Notification Command. Using this command, event types are set on media gateway (MG) by the call agent.  These are standard events that are carried in MGCP protocol from MG to a call agent. One example is DTMF.
  4. Notify Command. MG issue command to send events to the Call agent.
  5. Modify connection, for modifying an already-existing connection.
  6. Delete connection, for deleting a connection.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top