MGCP

Media Gateway Control Protocol or MGCP is a protocol used for controlling Voice over IP or VoIP calls by external call control elements known as media gateway controllers or MGCs or call agents. MGCP allows for the registration of remote Gateway resources such as FXO, FXS, PRI ISDN channels etc. With the MGCP the Router or Voice Gateway is really unaware of the fact that it’s a voice gateway.   

Protocols 

Basically MGCP utilizes three Layer 4 protocols. Two of them UDP, and the other TCP. The UDP port 2427 is used for Call Control setup and teardown, and the other 2727 is used for the Calling Agent. TCP port 2428 for back hauling and keepalive traffic to the Call Manager cluster.

  • UDP 2427 Call Control
  • TCP 2727 Calling Agent
  • TCP 2428 Keepalive & Backhaul

Endpoints

MGCP endpoints are basically made up of any voice related ports on the gateway such as a Router or Voice Gateway device such as a VG204. These voice ports provide connectivity to both analog ports such as Foreign Exchange Office or FXO Foreign Exchange Station or FXS and Digital Trunks such as a T1/E1 to the PSTN. Ports on gateways are identified by endpoints in very specific ways. It is important to note that Gateways can have multiple endpoints depending on the number of ports it contains. Endpoints can also be made of of individual ISDN channels along with the D channel for control.


Displaying basic MGCP related endpoint’s.

RTR#show mgcp endpoints
aaln/S0/0@RTR
aaln/S0/1@RTR
aaln/S0/2@RTR
aaln/S0/3@RTR
RTR#

Media & Control 

As mentioned above their are two main protocols used within MGCP for Call Control. Basically one is for Media, and the other for Control. For consistent call quality, and control it’s always good practice to bind bot. For example lets say that all voice related traffic is being sourced from subinterface f0/0.2 on the the Router. In this case we would bind  Media, and Control as follows.

RTR#configure terminal
RTR(config)#mgcp bind control source-interface FastEthernet0/0.2
RTR(config)#mgcp bind media source-interface FastEthernet0/0.2
RTR(config)#exit
RTR#

QoS Considerations

By default MGCP uses Class Selector 3 ( CS3 ) or DSCP AF31 for Call Control. You’ll also notice the media or RTP is classified as Expedited Forwarding or EF. You can easily verify this by simply doing the following.  

RTR#show mgcp | include af31
MGCP media (RTP) dscp: ef, MGCP signaling dscp: af31
RTR#

Faxing Protocols

  • Cisco FAX Wiki
  • T.37 Store and Forward
  • T.38 
  • Modem Pass Through
  • Modem Relay

Troubleshooting

Lets say you have an ISDN PRI / PSTN Gateway, and a VG204 for POTS / FXS with Analog devices such as Faxes, and or Credit Card machines hanging off of it. One of the things you might want to make sure of is the Fax protocol between the two Gateways matches. If you choose to use Modem Pass Through or T.38 Fax Relay just be sure to they are configured the same way on both Gateways.

Lets say you have a Cisco 2901 Router with a host name of RTR, and a VG204 with of the host name of VG-1, and you want to verify that they are both running the same Fax Protocol. You could simply check the MGCP Fax protocols to make sure they match.

RTR#show running-config | section mgcp
mgcp
mgcp call-agent 192.168.0.20 2427 service-type mgcp version 0.1
mgcp rtp unreachable timeout 1000 action notify
mgcp package-capability rtp-package
mgcp package-capability sst-package
mgcp package-capability pre-package
mgcp default-package fxr-package
no mgcp package-capability res-package
no mgcp timer receive-rtcp
mgcp sdp simple
mgcp fax t38 nsf 000000
mgcp bind control source-interface FastEthernet0/0.2
mgcp bind media source-interface FastEthernet0/0.2
mgcp profile default service mgcpapp mgcpapp 
RTR#

Now lets do the same thing on the VG204.

VG-1#show running-config | section mgcp
mgcp
mgcp call-agent 192.168.0.20 2427 service-type mgcp version 0.1
mgcp rtp unreachable timeout 1000 action notify
mgcp package-capability rtp-package
mgcp package-capability sst-package
mgcp default-package fxr-package
no mgcp package-capability res-package
no mgcp timer receive-rtcp
mgcp sdp simple
mgcp fax rate 7200
mgcp fax t38 nsf 000000
mgcp rtp payload-type g726r16 static
mgcp bind control source-interface FastEthernet0/0
mgcp bind media source-interface FastEthernet0/0
mgcp profile default
VG-1#

Routing Switching Voice Firewall Wireless