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:
* The introduction presents the basic assumptions and the relation
to other protocols such as H.323, RTSP, SAP or SIP.
* The interface section presents a conceptual overview of the MGCP,
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.
* The protocol description section presents the MGCP encodings,
which are based on simple text formats, and the transmission
procedure over UDP.
* The security section presents the security requirement of MGCP,
and its usage of IP security services (IPSEC).
* The event packages section provides an initial definition of
packages and event names.
* The description of the changes made in combining SGCP 1.1 and IPDC
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
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
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
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:
* Trunking gateways, that interface between the telephone network
and a Voice over IP network. Such gateways typically manage a
large number of digital circuits.
* Voice over ATM gateways, which operate much the same way as voice
over IP trunking gateways, except that they interface to an ATM
network.
* Residential gateways, that provide a traditional analog (RJ11)
interface to a Voice over IP network. Examples of residential
gateways include cable modem/cable set-top boxes, xDSL devices,
broad-band wireless devices
* Access gateways, that provide a traditional analog (RJ11) or
digital PBX interface to a Voice over IP network. Examples of
access gateways include small-scale voice over IP gateways.
* Business gateways, that provide a traditional digital PBX
interface or an integrated "soft PBX" interface to a Voice over IP
network.
* Network Access Servers, that can attach a "modem" to a telephone
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.
* Circuit switches, or packet switches, which can offer a control
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
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:
* An interface on a gateway that terminates a trunk connected to a
PSTN switch (e.g., Class 5, Class 4, etc.). A gateway that
terminates trunks is called a trunk gateway.
* An interface on a gateway that terminates an analog POTS
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:
* Transmission of audio packets using RTP and UDP over a TCP/IP
network.
* Transmission of audio packets using AAL2, or another adaptation
layer, over an ATM network.
* Transmission of packets over an internal connection, for example
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.
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.
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), RFC2327,
* the Session Announcement Protocol (SAP),
* the Session Initiation Protocol (SIP),
* the Real Time Streaming Protocol (RTSP), RFC2326.
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:
_____________________________________________________________________
| 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.
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:
* Digital channel (DS0),
* Analog line,
* Annoucement server access point,
* Interactive Voice Response access point,
* Conference bridge access point,
* Packet relay,
* Wiretap access point,
* ATM "trunk side" interface.
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.
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.
+-------
+---------------+|
(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.
+-------------+
| 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
+---------------------+ |
+-------
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.
2.1.2. Endpoint identifiers
Endpoints identifiers have two components that both are case
insensitive:
* the domain name of the gateway that is managing the endpoint,
* a local name within that gateway,
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:
*/term2/term3 if term1 is 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.
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:
* In the ISUP protocol, trunks are grouped into trunk groups,
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).
* In the gateway configuration files, physical interfaces are
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.
* In MGCP, the endpoints are identified by an endpoint identifier.
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
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.
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:
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
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,
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.
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 --
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:
* Connecting a trunk line to a wiretap device,
* Connecting a call to an Interactive Voice-Response unit,
* Connecting a call to a Conferencing unit,
* Routing a call from on endpoint to another, something often
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:
* Entities such as endpoints or Call Agents are identified by their
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.
* Entities may move to another platform. The association between a
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.
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:
_______________________________________________________
| 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.
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