Network Working Group M. Arango
Request for Comments: 2705 RSL COM
Category: Informational A. Dugan
I. Elliott
Level3 Communications
C. Huitema
Telcordia
S. Pickett
Vertical Networks
October 1999
Media Gateway Control Protocol (MGCP)
Version 1.0
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (1999). All Rights Reserved.
IESG NOTE:
This document is being published for the information of the
community. It describes a protocol that is currently being deployed
in a number of products. Implementers should be aware of
developments in the IETF Megaco Working Group and ITF-T SG16 who are
currently working on a potential successor to this protocol.
Abstract
This document describes an application programming interface and a
corresponding protocol (MGCP) for controlling Voice over IP (VoIP)
Gateways from external call control elements. MGCP assumes a call
control architecture where the call control "intelligence" is outside
the gateways and handled by external call control elements.
The document is structured in 6 main sections:
to other protocols such as H.323, RTSP, SAP or SIP.
Arango, et al. Informational [Page 1]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
presenting the naming conventions, the usage of the session
description protocol SDP, and the procedures that compose MGCP:
Notifications Request, Notification, Create Connection, Modify
Connection, Delete Connection, AuditEndpoint, AuditConnection and
RestartInProgress.
which are based on simple text formats, and the transmission
procedure over UDP.
and its usage of IP security services (IPSEC).
packages and event names.
to create MGCP 1.0.
Table of Contents
1. Introduction .............................................. 5
1.1. Relation with the H.323 standards .................... 7
1.2. Relation with the IETF standards ..................... 8
1.3. Definitions .......................................... 9
2. Media Gateway Control Interface ........................... 9
2.1. Model and naming conventions. ........................ 10
2.1.1. Types of endpoints .............................. 10
2.1.1.1. Digital channel (DS0) ...................... 11
2.1.1.2. Analog line ................................ 11
2.1.1.3. Annoucement server access point ............ 12
2.1.1.4. Interactive Voice Response access point .... 12
2.1.1.5. Conference bridge access point ............. 13
2.1.1.6. Packet relay ............................... 13
2.1.1.7. Wiretap access point ....................... 14
2.1.1.8. ATM "trunk side" interface. ................ 14
2.1.2. Endpoint identifiers ............................ 15
2.1.3. Calls and connections ........................... 17
2.1.3.1. Names of calls ............................. 20
2.1.3.2. Names of connections ....................... 20
2.1.3.3. Management of resources, attributes of ..... 20
2.1.3.4. Special case of local connections .......... 23
2.1.4. Names of Call Agents and other entities ......... 23
2.1.5. Digit maps ...................................... 24
2.1.6. Names of events ................................. 26
2.2. Usage of SDP ......................................... 29
2.3. Gateway Control Commands ............................. 30
Arango, et al. Informational [Page 2]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.3.1. EndpointConfiguration ........................... 32
2.3.2. NotificationRequest ............................. 33
2.3.3. CreateConnection ................................ 38
2.3.4. ModifyConnection ................................ 44
2.3.5. DeleteConnection (from the Call Agent) .......... 46
2.3.6. DeleteConnection (from the VoIP gateway) ........ 51
2.3.7. DeleteConnection (multiple connections, from the 51
2.3.8. Audit Endpoint .................................. 52
2.3.9. Audit Connection ................................ 55
2.3.10. Restart in progress ............................ 56
2.4. Return codes and error codes. ........................ 58
2.5. Reason Codes ......................................... 61
3. Media Gateway Control Protocol ............................ 61
3.1. General description .................................. 62
3.2. Command Header ....................................... 62
3.2.1. Command line .................................... 62
3.2.1.1. Coding of the requested verb ............... 63
3.2.1.2. Transaction Identifiers .................... 63
3.2.1.3. Coding of the endpoint identifiers and ..... 64
3.2.1.4. Coding of the protocol version ............. 65
3.2.2. Parameter lines ................................. 65
3.2.2.1. Response Acknowledgement ................... 68
3.2.2.2. Local connection options ................... 68
3.2.2.3. Capabilities ............................... 70
3.2.2.4. Connection parameters ...................... 71
3.2.2.5. Reason Codes ............................... 72
3.2.2.6. Connection mode ............................ 73
3.2.2.7. Coding of event names ...................... 73
3.2.2.8. RequestedEvents ............................ 74
3.2.2.9. SignalRequests ............................. 76
3.2.2.10. ObservedEvent ............................. 76
3.2.2.11. RequestedInfo ............................. 76
3.2.2.12. QuarantineHandling ........................ 77
3.2.2.13. DetectEvents .............................. 77
3.2.2.14. EventStates ............................... 77
3.2.2.15. RestartMethod ............................. 78
3.2.2.16. Bearer Information ........................ 78
3.3. Format of response headers ........................... 78
3.4. Formal syntax description of the protocol ............ 81
3.5. Encoding of the session description .................. 86
3.5.1. Usage of SDP for an audio service ............... 86
3.5.2. Usage of SDP in a network access service ........ 87
3.5.3. Usage of SDP for ATM connections ................ 90
3.5.4. Usage of SDP for local connections .............. 91
3.6. Transmission over UDP ................................ 91
3.6.1. Providing the At-Most-Once functionality ........ 91
3.6.2. Transaction identifiers and three ways handshake. 92
3.6.3. Computing retransmission timers ................. 93
Arango, et al. Informational [Page 3]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
3.6.4. Piggy backing ................................... 94
3.6.5. Provisional responses ........................... 94
4. States, failover and race conditions. ..................... 95
4.1. Basic Asumptions ..................................... 95
4.2. Security, Retransmission, and Detection of Lost ...... 96
4.3. Race conditions ...................................... 99
4.3.1. Quarantine list ................................. 99
4.3.2. Explicit detection ..............................103
4.3.3. Ordering of commands, and treatment of disorder .104
4.3.4. Fighting the restart avalanche ..................105
4.3.5. Disconnected Endpoints ..........................107
1. A "disconnected" timer is initialized to a random value, .107
2. The gateway then waits for either the end of this timer, .107
3. When the "disconnected" timer elapses, when a command is .107
4. If the "disconnected" procedure still left the endpoint ..107
5. Security requirements .....................................108
5.1. Protection of media connections ......................109
6. Event packages and end point types ........................109
6.1. Basic packages .......................................110
6.1.1. Generic Media Package ...........................110
6.1.2. DTMF package ....................................112
6.1.3. MF Package ......................................113
6.1.4. Trunk Package ...................................114
6.1.5. Line Package ....................................116
6.1.6. Handset emulation package .......................119
6.1.7. RTP Package .....................................120
6.1.8. Network Access Server Package ...................121
6.1.9. Announcement Server Package .....................122
6.1.10. Script Package .................................122
6.2. Basic endpoint types and profiles ....................123
7. Versions and compatibility ................................124
7.1. Differences between version 1.0 and draft 0.5 ........124
7.2. Differences between draft-04 and draft-05 ............125
7.3. Differences between draft-03 and draft-04 ............125
7.4. Differences between draft-02 and draft-03 ............125
7.5. Differences between draft-01 and draft-02 ............126
7.6. The making of MGCP from IPDC and SGCP ................126
7.7. Changes between MGCP and initial versions of SGCP ....126
8. Security Considerations ...................................128
9. Acknowledgements ..........................................128
10. References ................................................129
11. Authors' Addresses ........................................130
12. Appendix A: Proposed "MoveConnection" command .............132
12.1. Proposed syntax modification ........................133
13. Full Copyright Statement ..................................134
Arango, et al. Informational [Page 4]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
1. Introduction
This document describes an abstract application programming interface
and a corresponding protocol (MGCP) for controlling Telephony
Gateways from external call control elements called media gateway
controllers or call agents. A telephony gateway is a network element
that provides conversion between the audio signals carried on
telephone circuits and data packets carried over the Internet or over
other packet networks. Example of gateways are:
and a Voice over IP network. Such gateways typically manage a
large number of digital circuits.
over IP trunking gateways, except that they interface to an ATM
network.
interface to a Voice over IP network. Examples of residential
gateways include cable modem/cable set-top boxes, xDSL devices,
broad-band wireless devices
digital PBX interface to a Voice over IP network. Examples of
access gateways include small-scale voice over IP gateways.
interface or an integrated "soft PBX" interface to a Voice over IP
network.
circuit and provide data access to the Internet. We expect that,
in the future, the same gateways will combine Voice over IP
services and Network Access services.
interface to an external call control element.
MGCP assumes a call control architecture where the call control
"intelligence" is outside the gateways and handled by external call
control elements. The MGCP assumes that these call control elements,
or Call Agents, will synchronize with each other to send coherent
commands to the gateways under their control. MGCP does not define a
mechanism for synchronizing Call Agents. MGCP is, in essence, a
master/slave protocol, where the gateways are expected to execute
commands sent by the Call Agents. In consequence, this document
specifies in great detail the expected behavior of the gateways, but
Arango, et al. Informational [Page 5]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
only specify those parts of a call agent implementation, such as
timer management, that are mandated for proper operation of the
protocol.
MGCP assumes a connection model where the basic constructs are
endpoints and connections. Endpoints are sources or sinks of data and
could be physical or virtual. Examples of physical endpoints are:
PSTN switch (e.g., Class 5, Class 4, etc.). A gateway that
terminates trunks is called a trunk gateway.
connection to a phone, key system, PBX, etc. A gateway that
terminates residential POTS lines (to phones) is called a
residential gateway.
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.
Connections may be either point to point or multipoint. A point to
point connection is an association between two endpoints with the
purpose of transmitting data between these endpoints. Once this
association is established for both endpoints, data transfer between
these endpoints can take place. A multipoint connection is
established by connecting the endpoint to a multipoint session.
Connections can be established over several types of bearer networks:
network.
layer, over an ATM network.
the TDM backplane or the interconnection bus of a gateway. This is
used, in particular, for "hairpin" connections, connections that
terminate in a gateway but are immediately rerouted over the
telephone network.
For point-to-point connections the endpoints of a connection could be
in separate gateways or in the same gateway.
Arango, et al. Informational [Page 6]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
1.1. Relation with the H.323 standards
MGCP is designed as an internal protocol within a distributed system
that appears to the outside as a single VoIP gateway. This system is
composed of a Call Agent, that may or may not be distributed over
several computer platforms, and of a set of gateways, including at
least one "media gateway" that perform the conversion of media
signals between circuits and packets, and at least one "signalling
gateway" when connecting to an SS7 controlled network. In a typical
configuration, this distributed gateway system will interface on one
side with one or more telephony (i.e. circuit) switches, and on the
other side with H.323 conformant systems, as indicated in the
following table:
___________________________________________________________________
| Functional| Phone | Terminating | H.323 conformant |
| Plane | switch | Entity | systems |
|___________|____________|_________________|_______________________|
| Signaling | Signaling | Call agent | Signaling exchanges |
| Plane | exchanges | | with the call agent |
| | through | | through H.225/RAS and|
| | SS7/ISUP | | H.225/Q.931. |
|___________|____________|_________________|_______________________|
| | | | Possible negotiation |
| | | | of logical channels |
| | | | and transmission |
| | | | parameters through |
| | | | H.245 with the call |
| | | | agent. |
|___________|____________|_________________|_______________________|
| | | Internal | |
| | | synchronization| |
| | | through MGCP | |
|___________|____________|_________________|_______________________|
| Bearer | Connection| Telephony | Transmission of VOIP |
| Data | through | gateways | data using RTP |
| Transport | high speed| | directly between the |
| Plane | trunk | | H.323 station and the|
| | groups | | gateway. |
|___________|____________|_________________|_______________________|
In the MGCP model, the gateways focus on the audio signal translation
function, while the Call Agent handles the signaling and call
processing functions. As a consequence, the Call Agent implements the
"signaling" layers of the H.323 standard, and presents itself as an
"H.323 Gatekeeper" or as one or more "H.323 Endpoints" to the H.323
systems.
Arango, et al. Informational [Page 7]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
1.2. Relation with the IETF standards
While H.323 is the recognized standard for VoIP terminals, the IETF
has also produced specifications for other types of multi-media
applications. These other specifications include:
the Session Description Protocol (SDP),
RFC 2327,
the Real Time Streaming Protocol (RTSP),
RFC 2326.
The latter three specifications are in fact alternative signaling
standards that allow for the transmission of a session description to
an interested party. SAP is used by multicast session managers to
distribute a multicast session description to a large group of
recipients, SIP is used to invite an individual user to take part in
a point-to-point or unicast session, RTSP is used to interface a
server that provides real time data. In all three cases, the session
description is described according to SDP; when audio is transmitted,
it is transmitted through the Real-time Transport Protocol, RTP.
The distributed gateway systems and MGCP will enable PSTN telephony
users to access sessions set up using SAP, SIP or RTSP. The Call
Agent provides for signaling conversion, according to the following
table:
Arango, et al. Informational [Page 8]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
_____________________________________________________________________
| Functional| Phone | Terminating | IETF conforming systems|
| Plane | switch | Entity | |
|___________|____________|_________________|_________________________|
| Signaling | Signaling | Call agent | Signaling exchanges |
| Plane | exchanges | | with the call agent |
| | through | | through SAP, SIP or |
| | SS7/ISUP | | RTSP. |
|___________|____________|_________________|_________________________|
| | | | Negotiation of session |
| | | | description parameters |
| | | | through SDP (telephony |
| | | | gateway terminated but |
| | | | passed via the call |
| | | | agent to and from the |
| | | | IETF conforming system)|
|___________|____________|_________________|_________________________|
| | | Internal | |
| | | synchronization| |
| | | through MGCP | |
|___________|____________|_________________|_________________________|
| Bearer | Connection| Telephony | Transmission of VoIP |
| Data | through | gateways | data using RTP, |
| Transport | high speed| | directly between the |
| Plane | trunk | | remote IP end system |
| | groups | | and the gateway. |
|___________|____________|_________________|_________________________|
The SDP standard has a pivotal status in this architecture. We will
see in the following description that we also use it to carry session
descriptions in MGCP.
1.3. Definitions
Trunk: A communication channel between two switching systems. E.g., a
DS0 on a T1 or E1 line.
2. Media Gateway Control Interface
The interface functions provide for connection control and endpoint
control. Both use the same system model and the same naming
conventions.
Arango, et al. Informational [Page 9]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1. Model and naming conventions
The MGCP assumes a connection model where the basic constructs are
endpoints and connections. Connections are grouped in calls. One or
more connections can belong to one call. Connections and calls are
set up at the initiative of one or several Call Agents.
2.1.1. Types of endpoints
In the introduction, we presented several classes of gateways. Such
classifications, however, can be misleading. Manufacturers can
arbitrarily decide to provide several types of services in a single
packaging. A single product could well, for example, provide some
trunk connections to telephony switches, some primary rate
connections and some analog line interfaces, thus sharing the
characteristics of what we described in the introduction as
"trunking", "access" and "residential" gateways. MGCP does not make
assumptions about such groupings. We simply assume that media
gateways support collections of endpoints. The type of the endpoint
determines its functionalities. Our analysis, so far, has led us to
isolate the following basic endpoint types:
In this section, we will develop the expected behavior of such end
points.
This list is not limitative. There may be other types of endpoints
defined in the future, for example test endpoint that could be used
to check network quality, or frame-relay endpoints that could be used
to managed audio channels multiplexed over a frame-relay virtual
circuit.
Arango, et al. Informational [Page 10]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1.1.1. Digital channel (DS0)
Digital channels provide an 8Khz*8bit service. Such channels are
found in trunk and ISDN interfaces. They are typically part of
digital multiplexes, such as T1, E1, T3 or E3 interfaces. Media
gateways that support such channels are capable of translating the
digital signals received on the channel, which may be encoded
according to A or mu-law, using either the complete set of 8 bits or
only 7 of these bits, into audio packets. When the media gateway
also supports a NAS service, the gateway shall be capable of
receiving either audio-encoded data (modem connection) or binary data
(ISDN connection) and convert them into data packets.
+-------
+------------+|
(channel) ===|DS0 endpoint| -------- Connections
+------------+|
+-------
Media gateways should be able to establish several connections
between the endpoint and the packet networks, or between the endpoint
and other endpoints in the same gateway. The signals originating
from these connections shall be mixed according to the connection
"mode", as specified later in this document. The precise number of
connections that an endpoint support is a characteristic of the
gateway, and may in fact vary according with the allocation of
resource within the gateway.
In some cases, digital channels are used to carry signalling. This
is the case for example of SS7 "F" links, or ISDN "D" channels.
Media gateways that support these signalling functions shall be able
to send and receive the signalling packets to and from a call agent,
using the "back haul" procedures defined by the SIGTRAN working group
of the IETF. Digital channels are sometimes used in conjunction with
channel associated signalling, such as "MF R2". Media gateways that
support these signalling functions shall be able to detect and
produce the corresponding signals, such as for example "wink" or "A",
according to the event signalling and reporting procedures defined in
MGCP.
2.1.1.2. Analog line
Analog lines can be used either as a "client" interface, providing
service to a classic telephone unit, or as a "service" interface,
allowing the gateway to send and receive analog calls. When the
media gateway also supports a NAS service, the gateway shall be
capable of receiving audio-encoded data (modem connection) and
convert them into data packets.
Arango, et al. Informational [Page 11]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
+-------
+---------------+|
(line) ===|analog endpoint| -------- Connections
+---------------+|
+-------
Media gateways should be able to establish several connections
between the endpoint and the packet networks, or between the endpoint
and other endpoints in the same gateway. The audio signals
originating from these connections shall be mixed according to the
connection "mode", as specified later in this document. The precise
number of connections that an endpoint support is a characteristic of
the gateway, and may in fact vary according with the allocation of
resource within the gateway. A typical gateway should however be
able to support two or three connections per endpoint, in order to
provide services such as "call waiting" or "three ways calling".
2.1.1.3. Annoucement server access point
An announcement server endpoint provides acces to an announcement
service. Under requests from the call agent, the announcement server
will "play" a specified announcement. The requests from the call
agent will follow the event signalling and reporting procedures
defined in MGCP.
+----------------------+
| Announcement endpoint| -------- Connection
+----------------------+
A given announcement endpoint is not supposed to support more than
one connection at a time. If several connections were established to
the same endpoint, then the same announcements would be played
simultaneously over all the connections.
Connections to an announcement server are typically oneway, or "half
duplex" -- the announcement server is not expected to listen the
audio signals from the connection.
2.1.1.4. Interactive Voice Response access point
An Interactive Voice Response (IVR) endpoint provides acces to an IVR
service. Under requests from the call agent, the IVR server will
"play" announcements and tones, and will "listen" to responses from
the user. The requests from the call agent will follow the event
signalling and reporting procedures defined in MGCP.
Arango, et al. Informational [Page 12]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
+-------------+
| IVR endpoint| -------- Connection
+-------------+
A given IVR endpoint is not supposed to support more than one
connection at a time. If several connections were established to the
same endpoint, then the same tones and announcements would be played
simultaneously over all the connections.
2.1.1.5. Conference bridge access point
A conference bridge endpoint is used to provide access to a specific
conference.
+-------
+--------------------------+|
|Conference bridge endpoint| -------- Connections
+--------------------------+|
+-------
Media gateways should be able to establish several connections
between the endpoint and the packet networks, or between the endpoint
and other endpoints in the same gateway. The signals originating
from these connections shall be mixed according to the connection
"mode", as specified later in this document. The precise number of
connections that an endpoint support is a characteristic of the
gateway, and may in fact vary according with the allocation of
resource within the gateway.
2.1.1.6. Packet relay
A packet relay endpoint is a specific form of conference bridge, that
typically only supports two connections. Packets relays can be found
in firewalls between a protected and an open network, or in
transcoding servers used to provide interoperation between
incompatible gateways, for example gateways that do not support
compatible compression algorithms, or gateways that operate over
different transmission networks such as IP and ATM.
+-------
+---------------------+ |
|Packet relay endpoint| 2 connections
+---------------------+ |
+-------
Arango, et al. Informational [Page 13]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1.1.7. Wiretap access point
A wiretap access point provides access to a wiretap service,
providing either a recording or a life playback of a connection.
+-----------------+
| Wiretap endpoint| -------- Connection
+-----------------+
A given wiretap endpoint is not supposed to support more than one
connection at a time. If several connections were established to the
same endpoint, then the recording or playback would mix the audio
signals received on this connections.
Connections to an wiretap endpoint are typically oneway, or "half
duplex" -- the wiretap server is not expected to signal its presence
in a call.
2.1.1.8. ATM "trunk side" interface.
ATM "trunk side" endpoints are typically found when one or several
ATM permanent virtual circuits are used as a replacement for the
classic "TDM" trunks linking switches. When ATM/AAL2 is used,
several trunks or channels are multiplexed on a single virtual
circuit; each of these trunks correspond to a single endpoint.
+-------
+------------------+|
(channel) = |ATM trunk endpoint| -------- Connections
+------------------+|
+-------
Media gateways should be able to establish several connections
between the endpoint and the packet networks, or between the endpoint
and other endpoints in the same gateway. The signals originating
from these connections shall be mixed according to the connection
"mode", as specified later in this document. The precise number of
connections that an endpoint support is a characteristic of the
gateway, and may in fact vary according with the allocation of
resource within the gateway.
Arango, et al. Informational [Page 14]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1.2. Endpoint identifiers
Endpoints identifiers have two components that both are case
insensitive:
The syntax of the local name depends on the type of endpoint being
named. However, the local name for each of these types is naturally
hierarchical, beginning with a term which identifies the physical
gateway containing the given endpoint and ending in a term which
specifies the individual endpoint concerned. With this in mind, the
following rules for construction and interpretation of the Entity
Name field for these entity types MUST be supported:
1) The individual terms of the naming path MUST be separated by a
single slash ("/", ASCII 2F hex).
2) The individual terms are character strings composed of letters,
digits or other printable characters, with the exception of
characters used as delimitors ("/", "@"), characters used for
wildcarding ("*", "$") and white spaces.
3) Wild-carding is represented either by an asterisk ("*") or a
dollar sign ("$") for the terms of the naming path which are to be
wild-carded. Thus, if the full naming path looks like
term1/term2/term3
then the Entity Name field looks like this depending on which
terms are wild-carded:
term1/*/term3 if term2 is wild-carded
term1/term2/* if term3 is wild-carded
term1/*/* if term2 and term3 are wild-carded,
etc.
In each of these examples a dollar sign could have appeared
instead of an asterisk.
Arango, et al. Informational [Page 15]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
4) A term represented by an asterisk is to be interpreted as: "use
ALL values of this term known within the scope of the Media
Gateway". A term represented by a dollar sign is to be
interpreted as: "use ANY ONE value of this term known within the
scope of the Media Gateway". The description of a specific
command may add further criteria for selection within the general
rules given here.
If the Media Gateway controls multiple physical gateways, the first
term of the naming MUST identify the physical gateway containing the
desired entity. If the Media Gateway controls only a single physical
gateway, the first term of the naming string MAY identify that
physical gateway, depending on local practice. A local name that is
composed of only a wildcard character refers to either all (*) or any
($) endpoints within the media gateway.
In the case of trunking gateways, endpoints are trunk circuits
linking a gateway to a telephone switch. These circuits are typically
grouped into a digital multiplex, that is connected to the gateway by
a physical interface. Such circuits are named in three contexts:
identified by the SS7 point codes of the switches that the group
connects. Circuits within a trunk group are identified by a
circuit number (CIC in ISUP).
typically identified by the name of the interface, an arbitrary
text string. When the interface multiplexes several circuits,
individual circuits are typically identified by a circuit number.
The Call Agents use configuration databases to map ranges of circuit
numbers within an ISUP trunk group to corresponding ranges of
circuits in a multiplex connected to a gateway through a physical
interface. The gateway will be identified, in MGCP, by a domain name.
The local name will be structured to encode both the name of the
physical interface, for example X35V3+A4, and the circuit number
within the multiplex connected to the interface, for example 13. The
circuit number will be separated from the name of the interface by a
fraction bar, as in:
X35V3+A4/13
Arango, et al. Informational [Page 16]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Other types of endpoints will use different conventions. For example,
in gateways were physical interfaces by construction only control one
circuit, the circuit number will be omitted. The exact syntax of such
names should be specified in the corresponding server specification.
2.1.3. Calls and connections
Connections are created on the call agent on each endpoint that will
be involved in the "call." In the classic example of a connection
between two "DS0" endpoints (EP1 and EP2), the call agents
controlling the end points will establish two connections (C1 and
C2):
+---+ +---+
(channel1) ===|EP1|--(C1)--... ...(C2)--|EP2|===(channel2)
+---+ +---+
Each connection will be designated locally by a connection
identifier, and will be characterized by connection attributes.
When the two endpoints are located on gateways that are managed by
the same call agent, the creation is done via the three following
steps:
1) The call agent asks the first gateway 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." The session description contains the information
necessary for a third party to send packets towards the newly
created connection, such as for example IP address, UDP port, and
packetization parameters.
2) The call agent then 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."
3) The call agent uses a "modify connection" command to provide this
second "session description" to the first endpoint. Once this is
done, communication can proceed in both directions.
When the two endpoints are located on gateways that are managed by
the different call agents, these two call agents shall exchange
information through a call-agent to call-agent signalling protocol,
in order to synchronize the creation of the connection on the two
endpoints.
Arango, et al. Informational [Page 17]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Once established, the connection parameters can be modified at any
time by a "modify connection" command. The call agent may for
example instruct the gateway to change the compression algorithm used
on a connection, or to modify the IP address and UDP port to which
data should be sent, if a connection is "redirected."
The call agent removes a connection by sending to the gateway a
"delete connection" command. The gateway may also, under some
circumstances, inform a gateway that a connection could not be
sustained.
The following diagram provides a view of the states of a connection,
as seen from the gateway:
Arango, et al. Informational [Page 18]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Create connection
received
|
V
+-------------------+
|resource allocation|-(failed)-+
+-------------------+ |
| (connection refused)
(successful)
|
v
+----------->+
| |
| +-------------------+
| | remote session |
| | description |----------(yes)--------+
| | available ? | |
| +-------------------+ |
| | |
| (no) |
| | |
| +-----------+ +------+
| +--->| half open |------> Delete <-------| open |<----------+
| | | (wait) | Connection |(wait)| |
| | +-----------+ received +------+ |
| | | | | |
| | Modify Connection | Modify Connection |
| | received | received |
| | | | | |
| | +--------------------+ | +--------------------+ |
| | |assess modification | | |assess modification | |
| | +--------------------+ | +--------------------+ |
| | | | | | | |
| |(failed) (successful) | (failed) (successful) |
| | | | | | | |
| +<---+ | | +-------------+-------+
| | |
+<-------------------+ |
|
+-----------------+
| Free connection |
| resources. |
| Report. |
+-----------------+
|
V
Arango, et al. Informational [Page 19]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1.3.1. Names of calls
One of the attributes of each connection is the "call identifier."
Calls are identified by unique identifiers, independent of the
underlying platforms or agents. These identifiers are created by the
Call Agent. They are treated in MGCP as unstructured octet strings.
Call identifiers are expected to be unique within the system, or at a
minimum, unique within the collection of Call Agents that control the
same gateways. When a Call Agent builds several connections that
pertain to the same call, either on the same gateway or in different
gateways, these connections that belong to the same call share the
same call-id. This identifier can then be used by accounting or
management procedures, which are outside the scope of MGCP.
2.1.3.2. Names of connections
Connection identifiers are created by the gateway when it is
requested to create a connection. They identify the connection within
the context of an endpoint. They are treated in MGCP as unstructured
octet strings. The gateway should make sure that a proper waiting
period, at least 3 minutes, elapses between the end of a connection
that used this identifier and its use in a new connection for the
same endpoint. (Gateways may decide to use identifiers that are
unique within the context of the gateway.)
2.1.3.3. Management of resources, attributes of connections
Many types of resources will be associated to a connection, such as
specific signal processing functions or packetization functions.
Generally, these resources fall in two categories:
1) Externally visible resources, that affect the format of "the bits
on the network" and must be communicated to the second endpoint
involved in the connection.
2) Internal resources, that determine which signal is being sent over
the connection and how the received signals are processed by the
endpoint.
The resources allocated to a connection, and more generally the
handling of the connection, are chosen by the gateway under
instructions from the call agent. The call agent will provide these
instructions by sending two set of parameters to the gateway:
1) The local directives instruct the gateway on the choice of
resources that should be used for a connection,
Arango, et al. Informational [Page 20]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2) When available, the "session description" provided by the other
end of the connection.
The local directives specify such parameters as the mode of the
connection (e.g. send only, send-receive), preferred coding or
packetization methods, usage of echo cancellation or silence
suppression. (A detailed list can be found in the specification of
the LocalConnectionOptions parameter of the CreateConnection
command.) For each of these parameters, the call agent can either
specify a value, a range of value, or no value at all. This allow
various implementations to implement various level of control, from a
very tight control where the call agent specifies minute details of
the connection handling to a very loose control where the call agent
only specifies broad guidelines, such as the maximum bandwidth, and
let the gateway choose the detailed values.
Based on the value of the local directives, the gateway will
determine the resources allocated to the connection. When this is
possible, the gateway will choose values that are in line with the
remote session description - but there is no absolute requirement
that the parameters be exactly the same.
Once the resource have been allocated, the gateway will compose a
"session description" that describes the way it intends to receive
packets. Note that the session description may in some cases present
a range of values. For example, if the gateway is ready to accept
one of several compression algorithm, it can provide a list of these
accepted algorithms.
Arango, et al. Informational [Page 21]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Local Directives
(from call agent 1)
|
V
+-------------+
| resources |
| allocation |
| (gateway 1) |
+-------------+
| |
V |
Local |
Parameters V
| Session
| Description Local Directives
| | (from call agent 2)
| +---> Transmission----+ |
| (CA to CA) | |
| V V
| +-------------+
| | resources |
| | allocation |
| | (gateway 2) |
| +-------------+
| | |
| | V
| | Local
| | Parameters
| Session
| Description
| +---- Transmission<---+
| | (CA to CA)
V V
+-------------+
| modification|
| (gateway 1) |
+-------------+
|
V
Local
Parameters
- Information flow: local directives & session descriptions –
Arango, et al. Informational [Page 22]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1.3.4. Special case of local connections
Large gateways include a large number of endpoints which are often of
different types. In some networks, we may often have to set-up
connections between endpoints that are located within the same
gateway. Examples of such connections may be:
described as a "hairpin" connection.
Local connections are much simpler to establish than network
connections. In most cases, the connection will be established
through some local interconnecting device, such as for example a TDM
bus.
When two endpoints are managed by the same gateway, it is possible to
specify the connection in a single command that conveys the name of
the two endpoints that will be connected. The command is essentially
a "Create Connection" command which includes the name of the second
endpoint in lieu of the "remote session description."
2.1.4. Names of Call Agents and other entities
The media gateway control protocol has been designed to allow the
implementation of redundant Call Agents, for enhanced network
reliability. This means that there is no fixed binding between
entities and hardware platforms or network interfaces.
Reliability can be improved by the following precautions:
domain name, not their network addresses. Several addresses can be
associated with a domain name. If a command or a response cannot
be forwarded to one of the network addresses, implementations
should retry the transmission using another address.
logical name (domain name) and the actual platform are kept in the
domain name service. Call Agents and Gateways should keep track of
the time-to-live of the record they read from the DNS. They should
query the DNS to refresh the information if the time to live has
expired.
Arango, et al. Informational [Page 23]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
In addition to the indirection provided by the use of domain names
and the DNS, the concept of "notified entity" is central to
reliability and fail-over in MGCP. The "notified entity" for an
endpoint is the Call Agent currently controlling that endpoint. At
any point in time, an endpoint has one, and only one, "notified
entity" associated with it, and when the endpoint needs to send a
command to the Call Agent, it MUST send the command to the current
"notified entity" for which endpoint(s) the command pertains. Upon
startup, the "notified entity" MUST be set to a provisioned value.
Most commands sent by the Call Agent include the ability to
explicitly name the "notified entity" through the use of a
"NotifiedEntity" parameter. The "notified entity" will stay the same
until either a new "NotifiedEntity" parameter is received or the
endpoint reboots. If the "notified entity" for an endpoint is empty
or has not been set explicitly, the "notified entity" will then
default to the source address of the last connection handling command
or notification request received for the endpoint. Auditing will thus
not change the "notified entity."
2.1.5. Digit maps
The Call Agent can ask the gateway to collect digits dialed by the
user. This facility is intended to be used with residential gateways
to collect the numbers that a user dials; it may also be used with
trunking gateways and access gateways alike, to collect the access
codes, credit card numbers and other numbers requested by call
control services.
An alternative procedure is for the gateway to notify the Call Agent
of the dialed digits, as soon as they are dialed. However, such a
procedure generates a large number of interactions. It is preferable
to accumulate the dialed numbers in a buffer, and to transmit them in
a single message.
The problem with this accumulation approach, however, is that it is
hard for the gateway to predict how many numbers it needs to
accumulate before transmission. For example, using the phone on our
desk, we can dial the following numbers:
Arango, et al. Informational [Page 24]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
_______________________________________________________
| 0 | Local operator |
| 00 | Long distance operator |
| xxxx | Local extension number |
| 8xxxxxxx | Local number |
| #xxxxxxx | Shortcut to local number at|
| | other corporate sites |
| *xx | Star services |
| 91xxxxxxxxxx | Long distance number |
| 9011 + up to 15 digits| International number |
|________________________|_____________________________|
The solution to this problem is to load the gateway with a digit map
that correspond to the dial plan. This digit map is expressed using a
syntax derived from the Unix system command, egrep. For example, the
dial plan described above results in the following digit map:
(0T| 00T|[1-7]xxx|8xxxxxxx|#xxxxxxx|*xx|91xxxxxxxxxx|9011x.T)
The formal syntax of the digit map is described by the DigitMap rule
in the formal syntax description of the protocol (section 3.4). A
Digit-Map, according to this syntax, is defined either by a "string"
or by a list of strings. Each string in the list is an alternative
numbering scheme, specified either as a set of digits or timers, or
as regular expression. A gateway that detects digits, letters or
timers will:
1) Add the event parameter code as a token to the end of an internal
state variable called the "current dial string"
2) Apply the current dial string to the digit map table, attempting a
match to each regular expression in the Digit Map in lexical order
3) If the result is under-qualified (partially matches at least one
entry in the digit map), do nothing further.
If the result matches, or is over-qualified (i.e. no further digits
could possibly produce a match), send the current digit string to the
Call Agent. A match, in this specification, can be either a "perfect
match," exactly matching one of the specified alternatives, or an
impossible match, which occur when the dial string does not match any
of the alternative. Unexpected timers, for example, can cause
"impossible matches." Both perfect matches and impossible matches
trigger notification of the accumulated digits.
Digit maps are provided to the gateway by the Call Agent, whenever
the Call Agent instructs the gateway to listen for digits.
Arango, et al. Informational [Page 25]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.1.6. Names of events
The concept of events and signals is central to MGCP. A Call Agent
may ask to be notified about certain events occurring in an endpoint,
e.g. off-hook events, and a call agent may request certain signals
to be applied to an endpoint, e.g. dial-tone.
Events and signals are grouped in packages within which they share
the same namespace which we will refer to as event names in the
following. Packages are groupings of the events and signals
supported by a particular type of endpoint. For instance, one package
may support a certain group of events and signals for analog access
lines, and another package may support another group of events and
signals for video lines. One or more packages may exist for a given
endpoint-type.
Event names are case insensitive and are composed of two logical
parts, a package name and an event name. Both names are strings of
letters, hyphens and digits, with the restriction that hyphens shall
never be the first or last characters in a name. Package or event
names are not case sensitive - values such as "hu", "Hu", "HU" or
"hU" should be considered equal.
Examples of package names are "D" (DTMF), "M" (MF), "T" (Trunk) or
"L" (Line). Examples of event names can be "hu" (off hook or "hang-
up" transition), "hf" (flash hook) or "0" (the digit zero).
In textual representations, the package name, when present, is
separated from the event name by a slash ("/"). The package name is
in fact optional. Each endpoint-type has a default package associated
with it, and if the package name is excluded from the event name, the
default package name for that endpoint-type is assumed. For example,
for an analog access line, the following two event names are equal:
l/dl dial-tone in the line package for an analog access line.
dl dial-tone in the line package (default) for an analog access
line.
This document defines a basic set of package names and event names.
Additional package names and event names can be registered with the
IANA. A package definition shall define the name of the package, and
the definition of each event belonging to the package. The event
definition shall include the precise name of the event (i.e., the
code used in MGCP), a plain text definition of the event, and, when
appropriate, the precise definition of the corresponding signals, for
example the exact frequencies of audio signal such as dial tones or
DTMF tones.
Arango, et al. Informational [Page 26]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
In addition, implementers can gain experience by using experimental
packages. The names of experimental packages must start with the two
characters "x-"; the IANA shall not register package names that start
with these characters.
Digits, or letters, are supported in many packages, notably "DTMF"
and "MF". Digits and letters are defined by the rules "Digit" and
"Letter" in the definition of digit maps. This definition refers to
the digits (0 to 9), to the asterisk or star ("*") and orthotrope,
number or pound sign ("#"), and to the letters "A", "B", "C" and "D",
as well as the timer indication "T". These letters can be combined in
"digit string" that represent the keys that a user punched on a dial.
In addition, the letter "X" can be used to represent all digits, and
the sign "$" can be used in wildcard notations. The need to easily
express the digit strings has a consequence on the form of event
names:
An event name that does not denote a digit should always contain at
least one character that is neither a digit, nor one of the letters
A, B, C, D, T or X. (Such names should not contain the special
signs "*", "#", "/" or "$".)
A Call Agent may often have to ask a gateway to detect a group of
events. Two conventions can be used to denote such groups:
to a package, or a given event in many packages, or event any
event in any package supported by the gateway.
range of digits.
The star sign (*) can be used as a wildcard instead of a package
name, and the keyword "all" can be used as a wildcard instead of an
event name:
A name such as "foo/all" denotes all events in package "foo"
A name such as "*/bar" denotes the event "bar" in any package
supported by the gateway
The names "*" or "*/all" denote all events supported by the
gate way.
The call agent can ask a gateway to detect a set of digits or letters
either by individually describing those letters, or by using the
"range" notation defined in the syntax of digit strings. For example,
the call agent can:
Arango, et al. Informational [Page 27]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Use the letter "x" to denote "any letter or digit."
Use the notation "[0-9#]" to denote the digits 0 to 9 and the pound
sign.
In some cases, Call Agents will request the gateway to generate or
detect events on connections rather than on the end point itself.
For example, gateways may be asked to provide a ringback tone on a
connection. When an event shall be applied on a connection, the name
of the connection is added to the name of the event, using an "at"
sign (@) as a delimiter, as in:
G/rt@0A3F58
The wildcard character "*" (star) can be used to denote "all
connections". When this convention is used, the gateway will generate
or detect the event on all the connections that are connected to the
endpoint. An example of this convention could be:
R/qa@*
The wildcard character "$" can be used to denote "the current
connection." It should only be used by the call agent, when the event
notification request is "encapsulated" within a command creation or
modification command. When this convention is used, the gateway will
generate or detect the event on the connection that is currently
being created or modified. An example of this convention is:
G/rt@$
The connection id, or a wildcard replacement, can be used in
conjunction with the "all packages" and "all events" conventions.
For example, the notation:
can be used to designate all events on all connections.
Events and signals are described in packages. The package description
must provide, for each events, the following informations:
the actual signal that is generated by the client (i.e., xx ms FSK
tone) as well as the resulting user observed result (i.e., MW
light on/off).
frequencies and amplitude of audio signals, modulations and
repetitions,
Arango, et al. Informational [Page 28]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Signals are divided into different types depending on their behavior:
are turned off. This may happen either as the result of an event
or a new SignalRequests (see later).
either turned off (by an event or SignalRequests) or a signal
specific period of time has elapsed. Depending on package
specifications, a signal that times out may generate an "operation
complete" event.
stop on their own. If an event occurs the signal will not stop,
however if a new SignalRequests is applied, the signal will stop.
(Note: this point should be debated. One could make a case that
events such as strings of DTMF digits should in fact be allowed to
complete.)
TO signals are normally used to alert the endpoints' users, to
signal them that they are expected to perform a specific action,
such as hang down the phone (ringing). Transmission of these
signals should typically be interrupted as soon as the first of
the requested events has been produced.
Package descriptions should describe, for all signals, their type
(OO, TO, BR). They should also describe the maximum duration of
the TO signals.
2.2. Usage of SDP
The Call Agent uses the MGCP to provision the gateways with the
description of connection parameters such as IP addresses, UDP port
and RTP profiles. These descriptions will follow the conventions
delineated in the Session Description Protocol which is now an IETF
proposed standard, documented in RFC 2327.
SDP allows for description of multimedia conferences. This version
limits SDP usage to the setting of audio circuits and data access
circuits. The initial session descriptions contain the description
of exactly one media, of type "audio" for audio connections, "nas"
for data access.
Arango, et al. Informational [Page 29]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.3. Gateway Control Commands
This section describes the commands of the MGCP. The service consists
of connection handling and endpoint handling commands. There are nine
commands in the protocol:
gateway, instructing the gateway about the coding characteristics
expected by the "line-side" of the endpoint.
gateway, instructing the gateway to watch for specific events such
as hook actions or DTMF tones on a specified endpoint .
Agent when the requested events occur.
connection that terminates in an "endpoint" inside the gateway.
parameters associated to a previously established connection.
existing connection. The DeleteConnection command may also be used
by a gateway to indicate that a connection can no longer be
sustained.
commands to audit the status of an "endpoint" and any connections
associated with it. Network management beyond the capabilities
provided by these commands are generally desirable, e.g.
information about the status of the gateway. Such capabilities are
expected to be supported by the use of the Simple Network
Management Protocol (SNMP) and definition of a MIB which is
outside the scope of this specification.
Call Agent that the gateway, or a group of endpoints managed by
the gateway, is being taken out of service or is being placed back
in service.
These services allow a controller (normally, the Call Agent) to
instruct a gateway on the creation of connections that terminate in
an "endpoint" attached to the gateway, and to be informed about
events occurring at the endpoint. An endpoint may be for example:
Arango, et al. Informational [Page 30]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
gateway,
Connections are grouped into "calls". Several connections, that may
or may not belong to the same call, can terminate in the same
endpoint . Each connection is qualified by a "mode" parameter, which
can be set to "send only" (sendonly), "receive only" (recvonly),
"send/receive" (sendrecv), "conference" (confrnce), "data",
"inactive" (inactive), "loopback", "continuity test" (conttest),
"network loop back" (netwloop) or "network continuity test"
(netwtest).
The handling of the audio signals received on these connections is
determined by the mode parameters:
"receive", "conference" or "send/receive" mode are mixed and sent
to the endpoint.
all the connections whose mode is "send", "conference" or
"send/receive."
in data packets through connections in "conference" mode are
replicated to all the other connections whose mode is
"conference."
The "loopback" and "continuity test" modes are used during
maintenance and continuity test operations. There are two flavors of
continuity test, one specified by ITU and one used in the US. In the
first case, the test is a loopback test. The originating switch will
send a tone (the go tone) on the bearer circuit and expect the
terminating switch to loopback the circuit. If the originating switch
sees the same tone returned (the return tone), the COT has passed. If
not, the COT has failed. In the second case, the go and return tones
are different. The originating switch sends a certain go tone. The
terminating switch detects the go tone, it asserts a different return
tone in the backwards direction. When the originating switch detects
the return tone, the COT is passed. If the originating switch never
detects the return tone, the COT has failed.
If the mode is set to "loopback", the gateway is expected to return
the incoming signal from the endpoint back into that same endpoint.
This procedure will be used, typically, for testing the continuity of
trunk circuits according to the ITU specifications.
Arango, et al. Informational [Page 31]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
If the mode is set to "continuity test", the gateway is informed that
the other end of the circuit has initiated a continuity test
procedure according to the GR specification. The gateway will place
the circuit in the transponder mode required for dual-tone continuity
tests.
If the mode is set to "network loopback", the audio signals received
from the connection will be echoed back on the same connection.
If the mode is set to "network continuity test", the gateway will
process the packets received from the connection according to the
transponder mode required for dual-tone continuity test, and send the
processed signal back on the connection.
2.3.1. EndpointConfiguration
The EndpointConfiguration commands are used to specify the encoding
of the signals that will be received by the endpoint. For example,
in certain international telephony configurations, some calls will
carry mu-law encoded audio signals, while other will use A-law. The
Call Agent will use the EndpointConfiguration command to pass this
information to the gateway. The configuration may vary on a call by
call basis, but can also be used in the absence of any connection.
ReturnCode
<-- EndpointConfiguration( EndpointId,
BearerInformation)
EndpointId is the name for the endpoint in the gateway where
EndpointConfiguration executes, as defined in section 2.1.1. The
"any of" wildcard convention shall not be used. If the "all of"
wildcard convention is used, the command applies to all the endpoint
whose name matches the wildcard.
BearerInformation is a parameter defining the coding of the data
received from the line side. These information is encoded as a list
of sub-parameters. The only sub-parameter defined in this version of
the specification is the encoding method, whose values can be set to
"A-law" and "mu-law".
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
Arango, et al. Informational [Page 32]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.3.2. NotificationRequest
The NotificationRequest commands are used to request the gateway to
send notifications upon the occurrence of specified events in an
endpoint. For example, a notification may be requested for when a
gateway detects that an endpoint is receiving tones associated with
fax communication. The entity receiving this notification may decide
to use a different type of encoding method in the connections bound
to this endpoint.
ReturnCode
<-- NotificationRequest( EndpointId,
[NotifiedEntity,]
[RequestedEvents,]
RequestIdentifier,
[DigitMap,]
[SignalRequests,]
[QuarantineHandling,]
[DetectEvents,]
[encapsulated EndpointConfiguration])
EndpointId is the name for the endpoint in the gateway where
NotificationRequest executes, as defined in section 2.1.1.
NotifiedEntity is an optional parameter that specifies where the
notifications should be sent. When this parameter is absent, the
notifications should be sent to the originator of the
NotificationRequest.
RequestIdentifier is used to correlate this request with the
notifications that it triggers.
RequestedEvents is a list of events that the gateway is requested to
detect and report. Such events include, for example, fax tones,
continuity tones, or on-hook transition. To each event is associated
an action, which can be:
of observed events,
Arango, et al. Informational [Page 33]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Some actions can be combined. In particular:
"Accumulate" and "Ignore."
"Accumulate", "Accumulate according to Digit Map", "Ignore" and
"Embedded Notification Request."
"Accumulate" and with "Keep signals active." It can also be
combined with Notify, if the gateway is allowed to issue several
Notify commands in response to a single Notification request.
In addition to the requestedEvents parameter specified in the
command, some profiles of MGCP have introduced the concept of
"persistent events." According to such profiles, the persistent event
list is configured in the endpoint, by means outside the scope of
MGCP. The basic MGCP specification does not specify any persistent
event.
If a persistent event is not included in the list of RequestedEvents,
and the event occurs, the event will be detected anyway, and
processed like all other events, as if the persistent event had been
requested with a Notify action. Thus, informally, persistent events
can be viewed as always being implicitly included in the list of
RequestedEvents with an action to Notify, although no glare
detection, etc., will be performed.
Non-persistent events are those events explicitly included in the
RequestedEvents list. The (possibly empty) list of requested events
completely replaces the previous list of requested events. In
addition to the persistent events, only the events specified in the
requested events list will be detected by the endpoint. If a
persistent event is included in the RequestedEvents list, the action
specified will then replace the default action associated with the
event for the life of the RequestedEvents list, after which the
default action is restored. For example, if "Ignore off-hook" was
specified, and a new request without any off-hook instructions were
received, the default "Notify off-hook" operation then would be
restored. A given event MUST NOT appear more than once in a
RequestedEvents.
Arango, et al. Informational [Page 34]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The gateway will detect the union of the persistent events and the
requested events. If an event is not specified in either list, it
will be ignored.
The Swap Audio action can be used when a gateway handles more than
one active connection on an endpoint. This will be the case for
three-way calling, call waiting, and possibly other feature
scenarios. In order to avoid the round-trip to the Call Agent when
just changing which connection is attached to the audio functions of
the endpoint, the NotificationRequest can map an event (usually hook
flash, but could be some other event) to a local function swap audio,
which selects the "next" connection in a round robin fashion. If
there is only one connection, this action is effectively a no-op.
If signal(s) are desired to start when an event being looked for
occurs, the "Embedded NotificationRequest" action can be used. The
embedded NotificationRequest may include a new list of
RequestedEvents, SignalRequests and a new digit map as well. The
semantics of the embedded NotificationRequest is as if a new
NotificationRequest was just received with the same NotifiedEntity,
and RequestIdentifier. When the "Embedded NotificationRequest" is
activated, the "current dial string" will be cleared; the list of
observed events and the quarantine buffer will be unaffected.
MGCP implementations shall be able to support at least one level of
embedding. An embedded NotificationRequest that respects this
limitation shall not contain another Embedded NotificationRequest.
DigitMap is an optional parameter that allows the Call Agent to
provision the gateways with a digit map according to which digits
will be accumulated. If this optional parameter is absent, the
previously defined value is retained. This parameter must be defined,
either explicitly or through a previous command, if the
RequestedEvent parameters contain an request to "accumulate according
to the digit map." The collection of these digits will result in a
digit string. The digit string is initialized to a null string upon
reception of the NotificationRequest, so that a subsequent
notification only returns the digits that were collected after this
request. Digits that were accumulated according to the digit map are
reported as any other accumulated event, in the order in which they
occur. It is therefore possible that other events be accumulated may
be found in between the list of digits.
SignalRequests is a parameter that contains the set of signals that
the gateway is asked to apply to the endpoint, such as, for example
ringing, or continuity tones. Signals are identified by their name,
which is an event name, and may be qualified by parameters.
Arango, et al. Informational [Page 35]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The action triggered by the SignalRequests is synchronized with the
collection of events specified in the RequestedEvents parameter. For
example, if the NotificationRequest mandates "ringing" and the event
request ask to look for an "off-hook" event, the ringing shall stop
as soon as the gateway detect an off hook event. The formal
definition is that the generation of all "Time Out" signals shall
stop as soon as one of the requested events is detected, unless the
"Keep signals active" action is associated to the specified event.
The specific definition of actions that are requested via these
SignalRequests, such as the duration of and frequency of a DTMF
digit, is out side the scope of MGCP. This definition may vary from
location to location and hence from gateway to gateway.
The RequestedEvents and SignalRequests refer to the same event
definitions. In one case, the gateway is asked to detect the
occurrence of the event, and in the other case it is asked to
generate it. The specific events and signals that a given endpoint
can detect or perform are determined by the list of event packages
that are supported by that end point. Each package specifies a list
of events and actions that can be detected or performed. A gateway
that is requested to detect or perform an event belonging to a
package that is not supported by the specified endpoint shall return
an error. When the event name is not qualified by a package name, the
default package name for the end point is assumed. If the event name
is not registered in this default package, the gateway shall return
an error.
The Call Agent can send a NotificationRequest whose requested signal
list is empty. It will do so for example when tone generation should
stop.
The optional QuarantineHandling parameter specifies the handling of
"quarantine" events, i.e. events that have been detected by the
gateway before the arrival of this NotificationRequest command, but
have not yet been notified to the Call Agent. The parameter provides
a set of handling options:
(the default is to process them.)
notification (step by step), or multiple notifications (loop), in
response to this request (the default is exactly one.)
When the parameter is absent, the default value is assumed.
Arango, et al. Informational [Page 36]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
We should note that the quarantine-handling parameter also governs
the handling of events that were detected but not yet notified when
the command is received.
DetectEvents is an optional parameter that specifies a list of events
that the gateway is requested to detect during the quarantine period.
When this parameter is absent, the events that should be detected in
the quarantine period are those listed in the last received
DetectEvents list. In addition, the gateway should also detect the
events specified in the request list, including those for which the
"ignore" action is specified.
Some events and signals, such as the in-line ringback or the quality
alert, are performed or detected on connections terminating in the
end point rather than on the endpoint itself. The structure of the
event names allow the Call Agent to specify the connection (or
connections) on which the events should be performed or detected.
The command may carry an encapsulated EndpointConfiguration command,
that will apply to the same endpoint. When this command is present,
the parameters of the EndpointConfiguration command are inserted
after the normal parameters of the NotificationRequest, with the
exception of the EndpointId, which is not replicated.
The encapsulated EndpointConfiguration command shares the fate of the
NotificationRequest command. If the NotificationRequest is rejected,
the EndpointConfiguration is not executed.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary. .NH 3 Notifications
Notifications are sent via the Notify command and are sent by the
gateway when the observed events occur.
ReturnCode
<-- Notify( EndpointId,
[NotifiedEntity,]
RequestIdentifier,
ObservedEvents)
EndpointId is the name for the endpoint in the gateway which is
issuing the Notify command, as defined in section 2.1.1. The
identifier should be a fully qualified endpoint identifier, including
the domain name of the gateway. The local part of the name shall not
use the wildcard convention.
Arango, et al. Informational [Page 37]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
NotifiedEntity is an optional parameter that identifies the entity to
which the notifications is sent. This parameter is equal to the last
received value of the NotifiedEntity parameter. The parameter is
absent if there was no such parameter in the triggering request. The
notification is sent to the "current notified entity" or, if no such
entity was ever specified, to the address from which the request was
received.
RequestIdentifier is parameter that repeats the RequestIdentifier
parameter of the NotificationRequest that triggered this
notification. It is used to correlate this notification with the
request that triggered it.
ObservedEvents is a list of events that the gateway detected. A
single notification may report a list of events that will be reported
in the order in which they were detected. The list may only contain
the identification of events that were requested in the
RequestedEvents parameter of the triggering NotificationRequest. It
will contain the events that were either accumulated (but not
notified) or treated according to digit map (but no match yet), and
the final event that triggered the detection or provided a final
match in the digit map.
ReturnCode is a parameter returned by the call agent. It indicates
the outcome of the command and consists of an integer number
optionally followed by commentary.
2.3.3. CreateConnection
This command is used to create a connection between two endpoints.
ReturnCode,
ConnectionId,
[SpecificEndPointId,]
[LocalConnectionDescriptor,]
[SecondEndPointId,]
[SecondConnectionId]
<--- CreateConnection(CallId,
EndpointId,
[NotifiedEntity,]
[LocalConnectionOptions,]
Mode,
[{RemoteConnectionDescriptor |
SecondEndpointId}, ]
[Encapsulated NotificationRequest,]
[Encapsulated EndpointConfiguration])
Arango, et al. Informational [Page 38]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
A connection is defined by its endpoints. The input parameters in
CreateConnection provide the data necessary to build a gateway's
"view" of a connection.
CallId is a globally unique parameter that identifies the call (or
session) to which this connection belongs. Connections that belong to
the same call share the same call-id. The call-id can be used to
identify calls for reporting and accounting purposes. It does not
affect the handling of connections by the gateway.
EndpointId is the identifier for the connection endpoint in the
gateway where CreateConnection executes. The EndpointId can be
fully-specified by assigning a value to the parameter EndpointId in
the function call or it may be under-specified by using the "anyone"
wildcard convention. If the endpoint is underspecified, the endpoint
identifier will be assigned by the gateway and its complete value
returned in the SpecificEndPointId parameter of the response.
The NotifiedEntity is an optional parameter that specifies where the
Notify or DeleteConnection commands should be sent. If the parameter
is absent, the Notify or DeleteConnection commands should be sent to
the last received Notified Entity, or to originator of the
CreateConnection command if no Notified Entity was ever received for
the end point.
LocalConnectionOptions is a parameter used by the Call Agent to
direct the handling of the connection by the gateway. The fields
contained in LocalConnectionOptions are the following:
"gain control."
Arango, et al. Informational [Page 39]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
This set of field can be completed by vendor specific optional or
mandatory extensions. The encoding of the first three fields, when
they are present, will be compatible with the SDP and RTP profiles:
valid encoding names, as defined in the RTP AV Profile or
registered with the IANA.
in milliseconds represented by the media in a packet, as specified
in the "ptime" parameter of SDP, or as a range value, specifying
both the minimum and maximum acceptable packetization periods.
expressed as an integer number of kilobit per seconds.
For each of the first three fields, the Call Agent has three options:
for the connection,
encoding methods or a range of packetization periods,
of encoding method and packetization period to the gateway.
The bandwidth specification shall not contradict the specification of
encoding methods and packetization period. If an encoding method is
specified, then the gateway is authorized to use it, even if it
results in the usage of a larger bandwidth than specified.
The LocalConnectionOptions parameter may be absent in the case of a
data call.
The Type of Service specifies the class of service that will be used
for the connection. When the connection is transmitted over an IP
network, the parameters encodes the 8-bit type of service value
parameter of the IP header. When the Type of Service is not
specified, the gateway shall use a default or configured value.
The gateways can be instructed to perform a reservation, for example
using RSVP, on a given connection. When a reservation is needed, the
call agent will specify the reservation profile that should be used,
which is either "controlled load" or "guaranteed service." The
Arango, et al. Informational [Page 40]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
absence of reservation can be indicated by asking for the "best
effort" service, which is the default value of this parameter. When
reservation has been asked on a connection, the gateway will:
"send-only", "send-receive", "conference", "network loop back" or
"network continuity test" mode (if a remote connection descriptor
has been received,)
messages if the connection is in "receive-only", "send-receive",
"conference", "network loop back" or "network continuity test"
mode.
The RSVP filters will be deduced from the characteristics of the
connection. The RSVP resource profiles will be deduced from the
connection's bandwidth and packetization period.
By default, the telephony gateways always perform echo cancellation.
However, it is necessary, for some calls, to turn off these
operations. The echo cancellation parameter can have two values,
"on" (when the echo cancellation is requested) and "off" (when it is
turned off.)
The telephony gateways may perform gain control, in order to adapt
the level of the signal. However, it is necessary, for example for
modem calls, to turn off this function. The gain control parameter
may either be specified as "automatic", or as an explicit number of
decibels of gain. The default is to not perform gain control, which
is equivalent to specifying a gain of 0 decibels.
The telephony gateways may perform voice activity detection, and
avoid sending packets during periods of silence. However, it is
necessary, for example for modem calls, to turn off this detection.
The silence suppression parameter can have two values, "on" (when the
detection is requested) and "off" (when it is turned off.) The
default is "off."
The Call agent can request the gateway to enable encryption of the
audio Packets. It does so by providing an key specification, as
specified in RFC 2327. By default, encryption is not used.
The Call Agent may instruct the gateway to prepare the connection on
a specified type of network. The type of network is encoded as in
the "connection-field" parameter of the SDP standard. Possible
values are IN (Internet), ATM and LOCAL. The parameter is optional;
if absent, the network is determined by the type of gateway.
Arango, et al. Informational [Page 41]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
RemoteConnectionDescriptor is the connection descriptor for the
remote side of a connection, on the other side of the IP network. It
includes the same fields as in the LocalConnectionDescriptor, i.e.
the fields that describe a session according to the SDP standard.
This parameter may have a null value when the information for the
remote end is not known yet. This occurs because the entity that
builds a connection starts by sending a CreateConnection to one of
the two gateways involved in it. For the first CreateConnection
issued, there is no information available about the other side of the
connection. This information may be provided later via a
ModifyConnection call. In the case of data connections (mode=data),
this parameter describes the characteristics of the data connection.
The SecondEndpointId can be used instead of the
RemoteConnectionDescriptor to establish a connection between two
endpoints located on the same gateway. The connection is by
definition a local connection. The SecondEndpointId can be fully-
specified by assigning a value to the parameter SecondEndpointId in
the function call or it may be under-specified by using the "anyone"
wildcard convention. If the secondendpoint is underspecified, the
second endpoint identifier will be assigned by the gateway and its
complete value returned in the SecondEndPointId parameter of the
response.
Mode indicates the mode of operation for this side of the connection.
The mode are "send", "receive", "send/receive", "conference", "data",
"inactive", "loopback", "continuity test", "network loop back" or
"network continuity test." The expected handling of these modes is
specified in the introduction of the "Gateway Handling Function"
section. Some end points may not be capable of supporting all modes.
If the command specifies a mode that the endpoint cannot support, and
error shall be returned.
The gateway returns a ConnectionId, that uniquely identifies the
connection within one endpoint, and a LocalConnectionDescriptor,
which is a session description that contains information about
addresses and RTP ports, as defined in SDP. The
LocalConnectionDescriptor is not returned in the case of data
connections. The SpecificEndPointId is an optional parameter that
identifies the responding endpoint. It can be used when the
EndpointId argument referred to a "any of" wildcard name. When a
SpecificEndPointId is returned, the Call Agent should use it as the
EndpointId value is successive commands referring to this call.
Arango, et al. Informational [Page 42]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
When a SecondEndpointId is specified, the command really creates two
connections that can be manipulated separately through
ModifyConnection and DeleteConnection commands. The response to the
creation provides a SecondConnectionId parameter that identifies the
second connection.
After receiving a "CreateConnection" request that did not include a
RemoteConnectionDescriptor parameter, a gateway is in an ambiguous
situation. Because it has exported a LocalConnectionDescriptor
parameter, it can potentially receive packets. Because it has not yet
received the RemoteConnectionDescriptor parameter of the other
gateway, it does not know whether the packets that it receives have
been authorized by the Call Agent. It must thus navigate between two
risks, i.e. clipping some important announcements or listening to
insane data. The behavior of the gateway is determined by the value
of the Mode parameter:
voice signals and transmit them through the endpoint.
gateway should refuse the voice signals.
Test, the gateway should perform the expected echo or Response.
Note that the mode values SendReceive, Conference, Data and SendOnly
don't make sense in this situation. They should be treated as errors,
and the command should be rejected (Error code 517).
The command may optionally contain an encapsulated Notification
Request command, in which case a RequestIdentifier parameter will be
present, as well as, optionally, the RequestedEvents DigitMap,
SignalRequests, QuarantineHandling and DetectEvents parameters. The
encapsulated NotificationRequest is executed simultaneously with the
creation of the connection. For example, when the Call Agent wants to
initiate a call to an residential gateway, it should:
be sure that the user can start speaking as soon as the phone goes
off hook,
phone goes off-hook.
Arango, et al. Informational [Page 43]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
This can be accomplished in a single CreateConnection command, by
also transmitting the RequestedEvent parameters for the off hook
event, and the SignalRequest parameter for the ringing signal.
When these parameters are present, the creation and the
NotificationRequests should be synchronized, which means that
bothshould be accepted, or both refused. In our example, the
CreateConnection may be refused if the gateway does not have
sufficient resources, or cannot get adequate resources from the local
network access, and the off-hook Notification-Request can be refused
in the glare condition, if the user is already off-hook. In this
example, the phone should not ring if the connection cannot be
established, and the connection should not be established if the user
is already off hook.
The NotifiedEntity parameter, if present, applies to both the
CreateConnection and the NotificationRequest command. It defines the
new "notified entity" for the endpoint.
The command may carry an encapsulated EndpointConfiguration command,
that will apply to the same endpoint. When this command is present,
the parameters of the EndpointConfiguration command are inserted
after the normal parameters of the CreateConnection with the
exception of the EndpointId, which is not replicated. The
EndpointConfiguration command may be encapsulated together with an
encapsulated NotificationRequest command.
The encapsulated EndpointConfiguration command shares the fate of the
CreateConnection command. If the CreateConnection is rejected, the
EndpointConfiguration is not executed.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
2.3.4. ModifyConnection
This command is used to modify the characteristics of a gateway's
"view" of a connection. This "view" of the call includes both the
local connection descriptors as well as the remote connection
descriptor.
Arango, et al. Informational [Page 44]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
ReturnCode,
[LocalConnectionDescriptor]
<--- ModifyConnection(CallId,
EndpointId,
ConnectionId,
[NotifiedEntity,]
[LocalConnectionOptions,]
[Mode,]
[RemoteConnectionDescriptor,]
[Encapsulated NotificationRequest,]
[Encapsulated EndpointConfiguration])
The parameters used are the same as in the CreateConnection command,
with the addition of a ConnectionId that identifies the connection
within the endpoint. This parameter is returned by the
CreateConnection function, as part of the local connection
descriptor. It uniquely identifies the connection within the context
of the endpoint.
The EndpointId should be a fully qualified endpoint identifier. The
local name shall not use the wildcard convention.
The ModifyConnection command can be used to affect parameters of a
connection in the following ways:
the RemoteConnectionDescriptor.
the Mode parameter. This can occur at any time during the
connection, with arbitrary parameter values.
switching to a different coding scheme, changing the packetization
period, or modifying the handling of echo cancellation.
Connections can only be activated if the RemoteConnectionDescriptor
has been provided to the gateway. The receive only mode, however, can
be activated without the provision of this descriptor.
The command will only return a LocalConnectionDescriptor if the local
connection parameters, such as RTP ports, were modified. (Usage of
this feature is actually for further study.)
The command may optionally contain an encapsulated Notification
Request command, in which case a RequestIdentifier parameter will be
present, as well as, optionnally, the RequestedEvents DigitMap,
SignalRequests, QuarantineHandling and DetectEvents parameters. The
Arango, et al. Informational [Page 45]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
encapsulated NotificationRequest is executed simultaneously with the
modification of the connection. For example, when a connection is
accepted, the calling gateway should be instructed to place the
circuit in send-receive mode and to stop providing ringing tones.
This can be accomplished in a single ModifyConnection command, by
also transmitting the RequestedEvent parameters, for the on hook
event, and an empty SignalRequest parameter, to stop the provision of
ringing tones.
When these parameters are present, the modification and the
NotificationRequests should be synchronized, which means that both
should be accepted, or both refused. The NotifiedEntity parameter,
if present, applies to both the ModifyConnection and the
NotificationRequest command.
The command may carry an encapsulated EndpointConfiguration command,
that will apply to the same endpoint. When this command is present,
the parameters of the EndpointConfiguration command are inserted
after the normal parameters of the ModifyConnection with the
exception of the EndpointId, which is not replicated. The
EndpointConfiguration command may be encapsulated together with an
encapsulated NotificationRequest command.
The encapsulated EndpointConfiguration command shares the fate of the
ModifyConnection command. If the ModifyConnection is rejected, the
EndpointConfiguration is not executed.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
2.3.5. DeleteConnection (from the Call Agent)
This command is used to terminate a connection. As a side effect, it
collects statistics on the execution of the connection.
ReturnCode,
Connection-parameters
<-- DeleteConnection(CallId,
EndpointId,
ConnectionId,
[Encapsulated NotificationRequest,]
[Encapsulated EndpointConfiguration])
The endpoint identifier, in this form of the DeleteConnection
command, shall be fully qualified. Wildcard conventions shall not be
used.
Arango, et al. Informational [Page 46]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
In the general case where a connection has two ends, this command has
to be sent to both gateways involved in the connection. Some
connections, however, may use IP multicast. In this case, they can be
deleted individually.
After the connection has been deleted, any loopback that has been
requested for the connection should be cancelled. When all
connections to an endpoint have been deleted, that endpoint should be
placed in inactive mode.
In response to the DeleteConnection command, the gateway returns a
list of parameters that describe the status of the connection. These
parameters are:
Number of packets sent:
The total number of RTP data packets transmitted by the sender since
starting transmission on this connection. The count is not reset if
the sender changes its synchronization source identifier (SSRC, as
defined in RTP), for example as a result of a Modify command. The
value is zero if the connection was set in "receive only" mode.
Number of octets sent:
The total number of payload octets (i.e., not including header or
padding) transmitted in RTP data packets by the sender since starting
transmission on this connection. The count is not reset if the sender
changes its SSRC identifier, for example as a result of a
ModifyConnection command. The value is zero if the connection was set
in "receive only" mode.
Number of packets received:
The total number of RTP data packets received by the sender since
starting reception on this connection. The count includes packets
received from different SSRC, if the sender used several values. The
value is zero if the connection was set in "send only" mode.
Number of octets received:
The total number of payload octets (i.e., not including header or
padding) transmitted in RTP data packets by the sender since starting
transmission on this connection. The count includes packets received
from different SSRC, if the sender used several values. The value is
zero if the connection was set in "send only" mode.
Arango, et al. Informational [Page 47]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Number of packets lost:
The total number of RTP data packets that have been lost since the
beginning of reception. This number is defined to be the number of
packets expected less the number of packets actually received, where
the number of packets received includes any which are late or
duplicates. The count includes packets received from different SSRC,
if the sender used several values. Thus packets that arrive late are
not counted as lost, and the loss may be negative if there are
duplicates. The count includes packets received from different SSRC,
if the sender used several values. The number of packets expected is
defined to be the extended last sequence number received, as defined
next, less the initial sequence number received. The count includes
packets received from different SSRC, if the sender used several
values. The value is zero if the connection was set in "send only"
mode. This parameter is omitted if the connection was set in "data"
mode.
Interarrival jitter:
An estimate of the statistical variance of the RTP data packet
interarrival time measured in milliseconds and expressed as an
unsigned integer. The interarrival jitter J is defined to be the mean
deviation (smoothed absolute value) of the difference D in packet
spacing at the receiver compared to the sender for a pair of packets.
Detailed computation algorithms are found in RFC 1889. The count
includes packets received from different SSRC, if the sender used
several values. The value is zero if the connection was set in "send
only" mode. This parameter is omitted if the connection was set in
"data" mode.
Average transmission delay:
An estimate of the network latency, expressed in milliseconds. This
is the average value of the difference between the NTP timestamp
indicated by the senders of the RTCP messages and the NTP timestamp
of the receivers, measured when this messages are received. The
average is obtained by summing all the estimates, then dividing by
the number of RTCP messages that have been received. This parameter
is omitted if the connection was set in "data" mode.
When the gateway's clock is not synchronized by NTP, the latency
value can be computed as one half of the round trip delay, as
measured through RTCP.
When the gateway cannot compute the one way delay or the round trip
delay, the parameter conveys a null value.
For a detailed definition of these variables, refer to RFC 1889.
Arango, et al. Informational [Page 48]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
When the connection was set up over an ATM network, the meaning of
these parameters may change:
Number of packets sent: The total number of ATM cells transmitted
since starting transmission on this connection.
Number of octets sent:
The total number of payload octets transmitted in ATM cells.
Number of packets received:
The total number of ATM cells received since starting reception on
this connection.
Number of octets received:
The total number of payload octets received in ATM cells.
Number of packets lost:
Should be determined as the number of cell losts, or set to zero
if the adaptation layer does not enable the gateway to assess
losses.
Interarrival jitter:
Should be understood as the interarrival jitter between ATM cells.
Average transmission delay:
The gateway may not be able to assess this parameter over an ATM
network. It could simply report a null value.
When the connection was set up over an LOCAL interconnect, the
meaning of these parameters is defined as follows:
Number of packets sent:
Not significant.
Number of octets sent:
The total number of payload octets transmitted over the local
connection.
Number of packets received:
Not significant.
Number of octets received:
The total number of payload octets received over the connection.
Number of packets lost:
Not significant. A value of zero is assumed.
Arango, et al. Informational [Page 49]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Interarrival jitter:
Not significant. A value of zero is assumed.
Average transmission delay:
Not significant. A value of zero is assumed.
The standard set of connection parameters can be extended by the
creation of extension parameters.
The command may optionally contain an encapsulated Notification
Request command, in which case a RequestIdentifier parameter will be
present, as well as, optionnally, the RequestedEvents DigitMap,
SignalRequests, QuarantineHandling and DetectEvents parameters. The
encapsulated NotificationRequest is executed simultaneously with the
deletion of the connection. For example, when a user hang-up is
notified, the gateway should be instructed to delete the connection
and to start looking for an off hook event.
This can be accomplished in a single DeleteConnection command, by
also transmitting the RequestedEvent parameters, for the off hook
event, and an empty SignalRequest parameter.
When these parameters are present, the DeleteConnection and the
NotificationRequests should be synchronized, which means that both
should be accepted, or both refused.
The command may carry an encapsulated EndpointConfiguration command,
that will apply to the same endpoint. When this command is present,
the parameters of the EndpointConfiguration command are inserted
after the normal parameters of the DeleteConnection with the
exception of the EndpointId, which is not replicated. The
EndpointConfiguration command may be encapsulated together with an
encapsulated NotificationRequest command.
The encapsulated EndpointConfiguration command shares the fate of the
DeleteConnection command. If the DeleteConnection is rejected, the
EndpointConfiguration is not executed.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
Arango, et al. Informational [Page 50]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.3.6. DeleteConnection (from the VoIP gateway)
In some circumstances, a gateway may have to clear a connection, for
example because it has lost the resource associated with the
connection, or because it has detected that the endpoint no longer is
capable or willing to send or receive voice. The gateway terminates
the connection by using a variant of the DeleteConnection command:
ReturnCode,
<-- DeleteConnection( CallId,
EndpointId,
ConnectionId,
Reason-code,
Connection-parameters)
In addition to the call, endpoint and connection identifiers, the
gateway will also send the call's parameters that would have been
returned to the Call Agent in response to a DeleteConnection command.
The reason code indicates the cause of the disconnection.
ReturnCode is a parameter returned by the call agent. It indicates
the outcome of the command and consists of an integer number
optionally followed by commentary.
2.3.7. DeleteConnection (multiple connections, from the Call Agent)
A variation of the DeleteConnection function can be used by the Call
Agent to delete multiple connections at the same time. The command
can be used to delete all connections that relate to a Call for an
endpoint:
ReturnCode,
<-- DeleteConnection( CallId,
EndpointId)
It can also be used to delete all connections that terminate in a
given endpoint:
ReturnCode,
<-- DeleteConnection( EndpointId)
Finally, Call Agents can take advantage of the hierarchical naming
structure of endoints to delete all the connections that belong to a
group of endpoints. In this case, the "local name" component of the
EndpointID will be specified using the "all value" wildcarding
convention. The "any value" convention shall not be used. For
example, if endpoints names are structured as the combination of a
physical interface name and a circuit number, as in "X35V3+A4/13",
Arango, et al. Informational [Page 51]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
the Call Agent may replace the circuit number by a wild card
character "*", as in "X35V3+A4/*". This "wildcard" command instructs
the gateway to delete all the connections that where attached to
circuits connected to the physical interface "X35V3+A4".
After the connections have been deleted, the endpoint should be
placed in inactive mode. Any loopback that has been requested for the
connections should be cancelled.
This command does not return any individual statistics or call
parameters.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
2.3.8. Audit Endpoint
The AuditEndPoint command can be used by the Call Agent to find out
the status of a given endpoint.
ReturnCode,
EndPointIdList|{
[RequestedEvents,]
[DigitMap,]
[SignalRequests,]
[RequestIdentifier,]
[NotifiedEntity,]
[ConnectionIdentifiers,]
[DetectEvents,]
[ObservedEvents,]
[EventStates,]
[BearerInformation,]
[RestartReason,]
[RestartDelay,]
[ReasonCode,]
[Capabilities]}
<--- AuditEndPoint(EndpointId,
[RequestedInfo])
The EndpointId identifies the endpoint that is being audited. The
"all of" wildcard convention can be used to start auditing of a group
of endpoints. If this convention is used, the gateway should return
the list of endpoint identifiers that match the wildcard in the
EndPointIdList parameter. It shall not return any parameter specific
to one of these endpoints.
Arango, et al. Informational [Page 52]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
When a non-wildcard EndpointId is specified, the (possibly empty)
RequestedInfo parameter describes the information that is requested
for the EndpointId specified. The following endpoint info can be
audited with this command:
RequestedEvents, DigitMap, SignalRequests, RequestIdentifier,
NotifiedEntity, ConnectionIdentifiers, DetectEvents, ObservedEvents,
EventStates, RestartReason, RestartDelay, ReasonCode, and
Capabilities.
The response will in turn include information about each of the items
for which auditing info was requested:
is using including the action associated with each event.
Persistent events are included in the list.
active, On/Off signals that are currently "on" for the endpoint
(with or without parameter), and any pending Brief signals. Time-
Out signals that have timed-out, and currently playing Brief
signals are not included.
Request received by this endpoint (includes NotificationRequest
encapsulated in Connection handling primitives). If no
notification request has been received, the value zero will be
returned.
NotificationRequest received by this endpoint.
quarantine mode.
connections that currently exist for the specified endpoint.
endpoint.
Arango, et al. Informational [Page 53]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
them, the event corresponding to the state the endpoint is in,
e.g., off-hook if the endpoint is off-hook. The definition of the
individual events will state if the event in question has an
auditable state associated with it.
BearerInformation parameter for this endpoint.
last RestartInProgress command issued by the endpoint, "restart"
indicating a fully functional endpoint.
RestartInProgress command was issued by the endpoint at the time
of the response, or zero if the command would not include this
parameter.
RestartInProgress or DeleteConnection command issued by the
gateway for the endpoint, or the special value 000 if the
endpoint's state is nominal.
LocalConnectionOptions parameter and including event packages and
connection modes. If there is a need to specify that some
parameters, such as e.g., silence suppression, are only compatible
with some
Compression Algorithm: a list of supported codecs. The rest of
the parameters will apply to all codecs specified in this list.
Packetization Period: A single value or a range may be
specified.
Bandwidth: A single value or a range corresponding to the range
for packetization periods may be specified (assuming no silence
suppression).
Echo Cancellation: Whether echo cancellation is supported or
not.
Silence Suppression: Whether silence suppression is supported
or not.
Type of Service: Whether type of service is supported or not.
Arango, et al. Informational [Page 54]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Event Packages: A list of event packages supported. The first
event package in the list will be the default package.
Modes: A list of supported connection modes.
The Call Agent may then decide to use the AuditConnection command to
obtain further information about the connections.
If no info was requested and the EndpointId refers to a valid
endpoint, the gateway simply returns a positive acknowledgement.
If no NotifiedEntity has been specified in the last
NotificationRequest, the notified entity defaults to the source
address of the last NotificationRequest command received for this
connection.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
2.3.9. Audit Connection
The AuditConnection command can be used by the Call Agent to retrieve
the parameters attached to a connection:
ReturnCode,
[CallId,]
[NotifiedEntity,]
[LocalConnectionOptions,]
[Mode,]
[RemoteConnectionDescriptor,]
[LocalConnectionDescriptor,]
[ConnectionParameters]
<--- AuditConnection(EndpointId,
ConnectionId,
RequestedInfo)
The EndpointId parameter specifies the endpoint that handles the
connection. The wildcard conventions shall not be used.
The ConnectionId parameter is the identifier of the audited
connection, within the context of the specified endpoint.
The (possibly empty) RequestedInfo describes the information that is
requested for the ConnectionId within the EndpointId specified. The
following connection info can be audited with this command:
Arango, et al. Informational [Page 55]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
CallId, NotifiedEntity, LocalConnectionOptions, Mode,
RemoteConnectionDescriptor, LocalConnectionDescriptor,
ConnectionParameters
The AuditConnectionResponse will in turn include information about
each of the items auditing info was requested for:
supplied for the connection.
was supplied to the gateway for the connection.
way supplied for the connection.
parameters for the connection.
If no info was requested and the EndpointId is valid, the gateway
simply checks that the connection exists, and if so returns a
positive acknowledgement.
If no NotifiedEntity has been specified for the connection, the
notified entity defaults to the source address of the last connection
handling command received for this connection.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
2.3.10. Restart in progress
The RestartInProgress command is used by the gateway to signal that
An endpoint, or a group of endpoint, is taken in or out of service.
ReturnCode,
[NotifiedEntity]
<------- RestartInProgress ( EndPointId,
RestartMethod,
[RestartDelay,]
[Reason-code])
Arango, et al. Informational [Page 56]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The EndPointId identifies the endpoint that are taken in or out of
service. The "all of" wildcard convention may be used to apply the
command to a group of endpoint, such as for example all endpoints
that are attached to a specified interface, or even all endpoints
that are attached to a given gateway. The "any of" wildcard
convention shall not be used.
The RestartMethod parameter specified the type of restart. Three
values have been defined:
will Be taken out of service after the specified delay. The
established connections are not yet affected, but the Call Agent
should refrain to establish new connections, and should try to
gracefully tear down the existing connections.
are taken abruptely out of service. The established connections,
if any, are lost.
endpoints after the specified "restart delay." There are no
connections that are currently established on the endpoints.
disconnected and is now trying to establish connectivity. The
"restart delay" specifies the number of seconds the endpoint has
been disconnected. Established connections are not affected.
previously issued "graceful" restart command.
The optional "restart delay" parameter is expressed as a number of
seconds. If the number is absent, the delay value should be
considered null. In the case of the "graceful" method, a null delay
indicates that the call agent should simply wait for the natural
termination of the existing connections, without establishing new
connections. The restart delay is always considered null in the case
of the "forced" method.
A restart delay of null for the "restart" method indicates that
service has already been restored. This typically will occur after
gateway startup/reboot.
The optional reason code parameter the cause of the restart.
Arango, et al. Informational [Page 57]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Gateways SHOULD send a "graceful" or "forced" RestartInProgress
message as a courtesy to the Call Agent when they are taken out of
service, e.g., by being shutdown, or taken out of service by a
network management system, although the Call Agent cannot rely on
always receiving such messages. Gateways MUST send a "restart"
RestartInProgress message with a null delay to their Call Agent when
they are back in service according to the restart procedure specified
in Section 4.3.4 - Call Agents can rely on receiving this message.
Also, gateways MUST send a "disconnected" RestartInProgress message
to their current "notified entity" according to the "disconnected"
procedure specified in Section 4.3.5. The "restart delay" parameter
MUST NOT be used with the "forced" restart method.
The RestartInProgress message will be sent to the current notified
entity for the EndpointId in question. It is expected that a default
Call Agent, i.e., notified entity, has been provisioned for each
endpoint so, after a reboot, the default Call Agent will be the
notified entity for each endpoint. Gateways should take full
advantage of wild- carding to minimize the number of
RestartInProgress messages generated when multiple endpoints in a
gateway restart and the endpoints are managed by the same Call Agent.
ReturnCode is a parameter returned by the gateway. It indicates the
outcome of the command and consists of an integer number optionally
followed by commentary.
A NotifiedEntity may additionally be returned with the response from
the Call Agent:
executed), the restart procedure has completed, and the
NotifiedEntity returned is the new "notified entity" for the
endpoint(s).
restart procedure is not yet complete, and must therefore be
initiated again. If a NotifiedEntity parameter was returned, it
then specifies the new "notified entity" for the endpoint(s),
which must consequently be used when retrying the restart
procedure.
2.4. Return codes and error codes.
All MGCP commands are acknowledged. The acknowledgment carries a
return code, which indicates the status of the command. The return
code is an integer number, for which four ranges of values have been
defined:
Arango, et al. Informational [Page 58]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The values that have been already defined are listed in the following
list:
100 The transaction is currently being executed. An actual
completion message will follow on later.
200 The requested transaction was executed normally.
250 The connection was deleted.
400 The transaction could not be executed, due to a transient error.
401 The phone is already off hook
402 The phone is already on hook
403 The transaction could not be executed, because the endpoint does
not have sufficient resources at this time
404 Insufficient bandwidth at this time
500 The transaction could not be executed, because the endpoint is
unknown.
01 The transaction could not be executed, because the endpoint is
not ready.
502 The transaction could not be executed, because the endpoint does
not have sufficient resources
510 The transaction could not be executed, because a protocol error
was detected.
11 The transaction could not be executed, because the command
contained an unrecognized extension.
512 The transaction could not be executed, because the gateway is
not equipped to detect one of the requested events.
Arango, et al. Informational [Page 59]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
513 The transaction could not be executed, because the gateway is
not equipped to generate one of the requested signals.
514 The transaction could not be executed, because the gateway
cannot send the specified announcement.
515 The transaction refers to an incorrect connection-id (may have
been already deleted)
516 The transaction refers to an unknown call-id.
517 Unsupported or invalid mode.
518 Unsupported or unknown package.
519 Endpoint does not have a digit map.
520 The transaction could not be executed, because the endpoint is
"restarting".
521 Endpoint redirected to another Call Agent.
522 No such event or signal.
523 Unknown action or illegal combination of actions
524 Internal inconsistency in LocalConnectionOptions
525 Unknown extension in LocalConnectionOptions
526 Insufficient bandwidth
527 Missing RemoteConnectionDescriptor
528 Incompatible protocol version
529 Internal hardware failure
530 CAS signaling protocol error.
531 failure of a grouping of trunks (e.g. facility failure).
Arango, et al. Informational [Page 60]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
2.5. Reason Codes
Reason-codes are used by the gateway when deleting a connection to
inform the Call Agent about the reason for deleting the connection.
They may also be used in a RestartInProgress command, to inform the
gateway of the Restart's reason. The reason code is an integer
number, and the following values have been defined:
000 Endpoint state is nominal. (This code is used only in response
to audit requests.)
900 Endpoint malfunctioning
901 Endpoint taken out of service
902 Loss of lower layer connectivity (e.g., downstream sync)
3. Media Gateway Control Protocol
The MGCP implements the media gateway control interface as a set of
transactions. The transactions are composed of a command and a
mandatory response. There are eight types of command:
The first four commands are sent by the Call Agent to a gateway. The
Notify command is sent by the gateway to the Call Agent. The gateway
may also send a DeleteConnection as defined in 2.3.6. The Call Agent
may send either of the Audit commands to the gateway. The Gateway
may send a RestartInProgress command to the Call Agent.
Arango, et al. Informational [Page 61]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
3.1. General description
All commands are composed of a Command header, optionally followed by
a session description.
All responses are composed of a Response header, optionally followed
by a session description.
Headers and session descriptions are encoded as a set of text lines,
separated by a carriage return and line feed character (or,
optionnally, a single line-feed character). The headers are separated
from the session description by an empty line.
MGCP uses a transaction identifier to correlate commands and
responses. The transaction identifier is encoded as a component of
the command header and repeated as a component of the response header
(see section 3.2.1, 3.2.1.2 and 3.3).
3.2. Command Header
The command header is composed of:
transaction identifier, the endpoint towards which the action is
requested, and the MGCP protocol version,
a parameter value.
Unless otherwise noted or dictated by other referenced standards,
each component in the command header is case insensitive. This goes
for verbs as well as parameters and values, and all comparisons MUST
treat upper and lower case as well as combinations of these as being
equal.
3.2.1. Command line
The command line is composed of:
notifications or restarts, the name of the endpoint that is
issuing the command),
Arango, et al. Informational [Page 62]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
These four items are encoded as strings of printable ASCII
characters, separated by white spaces, i.e. the ASCII space (0x20) or
tabulation (0x09) characters. It is recommended to use exactly one
ASCII space separator.
3.2.1.1. Coding of the requested verb
The verbs that can be requested are encoded as four letter upper or
lower case ASCII codes (comparisons should be case insensitive) as
defined in the following table:
______________________________
| Verb | Code|
|______________________|______|
| EndpointConfiguration| EPCF|
| CreateConnection | CRCX|
| ModifyConnection | MDCX|
| DeleteConnection | DLCX|
| NotificationRequest | RQNT|
| Notify | NTFY|
| AuditEndpoint | AUEP|
| AuditConnection | AUCX|
| RestartInProgress | RSIP|
|______________________|______|
The transaction identifier is encoded as a string of up to 9 decimal
digits. In the command lines, it immediately follows the coding of
the verb.
New verbs may be defined in further versions of the protocol. It may
be necessary, for experimentation purposes, to use new verbs before
they are sanctioned in a published version of this protocol.
Experimental verbs should be identified by a four letter code
starting with the letter X, such as for example XPER.
3.2.1.2. Transaction Identifiers
MGCP uses a transaction identifier to correlate commands and
responses. A gateway supports two separate transaction identifier
name spaces:
a transaction identifier name space for sending transactions, and
a transaction identifier name space for receiving transactions.
At a minimum, transaction identifiers for commands sent to a given
gateway MUST be unique for the maximum lifetime of the transactions
within the collection of Call Agents that control that gateway. Thus,
Arango, et al. Informational [Page 63]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
regardless of the sending Call Agent, gateways can always detect
duplicate transactions by simply examining the transaction
identifier. The coordination of these transaction identifiers between
Call Agents is outside the scope of this specification though.
Transaction identifiers for all commands sent from a given gateway
MUST be unique for the maximum lifetime of the transactions
regardless of which Call Agent the command is sent to. Thus, a Call
Agent can always detect a duplicate transaction from a gateway by the
combination of the domain-name of the endpoint and the transaction
identifier.
The transaction identifier is encoded as a string of up to nine
decimal digits. In the command lines, it immediately follows the
coding of the verb.
Transaction identifiers have values between 1 and 999999999. An MGCP
entity MUST NOT reuse a transaction identifier more quickly than
three minutes after completion of the previous command in which the
identifier was used.
3.2.1.3. Coding of the endpoint identifiers and entity names
The endpoint identifiers and entity names are encoded as case
insensitive e-mail addresses, as defined in RFC 821. In these
addresses, the domain name identifies the system where the endpoint
is attached, while the left side identifies a specific endpoint on
that system.
Examples of such addresses can be:
______________________________________________________________________
| hrd4/56@gw23.example.net | Circuit number 56 in |
| | interface "hrd4" of the Gateway 23 |
| | of the "Example" network |
| Call-agent@ca.example.net | Call Agent for the |
| | "example" network |
| Busy-signal@ann12.example.net| The "busy signal" virtual |
| | endpoint in the announcement |
| | server number 12. |
|______________________________|______________________________________|
The name of notified entities is expressed with the same syntax, with
the possible addition of a port number as in:
Call-agent@ca.example.net:5234
Arango, et al. Informational [Page 64]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
In case the port number is omitted, the default MGCP port (2427) will
be used.
3.2.1.4. Coding of the protocol version
The protocol version is coded as the key word MGCP followed by a
white space and the version number, and optionally followed by a
profile name.. The version number is composed of a major version,
coded by a decimal number, a dot, and a minor version number, coded
as a decimal number. The version described in this document is
version 1.0.
The profile name, if present, is represented by a white-space
separated strings of visible (printable) characters extending to the
end of the line. Profile names may be defined for user communities
who want to apply restrictions or other profiling to MGCP.
In the initial messages, the version will be coded as:
MGCP 1.0
3.2.2. Parameter lines
Parameter lines are composed of a parameter name, which in most cases
is composed of a single upper case character, followed by a colon, a
white space and the parameter value. The parameter that can be
present in commands are defined in the following table:
Arango, et al. Informational [Page 65]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
_
|Parameter name | Code| Parameter value |
|||_|
|ResponseAck | K | see description |
|BearerInformation | B | see description |
|CallId | C | Hexadecimal string, at most 32 chars.|
|ConnectionId | I | Hexadecimal string, at most 32 chars.|
|NotifiedEntity | N | An identifier, in RFC 821 format, |
| | | composed of an arbitrary string and |
| | | of the domain name of the requesting |
| | | entity, possibly completed by a port |
| | | number, as in: |
| | | Call-agent@ca.example.net:5234 |
|RequestIdentifier | X | Hexadecimal string, at most 32 chars.|
|LocalConnectionOptions| L | See description |
|Connection Mode | M | See description |
|RequestedEvents | R | See description |
|SignalRequests | S | See description |
|DigitMap | D | A text encoding of a digit map |
|ObservedEvents | O | See description |
|ConnectionParameters | P | See description |
|ReasonCode | E | An arbitrary character string |
|SpecificEndpointID | Z | An identifier, in RFC 821 format, |
| | | composed of an arbitrary string, |
| | | followed by an "@" followed by the |
| | | domain name of the gateway to which |
| | | this endpoint is attached. |
|Second Endpoint ID | Z2 | Endpoint Id. |
|SecondConnectionId | I2 | Connection Id. |
|RequestedInfo | F | See description |
|QuarantineHandling | Q | See description |
|DetectEvents | T | See Description |
|RestartMethod | RM | See description |
|RestartDelay | RD | A number of seconds, encoded as |
| | | a decimal number |
|EventStates | ES | See description |
|Capabilities | A | See description |
|||_|
|RemoteConnection | RC | Session Description |
|Descriptor | | |
|LocalConnection | LC | Session Description |
|Descriptor | | |
|||_|
Arango, et al. Informational [Page 66]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The parameters are not necessarily present in all commands. The
following table provides the association between parameters and
commands. The letter M stands for mandatory, O for optional and F for
forbidden.
___________________________________________________________________
| Parameter name | EP| CR| MD| DL| RQ| NT| AU| AU| RS|
| | CF| CX| CX| CX| NT| FY| EP| CX| IP|
|_____________________|____|____|____|____|____|____|____|____|____|
| ResponseAck | O | O | O | O | O | O | O | O | O |
| BearerInformation | M | O | O | O | O | F | F | F | F |
| CallId | F | M | M | O | F | F | F | F | F |
| ConnectionId | F | F | M | O | F | F | F | M | F |
| RequestIdentifier | F | O+| O+| O+| M | M | F | F | F |
| LocalConnection | F | O | O | F | F | F | F | F | F |
| Options | | | | | | | | | |
| Connection Mode | F | M | M | F | F | F | F | F | F |
| RequestedEvents | F | O | O | O | O*| F | F | F | F |
| SignalRequests | F | O | O | O | O*| F | F | F | F |
| NotifiedEntity | F | O | O | O | O | O | F | F | F |
| ReasonCode | F | F | F | O | F | F | F | F | O |
| ObservedEvents | F | F | F | F | F | M | F | F | F |
| DigitMap | F | O | O | O | O | F | F | F | F |
| Connection | F | F | F | O | F | F | F | F | F |
| parameters | | | | | | | | | |
| Specific Endpoint ID| F | F | F | F | F | F | F | F | F |
| Second Endpoint ID | F | O | F | F | F | F | F | F | F |
| RequestedInfo | F | F | F | F | F | F | M | M | F |
| QuarantineHandling | F | O | O | O | O | F | F | F | F |
| DetectEvents | F | O | O | O | O | F | F | F | F |
| EventStates | F | F | F | F | F | F | F | F | F |
| RestartMethod | F | F | F | F | F | F | F | F | M |
| RestartDelay | F | F | F | F | F | F | F | F | O |
| SecondConnectionID | F | F | F | F | F | F | F | F | F |
| Capabilities | F | F | F | F | F | F | F | F | F |
|_____________________|____|____|____|____|____|____|____|____|____|
| RemoteConnection | F | O | O | F | F | F | F | F | F |
| Descriptor | | | | | | | | | |
| LocalConnection | F | F | F | F | F | F | F | F | F |
| Descriptor | | | | | | | | | |
|_____________________|____|____|____|____|____|____|____|____|____|
Note (+) that the RequestIdentifier parameter is optional in
connection creation, modification and deletion commands, but that it
becomes mandatory if the command contains an encapsulated
notification request.
Arango, et al. Informational [Page 67]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Note (*) that the RequestedEvents and SignalRequests parameters are
optional in the NotificationRequest. If these parameters are omitted,
the corresponding lists will be considered empty.
If implementers need to experiment with new parameters, for example
when developing a new application of MGCP, they should identify these
parameters by names that start with the string "X-" or "X+", such as
for example:
X-FlowerOfTheDay: Daisy
Parameter names that start with "X+" are critical parameter
extensions. An MGCP entity that receives a critical parameter
extension that it cannot understand should refuse to execute the
command. It should respond with an error code 511 (Unrecognized
extension).
Parameter names that start with "X-" are non critical parameter
extensions. An MGCP entity that receives a non critical parameter
extension that it cannot understand can safely ignore that parameter.
3.2.2.1. Response Acknowledgement
The response acknowledgement attribute is used to managed the "at-
most-once" facility described in the "transmission over UDP" section.
It contains a comma separated list of "confirmed transaction-id
ranges".
Each "confirmed transaction-id ranges" is composed of either one
decimal number, when the range includes exactly one transaction, or
two decimal numbers separated by a single hyphen, describing the
lower and higher transaction identifiers included in the range.
An example of response acknowledgement is:
K: 6234-6255, 6257, 19030-19044
3.2.2.2. Local connection options
The local connection options describe the operational parameters that
the Call Agent suggests to the gateway. These parameters are:
"p", followed by a colon and a decimal number. If the Call Agent
specifies a range of values, the range will be specified as two
decimal numbers separated by an hyphen.
Arango, et al. Informational [Page 68]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
keyword "a", followed by a colon and a character string. If the
Call Agent specifies a list of values, these values will be
separated by a semicolon.
encoded as the keyword "b", followed by a colon and a decimal
number. If the Call Agent specifies a range of values, the range
will be specified as two decimal numbers separated by an hyphen.
followed by a colon and the value "on" or "off".
by a colon a value which can be either the keyword "auto" or a
decimal number (positive or negative) representing the number of
decibels of gain.
followed by a colon and the value "on" or "off".
followed by a colon and the value encoded as two hexadecimal
digits.
followed by a colon and the value "g" (guaranteed service), "cl"
(controlled load) or "be" (best effort).
and a key specification, as defined for the parameter "K" of SDP
(RFC 2327).
colon and the type of network encoded as the keyword "IN", "ATM"
or "LOCAL".
Each of the parameters is optional. When several parameters are
present, the values are separated by a comma.
Examples of connection descriptors are:
L: p:10, a:PCMU
L: p:10, a:G726-32
L: p:10-20, b:64
L: b:32-64, e:off
These set of attributes may be extended by extension attributes.
Arango, et al. Informational [Page 69]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Extension attributes are composed of an attribute name, followed by a
semi-colon and by an attribute value. The attribute name should start
by the two characters "x+", for a mandatory extensions, or "x-", for
a non mandatory extension. If a gateway receives a mandatory
extension attribute that it does not recognize, it should reject the
command with an error code 525 (Unknown extension in
LocalConnectionOptions).
3.2.2.3. Capabilities
Capabilities inform the Call Agent about endpoints' capabilities when
audited. The encoding of capabilities is based on the Local
Connection Options encoding for the parameters that are common to
both. In addition, capabilities can also contain a list of supported
packages, and a list of supported modes.
The parameters used are:
A list of supported codecs. The following parameters will apply to
all codecs specified in this list. If there is a need to specify
that some parameters, such as e.g. silence suppression, are only
compatible with some codecs, then the gateway will return several
LocalConnectionOptions parameters, one for each set of codecs.
Packetization Period:
A range may be specified.
Bandwidth:
A range corresponding to the range for packetization periods may
be specified (assuming no silence suppression). If absent, the
values will be deduced from the codec type.
Echo Cancellation:
"on" if echo cancellation is supported for this codec, "off"
otherwise. The default is support.
Silence Suppression:
"on" if silence suppression is supported for this codec, "off"
otherwise. The default is support.
Gain Control:
"0" if gain control is not supported. The default is support.
Type of Service:
The value "0" indicates no support for type of service, all other
values indicate support for type of service. The default is
support.
Arango, et al. Informational [Page 70]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Resource Reservation:
The parameter indicates the reservation services that are
supported, in addition to best effort. The value "g" is encoded
when the gateway supports both the guaranteed and the controlled
load service, "cl" when only the controlled load service is
supported. The default is "best effort."
Encryption Key:
Encoding any value indicates support for encryption. Default is
no support.
Type of network:
The keyword "nt", followed by a colon and a semicolon separated
list of supported network types. This parameter is optional.
Event Packages
The event packages supported by this endpoint encoded as the
keyword "v", followed by a colon and a character string. If a list
of values is specified, these values will be separated by a
semicolon. The first value specified will be the default package
for that endpoint.
Modes
The modes supported by this endpoint encoded as the keyword "m",
followed by a colon and a semicolon-separated list of supported
connection modes for this endpoint.
3.2.2.4. Connection parameters
Connection parameters are encoded as a string of type and value
pairs, where the type is a either letter identifier of the parameter
or an extension type, and the value a decimal integer. Types are
separated from value by an `=' sign. Parameters are encoded from each
other by a comma.
Arango, et al. Informational [Page 71]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The connection parameter types are specified in the following table:
__________________________________________________________________
| Connection parameter| Code| Connection parameter |
| name | | value |
|_____________________|______|____________________________________|
| Packets sent | PS | The number of packets that |
| | | were sent on the connection. |
| Octets sent | OS | The number of octets that |
| | | were sent on the connection. |
| Packets received | PR | The number of packets that |
| | | were received on the connection. |
| Octets received | OR | The number of octets that |
| | | were received on the connection. |
| Packets lost | PL | The number of packets that |
| | | were not received on the |
| | | connection, as deduced from |
| | | gaps in the sequence number. |
| Jitter | JI | The average inter-packet arrival |
| | | jitter, in milliseconds, |
| | | expressed as an integer number. |
| Latency | LA | Average latency, in milliseconds, |
| | | expressed as an integer number. |
|_____________________|______|____________________________________|
Extension parameters names are composed of the string "X-" followed
by a two letters extension parameter name. Call agents that received
unrecognized extensions shall silently ignore these extensions.
An example of connection parameter encoding is:
P: PS=1245, OS=62345, PR=0, OR=0, PL=0, JI=0, LA=48
3.2.2.5. Reason Codes
Reason codes are three-digit numeric values. The reason code is
optionally followed by a white space and commentary, e.g.:
900 Endpoint malfunctioning
A list of reason-codes can be found in Section 2.5.
Arango, et al. Informational [Page 72]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
3.2.2.6. Connection mode
The connection mode describes the mode of operation of the
connection. The possible values are:
________________________________________________________
| Mode | Meaning |
|____________|__________________________________________|
| M: sendonly| The gateway should only send packets |
| M: recvonly| The gateway should only receive packets |
| M: sendrecv| The gateway should send |
| | and receive packets |
| M: confrnce| The gateway should place |
| | the connection in conference mode |
| M: inactive| The gateway should neither |
| | send nor receive packets |
| M: loopback| The gateway should place |
| | the circuit in loopback mode. |
| M: conttest| The gateway should place |
| | the circuit in test mode. |
| M: netwloop| The gateway should place |
| | the connection in network loopback mode.|
| M: netwtest| The gateway should place |
| | the connection in network |
| | continuity test mode. |
| M: data | The gateway should use the circuit |
| | for network access for data |
| | (e.g., PPP, SLIP, etc.). |
|____________|__________________________________________|
3.2.2.7. Coding of event names
Event names are composed of an optional package name, separated by a
slash (/) from the name of the actual event. The event name can
optionally be followed by an at sign (@) and the identifier of a
connection on which the event should be observed. Event names are
used in the RequestedEvents, SignalRequests and ObservedEvents
parameter.
Each signal has one of the following signal-types associated with:
On/Off (OO), Time-out (TO), Brief (BR). (These signal types are
specified in the package definitions, and are not present in the
messages.) On/Off signals can be parameterized with a "+" to turn
the signal on, or a "-" to turn the signal off. If an on/off signal
is not parameterized, the signal is turned on. Both of the following
will turn the vmwi signal on:
vmwi(+), vmwi
Arango, et al. Informational [Page 73]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The following are valid examples of event names:
____________________________________________________________
| L/hu | on-hook transition, in the line package |
| F/0 | digit 0 in the MF package |
| fh | Flash-hook, assuming that the line package|
| | is a default package for the end point. |
| G/rt@0A3F58 | Ring back signal on |
| | connection "0A3F58". |
|_____________|_____________________________________________|
In addition, the range and wildcard notation of events can be used,
instead of individual names, in the RequestedEvents and DetectEvents
parameters. The star sign can be used to denote "all connections",
and the dollar sign can be used to denote the "current" connection.
The following are valid examples of such notations:
__________________________________________________________
| M/[0-9] | Digits 0 to 9 in the MF package |
| fh | Flash-hook, assuming that the line package|
| | is a default package for the end point. |
| [0-9*#A-D]| All digits and letters in the DTMF |
| | packages (default for endpoint). |
| T/$ | All events in the trunk packages. |
| R/qa@* | The quality alert event in all |
| | connections |
| R/rt@$ | Ringback on current connection |
|___________|_____________________________________________|
3.2.2.8. RequestedEvents
The RequestedEvent parameter provides the list of events that have
been requested. The event codes are described in the previous
section.
Each event can be qualified by a requested action, or by a list of
actions. The actions, when specified, are encoded as a list of
keywords, enclosed in parenthesis and separated by commas. The codes
for the various actions are:
Arango, et al. Informational [Page 74]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
______________________________________
| Action | Code|
|______________________________|______|
| Notify immediately | N |
| Accumulate | A |
| Treat according to digit map | D |
| Swap | S |
| Ignore | I |
| Keep Signal(s) active | K |
| Embedded Notification Request| E |
|______________________________|______|
When no action is specified, the default action is to notify the
event. This means that, for example, ft and ft(N) are equivalent.
Events that are not listed are ignored.
The digit-map action can only be specified for the digits, letters
and interdigit timers in the MF and DTMF packages, or in other
packages that would define the encoding of digits and timers.
The requested list is encoded on a single line, with event/action
groups separated by commas. Examples of RequestedEvents encoding are:
R: hu(N), hf(S,N)
R: hu(N), [0-9#T](D)
In the case of the "enable" action, the embedded notification request
parameters are encoded as a list of up to three parameter groups,
separated by commas. Each group start by a one letter identifier,
followed by a list of parameters enclosed between parenthesis. The
first optional parameter group, identified by the letter "R", is the
enabled value of the RequestedEvents parameter. The second optional
group, identified by the letter "S", is the enabled value of the
SignalRequests parameter. The third optional group, identified by
the letter "D", is the enabled value of the DigitMap. (Note that some
existing implementation may encode these three components in a
different order.)
If the RequestedEvents is not present, the parameter will be set to a
null value. If the SignalRequest is not present, the parameter will
be set to a null value. If the DigitMap is absent, the current value
should be used. The following are valid examples of embedded
requests:
R: hd(E(R([0-9#T](D),hu(N)),S(dl),D([0-9].[#T])))
R: hd(E(R([0-9#T](D),hu(N)),S(dl)))
Arango, et al. Informational [Page 75]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
3.2.2.9. SignalRequests
The SignalRequests parameter provides the name of the signals that
have been requested. Each signal is identified by a name, as
indicated in the previous section.
Several signals, such as for example announcement or ADSI display,
can be qualified by additional parameters:
These parameters will be encoded as a set of UTF8 character strings,
spearated by comams and enclosed within parenthesis, as in:
S: adsi("123456 Francois Gerard")
S: ann(no-such-number, 1234567)
When several signals are requested, their codes are separated by a
comma, as in:
S: asdi(123456 Your friend), rg
3.2.2.10. ObservedEvent
The observed event parameters provides the list of events that have
been observed. The event codes are the same as those used in the
NotificationRequest. Events that have been accumulated according to
the digit map may be grouped in a single string; they should be
reported as lists of isolated events if other events where detected
during the digit accumulation. Examples of observed actions are:
O: L/hu
O: 8295555T
O: 8,2,9,5,5,L/hf,5,5,T
O: L/hf, L/hf, L/hu
3.2.2.11. RequestedInfo
The RequestedInfo parameter contains a comma separated list of
parameter codes, as defined in the "Parameter lines" section. For
example, if one wants to audit the value of the NotifiedEntity,
RequestIdentifier, RequestedEvents, SignalRequests, DigitMap,
QuarantineHandling and DetectEvents parameters, The value of the
RequestedInfo parameter will be:
F:N,X,R,S,D,Q,T
Arango, et al. Informational [Page 76]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
The capabilities request, in the AuditEndPoint command, is encoded by
the keyword "A", as in:
F:A
3.2.2.12. QuarantineHandling
The quarantine handling parameter contains a list of comma separated
keywords:
quarantined events. If neither process or discard is present,
process is assumed.
one notification is expected, or whether multiple notifications
are allowed. If neither step or loop is present, step is assumed.
The following values are valid examples:
Q:loop
Q:process
Q:discard,loop
3.2.2.13. DetectEvents
The DetectEvent parameter is encoded as a comma separated list of
events, such as for example:
T: hu,hd,hf,[0-9#*]
It should be noted, that no actions can be associated with the
events.
3.2.2.14. EventStates
The EventStates parameter is encoded as a comma separated list of
events, such as for example:
ES: hu
It should be noted, that no actions can be associated with the
events.
Arango, et al. Informational [Page 77]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
3.2.2.15. RestartMethod
The RestartMethod parameter is encoded as one of the keywords
"graceful", "forced", "restart", "disconnected" or "cancel-graceful"
as for example:
RM:restart
3.2.2.16. Bearer Information
The values of the bearer informations are encoded as a comma
separated list of attributes, represented by an attribute name,
separated by a colon from an attribute value.
The only attribute that is defined is the "encoding" (code "e"),
whose defined values are "A" (A-law) and "mu" (mu-law).
An example of bearer information encoding is:
B: e:mu
3.3. Format of response headers
The response header is composed of a response line, optionally
followed by headers that encode the response parameters.
An example of response header could be:
200 1203 OK
The response line starts with the response code, which is a three
digit numeric value. The code is followed by a white space, the
transaction identifier, and an optional commentary preceded by a
white space.
The following table describe the parameters whose presence is
mandatory or optional in a response header, as a function of the
command that triggered the response. The letter M stands for
mandatory, O for optional and F for forbidden.
Arango, et al. Informational [Page 78]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
___________________________________________________________________
| Parameter name | EP| CR| MD| DL| RQ| NT| AU| AU| RS|
| | CF| CX| CX| CX| NT| FY| EP| CX| IP|
|_____________________|____|____|____|____|____|____|____|____|____|
| ResponseAck | F | F | F | F | F | F | F | F | F |
| BearerInformation | F | F | F | F | F | F | O | F | F |
| CallId | F | F | F | F | F | F | F | O | F |
| ConnectionId | F | O*| F | F | F | F | F | F | F |
| RequestIdentifier | F | F | F | F | F | F | O | F | F |
| LocalConnection | F | F | F | F | F | F | O | O | F |
| Options | | | | | | | | | |
| Connection Mode | F | F | F | F | F | F | F | O | F |
| RequestedEvents | F | F | F | F | F | F | O | F | F |
| SignalRequests | F | F | F | F | F | F | O | F | F |
| NotifiedEntity | F | F | F | F | F | F | F | F | O |
| ReasonCode | F | F | F | F | F | F | O | F | F |
| ObservedEvents | F | F | F | F | F | F | O | F | F |
| DigitMap | F | F | F | F | F | F | O | F | F |
| Connection | F | F | F | O | F | F | F | O | F |
| Parameters | | | | | | | | | |
| Specific Endpoint ID| F | O | F | F | F | F | F | F | F |
| RequestedInfo | F | F | F | F | F | F | F | F | F |
| QuarantineHandling | F | F | F | F | F | F | O | F | F |
| DetectEvents | F | F | F | F | F | F | O | F | F |
| EventStates | F | F | F | F | F | F | O | F | F |
| RestartMethod | F | F | F | F | F | F | O | F | F |
| RestartDelay | F | F | F | F | F | F | O | F | F |
| Capabilities | F | F | F | F | F | F | O | F | F |
| SecondConnectionId | F | O | F | F | F | F | F | F | F |
| SecondEndpointID | F | O | F | F | F | F | F | F | F |
|_____________________|____|____|____|____|____|____|____|____|____|
| LocalConnection | F | M | O | F | F | F | F | O*| F |
| Descriptor | | | | | | | | | |
| RemoteConnection | F | F | F | F | F | F | F | O*| F |
| Descriptor | | | | | | | | | |
|_____________________|____|____|____|____|____|____|____|____|____|
In the case of a CreateConnection message, the response line is
followed by a Connection-Id parameter. It may also be followed a
Specific-Endpoint-Id parameter, if the creation request was sent to a
wildcarded Endpoint-Id. The connection-Id parameter is marked as
optional in the Table. In fact, it is mandatory with all positive
responses, when a connection was created, and forbidden when the
response is negative, when no connection as created.
In the case of a DeleteConnection message, the response line is
followed by a Connection Parameters parameter, as defined in section
3.2.2.2.
Arango, et al. Informational [Page 79]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
A LocalConnectionDescriptor should be transmitted with a positive
response (code 200) to a CreateConnection. It may be transmitted in
response to a ModifyConnection command, if the modification resulted
in a modification of the session parameters. The
LocalConnectionDescriptor is encoded as a "session description," as
defined in section 3.4. It is separated from the response header by
an empty line.
When several session descriptors are encoded in the same response,
they are encoded one after each other, separated by an empty line.
This is the case for example when the response to an audit connection
request carries both a local session description and a remote session
description, as in:
200 1203 OK
C: A3C47F21456789F0
N: [128.96.41.12]
L: p:10, a:PCMU;G726-32
M: sendrecv
P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27,LA=48
v=0
c=IN IP4 128.96.41.1
m=audio 1296 RTP/AVP 0
v=0
c=IN IP4 128.96.63.25
m=audio 1296 RTP/AVP 0 96
a=rtpmap:96 G726-32/8000
In this example, according to the SDP syntax, each description starts
with a "version" line, (v=...). The local description is always
transmitted before the remote description. If a connection descriptor
is requested, but it does not exist for the connection audited, that
connection descriptor will appear with the SDP protocol version field
only.
Arango, et al. Informational [Page 80]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
3.4. Formal syntax description of the protocol
In this section, we provided a formal description of the protocol
syntax, following the "Augmented BNF for Syntax Specifications"
defined in RFC 2234.
MGCPMessage = MGCPCommand / MGCPResponse
MGCPCommand = MGCPCommandLine 0*(MGCPParameter) [EOL *SDPinformation]
MGCPCommandLine = MGCPVerb 1*(WSP) <transaction-id> 1*(WSP)
<endpointName> 1*(WSP) MGCPversion EOL
MGCPVerb = "EPCF" / "CRCX" / "MDCX" / "DLCX" / "RQNT"
/ "NTFY" / "AUEP" / "AUCX" / "RSIP" / extensionVerb
extensionVerb = "X" 3(ALPHA / DIGIT)
transaction-id = 1*9(DIGIT)
endpointName = localEndpointName "@" DomainName
LocalEndpointName = LocalNamePart 0*("/" LocalNamePart)
LocalNamePart = AnyName / AllName / NameString
AnyName = "$"
AllNames = "*"
NameString = 1*(range-of-allowed-characters)
DomainName = 1*256(ALPHA / DIGIT / "." / "-") ; as defined in RFC 821
MGCPversion = "MGCP" 1*(WSP) 1*(DIGIT) "." 1*(DIGIT)
[1*(WSP) ProfileName]
ProfileName = 1*(range-of-allowed-characters)
MGCPParameter = ParameterValue EOL
ParameterValue = ("K" ":" 0*WSP <ResponseAck>) /
("B" ":" 0*WSP <BearerInformation>) /
("C" ":" 0*WSP <CallId>) /
("I" ":" 0*WSP <ConnectionId>) /
("N" ":" 0*WSP <NotifiedEntity>) /
("X" ":" 0*WSP <RequestIdentifier>) /
("L" ":" 0*WSP <LocalConnectionOptions>) /
("M" ":" 0*WSP <ConnectionMode>) /
("R" ":" 0*WSP <RequestedEvents>) /
("S" ":" 0*WSP <SignalRequests>) /
("D" ":" 0*WSP <DigitMap>) /
("O" ":" 0*WSP <ObservedEvents>) /
("P" ":" 0*WSP <ConnectionParameters>) /
("E" ":" 0*WSP <ReasonCode>) /
Arango, et al. Informational [Page 81]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
("Z" ":" 0*WSP <SpecificEndpointID>) /
("Z2" ":" 0*WSP <SecondEndpointID>) /
("I2" ":" 0*WSP <SecondConnectionID>) /
("F" ":" 0*WSP <RequestedInfo>) /
("Q" ":" 0*WSP <QuarantineHandling>) /
("T" ":" 0*WSP <DetectEvents>) /
("RM" ":" 0*WSP <RestartMethod>) /
("RD" ":" 0*WSP <RestartDelay>) /
("A" ":" 0*WSP <Capabilities>) /
("ES" ":" 0*WSP <EventStates>) /
(extensionParameter ":" 0*WSP <parameterString>)
ResponseAck = confirmedTransactionIdRange
confirmedTransactionIdRange = 1*9DIGIT [ "-" 1*9DIGIT ]
BearerInformation = BearerAttribute 0*("," 0*WSP BearerAttribute)
BearerAttribute = ("e" ":" <BearerEncoding>)
BearerEncoding = "A" / "mu"
CallId = 1*32(HEXDIG)
The audit request response may include a list of identifiers
ConnectionId = 1*32(HEXDIG) 0*("," 1*32(HEXDIG))
SecondConnectionID = ConnectionId
NotifiedEntity = [LocalName "@"] DomainName [":" portNumber]
LocalName = 1*32(suitableCharacter)
portNumber = 1*5(DIGIT)
RequestIdentifier = 1*32(HEXDIG)
LocalConnectionOptions = [ LocalOptionValue 0*(WSP)
0*("," 0*(WSP) LocalOptionValue 0*(WSP)) ]
LocalOptionValue = ("p" ":" <packetizationPeriod> )
/ ("a" ":" <compressionAlgorithm> )
/ ("b" ":" <bandwidth> )
/ ("e" ":" <echoCancellation> )
/ ("gc" ":" <gainControl> )
/ ("s" ":" <silenceSuppression> )
/ ("t" ":" <typeOfService> )
/ ("r" ":" <resourceReservation> )
/ ("k" ":" <encryptionmethod>[":"<encryptionKey>])
/ ("nt" ":" <typeOfNetwork> )
/ (localOptionExtensionName ":"
/ localOptionExtensionValue)
Arango, et al. Informational [Page 82]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
Capabilities = [ CapabilityValue 0*(WSP)
0*("," 0*(WSP) CapabilityValue 0*(WSP)) ]
CapabilityValue = LocalOptionValue
/ ("v" ":" <supportedPackages>)
/ ("m" ":" <supportedModes> )
packetizationPeriod = 1*4(DIGIT)["-" 1*4(DIGIT)]
compressionAlgorithm = algorithmName 0*(";" algorithmName)
algorithmName = 1*32(SuitableCharacter)
bandwidth = 1*4(DIGIT)["-" 1*4(DIGIT)]
echoCancellation = "on" / "off"
gainControl = "auto" / ["-"]1*4(DIGIT)
silenceSuppression = "on" / "off"
typeOfService = 2HEXDIG
resourceReservation = "g" / "cl" / "be"
;encryption parameters are coded as in SDP (RFC 2327)
encryptiondata = ( "clear" ":" <encryptionKey> )
/ ( "base64" ":" <encodedEncryptionKey> )
/ ( "uri" ":" <URItoObtainKey> )
/ ( "prompt" ) ; defined in SDP, not usable in MGCP!
encryptionKey = 1*(SuitableCharacter / SP)
encodedEncryptionKey = 1*(ALPHA / DIGIT / "+" / "/" / "=")
URItoObtainKey = 1*(SuitableCharacter) / quotedString
typeOfNetwork = "IN" / "ATM" / "LOCAL"
supportedModes= ConnectionMode 0*(";" ConnectionMode)
supportedPackages = packageName 0*(";" packageName)
localOptionExtensionName = "x" ("+"/"-") 1*32(SuitableCharacter)
localOptionExtensionValue = 1*32(SuitableCharacter) / quotedString
ConnectionMode = "sendonly" / "recvonly" / "sendrecv" /
"confrnce" / "inactive" / "loopback" /
"conttest" / "netwloop" / "netwtest" / "data"
RequestedEvents = [requestedEvent 0*("," 0*(WSP) requestedEvent)]
requestedEvent = eventName [ "(" requestedActions ")" ]
eventName = [ (packageName / "*") "/" ] (eventId / "all" / eventRange)
[ "@" (ConnectionId / "$" / "*") ]
packageName = 1*(ALPHA / DIGIT / HYPHEN)
eventId = 1*(SuitableCharacter)
eventRange = "[" 1*(DIGIT / DTMFLetter / "*" / "#" /
Arango, et al. Informational [Page 83]
RFC 2705 Media Gateway Control Protocol (MGCP) October 1999
(DIGIT "-" DIGIT)/(DTMFLetter "-"
DTMFLetter)) "]"
requestedActions = requestedAction 0*("," 0*(WSP) requestedAction)
requestedAction = "N" / "A" / "D" / "S" / "I" / "K" /
"E" "(" EmbeddedRequest ")"
EmbeddedRequest = ( "R" "(" EmbeddedRequestList ")"
["," "S" "(" EmbeddedSignalRequest ")" ]
["," "D" "(" EmbeddedDigitMap ")" ] )
/ ( "S" "(" EmbeddedSignalRequest ")"
["," "D" "(" EmbeddedDigitMap ")" ] )
/ ( "D" "(" EmbeddedDigitMap ")" )
EmbeddedRequestList = RequestedEvents
EmbeddedSignalRequest = SignalRequests
EmbeddedDigitMap = DigitMap
SignalRequests = [ SignalRequest 0*("," 0*(WSP) SignalRequest ) ]
SignalRequest = eventName [ "(" eventParameters ")" ]
eventParameters = eventParameter 0*("," 0*(WSP) eventParameter)
eventParameter = eventParameterString / quotedString
eventParameterString = 1*(SuitableCharacter)
DigitMap = DigitString / "(" DigitStringList ")"
DigitStringList = DigitString 0*( "|" DigitString )
DigitString = 1*(DigitStringElement)
DigitStringElement = DigitPosition ["."]
DigitPosition = DigitMapLetter / DigitMapRange
DigitMapLetter = DIGIT / "#" / "*" / "A" / "B" / "C" / "D" / "T"
DigitMapRange = "x" / "[" 1*DigitLetter "]"
DigitLetter ::= *1)