RFC3435 - Media Gateway Control Protocol (MGCP) Version 1.0

时间:2005-02-17 来源: 作者: 点击:
Network Working Group F. Andreasen Request for Comments: 3435 B. Foster Obsoletes: 2705 Cisco Systems Category: Informational January 2003 Media Gateway Control Protocol (MGCP) Version 1.0 Status of this Memo This memo provides information for the In
  Network Working Group F. Andreasen
Request for Comments: 3435 B. Foster
Obsoletes: 2705 Cisco Systems
Category: Informational January 2003

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 (2003). 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 RFC3015,
which was developed in the IETF Megaco Working Group and the ITU-T
SG16 and which is considered by the IETF and ITU-T to be the
standards-based (including reviewed security considerations) way to
meet the needs that MGCP was designed to address.

Abstract

This document describes an application programming interface and a
corresponding protocol (MGCP) which is used between elements of a
decomposed multimedia gateway. The decomposed multimedia gateway
consists of a Call Agent, which contains the call control
"intelligence", and a media gateway which contains the media
functions, e.g., conversion from TDM voice to Voice over IP.

Media gateways contain endpoints on which the Call Agent can create,
modify and delete connections in order to establish and control media
sessions with other multimedia endpoints. Also, the Call Agent can
instruct the endpoints to detect certain events and generate signals.
The endpoints automatically communicate changes in service state to
the Call Agent. Furthermore, the Call Agent can audit endpoints as
well as the connections on endpoints.

The basic and general MGCP protocol is defined in this document,
however most media gateways will need to implement one or more MGCP
packages, which define extensions to the protocol suitable for use
with specific types of media gateways. Such packages are defined in
separate documents.

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
1.4 Conventions used in this Document............................9
2. Media Gateway Control Interface.............................10
2.1 Model and Naming Conventions................................10
2.1.1 Types of Endpoints..........................................10
2.1.2 Endpoint Identifiers........................................14
2.1.3 Calls and Connections.......................................16
2.1.4 Names of Call Agents and Other Entities.....................22
2.1.5 Digit Maps..................................................23
2.1.6 Packages....................................................26
2.1.7 Events and Signals..........................................28
2.2 Usage of SDP................................................33
2.3 Gateway Control Commands....................................33
2.3.1 Overview of Commands........................................33
2.3.2 EndpointConfiguration.......................................36
2.3.3 NotificationRequest.........................................37
2.3.4 Notify......................................................44
2.3.5 CreateConnection............................................46
2.3.6 ModifyConnection............................................52
2.3.7 DeleteConnection (from the Call Agent)......................54
2.3.8 DeleteConnection (from the gateway).........................58
2.3.9 DeleteConnection (multiple connections from the Call Agent) 59
2.3.10 AuditEndpoint...............................................60
2.3.11 AuditConnection.............................................65
2.3.12 RestartInProgress...........................................66
2.4 Return Codes and Error Codes................................69
2.5 Reason Codes................................................74
2.6 Use of Local Connection Options and Connection Descriptors..75
2.7 Resource Reservations.......................................77
3. Media Gateway Control Protocol..............................77
3.1 General Description.........................................78
3.2 Command Header..............................................79
3.2.1 Command Line................................................79
3.2.2 Parameter Lines.............................................82
3.3 Format of response headers.................................101
3.3.1 CreateConnection Response..................................104
3.3.2 ModifyConnection Response..................................105

3.3.3 DeleteConnection Response..................................106
3.3.4 NotificationRequest Response...............................106
3.3.5 Notify Response............................................106
3.3.6 AuditEndpoint Response.....................................106
3.3.7 AuditConnection Response...................................107
3.3.8 RestartInProgress Response.................................108
3.4 Encoding of the Session Description (SDP)..................108
3.4.1 Usage of SDP for an Audio Service..........................110
3.4.2 Usage of SDP for LOCAL Connections.........................110
3.5 Transmission over UDP......................................111
3.5.1 Providing the At-Most-Once Functionality...................112
3.5.2 Transaction Identifiers and Three Ways Handshake...........113
3.5.3 Computing Retransmission Timers............................114
3.5.4 Maximum Datagram Size, Fragmentation and Reassembly........115
3.5.5 Piggybacking...............................................116
3.5.6 Provisional Responses......................................117
4. States, Failover and Race Conditions.......................119
4.1 Failover Assumptions and Highlights........................119
4.2 Communicating with Gateways................................121
4.3 Retransmission, and Detection of Lost Associations:........122
4.4 Race Conditions............................................126
4.4.1 Quarantine List............................................127
4.4.2 Explicit Detection.........................................133
4.4.3 Transactional Semantics....................................134
4.4.4 Ordering of Commands, and Treatment of Misorder............135
4.4.5 Endpoint Service States....................................137
4.4.6 Fighting the Restart Avalanche.............................140
4.4.7 Disconnected Endpoints.....................................143
4.4.8 Load Control in General....................................146
5. Security Requirements......................................147
5.1 Protection of Media Connections............................148
6. Packages...................................................148
6.1 Actions....................................................150
6.2 BearerInformation..........................................150
6.3 ConnectionModes............................................151
6.4 ConnectionParameters.......................................151
6.5 DigitMapLetters............................................151
6.6 Events and Signals.........................................152
6.6.1 Default and Reserved Events................................155
6.7 ExtensionParameters........................................156
6.8 LocalConnectionOptions.....................................157
6.9 Reason Codes...............................................157
6.10 RestartMethods.............................................158
6.11 Return Codes...............................................158
7. Versions and Compatibility.................................158
7.1 Changes from RFC2705......................................158
8. Security Considerations....................................164
9. Acknowledgments............................................164

10. References.................................................164
Appendix A: Formal Syntax Description of the Protocol.............167
Appendix B: Base Package..........................................175
B.1 Events.....................................................175
B.2 Extension Parameters.......................................176
B.2.1 PersistentEvents...........................................176
B.2.2 NotificationState..........................................177
B.3 Verbs......................................................177
Appendix C: IANA Considerations...................................179
C.1 New MGCP Package Sub-Registry..............................179
C.2 New MGCP Package...........................................179
C.3 New MGCP LocalConnectionOptions Sub-Registry...............179
Appendix D: Mode Interactions.....................................180
Appendix E: Endpoint Naming Conventions...........................182
E.1 Analog Access Line Endpoints...............................182
E.2 Digital Trunks.............................................182
E.3 Virtual Endpoints..........................................183
E.4 Media Gateway..............................................184
E.5 Range Wildcards............................................184
Appendix F: Example Command Encodings.............................185
F.1 NotificationRequest........................................185
F.2 Notify.....................................................186
F.3 CreateConnection...........................................186
F.4 ModifyConnection...........................................189
F.5 DeleteConnection (from the Call Agent).....................189
F.6 DeleteConnection (from the gateway)........................190
F.7 DeleteConnection (multiple connections
from the Call Agent).......................................190
F.8 AuditEndpoint..............................................191
F.9 AuditConnection............................................192
F.10 RestartInProgress..........................................193
Appendix G: Example Call Flows....................................194
G.1 Restart....................................................195
G.1.1 Residential Gateway Restart................................195
G.1.2 Call Agent Restart.........................................198
G.2 Connection Creation........................................200
G.2.1 Residential Gateway to Residential Gateway.................200
G.3 Connection Deletion........................................206
G.3.1 Residential Gateway to Residential Gateway.................206
Authors' Addresses................................................209
Full Copyright Statement..........................................210

1. Introduction

This document describes an abstract application programming interface
(MGCI) and a corresponding protocol (MGCP) for controlling media
gateways from external call control elements called media gateway
controllers or Call Agents. A media gateway is typically 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. Examples of media 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, and
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 known as Call Agents. The MGCP assumes that these
call control elements, or Call Agents, will synchronize with each
other to send coherent commands and responses to the gateways under
their control. If this assumption is violated, inconsistent behavior
should be expected. 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 specifies
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 and/or sinks of
data and can 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 trunking 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,
for example:

* Transmission of audio packets using RTP and UDP over an 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 "signaling
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 call 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), RFC2974

* the Session Initiation Protocol (SIP), RFC3261

* 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 syn- | |
| | | chronization | |
| | | 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.

1.4 Conventions used in this Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED, "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14, RFC2119 [2].

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 more 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
package. 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 functionality. Our analysis, so far, has led us to
isolate the following basic endpoint types:

* Digital channel (DS0),

* Analog line,

* Announcement server access point,

* Interactive Voice Response access point,

* Conference bridge access point,

* Packet relay,

* ATM "trunk side" interface.

In this section, we will describe the expected behavior of such
endpoints.

This list is not final. There may be other types of endpoints
defined in the future, for example test endpoints that could be used
to check network quality, or frame-relay endpoints that could be used
to manage audio channels multiplexed over a frame-relay virtual
circuit.

2.1.1.1 Digital Channel (DS0)

Digital channels provide a 64 Kbps 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-law or mu-law, using either the complete set of 8 bits per sample
or only 7 of these bits, into audio packets. When the media gateway
also supports a Network Access Server (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 supports is a characteristic of the
gateway, and may in fact vary according to the allocation of
resources within the gateway.

In some cases, digital channels are used to carry signaling. This is
the case for example for SS7 "F" links, or ISDN "D" channels. Media
gateways that support these signaling functions shall be able to send
and receive the signaling packets to and from a Call Agent, using the
"backhaul" procedures defined by the SIGTRAN working group of the
IETF. Digital channels are sometimes used in conjunction with
channel associated signaling, such as "MF R2". Media gateways that
support these signaling functions shall be able to detect and produce
the corresponding signals, such as for example "wink" or "A",
according to the event signaling 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 supports is a characteristic
of the gateway, and may in fact vary according to the allocation of
resources within the gateway. A typical gateway should however be
able to support two or three connections per endpoint, in order to
support services such as "call waiting" or "three way calling".

2.1.1.3 Announcement Server Access Point

An announcement server endpoint provides access 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 signaling and reporting procedures
defined in MGCP.

+----------------------+
| Announcement endpoint| -------- Connection
+----------------------+

A given announcement endpoint is not expected 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 one way, or "half
duplex" -- the announcement server is not expected to listen to the
audio signals from the connection.

2.1.1.4 Interactive Voice Response Access Point

An Interactive Voice Response (IVR) endpoint provides access to an
IVR service. Under requests from the Call Agent, the IVR server will
"play" announcements and tones, and will "listen" to responses, such
as DTMF input or voice messages, from the user. The requests from
the Call Agent will follow the event signaling and reporting
procedures defined in MGCP.

+-------------+
| IVR endpoint| -------- Connection
+-------------+

A given IVR endpoint is not expected 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 supports is a characteristic of the
gateway, and may in fact vary according to the allocation of
resources 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 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 supports is a characteristic of the
gateway, and may in fact vary according to the allocation of
resources within the gateway.

2.1.2 Endpoint Identifiers

Endpoint 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

Endpoint names are of the form:

local-endpoint-name@domain-name

where domain-name is an absolute domain-name as defined in RFC1034
and includes a host portion, thus an example domain-name could be:

mygateway.whatever.net

Also, domain-name may be an IP-address of the form defined for domain
name in RFC821, thus another example could be (see RFC821 for
details):

[192.168.1.2]

Both IPv4 and IPv6 addresses can be specified, however use of IP
addresses as endpoint identifiers is generally discouraged.

Note that since the domain name portion is part of the endpoint
identifier, different forms or different values referring to the same
entity are not freely interchangeable. The most recently supplied
form and value MUST always be used.

The local endpoint name is case-insensitive. The syntax of the local
endpoint name is hierarchical, where the least specific component of
the name is the leftmost term, and the most specific component is the
rightmost term. The precise syntax depends on the type of endpoint
being named and MAY start with a term that identifies the endpoint
type. In any case, the local endpoint name MUST adhere to the
following naming rules:

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 delimiters ("/", "@"), 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 local endpoint name is of the
form:

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". Unless specified otherwise, this refers to all
endpoints configured for service, regardless of their actual
service state, i.e., in-service or out-of-service.

5) 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". Unless specified otherwise, this only refers to
endpoints that are in-service.

Furthermore, it is RECOMMENDED that Call Agents adhere to the
following:

* Wild-carding should only be done from the right, thus if a term is
wild-carded, then all terms to the right of that term should be
wild-carded as well.

* In cases where mixed dollar sign and asterisk wild-cards are used,
dollar-signs should only be used from the right, thus if a term had
a dollar sign wild-card, all terms to the right of that term should
also contain dollar sign wild-cards.

The description of a specific command may add further criteria for
selection within the general rules given above.

Note, that wild-cards may be applied to more than one term in which
case they shall be evaluated from left to right. For example, if we
have the endpoint names "a/1", "a/2", "b/1", and "b/2", then "$/*"
(which is not recommended) will evaluate to either "a/1, a/2", or
"b/1, b/2". However, "*/$" may evaluate to "a/1, b/1", "a/1, b/2",
"a/2, b/1", or "a/2, b/2". The use of mixed wild-cards in a command
is considered error prone and is consequently discouraged.

A local name that is composed of only a wildcard character refers to
either all (*) or any ($) endpoints within the media gateway.

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 endpoints will establish two connections (C1 and C2):

+---+ +---+
(channel1) ===|EP1|--(C1)--... ...(C2)--|EP2|===(channel2)
+---+ +---+

Each connection will be designated locally by an endpoint unique
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 responds 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
codec 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 responds to the
command by providing its own "session description".

3) The Call Agent then 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
two different Call Agents, the Call Agents exchange information
through a Call-Agent to Call-Agent signaling protocol, e.g., SIP [7],
in order to synchronize the creation of the connection on the two
endpoints.

Once a connection has been 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 codec 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 a "delete connection"
command to the gateway. 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",
which as far as the MGCP protocol is concerned has little semantic
meaning, and is mainly retained for backwards compatibility.

Calls are identified by unique identifiers, independent of the
underlying platforms or agents. Call identifiers are hexadecimal
strings, which are created by the Call Agent. The maximum length of
call identifiers is 32 characters.

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. From the gateway's perspective, the Call identifier
is thus unique. 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 should 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. Connection identifiers are
treated in MGCP as hexadecimal strings. The gateway MUST 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). The
maximum length of a connection identifier is 32 characters.

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 sets 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 (referred to as the remote session
description).

The local directives specify such parameters as the mode of the
connection (e.g., send-only, or 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.) Depending on the parameter, the Call Agent MAY either
specify a value, a range of values, or no value at all. This allows
various implementations to implement various levels 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
lets the gateway choose the detailed values subject to the
guidelines.

Based on the value of the local directives, the gateway will
determine the resources to allocate 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 resources have been allocated, the gateway will compose a
"session description" that describes the way it intends to send and
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 algorithms, it can provide a list
of these accepted algorithms.

Local Directives
(from Call Agent 1)
|
V
+-------------+
| resource |
| allocation |
| (gateway 1) |
+-------------+
| |
V |
Local |
Parameters V
| Session
| Description Local Directives
| | (from Call Agent 2)
| +---> Transmission----+ |
| (CA to CA) | |
| V V
| +-------------+
| | resource |
| | 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 call to an Interactive Voice-Response unit,

* Connecting a call to a Conferencing unit,

* Routing a call from one 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 names 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.

Call Agent names consist of two parts, similar to endpoint names.
Semantically, the local portion of the name does not exhibit any
internal structure. An example Call Agent name is:

ca1@ca.whatever.net

Note that both the local part and the domain name have to be
supplied. Nevertheless, implementations are encouraged to accept call
agent names consisting of only the domain name.

Reliability can be improved by using the following procedures:

* 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 MUST
retry the transmission using another address.

* Entities MAY move to another platform. The association between a
logical name (domain name) and the actual platform is kept in the
domain name service. Call Agents and Gateways MUST keep track of
the time-to-live of the record they read from the DNS. They MUST
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. The "notified entity" determines where
the endpoint will send commands to; when the endpoint needs to send a
command to the Call Agent, it MUST send the command to its current
"notified entity". The "notified entity" however does not determine
where commands can be received from; any Call Agent can send commands
to the endpoint. Please refer to Section 5 for the relevant security
considerations.

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 does a warm or cold (power-cycle) restart.

If a "NotifiedEntity" parameter is sent with an "empty" value, the
"notified entity" for the endpoint will be set to empty. If the
"notified entity" for an endpoint is empty or has not been set
explicitly (neither by a command nor by provisioning), the "notified
entity" will then default to the source address (i.e., IP address and
UDP port number) of the last successful non-audit command received
for the endpoint. Auditing will thus not change the "notified
entity". Use of an empty "NotifiedEntity" parameter value is
strongly discouraged as it is error prone and eliminates the DNS-
based fail-over and reliability mechanisms.

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 can also be used with

trunking gateways and access gateways alike, to collect access codes,
credit card numbers and other numbers requested by call control
services.

One procedure is for the gateway to notify the Call Agent of each
individual dialed digit, 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
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容