What is MGCP Protocol ?

The MGCP full form is 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 telecom network. Voice trunks can be of multiple types e.g E1/T1, Voip, ISDN , analog lines etc.  Call control is an application which handles the singling message for the call and sends the command to the media gateway over MGCP protocol to reserve/release/modify the voice trunks using 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 term the use of MGCP then we will discuss in detail about the mgcp protocol. In other tutorial for ss7 protocol we have discussed about the signaling flow for the Call control.  Here we will discuss about media gateway.

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 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 setup in each direction from the gateway.

Media Gateway , does format conversion too. For example, a PSTN subscriber dials a number in VoIP network. In this case media gateway do 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 describes 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 signaling message for the call, it reserves a media channel in incoming direction. Then forwards the call message towards the terminating switching center and reserves media channel in 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 command is SDP protocol type.

MGCP Commands :

To setup the call, both ends issues commands to each other. Following are calls those are present in MGCP protocol.

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

 

Leave a Reply

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