Configure and Troubleshoot MGCP Gateways: Requirements
Configure and Troubleshoot MGCP Gateways: Requirements
Contents
Introduction
Prerequisites
Requirements
Components Used
Common Definitiions
MGCP Fundamentals
Basic Flow
Endpoint Identifiers
Basic Configuration of MGCP
Gateway CLI Configuration
CUCM Configuration
Endpoint Registration & Call Setup
MGCP Endpoint Registration
MGCP Call Setup
Troubleshoot MGCP
Related Information
Introduction
This document describes the Media Gateway Control Protocol (MGCP) and the mechanisms
behind the Messages. More specifically, it disects an MGCP Message in order to better
understand each of their components, and what makes them important. In addition to the protocol
MGCP as a whole, this document also includes how to configure and troubleshoot MGCP.
This document utilizes configuration examples as well as debug and show command outputs as
reference points. The many features in this document are clearly marked with the version the
feature was introduced to both IOS and IOS-XE.
Prerequisites
Requirements
● There are no formal requirements when you read this document. It is meant to be an
introduction into MGCP.
Components Used
Common Definitiions
Attribute Definition
Call
The Call Control elements that play the Primary role and provide centralized call intelligence.
Agent
Endpoint
The Endpoints are the devices that the Call Agents control. Such as: FXO, FXS, or a DS0 chan
s
PSTN Public Switched Telephone Network
The information in this document was created from the devices in a specific lab environment. All of
the devices used in this document started with a cleared (default) configuration. If your network is
in production, ensure that you understand the potential impact of any command.
MGCP Fundamentals
The Media Gateway Control Protocol (MGCP) is defined by RFC 2705. MGCP is a Call
Agent/Endpoint protocol, where the Endpoint is controlled by a Call Agent of some type. The entire
control intelligence is controlled by a Call Agent who instructs the endpoint what action to take
once an event is detected. MGCP uses TCP port 2428 and UDP port 2427.
TCP port 2428 in MGCP is used to open a new socket with the Call Agent to determine if the
connection can be established. Without this new socket, subsequent MGCP Messages cannot be
exchanged. It is also used to Send/Receive Backhaul Messages between PRI Endpoints and the
Call Agent it is registered to. Finally, TCP port 2428 is used to failover to backup Call Agents in the
event a Primary Call Agent is unresponsive.
UDP Port 2427 in MGCP is used for MGCP Messages exchanged between the Endpoints and the
Call Agents.
Basic Flow
This is an example of a basic MGCP Flow. You can see in the Example that the gateway receives
a new call from the PSTN on this Voice Gateway (Endpoint). The Gateway then notifies the Call
Agent (CUCM) of this new call that is received, the Call Agent then instructs the Gateway to create
a connection for this new call. Finally, the Gateway sends an OK back to the Call Agent to
establish the call.
Endpoint Identifiers
An identifier is needed per endpoint for the Call Agent to be able to determine whom it needs to
send an event, or where an event comes from. Endpoints Identifiers have two main components:
AALN/S1/SU0/[email protected]
S0/SU0/DS1-0@AV-VG200-1
On the Analog Gateway that you plan to register to CUCM, this is the minimal configuration that is
actually required. You only need to add this configuration to start the registration process, as the
rest of the configuration is then downloaded from CUCM:
CUCM Configuration
In order to configure the MGCP Gateway in CUCM you need to log in to Cisco Unified CM
Administration. Once logged in, navigate to Device > Gateway:
The previous selection starts you at the Find and List Gateway page. On this, you want to select
the Add New button with a plus sign:
After you select Add New you are prompted to select a Gateway Type. Use this drop down in
order to select the hardware you plan to register, and select Next to select the protocol you want
for this device (you need to select MGCP):
Now that you have selected the hardware and protocol used, you need to configure the Domain
Name, Cisco Unified Communications Manager Group, and the Module Information. These
are the major fields that are required to register an endpoint via MGCP.
The Domain Name is comprised of 1 to 2 parts. At a minimum in the Domain Name field you need
to enter the Host Name of the router. In my scenario, the Host Name is:
VG320
However, if you have a domain name configured on the gateway, you need to configure the Fully
Qualified Domain Name of this device:
Now, you must hit Save. This updates the page and allow you to select a Subunit now. Once you
select a Subunit, select Save again. You can now see your configurable ports:
In order to configure an endpoint now, click the port in which you have your analog device plugged
into (In our case, it is 0/0/0). Once you select a port you are prompted to configure the port type:
In this case, you select POTS. Once this is selected, you can enter all the necessary values for the
device information like you would for any other Call Manager Endpoint. The only required field is
Device Pool, however you might want to enter values for things such as a Calling Search Space.
Once you have done this, you can then click Save. At this point you now see the left-hand pane
has populated the Add a new DN field for you. You can now associate a DN with this port, save,
and the apply the configuration. Once this is done, back at the port configuration page you can
now see the port as registered:
For an MGCP Endpoint to register to CUCM, the Gateway opens TCP socket 2428 to CUCM, from
here it uses UDP port 2427 to send command messages. Once the socket it open, the Gateway
sends an RSIP Command to the CUCM to inform it that the Endpoint must be taken out of service
while the restart occurs, and CUCM sends a simple acknowledgment to this. After the Restart is
complete, CUCM sends a RQNT with the parameter R: L/hd. What this does is denotes that the
Gateway must notify CUCM of an Off-hook event.
At this point, the CUCM sends an AUEP (Audit Endpoint) to the Gateway to determine the status
of the given Endpoint. The response from the Gateway is an ACK with the endpoints capabilities.
Once this is complete the Endpoint is registered with the CUCM. This is a sample debug output:
You can see that your Call Agent, in this case CUCM, starts with a CRCX that has recvonly to the
Gateway to establish connection for the call. The Gateway responds back with a 200 OK that
contains SDP for what it supports. Once this exchange is done, the CUCM sends an RQNT
message to the Gateway with the parameter S: G/rt. This tells the Gateway to play ringback to the
device. After the far end receives the call, and picks up, CUCM then sends a MDCX with SDP to
the Gateway to let it know of the media information for the far end device. The Gateway sends
back a simple 200 OK to acknowledge this, and at this point you have two-way media.
Now that the call has been answered, CUCM sends another RQNT with the parameter R: D/[0-
9ABCD*#]. This is tells the Gateway to let CUCM know of any DTMF that is pressed while the call
is active so that it can be relayed to the next device.
Once the call is over with, CUCM sends a MDCX to the Gateway with M: recvonly to terminate
the media, followed by a DLCX to disconnect the call. This is a sample debug output:
v=0
c=IN IP4 <Gateway IP>
m=audio 16410 RTP/AVP 0 101 100
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:100 X-NSE/8000
a=fmtp:100 192-194
<---
v=0
o=- 6 0 IN EPN AALN/S0/SU1/[email protected]
s=Cisco SDP 0
t=0 0
m=audio 18946 RTP/AVP 0 101
c=IN IP4 <Phone IP>
a=rtpmap:101 telephone-event
a=fmtp:101 0-15
<---
Troubleshoot MGCP
When you troubleshoot MGCP there are some helpful show commands and debugs that you can
view in order to determine why registration or a call has failed. A great place to start, is to check if
your MGCP Gateway is Registered to the Call Agent. You can check this via the show command
show ccm-manager or show mgcp:
These commands have been shortened to contain just the pertinent output. For additional
information, you can look at these show outputs:
show mgcp
show mgcp endpoint
show mgcp connection
show ccm-manager
show voice port summary
show isdn status
show controller [t1/e1] x/x/x
show call active voice brief
show voice call summary
show voice call status
If the previous show commands check out, you can run these debugs on the device to further
determine why your call has failed:
The previous debugs are a great place to start for what you need to troubleshoot registration and
call setup issues.
Related Information
RFC 2705:
https://tools.ietf.org/html/rfc2705#section-2.3.2