Network Working Group                                       F. Andreasen
Request for Comments: 3435                                     B. Foster
Obsoletes: 2705                                            Cisco Systems
Category: Informational                                     January 2003
        
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

媒体网关控制协议(MGCP)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.

版权所有(C)互联网协会(2003年)。版权所有。

IESG Note

IESG注释

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 RFC 3015, 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.

本文件发布供社区参考。它描述了目前正在许多产品中部署的协议。实施者应了解RFC 3015,它是在IETF Megaco工作组和ITU-T SG16中开发的,并且被IETF和ITU-T视为基于标准(包括经审查的安全考虑)的方式,以满足MGCP旨在满足的需求。

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.

本文档描述了应用程序编程接口和相应的协议(MGCP),该协议用于分解多媒体网关的元素之间。分解后的多媒体网关由一个呼叫代理(包含呼叫控制“智能”)和一个媒体网关(包含媒体功能,例如从TDM语音转换为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.

本文件中定义了基本和通用MGCP协议,但大多数媒体网关将需要实现一个或多个MGCP包,这些包定义了适用于特定类型媒体网关的协议扩展。这些包在单独的文件中定义。

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
        
   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 RFC 2705......................................158
   8.     Security Considerations....................................164
   9.     Acknowledgments............................................164
        
   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 RFC 2705......................................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
        
   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
1. 介绍

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:

本文档描述了一个抽象应用程序编程接口(MGCI)和相应的协议(MGCP),用于从称为媒体网关控制器或呼叫代理的外部呼叫控制元素控制媒体网关。媒体网关通常是提供电话电路上承载的音频信号与通过因特网或其他分组网络承载的数据分组之间的转换的网络元件。媒体网关的示例包括:

* Trunking gateways, that interface between the telephone network and a Voice over IP network. Such gateways typically manage a large number of digital circuits.

* 中继网关,电话网络和IP语音网络之间的接口。此类网关通常管理大量数字电路。

* Voice over ATM gateways, which operate much the same way as voice over IP trunking gateways, except that they interface to an ATM network.

* ATM语音网关,其运行方式与IP语音中继网关基本相同,只是它们与ATM网络连接。

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

* 住宅网关,为IP语音网络提供传统的模拟(RJ11)接口。住宅网关的示例包括电缆调制解调器/电缆机顶盒、xDSL设备和宽带无线设备。

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

* 接入网关,为IP语音网络提供传统的模拟(RJ11)或数字PBX接口。接入网关的示例包括小型IP语音网关。

* Business gateways, that provide a traditional digital PBX interface or an integrated "soft PBX" interface to a Voice over IP network.

* 业务网关,为IP语音网络提供传统的数字PBX接口或集成的“软PBX”接口。

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

* 网络访问服务器,可将“调制解调器”连接到电话线路,并提供对Internet的数据访问。我们预计,在未来,同样的网关将结合IP语音服务和网络访问服务。

* 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

MGCP采用呼叫控制体系结构,其中呼叫控制“智能”位于网关之外,并由称为呼叫代理的外部呼叫控制元素处理。MGCP假定这些呼叫控制元素或呼叫代理将彼此同步,以向其控制下的网关发送一致的命令和响应。如果违反了这一假设,则应预期会出现不一致的行为。MGCP未定义同步呼叫代理的机制。MGCP本质上是一种主/从协议,其中网关应执行呼叫代理发送的命令。因此,本文件详细说明了

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:

MGCP假设一个连接模型,其中基本构造是端点和连接。端点是数据的源和/或汇,可以是物理的,也可以是虚拟的。物理端点的示例包括:

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

* 网关上的一种接口,用于终止连接到PSTN交换机(如5级、4级等)的中继。终止中继的网关称为中继网关。

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

* 网关上的一种接口,用于终止与电话、钥匙系统、PBX等的模拟POTS连接。用于终止住宅POTS线路(与电话)的网关称为住宅网关。

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.

* 通过IP网络使用RTP和UDP传输音频数据包。

* Transmission of audio packets using AAL2, or another adaptation layer, over an ATM network.

* 通过ATM网络使用AAL2或另一适配层传输音频数据包。

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

* 通过内部连接(例如TDM背板或网关的互连总线)传输数据包。这尤其用于“发夹”连接,即终止于网关但立即通过电话网络重新路由的连接。

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
1.1 与H.323标准的关系

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:

MGCP被设计为分布式系统内的内部协议,在外部看来,它是一个单一的VoIP网关。该系统由呼叫代理(可以分布在多个计算机平台上,也可以不分布在多个计算机平台上)和一组网关组成,包括至少一个执行电路和分组之间媒体信号转换的“媒体网关”,以及连接到SS7控制网络时的至少一个“信令网关”。在典型配置中,该分布式网关系统将一边与一个或多个电话(即电路)交换机接口,另一边与符合H.323标准的系统接口,如下表所示:

    ------------------------------------------------------------------
   | 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.             |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | 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.

在MGCP模型中,网关侧重于音频信号转换功能,而呼叫代理处理呼叫信令和呼叫处理功能。因此,呼叫代理实现H.323标准的“信令”层,并将自己呈现为H.323系统的“H.323网守”或一个或多个“H.323端点”。

1.2 Relation with the IETF Standards
1.2 与IETF标准的关系

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:

虽然H.323是公认的VoIP终端标准,但IETF也为其他类型的多媒体应用制定了规范。这些其他规格包括:

* the Session Description Protocol (SDP), RFC 2327

* 会话描述协议(SDP),RFC2327

* the Session Announcement Protocol (SAP), RFC 2974

* 会话公告协议(SAP),RFC 2974

* the Session Initiation Protocol (SIP), RFC 3261

* 会话启动协议(SIP),RFC3261

* the Real Time Streaming Protocol (RTSP), RFC 2326.

* 实时流协议(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.

后三个规范实际上是替代信令标准,允许将会话描述传输给相关方。多播会话管理器使用SAP将多播会话描述分发给一大群收件人,SIP用于邀请单个用户参与点对点或单播会话,RTSP用于连接提供实时数据的服务器。在所有三种情况下,根据SDP描述会话描述;当音频传输时,它通过实时传输协议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:

分布式网关系统和MGCP将使PSTN电话用户能够访问使用SAP、SIP或RTSP设置的会话。呼叫代理根据下表提供信令转换:

    ------------------------------------------------------------------
   | 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.       |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | 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.

SDP标准在该体系结构中具有举足轻重的地位。我们将在下面的描述中看到,我们还使用它在MGCP中进行会话描述。

1.3 Definitions
1.3 定义

Trunk: A communication channel between two switching systems, e.g., a DS0 on a T1 or E1 line.

中继线:两个交换系统之间的通信信道,例如T1或E1线路上的DS0。

1.4 Conventions used in this Document
1.4 本文件中使用的公约

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, RFC 2119 [2].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照BCP 14、RFC 2119[2]中的说明进行解释。

2. Media Gateway Control Interface
2. 媒体网关控制接口

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
2.1 模型和命名约定

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.

MGCP假设一个连接模型,其中基本构造是端点和连接。连接在调用中分组。一个或多个连接可以属于一个呼叫。连接和呼叫由一个或多个呼叫代理主动设置。

2.1.1 Types of Endpoints
2.1.1 端点的类型

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:

在引言中,我们介绍了几类网关。然而,这样的分类可能会产生误导。制造商可以任意决定在一个包中提供几种类型的服务。例如,单个产品可以提供一些到电话交换机的中继连接、一些主要速率连接和一些模拟线路接口,从而共享我们在介绍中描述的“中继”、“接入”和“住宅”网关的特征。MGCP不对此类分组进行假设。我们只是假设媒体网关支持端点集合。端点的类型决定其功能。到目前为止,我们的分析已使我们分离出以下基本端点类型:

* Digital channel (DS0),

* 数字信道(DS0),

* Analog line,

* 模拟线,

* Announcement server access point,

* 公告服务器访问点,

* Interactive Voice Response access point,

* 交互式语音响应接入点,

* Conference bridge access point,

* 会议桥接入点,

* Packet relay,

* 分组中继,

* ATM "trunk side" interface.

* ATM“中继端”接口。

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)
2.1.1.1 数字信道(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.

数字频道提供64 Kbps的服务。这种信道存在于中继和ISDN接口中。它们通常是数字多路复用的一部分,如T1、E1、T3或E3接口。支持此类信道的媒体网关能够将在信道上接收的数字信号转换为音频分组,该数字信号可以根据A-定律或mu定律进行编码,使用每个样本8位的完整集合,或者仅使用这些位中的7位。当媒体网关还支持网络访问服务器(NAS)服务时,网关应能够接收音频编码数据(调制解调器连接)或二进制数据(ISDN连接),并将其转换为数据包。

                                         +-------
                           +------------+|
              (channel) ===|DS0 endpoint| -------- Connections
                           +------------+|
                                         +-------
        
                                         +-------
                           +------------+|
              (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.

在某些情况下,数字信道用于传输信号。例如,SS7“F”链路或ISDN“D”信道就是这种情况。支持这些信令功能的媒体网关应能够使用IETF SIGTRAN工作组定义的“回程”程序向呼叫代理发送和接收信令包。数字信道有时与信道相关信令(如“MF R2”)结合使用。根据MGCP中定义的事件信令和报告程序,支持这些信令功能的媒体网关应能够检测并产生相应的信号,例如“wink”或“A”。

2.1.1.2 Analog Line
2.1.1.2 模拟线

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.

模拟线路既可以用作“客户端”接口,为传统电话单元提供服务,也可以用作“服务”接口,允许网关发送和接收模拟呼叫。当媒体网关还支持NAS服务时,网关应能够接收音频编码数据(调制解调器连接),并将其转换为数据包。

                                         +-------
                        +---------------+|
              (line) ===|analog endpoint| -------- Connections
                        +---------------+|
                                         +-------
        
                                         +-------
                        +---------------+|
              (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
2.1.1.3 公告服务器访问点

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.

公告服务器终结点提供对公告服务的访问。在呼叫代理的请求下,公告服务器将“播放”指定的公告。来自呼叫代理的请求将遵循MGCP中定义的事件信令和报告程序。

                  +----------------------+
                  | Announcement endpoint| -------- Connection
                  +----------------------+
        
                  +----------------------+
                  | 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
2.1.1.4 交互式语音应答接入点

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)端点提供对IVR服务的访问。在呼叫代理的请求下,IVR服务器将“播放”通知和铃声,并“收听”来自用户的响应,如DTMF输入或语音消息。来自呼叫代理的请求将遵循MGCP中定义的事件信令和报告程序。

                      +-------------+
                      | IVR endpoint| -------- Connection
                      +-------------+
        
                      +-------------+
                      | 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.

给定的IVR端点一次不支持多个连接。如果在同一端点上建立了多个连接,那么将在所有连接上同时播放相同的音调和公告。

2.1.1.5 Conference Bridge Access Point
2.1.1.5 会议桥接入点

A conference bridge endpoint is used to provide access to a specific conference.

会议网桥端点用于提供对特定会议的访问。

                                           +-------
               +--------------------------+|
               |Conference bridge endpoint| -------- Connections
               +--------------------------+|
                                           +-------
        
                                           +-------
               +--------------------------+|
               |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
2.1.1.6 包中继

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.

分组中继端点是一种特定形式的会议网桥,通常只支持两个连接。包中继可以在受保护网络和开放网络之间的防火墙中找到,或者在用于提供不兼容网关之间互操作的转码服务器中找到,例如不支持兼容压缩算法的网关,或者在不同传输网络(如IP和ATM)上运行的网关。

                                           +-------
                   +---------------------+ |
                   |Packet relay endpoint|  2 connections
                   +---------------------+ |
                                           +-------
        
                                           +-------
                   +---------------------+ |
                   |Packet relay endpoint|  2 connections
                   +---------------------+ |
                                           +-------
        
2.1.1.7 ATM "trunk side" Interface
2.1.1.7 ATM“中继侧”接口

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.

当使用一个或多个ATM永久虚拟电路替代传统的“TDM”中继链路交换机时,通常会找到ATM“中继端”端点。当使用ATM/AAL2时,在单个虚拟电路上多路复用多个中继或信道;每个中继都对应于一个端点。

                                          +-------
                      +------------------+|
          (channel) = |ATM trunk endpoint| -------- Connections
                      +------------------+|
                                          +-------
        
                                          +-------
                      +------------------+|
          (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
2.1.2 端点标识符

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

局部端点-name@domain-名字

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

其中,域名是RFC 1034中定义的绝对域名,包括主机部分,因此示例域名可以是:

mygateway.whatever.net

mygateway.whatever.net

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

此外,域名可以是RFC 821中为域名定义的形式的IP地址,因此另一个示例可以是(有关详细信息,请参阅RFC 821):

[192.168.1.2]

[192.168.1.2]

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

可以指定IPv4和IPv6地址,但通常不鼓励将IP地址用作端点标识符。

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).

1) 命名路径的各个术语必须用一个斜杠(“/”,ASCII 2F十六进制)分隔。

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.

2) 单个术语是由字母、数字或其他可打印字符组成的字符串,但用作分隔符(“/”、“@”)的字符、用于通配符(“*”、“$”)的字符和空格除外。

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:

3) 对于要进行通配符的命名路径,通配符由星号(*)或美元符号($)表示。因此,如果完整的本地端点名称的形式为:

term1/term2/term3

第1条/第2条/第3条

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.
        
          */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.

4) 用星号(“*”)表示的术语应解释为:“使用媒体网关范围内已知的该术语的所有值”。除非另有规定,否则这是指为服务配置的所有端点,而不管它们的实际服务状态,即服务中或服务外。

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.

5) 以美元符号($)表示的术语应解释为:“使用媒体网关范围内已知的该术语的任何一个值”。除非另有规定,否则这仅指正在使用的端点。

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/1”、“a/2”、“b/1”和“b/2”,那么“$/*”(不推荐)将计算为“a/1,a/2”或“b/1,b/2”。然而,“*/$”可以评估为“a/1、b/1”、“a/1、b/2”、“a/2、b/1”或“a/2、b/2”。在命令中使用混合通配符被认为是容易出错的,因此不鼓励这样做。

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
2.1.3 电话和连接

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):

在“调用”中涉及的每个端点上的调用代理上创建连接。在两个“DS0”端点(EP1和EP2)之间连接的经典示例中,控制端点的呼叫代理将建立两个连接(C1和C2):

                  +---+                            +---+
    (channel1) ===|EP1|--(C1)--...        ...(C2)--|EP2|===(channel2)
                  +---+                            +---+
        
                  +---+                            +---+
    (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.

1) 呼叫代理要求第一个网关在第一个端点上“创建连接”。网关将资源分配给该连接,并通过提供“会话描述”来响应该命令。会话描述包含第三方向新创建的连接发送数据包所需的信息,例如IP地址、UDP端口和编解码器参数。

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".

2) 呼叫代理然后要求第二个网关在第二个端点上“创建连接”。该命令携带第一个网关提供的“会话描述”。网关将资源分配给该连接,并通过提供自己的“会话描述”来响应该命令。

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.

3) 然后,调用代理使用“修改连接”命令向第一个端点提供第二个“会话描述”。一旦完成,通信可以在两个方向上进行。

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.

当两个端点位于由两个不同呼叫代理管理的网关上时,呼叫代理通过呼叫代理到呼叫代理信令协议(例如,SIP[7])交换信息,以便在两个端点上同步连接的创建。

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".

建立连接后,可以随时通过“修改连接”命令修改连接参数。呼叫代理例如可以指示网关更改连接上使用的编解码器,或者如果连接被“重定向”,则指示网关修改数据应该发送到的IP地址和UDP端口。

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
        
           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
2.1.3.1 电话号码

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.

每个连接的一个属性是“调用标识符”,就MGCP协议而言,它几乎没有语义意义,主要是为了向后兼容而保留的。

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.

调用由唯一标识符标识,独立于底层平台或代理。调用标识符是十六进制字符串,由调用代理创建。呼叫标识符的最大长度为32个字符。

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.

呼叫标识符在系统中是唯一的,或者至少在控制相同网关的呼叫代理集合中是唯一的。从网关的角度来看,呼叫标识符因此是唯一的。当呼叫代理在同一网关或不同网关上构建与同一呼叫相关的多个连接时,属于同一呼叫的这些连接应共享相同的呼叫id。然后,该标识符可由MGCP范围之外的记帐或管理过程使用。

2.1.3.2 Names of Connections
2.1.3.2 连接名称

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.

当请求网关创建连接时,网关将创建连接标识符。它们标识端点上下文中的连接。连接标识符在MGCP中被视为十六进制字符串。网关必须确保在使用此标识符的连接结束和在同一端点的新连接中使用该标识符之间经过适当的等待时间(至少3分钟)(网关可能决定使用网关上下文中唯一的标识符)。连接标识符的最大长度为32个字符。

2.1.3.3 Management of Resources, Attributes of Connections
2.1.3.3 资源管理、连接属性

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.

1) 外部可见资源,影响“网络上的位”的格式,必须与连接中涉及的第二个端点通信。

2) Internal resources, that determine which signal is being sent over the connection and how the received signals are processed by the endpoint.

2) 内部资源,用于确定通过连接发送的信号以及端点如何处理接收到的信号。

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,

1) 本地指令指示网关选择用于连接的资源,

2) When available, the "session description" provided by the other end of the connection (referred to as the remote session description).

2) 可用时,连接另一端提供的“会话描述”(称为远程会话描述)。

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.

本地指令指定连接模式(例如,仅发送或发送-接收)、首选编码或分组方法、回声消除或静音抑制的使用等参数。(详细列表可在CreateConnection命令的LocalConnectionOptions参数的规范中找到。)根据参数的不同,调用代理可以指定值、值的范围,也可以不指定任何值。这允许各种实现实现不同级别的控制,从非常严格的控制(呼叫代理指定连接处理的详细信息)到非常松散的控制(呼叫代理仅指定广泛的指导原则,例如最大带宽),并允许网关根据指南选择详细的值。

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
        
                 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
2.1.3.4 本地连接的特殊情况

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.

建立本地连接比建立网络连接简单得多。在大多数情况下,将通过一些本地互连设备建立连接,例如TDM总线。

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
2.1.4 呼叫代理和其他实体的名称

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

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.

* 实体可以移动到另一个平台。逻辑名称(域名)和实际平台之间的关联保留在域名服务中。呼叫代理和网关必须跟踪从DNS读取的记录的生存时间。如果生存时间已过期,他们必须查询DNS以刷新信息。

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.

除了使用域名和DNS提供的间接性之外,“通知实体”的概念对于MGCP的可靠性和故障转移至关重要。端点的“通知实体”是当前控制该端点的调用代理。在任何时间点,端点都有一个且只有一个与之关联的“通知实体”。“通知实体”确定端点将向何处发送命令;当端点需要向调用代理发送命令时,它必须将该命令发送到其当前的“通知实体”。但是,“通知实体”不确定从何处接收命令;任何调用代理都可以向端点发送命令。有关安全注意事项,请参阅第5节。

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.

启动时,必须将“通知实体”设置为已设置的值。调用代理发送的大多数命令都能够通过使用“NotifiedEntity”参数显式命名“NotifiedEntity”。“通知实体”将保持不变,直到接收到新的“NotifiedEntity”参数或端点进行热重启或冷重启(电源循环)。

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.

如果发送带有“empty”值的“NotifiedEntity”参数,则端点的“NotifiedEntity”将设置为空。如果端点的“通知实体”为空或未明确设置(既不是通过命令也不是通过设置),则“通知实体”将默认为该端点上一次成功接收的非审核命令的源地址(即IP地址和UDP端口号)。因此,审计不会改变“被通知实体”。强烈反对使用空的“NotifiedEntity”参数值,因为它容易出错,并消除了基于DNS的故障转移和可靠性机制。

2.1.5 Digit Maps
2.1.5 数字地图

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 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       |
        ------------------------------------------------------
        
        ------------------------------------------------------
       |  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 have the Call Agent load the gateway with a digit map that may 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:

此问题的解决方案是让呼叫代理向网关加载可能与拨号计划对应的数字映射。此数字映射使用从Unix系统命令egrep派生的语法表示。例如,上述拨号计划会产生以下数字映射:

(0T|00T|[1-7]xxx|8xxxxxxx|#xxxxxxx|*xx|91xxxxxxxxxx|9011x.T)

(0T | 00T |[1-7]xxx | 8xxxxxx | xxxxxx |*xx | 91xxxxxxxxx | 9011x.T)

The formal syntax of the digit map is described by the DigitMap rule in the formal syntax description of the protocol (see Appendix A) - support for basic digit map letters is REQUIRED while support for extension digit map letters is OPTIONAL. A gateway receiving a digit map with an extension digit map letter not supported SHOULD return error code 537 (unknown digit map extension).

数字映射的正式语法由协议的正式语法描述中的DigitMap规则描述(见附录A)-需要支持基本数字映射字母,而支持扩展数字映射字母是可选的。接收到带有不支持的扩展名数字映射字母的数字映射的网关应返回错误代码537(未知数字映射扩展名)。

A digit map, according to this syntax, is defined either by a (case insensitive) "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 an expression over which the gateway will attempt to find a shortest possible match. The following constructs can be used in each numbering scheme:

根据这种语法,数字映射由(不区分大小写的)“字符串”或字符串列表定义。列表中的每个字符串都是可选的编号方案,指定为一组数字或计时器,或者指定为网关将尝试在其上查找最短可能匹配项的表达式。以下构造可用于每个编号方案:

* Digit: A digit from "0" to "9". * Timer: The symbol "T" matching a timer expiry. * DTMF: A digit, a timer, or one of the symbols "A", "B", "C", "D", "#", or "*". Extensions may be defined. * Wildcard: The symbol "x" which matches any digit ("0" to "9"). * Range: One or more DTMF symbols enclosed between square brackets ("[" and "]"). * Subrange: Two digits separated by hyphen ("-") which matches any digit between and including the two. The subrange construct can only be used inside a range construct, i.e., between "[" and "]". * Position: A period (".") which matches an arbitrary number, including zero, of occurrences of the preceding construct.

* 数字:从“0”到“9”的数字计时器:与计时器到期日匹配的符号“T”。*DTMF:数字、定时器或符号“A”、“B”、“C”、“D”、“#”或“*”之一。可以定义扩展。*通配符:与任何数字(“0”到“9”)匹配的符号“x”。*范围:括在方括号(“[”和“]”)之间的一个或多个DTMF符号。*子范围:由连字符(“-”)分隔的两个数字,它匹配两个数字之间的任何数字。子范围构造只能在范围构造内使用,即在“[”和“]”之间使用*位置:一个句点(“.”),它与前面构造出现的任意数目(包括零)相匹配。

A gateway that detects events to be matched against a digit map MUST do the following:

检测要与数字映射匹配的事件的网关必须执行以下操作:

1) Add the event code as a token to the end of an internal state variable for the endpoint called the "current dial string".

1) 将事件代码作为令牌添加到称为“当前拨号字符串”的端点的内部状态变量的末尾。

2) Apply the current dial string to the digit map table, attempting a match to each expression in the digit map.

2) 将当前拨号字符串应用于数字映射表,尝试匹配数字映射中的每个表达式。

3) If the result is under-qualified (partially matches at least one entry in the digit map and doesn't completely match another entry), do nothing further.

3) 如果结果不合格(部分匹配数字映射中的至少一个条目,但不完全匹配另一个条目),则不做进一步操作。

If the result matches an entry, or is over-qualified (i.e., no further digits could possibly produce a match), send the list of accumulated events 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 occurs when the dial string does not match any of the alternatives. Unexpected timers, for example, can cause "impossible matches". Both perfect matches and impossible matches trigger notification of the accumulated digits (which may include other events - see Section 2.3.3).

如果结果与某个条目相匹配,或过于合格(即,没有其他数字可能产生匹配),请将累积事件列表发送给呼叫代理。在本规范中,匹配可以是“完美匹配”,与指定的备选方案中的一个完全匹配,也可以是不可能的匹配,当拨号字符串与任何备选方案都不匹配时会出现这种情况。例如,意外的计时器可能导致“不可能的匹配”。完全匹配和不可能匹配都会触发累积数字的通知(可能包括其他事件-参见第2.3.3节)。

The following example illustrates the above. Assume we have the digit map:

下面的示例说明了上述内容。假设我们有数字地图:

(xxxxxxx|x11)

(xxxxxxx | x11)

and a current dial string of "41". Given the input "1" the current dial string becomes "411". We have a partial match with "xxxxxxx", but a complete match with "x11", and hence we send "411" to the Call Agent.

和当前拨号串“41”。给定输入“1”,当前拨号字符串变为“411”。我们与“xxxxxxx”部分匹配,但与“x11”完全匹配,因此我们向呼叫代理发送“411”。

The following digit map example is more subtle:

以下数字映射示例更为微妙:

(0[12].|00|1[12].1|2x.#)

(0[12]。| 00 | 1[12].1 | 2x.|)

Given the input "0", a match will occur immediately since position (".") allows for zero occurrences of the preceding construct. The input "00" can thus never be produced in this digit map.

给定输入“0”,匹配将立即发生,因为位置(“.”)允许前面构造的零次出现。因此,在这个数字地图中永远不会产生输入“00”。

Given the input "1", only a partial match exists. The input "12" is also only a partial match, however both "11" and "121" are a match.

给定输入“1”,仅存在部分匹配。输入“12”也只是部分匹配,但是“11”和“121”都是匹配。

Given the input "2", a partial match exists. A partial match also exists for the input "23", "234", "2345", etc. A full match does not occur here until a "#" is generated, e.g., "2345#". The input "2#" would also have been a match.

给定输入“2”,存在部分匹配。输入“23”、“234”、“2345”等也存在部分匹配。在生成“#”之前,这里不会发生完全匹配,例如“2345”。输入“2#”也应该是匹配的。

Note that digit maps simply define a way of matching sequences of event codes against a grammar. Although digit maps as defined here are for DTMF input, extension packages can also be defined so that digit maps can be used for other types of input represented by event codes that adhere to the digit map syntax already defined for these event codes (e.g., "1" or "T"). Where such usage is envisioned, the definition of the particular event(s) SHOULD explicitly state that in the package definition.

请注意,数字映射只是定义了一种根据语法匹配事件代码序列的方法。尽管此处定义的数字映射用于DTMF输入,但也可以定义扩展包,以便数字映射可用于由事件代码表示的其他类型的输入,这些事件代码遵循已为这些事件代码定义的数字映射语法(例如,“1”或“T”)。如果设想了这种用法,则特定事件的定义应在包定义中明确说明。

Since digit maps are not bounded in size, it is RECOMMENDED that gateways support digit maps up to at least 2048 bytes per endpoint.

由于数字映射的大小不受限制,建议网关支持每个端点至少2048字节的数字映射。

2.1.6 Packages
2.1.6 包装

MGCP is a modular and extensible protocol, however with extensibility comes the need to manage, identify, and name the individual extensions. This is achieved by the concept of packages, which are simply well-defined groupings of extensions. For example, one package may support a certain group of events and signals, e.g., off-hook and ringing, for analog access lines. Another package may support another group of events and signals for analog access lines or for another type of endpoint such as video. One or more packages may be supported by a given endpoint.

MGCP是一个模块化和可扩展的协议,但是随着可扩展性的增加,需要管理、识别和命名各个扩展。这是通过包的概念实现的,包只是定义良好的扩展分组。例如,一个包可以支持模拟接入线的特定事件和信号组,例如摘机和振铃。另一个包可以支持另一组用于模拟接入线或另一类型的端点(例如视频)的事件和信号。给定端点可能支持一个或多个包。

MGCP allows the following types of extensions to be defined in a package:

MGCP允许在包中定义以下类型的扩展:

* BearerInformation

* 承载信息

* LocalConnectionOptions

* 本地连接选项

* ExtensionParameters

* 扩展参数

* ConnectionModes

* 连接模式

* Events

* 事件

* Signals

* 信号

* Actions

* 行动

* DigitMapLetters

* 数码相机

* ConnectionParameters

* 连接参数

* RestartMethods

* 重新启动方法

* ReasonCodes

* 理由码

* Return codes

* 返回码

each of which will be explained in more detail below. The rules for defining each of these extensions in a package are described in Section 6, and the encoding and syntax are defined in Section 3 and Appendix A.

下面将对每一项进行更详细的解释。第6节描述了在包中定义这些扩展的规则,第3节和附录a定义了编码和语法。

With the exception of DigitMapLetters, a package defines a separate name space for each type of extension by adding the package name as a prefix to the extension, i.e.:

除DigitMapleters外,软件包通过将软件包名称作为前缀添加到扩展中,为每种类型的扩展定义单独的名称空间,即:

package-name/extension

包名称/扩展名

Thus the package-name is followed by a slash ("/") and the name of the extension.

因此,包名后面跟着一个斜杠(“/”)和扩展名。

An endpoint supporting one or more packages may define one of those packages as the default package for the endpoint. Use of the package name for events and signals in the default package for an endpoint is OPTIONAL, however it is RECOMMENDED to always include the package name. All other extensions, except DigitMapLetter, defined in the package MUST include the package-name when referring to the extension.

支持一个或多个包的端点可以将其中一个包定义为端点的默认包。在端点的默认包中为事件和信号使用包名是可选的,但是建议始终包括包名。在引用扩展时,包中定义的所有其他扩展(DigitMapLetter除外)必须包含包名称。

Package names are case insensitive strings of letters, hyphens and digits, with the restriction that hyphens shall never be the first or last character in a name. Examples of package names are "D", "T", and "XYZ". Package names are not case sensitive - names such as "XYZ", "xyz", and "xYz" are equal.

包名称是不区分大小写的字母、连字符和数字字符串,限制连字符不能是名称中的第一个或最后一个字符。包名称的示例有“D”、“T”和“XYZ”。包名称不区分大小写-名称(如“XYZ”、“XYZ”和“XYZ”)相等。

Package definitions will be provided in other documents and with package names and extensions names registered with IANA. For more details, refer to section 6.

包定义将在其他文件中提供,包名称和扩展名将在IANA注册。有关更多详细信息,请参阅第6节。

Implementers can gain experience by using experimental packages. The name of an experimental package MUST start with the two characters "x-"; the IANA SHALL NOT register package names that start with these characters, or the characters "x+", which are reserved. A gateway that receives a command referring to an unsupported package MUST return an error (error code 518 - unsupported package, is RECOMMENDED).

实现者可以通过使用实验包获得经验。实验包的名称必须以两个字符“x-”开头;IANA不得注册以这些字符或保留的字符“x+”开头的包名。接收引用不受支持的包的命令的网关必须返回错误(建议使用错误代码518-不受支持的包)。

2.1.7 Events and Signals
2.1.7 事件和信号

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) by including the name of the event in a RequestedEvents parameter (in a NotificationRequest command - see Section 2.3.3).

事件和信号的概念是MGCP的核心。呼叫代理可以通过在RequestedEvents参数中包含事件名称(在NotificationRequest命令中-请参阅第2.3.3节)来请求通知端点中发生的某些事件(例如,摘机事件)。

A Call Agent may also request certain signals to be applied to an endpoint (e.g., dial-tone) by supplying the name of the event in a SignalRequests parameter.

呼叫代理还可以通过在SignalRequests参数中提供事件名称来请求将某些信号应用于端点(例如拨号音)。

Events and signals are grouped in packages, within which they share the same name space which we will refer to as event names in the following. Event names are case insensitive strings of letters, hyphens and digits, with the restriction that hyphens SHALL NOT be the first or last character in a name. Some event codes may need to be parameterized with additional data, which is accomplished by adding the parameters between a set of parentheses. Event names are not case sensitive - values such as "hu", "Hu", "HU" or "hU" are equal.

事件和信号分组在包中,在包中它们共享相同的名称空间,我们将在下文中称之为事件名称。事件名称是不区分大小写的字母、连字符和数字字符串,限制连字符不能是名称中的第一个或最后一个字符。某些事件代码可能需要使用附加数据进行参数化,这可以通过在一组括号之间添加参数来实现。事件名称不区分大小写-值如“hu”、“hu”、“hu”或“hu”相等。

Examples of event names can be "hu" (off hook or "hang-up" transition), "hf" (hook-flash) or "0" (the digit zero).

事件名称的示例可以是“hu”(摘机或“挂起”转换)、“hf”(挂机闪烁)或“0”(数字零)。

The package name is OPTIONAL for events in the default package for an endpoint, however it is RECOMMENDED to always include the package name. If the package name is excluded from the event name, the default package name for that endpoint MUST be assumed. For example, for an analog access line which has the line package ("L") as a default with dial-tone ("dl") as one of the events in that package, the following two event names are equal:

对于端点的默认包中的事件,包名称是可选的,但是建议始终包含包名称。如果从事件名称中排除包名称,则必须假定该端点的默认包名称。例如,对于将线路包(“L”)作为默认设置,并将拨号音(“dl”)作为该包中的事件之一的模拟接入线路,以下两个事件名称相等:

L/dl

信用证

and

dl

dl

For any other non-default packages that are associated with that endpoint, (such as the generic package for an analog access endpoint-type for example), the package name MUST be included with the event name. Again, unconditional inclusion of the package name is RECOMMENDED.

对于与该端点关联的任何其他非默认包(例如模拟访问端点类型的通用包),包名称必须包含在事件名称中。同样,建议无条件地包含包名。

Digits, or letters, are supported in some packages, notably "DTMF". Digits and letters are defined by the rules "Digit" and "Letter" in the definition of digit maps. This definition refers to the digits (0 to 9), to the asterisk or star ("*") and orthotrope, number or pound sign ("#"), and to the letters "A", "B", "C" and "D", as well as the timer indication "T". These letters can be combined in "digit string" that represents the keys that a user punched on a dial. In addition, the letter "X" can be used to represent all digits (0 to 9). Also, extensions MAY define use of other letters. The need to easily express the digit strings in earlier versions of the protocol has a consequence on the form of event names:

一些软件包支持数字或字母,尤其是“DTMF”。数字和字母由数字地图定义中的“数字”和“字母”规则定义。该定义指数字(0至9)、星号或星号(*)和数字、数字或磅号(#))、字母“A”、“B”、“C”和“D”,以及计时器指示“T”。这些字母可以组合成“数字串”,表示用户在拨号盘上穿孔的键。此外,字母“X”可用于表示所有数字(0到9)。此外,扩展名可能定义其他字母的使用。在协议的早期版本中,需要方便地表示数字字符串,这会对事件名称的形式产生影响:

An event name that does not denote a digit MUST always contain at least one character that is neither a digit, nor one of the letters A, B, C, D, T or X (such names also MUST NOT just contain the special signs "*", or "#"). Event names consisting of more than one character however may use any of the above.

不表示数字的事件名称必须始终包含至少一个既不是数字的字符,也不是字母a、B、C、D、T或X中的一个(此类名称也不得仅包含特殊符号“*”或“#”)。但是,由多个字符组成的事件名称可以使用上述任何字符。

A Call Agent may often have to ask a gateway to detect a group of events. Two conventions can be used to denote such groups:

呼叫代理通常必须请求网关检测一组事件。可使用两种约定来表示此类组:

* The "*" and "all" wildcard conventions (see below) can be used to detect any event belonging to a package, or a given event in many packages, or any event in any package supported by the gateway.

* “*”和“all”通配符约定(见下文)可用于检测属于某个包的任何事件,或多个包中的给定事件,或网关支持的任何包中的任何事件。

* The regular expression Range notation can be used to detect a range of digits.

* 正则表达式范围表示法可用于检测数字范围。

The star sign (*) can be used as a wildcard instead of a package name, and the keyword "all" can be used as a wildcard instead of an event name:

星号(*)可以用作通配符而不是包名称,关键字“all”可以用作通配符而不是事件名称:

* A name such as "foo/all" denotes all events in package "foo".

* “foo/all”等名称表示包“foo”中的所有事件。

* A name such as "*/bar" denotes the event "bar" in any package supported by the gateway.

* 诸如“*/bar”之类的名称表示网关支持的任何包中的事件“bar”。

* The name "*/all" denotes all events supported by the endpoint.

* 名称“*/all”表示端点支持的所有事件。

This specification purposely does not define any additional detail for the "all packages" and "all events" wildcards. They provide limited benefits, but introduce significant complexity along with the potential for errors. Their use is consequently strongly discouraged.

本规范有意不为“所有包”和“所有事件”通配符定义任何附加细节。它们提供的好处有限,但会带来巨大的复杂性和潜在的错误。因此,强烈反对使用它们。

The Call Agent can ask a gateway to detect a set of digits or letters either by individually describing those letters, or by using the "range" notation defined in the syntax of digit strings. For example, the Call Agent can:

呼叫代理可以要求网关检测一组数字或字母,方法是单独描述这些字母,或使用数字字符串语法中定义的“范围”符号。例如,呼叫代理可以:

* Use the letter "x" to denote" digits from 0 to 9. * Use the notation "[0-9#]" to denote the digits 0 to 9 and the pound sign.

* 使用字母“x”表示“0到9的数字。*使用符号“[0-9#]”表示数字0到9和磅符号。

The individual event codes are still defined in a package though (e.g., the "DTMF" package).

尽管如此,单个事件代码仍在包中定义(例如,“DTMF”包)。

Events can by default only be generated and detected on endpoints, however events can be also be defined so they can be generated or detected on connections rather than on the endpoint itself (see Section 6.6). For example, gateways may be asked to provide a ringback tone on a connection. When an event is to be applied on a connection, the name of the connection MUST be added to the name of the event, using an "at" sign (@) as a delimiter, as in:

默认情况下,只能在端点上生成和检测事件,但是也可以定义事件,以便在连接上而不是端点本身上生成或检测事件(请参见第6.6节)。例如,可能会要求网关在连接上提供回铃音。将事件应用于连接时,必须使用“at”符号(@)作为分隔符将连接名称添加到事件名称中,如中所示:

G/rt@0A3F58

G/rt@0A3F58

where "G" is the name of the package and "rt" is the name of the event. Should the connection be deleted while an event or signal is being detected or applied on it, that particular event detection or signal generation simply stops. Depending on the signal, this may generate a failure (see below).

其中,“G”是包的名称,“rt”是事件的名称。如果在检测或应用事件或信号时删除连接,则该特定事件检测或信号生成将停止。根据信号的不同,这可能会产生故障(见下文)。

The wildcard character "*" (star) can be used to denote "all connections". When this convention is used, the gateway will generate or detect the event on all the connections that are connected to the endpoint. This applies to existing as well as future connections created on the endpoint. An example of this convention could be:

通配符“*”(星形)可用于表示“所有连接”。使用此约定时,网关将在连接到端点的所有连接上生成或检测事件。这适用于在端点上创建的现有连接以及将来的连接。这项公约的一个例子可以是:

      R/qa@*
        
      R/qa@*
        

where "R" is the name of the package and "qa" is the name of the event.

其中,“R”是包的名称,“qa”是事件的名称。

When processing a command using the "all connections" wildcard, the "*" wildcard character applies to all current and future connections on the endpoint, however it will not be expanded. If a subsequent command either explicitly (e.g., by auditing) or implicitly (e.g., by persistence) refers to such an event, the "*" value will be used. However, when the event is actually observed, that particular occurrence of the event will include the name of the specific connection it occurred on.

使用“所有连接”通配符处理命令时,“*”通配符将应用于端点上的所有当前和未来连接,但不会展开。如果后续命令显式(例如,通过审核)或隐式(例如,通过持久性)引用此类事件,则将使用“*”值。但是,当实际观察到该事件时,该事件的特定事件将包括它发生的特定连接的名称。

The wildcard character "$" can be used to denote "the current connection". It can only be used by the Call Agent, when the event notification request is "encapsulated" within a connection creation or modification command. When this convention is used, the gateway will generate or detect the event on the connection that is currently being created or modified. An example of this convention is:

通配符“$”可用于表示“当前连接”。当事件通知请求被“封装”在连接创建或修改命令中时,它只能由调用代理使用。使用此约定时,网关将生成或检测当前正在创建或修改的连接上的事件。这项公约的一个例子是:

G/rt@$

G/rt@$

When processing a command using the "current connection" wildcard, the "$" wildcard character will be expanded to the value of the current connection. If a subsequent command either explicitly (e.g., by auditing) or implicitly (e.g., by persistence) refers to such an event, the expanded value will be used. In other words, the "current connection" wildcard is expanded once, which is at the initial processing of the command in which it was explicitly included.

使用“当前连接”通配符处理命令时,“$”通配符将扩展为当前连接的值。如果后续命令显式(例如,通过审核)或隐式(例如,通过持久性)引用此类事件,则将使用扩展值。换句话说,“当前连接”通配符展开一次,即在显式包含通配符的命令的初始处理时展开一次。

The connection id, or a wildcard replacement, can be used in conjunction with the "all packages" and "all events" conventions. For example, the notation:

连接id或通配符替换可以与“所有包”和“所有事件”约定结合使用。例如,符号:

      */all@*
        
      */all@*
        

can be used to designate all events on all current and future connections on the endpoint. However, as mentioned before, the use of the "all packages" and "all events" wildcards are strongly discouraged.

可用于指定端点上所有当前和未来连接上的所有事件。但是,如前所述,强烈反对使用“所有包”和“所有事件”通配符。

Signals are divided into different types depending on their behavior:

信号根据其行为分为不同类型:

* On/off (OO): Once applied, these signals last until they are turned off. This can only happen as the result of a reboot/restart or a new SignalRequests where the signal is explicitly turned off (see later). Signals of type OO are defined to be idempotent, thus multiple requests to turn a given OO signal on (or off) are

* 开/关(OO):一旦应用,这些信号将持续到关闭。这只能在重新启动/重新启动或新的信号请求(信号已明确关闭)的情况下发生(见下文)。OO类型的信号被定义为幂等信号,因此打开(或关闭)给定OO信号的多个请求被忽略

perfectly valid and MUST NOT result in any errors. An On/Off signal could be a visual message-waiting indicator (VMWI). Once turned on, it MUST NOT be turned off until explicitly instructed to by the Call Agent, or as a result of an endpoint restart, i.e., these signals will not turn off as a result of the detection of a requested event.

完全有效,不得导致任何错误。开/关信号可以是可视消息等待指示器(VMWI)。一旦开启,在呼叫代理明确指示之前,或端点重新启动后,不得将其关闭,即,这些信号不会因检测到请求的事件而关闭。

* Time-out (TO): Once applied, these signals last until they are either cancelled (by the occurrence of an event or by not being included in a subsequent (possibly empty) list of signals), or a signal-specific period of time has elapsed. A TO signal that times out will generate an "operation complete" event. A TO signal could be "ringback" timing out after 180 seconds. If an event occurs prior to the 180 seconds, the signal will, by default, be stopped (the "Keep signals active" action - see Section 2.3.3 - will override this behavior). If the signal is not stopped, the signal will time out, stop and generate an "operation complete" event, about which the Call Agent may or may not have requested to be notified. If the Call Agent has asked for the "operation complete" event to be notified, the "operation complete" event sent to the Call Agent SHALL include the name(s) of the signal(s) that timed out (note that if parameters were passed to the signal, the parameters will not be reported). If the signal was generated on a connection, the name of the connection SHALL be included as described above. Time-out signals have a default time-out value defined for them, which MAY be altered by the provisioning process. Also, the time-out period may be provided as a parameter to the signal (see Section 3.2.2.4). A value of zero indicates that the time-out period is infinite. A TO signal that fails after being started, but before having generated an "operation complete" event will generate an "operation failure" event which will include the name of the signal that failed. Deletion of a connection with an active TO signal will result in such a failure.

* 超时(TO):一旦应用,这些信号将持续,直到它们被取消(通过发生事件或不包括在后续(可能为空)信号列表中),或经过特定于信号的时间段为止。发出超时信号将生成“操作完成”事件。TO信号可能是180秒后“回响”超时。如果在180秒之前发生事件,默认情况下,信号将停止(“保持信号激活”操作-参见第2.3.3节-将覆盖此行为)。如果信号未停止,信号将超时、停止并生成“操作完成”事件,呼叫代理可能会或可能没有请求通知该事件。如果呼叫代理要求通知“操作完成”事件,发送给呼叫代理的“操作完成”事件应包括超时信号的名称(注意,如果参数传递给信号,则不会报告参数)。如果信号是在连接上产生的,则应如上所述包括连接的名称。超时信号具有为其定义的默认超时值,该值可能会被设置过程更改。此外,超时周期可作为信号参数提供(见第3.2.2.4节)。值为零表示超时周期是无限的。启动后但在生成“操作完成”事件之前失败的TO信号将生成“操作失败”事件,该事件将包括失败信号的名称。删除带有活动TO信号的连接将导致此类故障。

* Brief (BR): The duration of these signals is normally so short that they stop on their own. If a signal stopping event occurs, or a new SignalRequests is applied, a currently active BR signal will not stop. However, any pending BR signals not yet applied MUST be cancelled (a BR signal becomes pending if a NotificationRequest includes a BR signal, and there is already an active BR signal). As an example, a brief tone could be a DTMF digit. If the DTMF digit "1" is currently being played, and a signal stopping event occurs, the "1" would play to completion. If a request to play DTMF digit "2" arrives before DTMF digit "1" finishes playing, DTMF digit "2" would become pending.

* 简短(BR):这些信号的持续时间通常很短,以至于它们会自行停止。如果发生信号停止事件,或应用了新的SignalRequests,则当前激活的BR信号不会停止。但是,必须取消尚未应用的任何挂起BR信号(如果NotificationRequest包含BR信号,并且已经存在活动BR信号,则BR信号将变为挂起)。例如,短音可以是DTMF数字。如果当前正在播放双音多频数字“1”,并且发生信号停止事件,“1”将播放到结束。如果在DTMF数字“1”结束播放之前,请求播放DTMF数字“2”,则DTMF数字“2”将处于挂起状态。

Signal(s) generated on a connection MUST include the name of that connection.

在连接上生成的信号必须包括该连接的名称。

2.2 Usage of SDP
2.2 SDP的使用

The Call Agent uses the MGCP to provide the endpoint with the description of connection parameters such as IP addresses, UDP port and RTP profiles. These descriptions will follow the conventions delineated in the Session Description Protocol which is now an IETF proposed standard, documented in RFC 2327.

呼叫代理使用MGCP向端点提供连接参数的描述,如IP地址、UDP端口和RTP配置文件。这些描述将遵循会话描述协议中描述的约定,会话描述协议现在是IETF提议的标准,记录在RFC 2327中。

2.3 Gateway Control Commands
2.3 网关控制命令
2.3.1 Overview of Commands
2.3.1 命令概述

This section describes the commands of the MGCP. The service consists of connection handling and endpoint handling commands. There are currently nine commands in the protocol:

本节介绍MGCP的命令。该服务由连接处理和端点处理命令组成。协议中目前有九个命令:

* The Call Agent can issue an EndpointConfiguration command to a gateway, instructing the gateway about the coding characteristics expected by the "line-side" of the endpoint.

* 呼叫代理可以向网关发出EndpointConfiguration命令,指示网关端点的“线路端”所期望的编码特性。

* The Call Agent can issue a NotificationRequest command to a gateway, instructing the gateway to watch for specific events such as hook actions or DTMF tones on a specified endpoint.

* 呼叫代理可以向网关发出NotificationRequest命令,指示网关监视指定端点上的特定事件,如挂钩动作或DTMF音。

* The gateway will then use the Notify command to inform the Call Agent when the requested events occur.

* 然后,网关将使用Notify命令在请求的事件发生时通知呼叫代理。

* The Call Agent can use the CreateConnection command to create a connection that terminates in an "endpoint" inside the gateway.

* 调用代理可以使用CreateConnection命令创建一个连接,该连接终止于网关内的“端点”。

* The Call Agent can use the ModifyConnection command to change the parameters associated with a previously established connection.

* 呼叫代理可以使用ModifyConnection命令更改与先前建立的连接关联的参数。

* The Call Agent can use the DeleteConnection command to delete an existing connection. The DeleteConnection command may also be used by a gateway to indicate that a connection can no longer be sustained.

* 呼叫代理可以使用DeleteConnection命令删除现有连接。网关也可以使用DeleteConnection命令来指示连接无法继续。

* The Call Agent can use the AuditEndpoint and AuditConnection commands to audit the status of an "endpoint" and any connections associated with it. Network management beyond the capabilities provided by these commands is generally desirable. Such capabilities are expected to be supported by the use of the Simple Network Management Protocol (SNMP) and definition of a MIB which is outside the scope of this specification.

* 调用代理可以使用AuditEndpoint和AuditConnection命令来审核“端点”及其关联的任何连接的状态。通常,除了这些命令提供的功能外,还需要网络管理。通过使用简单网络管理协议(SNMP)和定义本规范范围之外的MIB,这些功能有望得到支持。

* The Gateway can use the RestartInProgress command to notify the Call Agent that a group of endpoints managed by the gateway is being taken out-of-service or is being placed back in-service.

* 网关可以使用RestartInProgress命令通知呼叫代理由网关管理的一组端点正在停止服务或重新投入服务。

These services allow a controller (normally, the Call Agent) to instruct a gateway on the creation of connections that terminate in an "endpoint" attached to the gateway, and to be informed about events occurring at the endpoint. An endpoint may be for example:

这些服务允许控制器(通常是呼叫代理)指示网关创建以连接到网关的“端点”终止的连接,并通知在端点发生的事件。端点可以是例如:

* A specific trunk circuit, within a trunk group terminating in a gateway,

* 在网关中终止的中继组内的特定中继电路,

* A specific announcement handled by an announcement server.

* 由公告服务器处理的特定公告。

Connections are logically grouped into "calls" (the concept of a "call" has however little semantic meaning in MGCP itself). Several connections, that may or may not belong to the same call, can terminate in the same endpoint. Each connection is qualified by a "mode" parameter, which can be set to "send only" (sendonly), "receive only" (recvonly), "send/receive" (sendrecv), "conference" (confrnce), "inactive" (inactive), "loopback", "continuity test" (conttest), "network loop back" (netwloop) or "network continuity test" (netwtest).

连接在逻辑上分为“调用”(“调用”的概念在MGCP本身中几乎没有语义意义)。可能属于或不属于同一调用的多个连接可以在同一端点终止。每个连接都由一个“mode”参数限定,该参数可以设置为“仅发送”(仅发送)、“仅接收”(仅接收)、“发送/接收”(发送/接收)(发送/接收)、“会议”(会议)、“非活动”(非活动)、“环回”、“连续性测试”(conttest)、“网络环回”(netwloop)或“网络连续性测试”(netwtest)。

Media generated by the endpoint is sent on connections whose mode is either "send only", "send/receive", or "conference", unless the endpoint has a connection in "loopback" or "continuity test" mode. However, media generated by applying a signal to a connection is always sent on the connection, regardless of the mode.

端点生成的媒体在模式为“仅发送”、“发送/接收”或“会议”的连接上发送,除非端点的连接处于“环回”或“连续性测试”模式。但是,通过向连接应用信号生成的媒体始终在连接上发送,而与模式无关。

The handling of the media streams received on connections is determined by the mode parameters:

连接上接收的媒体流的处理由模式参数决定:

* Media streams received through connections in "receive", "conference" or "send/receive" mode are mixed and sent to the endpoint, unless the endpoint has another connection in "loopback" or "continuity test" mode.

* 通过“接收”、“会议”或“发送/接收”模式下的连接接收的媒体流被混合并发送到端点,除非端点在“环回”或“连续性测试”模式下有另一个连接。

* Media streams originating from the endpoint are transmitted over all the connections whose mode is "send", "conference" or "send/receive", unless the endpoint has another connection in "loopback" or "continuity test" mode.

* 来自该端点的媒体流通过其模式为“发送”、“会议”或“发送/接收”的所有连接进行传输,除非该端点有另一个处于“环回”或“连续性测试”模式的连接。

* In addition to being sent to the endpoint, a media stream received through a connection in "conference" mode is forwarded to all the other connections whose mode is "conference". This also applies

* 除了被发送到端点之外,通过“会议”模式的连接接收的媒体流被转发到其模式为“会议”的所有其他连接。这也适用

when the endpoint has a connection in "loopback" or "continuity test" mode. The details of this forwarding, e.g., RTP translator or mixer, is outside the scope of this document.

当端点具有处于“环回”或“连续性测试”模式的连接时。此转发的详细信息,例如RTP转换器或混音器,不在本文档范围内。

Note that in order to detect events on a connection, the connection must by default be in one of the modes "receive", "conference", "send/receive", "network loopback" or "network continuity test". The event detection only applies to the incoming media. Connections in "sendonly", "inactive", "loopback", or "continuity test" mode will thus normally not detect any events, although requesting to do so is not considered an error.

请注意,为了检测连接上的事件,默认情况下连接必须处于“接收”、“会议”、“发送/接收”、“网络环回”或“网络连续性测试”模式之一。事件检测仅适用于传入媒体。因此,“sendonly”、“inactive”、“loopback”或“continuity test”模式下的连接通常不会检测到任何事件,尽管请求这样做并不被视为错误。

The "loopback" and "continuity test" modes are used during maintenance and continuity test operations. An endpoint may have more than one connection in either "loopback" or "continuity test" mode. As long as there is one connection in that particular mode, and no other connection on the endpoint is placed in a different maintenance or test mode, the maintenance or test operation shall continue undisturbed. There are two flavors of continuity test, one specified by ITU and one used in the US. In the first case, the test is a loopback test. The originating switch will send a tone (the go tone) on the bearer circuit and expects the terminating switch to loopback the tone. If the originating switch sees the same tone returned (the return tone), the COT has passed. If not, the COT has failed. In the second case, the go and return tones are different. The originating switch sends a certain go tone. The terminating switch detects the go tone, it asserts a different return tone in the backwards direction. When the originating switch detects the return tone, the COT is passed. If the originating switch never detects the return tone, the COT has failed.

“环回”和“连续性测试”模式在维护和连续性测试操作期间使用。在“环回”或“连续性测试”模式下,端点可能有多个连接。只要在该特定模式下有一个连接,且端点上没有其他连接处于不同的维护或测试模式,则维护或测试操作应保持不受干扰。有两种类型的连续性测试,一种由ITU指定,另一种在美国使用。在第一种情况下,测试是环回测试。发起交换机将在承载电路上发送一个音调(go音调),并期望终端交换机回送该音调。如果始发交换机看到相同的返回音(返回音),则COT已通过。如果没有,则COT出现故障。在第二种情况下,go和return音调不同。始发开关发送特定的go音调。终端开关检测到go音调,它在向后方向上断言不同的返回音调。当始发开关检测到回音时,COT通过。如果始发开关从未检测到回音,则COT出现故障。

If the mode is set to "loopback", the gateway is expected to return the incoming signal from the endpoint back into that same endpoint. This procedure will be used, typically, for testing the continuity of trunk circuits according to the ITU specifications. If the mode is set to "continuity test", the gateway is informed that the other end of the circuit has initiated a continuity test procedure according to the GR specification (see [22]). The gateway will place the circuit in the transponder mode required for dual-tone continuity tests.

如果模式设置为“环回”,则网关应将输入信号从端点返回到同一端点。本程序通常用于根据ITU规范测试中继电路的连续性。如果模式设置为“导通性测试”,则网关会被告知电路的另一端已根据GR规范启动了导通性测试程序(参见[22])。网关将使电路处于双音连续性测试所需的收发器模式。

If the mode is set to "network loopback", the audio signals received from the connection will be echoed back on the same connection. The media is not forwarded to the endpoint.

如果模式设置为“网络环回”,则从连接接收的音频信号将在同一连接上回响。媒体不会转发到终结点。

If the mode is set to "network continuity test", the gateway will process the packets received from the connection according to the transponder mode required for dual-tone continuity test, and send the processed signal back on the connection. The media is not forwarded

如果模式设置为“网络连续性测试”,网关将根据双音连续性测试所需的应答器模式处理从连接接收的数据包,并将处理后的信号发送回连接。媒体未转发

to the endpoint. The "network continuity test" mode is included for backwards compatibility only and use of it is discouraged.

到终点。“网络连续性测试”模式仅用于向后兼容性,不鼓励使用。

2.3.2 EndpointConfiguration
2.3.2 端点配置

The EndpointConfiguration command can be used to specify the encoding of the signals that will be received by the endpoint. For example, in certain international telephony configurations, some calls will carry mu-law encoded audio signals, while others will use A-law. The Call Agent can use the EndpointConfiguration command to pass this information to the gateway. The configuration may vary on a call by call basis, but can also be used in the absence of any connection.

EndpointConfiguration命令可用于指定端点将接收的信号的编码。例如,在某些国际电话配置中,一些呼叫将携带mu-law编码的音频信号,而其他呼叫将使用A-law。呼叫代理可以使用EndpointConfiguration命令将此信息传递给网关。配置可能会因呼叫而异,但也可以在没有任何连接的情况下使用。

ReturnCode, [PackageList] <-- EndpointConfiguration(EndpointId, [BearerInformation])

返回代码,[PackageList]<--EndpointConfiguration(EndpointId,[BearerInformation])

EndpointId is the name of the endpoint(s) in the gateway where EndpointConfiguration executes. The "any of" wildcard convention MUST NOT be used. If the "all of" wildcard convention is used, the command applies to all the endpoints whose name matches the wildcard.

EndpointId是执行EndpointConfiguration的网关中端点的名称。不得使用“任意”通配符约定。如果使用“全部”通配符约定,则该命令将应用于名称与通配符匹配的所有端点。

BearerInformation is a parameter defining the coding of the data sent to and received from the line side. The information is encoded as a list of sub-parameters. The only sub-parameter defined in this version of the specification is the bearer encoding, whose value can be set to "A-law" or "mu-law". The set of sub-parameters may be extended.

承载信息是一个参数,用于定义发送至线路侧和从线路侧接收的数据的编码。信息编码为子参数列表。本规范版本中定义的唯一子参数是承载编码,其值可以设置为“A-law”或“mu-law”。子参数集可以扩展。

In order to allow for extensibility, while remaining backwards compatible, the BearerInformation parameter is conditionally optional based on the following conditions:

为了允许扩展性,同时保持向后兼容,根据以下条件,BealerInformation参数是有条件可选的:

* if Extension Parameters (vendor, package or other) are not used, the BearerInformation parameter is REQUIRED,

* 如果未使用扩展参数(供应商、包装或其他),则需要BealerInformation参数,

* otherwise, the BearerInformation parameter is OPTIONAL.

* 否则,轴承信息参数是可选的。

When omitted, BearerInformation MUST retain its current value.

省略时,轴承信息必须保留其当前值。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.3 NotificationRequest
2.3.3 通知请求

The NotificationRequest command is used to request the gateway to send notifications upon the occurrence of specified events in an endpoint. For example, a notification may be requested for when a gateway detects that an endpoint is receiving tones associated with fax communication. The entity receiving this notification may then decide to specify use of a different type of encoding method in the connections bound to this endpoint and instruct the gateway accordingly with a ModifyConnection Command.

NotificationRequest命令用于请求网关在端点中发生指定事件时发送通知。例如,当网关检测到端点正在接收与传真通信相关联的音调时,可以请求通知。接收此通知的实体随后可能决定在绑定到此端点的连接中指定使用不同类型的编码方法,并相应地使用ModifyConnection命令指示网关。

         ReturnCode,
         [PackageList]
         <-- NotificationRequest(EndpointId,
                                 [NotifiedEntity,]
                                 [RequestedEvents,]
                                 RequestIdentifier,
                                 [DigitMap,]
                                 [SignalRequests,]
                                 [QuarantineHandling,]
                                 [DetectEvents,]
                                 [encapsulated EndpointConfiguration])
        
         ReturnCode,
         [PackageList]
         <-- NotificationRequest(EndpointId,
                                 [NotifiedEntity,]
                                 [RequestedEvents,]
                                 RequestIdentifier,
                                 [DigitMap,]
                                 [SignalRequests,]
                                 [QuarantineHandling,]
                                 [DetectEvents,]
                                 [encapsulated EndpointConfiguration])
        

EndpointId is the identifier for the endpoint(s) in the the gateway where the NotificationRequest executes. The "any of" wildcard MUST NOT be used.

EndpointId是执行NotificationRequest的网关中端点的标识符。不得使用“任意”通配符。

NotifiedEntity is an optional parameter that specifies a new "notified entity" for the endpoint.

NotifiedEntity是一个可选参数,用于为端点指定新的“通知实体”。

RequestIdentifier is used to correlate this request with the notifications that it triggers. It will be repeated in the corresponding Notify command.

RequestIdentifier用于将此请求与其触发的通知相关联。它将在相应的Notify命令中重复。

RequestedEvents is a list of events, possibly qualified by event parameters (see Section 3.2.2.4), that the gateway is requested to detect and report. Such events may include, for example, fax tones, continuity tones, or on-hook transition. Unless otherwise specified, events are detected on the endpoint, however some events can be detected on a connection. A given event MUST NOT appear more than once in a RequestedEvents. If the parameter is omitted, it defaults to empty.

RequestedEvents是请求网关检测和报告的事件列表,可能由事件参数限定(见第3.2.2.4节)。此类事件可包括例如传真音调、连续性音调或挂机转换。除非另有规定,否则会在端点上检测到事件,但是可以在连接上检测到某些事件。给定事件在RequestedEvents中不得出现多次。如果省略该参数,则默认为空。

To each event is associated one or more actions, which can be:

与每个事件关联的是一个或多个操作,可以是:

* Notify the event immediately, together with the accumulated list of observed events,

* 立即通知事件以及观察到的事件的累积列表,

* Swap audio,

* 交换音频,

* Accumulate the event in an event buffer, but don't notify yet,

* 在事件缓冲区中累积事件,但不通知,

* Accumulate according to Digit Map,

* 根据数字地图进行累加,

* Keep Signal(s) active,

* 保持信号处于激活状态,

* Process the Embedded Notification Request,

* 处理嵌入的通知请求,

* Ignore the event.

* 忽略事件。

Support for Notify, Accumulate, Keep Signal(s) Active, Embedded Notification Request, and Ignore is REQUIRED. Support for Accumulate according to Digit Map is REQUIRED on any endpoint capable of detecting DTMF. Support for any other action is OPTIONAL. The set of actions can be extended.

需要支持通知、累积、保持信号活动、嵌入通知请求和忽略。在任何能够检测DTMF的端点上,都需要支持根据数字映射进行累加。对任何其他操作的支持都是可选的。操作集可以扩展。

A given action can by default be specified for any event, although some actions will not make sense for all events. For example, an off-hook event with the Accumulate according to Digit Map action is valid, but will of course immediately trigger a digit map mismatch when the off-hook event occurs. Needless to say, such practice is discouraged.

默认情况下,可以为任何事件指定给定的操作,尽管某些操作对所有事件都没有意义。例如,具有“根据数字映射累积”操作的摘机事件是有效的,但当摘机事件发生时,当然会立即触发数字映射不匹配。不用说,这种做法是不受鼓励的。

Some actions can be combined as shown in the table below, where "Y" means the two actions can be combined, and "N" means they cannot:

如下表所示,某些动作可以组合,其中“Y”表示两个动作可以组合,“N”表示不能组合:

       --------------------------------------------------------------
      |       | Notif | Swap | Accum | AccDi | KeSiA | EmbNo | Ignor |
      |--------------------------------------------------------------|
      | Notif |   N   |   Y  |   N   |   N   |   Y   |   Y*  |   N   |
      | Swap  |   -   |   N  |   Y   |   N   |   N   |   N   |   Y   |
      | Accum |   -   |   -  |   N   |   N   |   Y   |   Y   |   N   |
      | AccDi |   -   |   -  |   -   |   N   |   Y   |   N   |   N   |
      | KeSiA |   -   |   -  |   -   |   -   |   N   |   Y   |   Y   |
      | EmbNo |   -   |   -  |   -   |   -   |   -   |   N   |   N   |
      | Ignor |   -   |   -  |   -   |   -   |   -   |   -   |   N   |
       --------------------------------------------------------------
        
       --------------------------------------------------------------
      |       | Notif | Swap | Accum | AccDi | KeSiA | EmbNo | Ignor |
      |--------------------------------------------------------------|
      | Notif |   N   |   Y  |   N   |   N   |   Y   |   Y*  |   N   |
      | Swap  |   -   |   N  |   Y   |   N   |   N   |   N   |   Y   |
      | Accum |   -   |   -  |   N   |   N   |   Y   |   Y   |   N   |
      | AccDi |   -   |   -  |   -   |   N   |   Y   |   N   |   N   |
      | KeSiA |   -   |   -  |   -   |   -   |   N   |   Y   |   Y   |
      | EmbNo |   -   |   -  |   -   |   -   |   -   |   N   |   N   |
      | Ignor |   -   |   -  |   -   |   -   |   -   |   -   |   N   |
       --------------------------------------------------------------
        

Note (*): The "Embedded Notification Request" can only be combined with "Notify", if the gateway is allowed to issue more than one Notify command per Notification request (see below and Section 4.4.1).

注(*):“嵌入式通知请求”只能与“通知”结合使用,前提是允许网关对每个通知请求发出多个通知命令(见下文和第4.4.1节)。

If no action is specified, the Notify action will be applied. If one or more actions are specified, only those actions apply. When two or more actions are specified, each action MUST be combinable with all

如果未指定任何操作,则将应用Notify操作。如果指定了一个或多个操作,则仅应用这些操作。当指定两个或多个操作时,每个操作必须与所有操作组合

the other actions as defined by the table above - the individual actions are assumed to occur simultaneously.

上表中定义的其他行动-假设单独行动同时发生。

If a client receives a request with an invalid or unsupported action or an illegal combination of actions, it MUST return an error to the Call Agent (error code 523 - unknown or illegal combination of actions, is RECOMMENDED).

如果客户端收到的请求包含无效或不受支持的操作或非法的操作组合,则必须向呼叫代理返回错误(错误代码523-建议使用未知或非法的操作组合)。

In addition to the RequestedEvents parameter specified in the command, some MGCP packages may contain "persistent events" (this is generally discouraged though - see Appendix B for an alternative). Persistent events in a given package are always detected on an endpoint that implements that package. If a persistent event is not included in the list of RequestedEvents, and the event occurs, the event will be detected anyway and processed like all other events, as if the persistent event had been requested with a Notify action. A NotificationRequest MUST still be in place for a persistent event to trigger a Notify though. Thus, informally, persistent events can be viewed as always being implicitly included in the list of RequestedEvents with an action to Notify, although no glare detection, etc., will be performed.

除了命令中指定的RequestedEvents参数外,某些MGCP包可能包含“持久事件”(但通常不鼓励这样做-请参阅附录B了解替代方法)。给定包中的持久事件总是在实现该包的端点上检测到。如果RequestedEvents列表中未包含持久性事件,并且该事件发生,则该事件将被检测到,并与所有其他事件一样进行处理,就像持久性事件是通过Notify操作请求的一样。NotificationRequest必须仍然存在,持续事件才能触发Notify。因此,非正式地说,持久性事件可以被视为总是隐式地包括在请求事件列表中,并具有要通知的操作,尽管不会执行眩光检测等。

Non-persistent events are those events that need to be explicitly included in the RequestedEvents list. The (possibly empty) list of requested events completely replaces the previous list of requested events. In addition to the persistent events, only the events specified in the requested events list will be detected by the endpoint. If a persistent event is included in the RequestedEvents list, the action specified will replace the default action associated with the event for the life of the RequestedEvents list, after which the default action is restored. For example, if "off-hook"was a persistent event, the "Ignore off-hook" action was specified, and a new request without any off-hook instructions were received, the default "Notify off-hook" operation would be restored.

非持久性事件是那些需要显式包含在RequestedEvents列表中的事件。请求的事件列表(可能为空)完全替换先前请求的事件列表。除了持久事件外,端点将仅检测请求的事件列表中指定的事件。如果RequestedEvents列表中包含持久性事件,则指定的操作将在RequestedEvents列表的生命周期内替换与该事件关联的默认操作,然后恢复默认操作。例如,如果“off-hook”是一个持久性事件,指定了“Ignore-off-hook”操作,并且收到了一个没有任何off-hook指令的新请求,那么将恢复默认的“Notify-off-hook”操作。

The gateway will detect the union of the persistent events and the requested events. If an event is not included in either list, it will be ignored.

网关将检测持久事件和请求事件的联合。如果某个事件未包含在任一列表中,则该事件将被忽略。

The Call Agent can send a NotificationRequest with an empty (or omitted) RequestedEvents list to the gateway. The Call Agent can do so, for example, to a gateway when it does not want to collect any more DTMF digits. However, persistent events will still be detected and notified.

呼叫代理可以向网关发送带有空(或省略)RequestedEvents列表的NotificationRequest。呼叫代理可以这样做,例如,当它不想收集更多的DTMF数字时,呼叫代理可以这样做到网关。但是,仍将检测并通知持续事件。

The Swap Audio action can be used when a gateway handles more than one connection on an endpoint. This will be the case for call waiting, and possibly other feature scenarios. In order to avoid the

当网关处理端点上的多个连接时,可以使用交换音频操作。这将是呼叫等待的情况,可能还有其他功能场景。为了避免

round-trip to the Call Agent when just changing which connection is attached to the audio functions of the endpoint, the NotificationRequest can map an event (usually hook flash, but could be some other event) to a local swap audio function, which selects the "next" connection in a round robin fashion. If there is only one connection, this action is effectively a no-op. If there are more than two connections, the order is undefined. If the endpoint has exactly two connections, one of which is "inactive", the other of which is in "send/receive" mode, then swap audio will attempt to make the "send/receive" connection "inactive", and vice versa. This specification intentionally does not provide any additional detail on the swap audio action.

往返调用代理仅更改连接到端点音频函数的连接时,NotificationRequest可以将事件(通常是挂钩闪烁,但可能是其他事件)映射到本地交换音频函数,该函数以循环方式选择“下一个”连接。如果只有一个连接,则此操作实际上是禁止操作。如果有两个以上的连接,则顺序未定义。如果端点正好有两个连接,其中一个处于“非活动”状态,另一个处于“发送/接收”模式,则交换音频将尝试使“发送/接收”连接处于“非活动”状态,反之亦然。本规范有意不提供有关交换音频操作的任何其他详细信息。

If signal(s) are desired to start when an event being looked for occurs, the "Embedded NotificationRequest" action can be used. The embedded NotificationRequest may include a new list of RequestedEvents, SignalRequests and a new digit map as well. The semantics of the embedded NotificationRequest is as if a new NotificationRequest was just received with the same NotifiedEntity, RequestIdentifier, QuarantineHandling and DetectEvents. When the "Embedded NotificationRequest" is activated, the "current dial string" will be cleared; however the list of observed events and the quarantine buffer will be unaffected (if combined with a Notify, the Notify will clear the list of observed events though - see Section 4.4.1). Note, that the Embedded NotificationRequest action does not accumulate the triggering event, however it can be combined with the Accumulate action to achieve that. If the Embedded NotificationRequest fails, an Embedded NotificationRequest failure event SHOULD be generated (see Appendix B).

如果需要在正在查找的事件发生时启动信号,则可以使用“嵌入式NotificationRequest”操作。嵌入式NotificationRequest还可以包括新的RequestedEvents列表、SignalRequests和新的数字映射。嵌入式NotificationRequest的语义就好像刚收到一个新的NotificationRequest,它具有相同的NotificationIdentity、RequestIdentifier、QuarantineHandling和DetecteEvents。当“嵌入式通知请求”被激活时,“当前拨号串”将被清除;但是,观察到的事件列表和隔离缓冲区将不受影响(如果与Notify结合使用,Notify将清除观察到的事件列表-参见第4.4.1节)。请注意,嵌入式NotificationRequest操作不会累积触发事件,但是可以将其与累积操作结合使用以实现此目的。如果嵌入式NotificationRequest失败,则应生成嵌入式NotificationRequest失败事件(参见附录B)。

MGCP implementations SHALL be able to support at least one level of embedding. An embedded NotificationRequest that respects this limitation MUST NOT contain another Embedded NotificationRequest.

MGCP实现应能够支持至少一个嵌入级别。遵守此限制的嵌入式NotificationRequest不得包含其他嵌入式NotificationRequest。

DigitMap is an optional parameter that allows the Call Agent to provision the endpoint with a digit map according to which digits will be accumulated. If this optional parameter is absent, the previously defined value is retained. This parameter MUST be defined, either explicitly or through a previous command, if the RequestedEvents parameter contains a request to "accumulate according to the digit map". The collection of these digits will result in a digit string. The digit string is initialized to a null string upon reception of the NotificationRequest, so that a subsequent notification only returns the digits that were collected after this request. Digits that were accumulated according to the digit map are reported as any other accumulated event, in the order in which they occur. It is therefore possible that other events accumulated are

DigitMap是一个可选参数,它允许调用代理为端点提供一个数字映射,根据该映射将累积哪些数字。如果缺少此可选参数,则保留先前定义的值。如果RequestedEvents参数包含“根据数字映射累积”的请求,则必须显式或通过上一个命令定义此参数。这些数字的集合将生成一个数字字符串。收到NotificationRequest后,数字字符串被初始化为空字符串,因此后续通知仅返回此请求之后收集的数字。根据数字映射累积的数字按其发生顺序报告为任何其他累积事件。因此,可能累积了其他事件

found in between the list of digits. If the gateway is requested to "accumulate according to digit map" and the gateway currently does not have a digit map for the endpoint in question, the gateway MUST return an error (error code 519 - endpoint does not have a digit map, is RECOMMENDED).

在数字列表之间找到。如果请求网关“根据数字映射累计”,并且网关当前没有相关端点的数字映射,则网关必须返回错误(错误代码519-建议端点没有数字映射)。

SignalRequests is an optional parameter that contains the set of signals that the gateway is asked to apply. When omitted, it defaults to empty. When multiple signals are specified, the signals MUST be applied in parallel. Unless otherwise specified, signals are applied to the endpoint. However some signals can be applied to a connection. Signals are identified by their name, which is an event name, and may be qualified by signal parameters (see Section 3.2.2.4). The following are examples of signals:

SignalRequests是一个可选参数,包含请求网关应用的信号集。省略时,默认为空。当指定多个信号时,必须并行应用这些信号。除非另有规定,否则信号将应用于端点。但是,某些信号可以应用于连接。信号通过其名称(事件名称)进行识别,并可通过信号参数进行限定(见第3.2.2.4节)。以下是信号示例:

* Ringing,

* 响铃,

* Busy tone,

* 忙音,

* Call waiting tone,

* 呼叫等待音,

* Off hook warning tone,

* 摘机警告音,

* Ringback tones on a connection.

* 连接上的回铃音。

Names and descriptions of signals are defined in the appropriate package.

信号的名称和描述在相应的软件包中定义。

Signals are, by default, applied to endpoints. If a signal applied to an endpoint results in the generation of a media stream (audio, video, etc.), then by default the media stream MUST NOT be forwarded on any connection associated with that endpoint, regardless of the mode of the connection. For example, if a call-waiting tone is applied to an endpoint involved in an active call, only the party using the endpoint in question will hear the call-waiting tone. However, individual signals may define a different behavior.

默认情况下,信号应用于端点。如果应用于端点的信号导致生成媒体流(音频、视频等),则默认情况下,媒体流不得在与该端点相关联的任何连接上转发,无论连接模式如何。例如,如果将呼叫等待音应用于活动呼叫中涉及的端点,则只有使用相关端点的一方将听到呼叫等待音。但是,单个信号可能定义不同的行为。

When a signal is applied to a connection that has received a RemoteConnectionDescriptor, the media stream generated by that signal will be forwarded on the connection regardless of the current mode of the connection (including loopback and continuity test). If a RemoteConnectionDescriptor has not been received, the gateway MUST return an error (error code 527 - missing RemoteConnectionDescriptor, is RECOMMENDED). Note that this restriction does not apply to detecting events on a connection.

当信号应用于已接收RemoteConnectionDescriptor的连接时,由该信号生成的媒体流将在该连接上转发,而不考虑连接的当前模式(包括环回和连续性测试)。如果未收到RemoteConnectionDescriptor,网关必须返回错误(建议错误代码527-缺少RemoteConnectionDescriptor)。请注意,此限制不适用于检测连接上的事件。

When a (possibly empty) list of signal(s) is supplied, this list completely replaces the current list of active time-out signals. Currently active time-out signals that are not provided in the new list MUST be stopped and the new signal(s) provided will now become active. Currently active time-out signals that are provided in the new list of signals MUST remain active without interruption, thus the timer for such time-out signals will not be affected. Consequently, there is currently no way to restart the timer for a currently active time-out signal without turning the signal off first. If the time-out signal is parameterized, the original set of parameters MUST remain in effect, regardless of what values are provided subsequently. A given signal MUST NOT appear more than once in a SignalRequests. Note that applying a signal S to an endpoint, connection C1 and connection C2, constitutes three different and independent signals.

当提供信号列表(可能为空)时,此列表将完全替换当前的活动超时信号列表。必须停止新列表中未提供的当前活动超时信号,并且提供的新信号现在将变为活动信号。新信号列表中提供的当前激活的超时信号必须保持激活而不中断,因此此类超时信号的计时器不会受到影响。因此,如果不先关闭信号,当前无法重新启动当前激活超时信号的计时器。如果超时信号被参数化,则无论随后提供什么值,原始参数集必须保持有效。给定信号在信号请求中不得出现多次。注意,将信号S应用于端点(连接C1和连接C2)构成三个不同且独立的信号。

The action triggered by the SignalRequests is synchronized with the collection of events specified in the RequestedEvents parameter. For example, if the NotificationRequest mandates "ringing" and the RequestedEvents asks to look for an "off-hook" event, the ringing SHALL stop as soon as the gateway detects an off-hook event. The formal definition is that the generation of all "Time Out" signals SHALL stop as soon as one of the requested events is detected, unless the "Keep signals active" action is associated to the detected event. The RequestedEvents and SignalRequests may refer to the same event definitions. In one case, the gateway is asked to detect the occurrence of the event, and in the other case it is asked to generate it. The specific events and signals that a given endpoint can detect or perform are determined by the list of packages that are supported by that endpoint. Each package specifies a list of events and signals that can be detected or performed. A gateway that is requested to detect or perform an event belonging to a package that is not supported by the specified endpoint MUST return an error (error code 518 - unsupported or unknown package, is RECOMMENDED). When the event name is not qualified by a package name, the default package name for the endpoint is assumed. If the event name is not registered in this default package, the gateway MUST return an error (error code 522 - no such event or signal, is RECOMMENDED).

由SignalRequests触发的操作与RequestedEvents参数中指定的事件集合同步。例如,如果NotificationRequest强制要求“振铃”,而RequestedEvents要求查找“摘机”事件,则只要网关检测到摘机事件,振铃就会停止。正式定义是,所有“超时”信号的生成应在检测到一个请求的事件时立即停止,除非“保持信号活动”动作与检测到的事件相关。RequestedEvents和SignalRequests可能引用相同的事件定义。在一种情况下,要求网关检测事件的发生,在另一种情况下,要求网关生成事件。给定端点可以检测或执行的特定事件和信号由该端点支持的包列表确定。每个包都指定了可检测或执行的事件和信号的列表。被请求检测或执行属于指定端点不支持的包的事件的网关必须返回错误(错误代码518-建议使用不支持或未知的包)。如果事件名称未由包名称限定,则假定端点的默认包名称。如果此默认包中未注册事件名称,网关必须返回错误(错误代码522-建议不要使用此类事件或信号)。

The Call Agent can send a NotificationRequest whose requested signal list is empty. It will do so for example when a time-out signal(s) should stop.

呼叫代理可以发送请求信号列表为空的NotificationRequest。例如,当超时信号停止时,它会这样做。

If signal(s) are desired to start as soon as a "looked-for" event occurs, the "Embedded NotificationRequest" action can be used. The embedded NotificationRequest may include a new list of RequestedEvents, SignalRequests and a new Digit Map as well. The embedded NotificationRequest action allows the Call Agent to set up a

如果希望在“查找”事件发生后立即启动信号,则可以使用“嵌入式NotificationRequest”操作。嵌入式NotificationRequest还可以包括新的RequestedEvents列表、SignalRequests和新的数字映射。嵌入式NotificationRequest操作允许调用代理设置

"mini-script" to be processed by the gateway immediately following the detection of the associated event. Any SignalRequests specified in the embedded NotificationRequest will start immediately. Considerable care must be taken to prevent discrepancies between the Call Agent and the gateway. However, long-term discrepancies should not occur as a new SignalRequests completely replaces the old list of active time-out signals, and BR-type signals always stop on their own. Limiting the number of On/Off-type signals is encouraged. It is considered good practice for a Call Agent to occasionally turn on all On/Off signals that should be on, and turn off all On/Off signals that should be off.

网关在检测到相关事件后立即处理的“迷你脚本”。嵌入式NotificationRequest中指定的任何信号请求都将立即启动。必须非常小心地防止呼叫代理和网关之间出现差异。但是,长期差异不应发生,因为新的SignalRequests完全取代了旧的活动超时信号列表,并且BR类型的信号始终自行停止。鼓励限制开/关型信号的数量。呼叫代理偶尔打开所有应打开的开/关信号,并关闭所有应关闭的开/关信号,这被认为是良好的做法。

The Ignore action can be used to ignore an event, e.g., to prevent a persistent event from being notified. However, the synchronization between the event and an active time-out signal will still occur by default (e.g., a time-out dial-tone signal will stop when an off-hook occurs even if off-hook was a requested event with action "Ignore"). To prevent this synchronization from happening, the "Keep Signal(s) Active" action will have to be specified as well.

Ignore操作可用于忽略事件,例如,防止通知持续事件。但是,默认情况下,事件和活动超时信号之间的同步仍将发生(例如,即使off-hook是一个动作为“Ignore”的请求事件,当发生off-hook时,超时拨号音信号也将停止)。为了防止发生这种同步,还必须指定“保持信号激活”操作。

The optional QuarantineHandling parameter specifies the handling of "quarantine" events, i.e., events that have been detected by the gateway before the arrival of this NotificationRequest command, but have not yet been notified to the Call Agent. The parameter provides a set of handling options (see Section 4.4.1 for details):

可选的QuarantineHandling参数指定“隔离”事件的处理,即网关在该NotificationRequest命令到达之前已检测到但尚未通知呼叫代理的事件。该参数提供一组处理选项(详见第4.4.1节):

* whether the quarantined events should be processed or discarded (the default is to process them).

* 应处理还是丢弃隔离的事件(默认情况下是处理它们)。

* whether the gateway is expected to generate at most one notification (step by step), or multiple notifications (loop), in response to this request (the default is at most one).

* 网关是否应生成最多一个通知(逐步)或多个通知(循环),以响应此请求(默认为最多一个)。

When the parameter is absent, the default value is assumed.

如果缺少该参数,则假定默认值。

We should note that the quarantine-handling parameter also governs the handling of events that were detected and processed but not yet notified when the command is received.

我们应该注意,隔离处理参数还控制已检测和处理但在收到命令时尚未通知的事件的处理。

DetectEvents is an optional parameter, possibly qualified by event parameters, that specifies a list of events that the gateway is requested to detect during the quarantine period. When this parameter is absent, the events to be detected in the quarantine period are those listed in the last received DetectEvents list. In addition, the gateway will also detect persistent events and the events specified in the RequestedEvents list, including those for which the "ignore" action is specified.

DetecteEvents是一个可选参数,可能由事件参数限定,用于指定隔离期间请求网关检测的事件列表。如果不存在此参数,则隔离期内要检测的事件是上次接收的DetectEvents列表中列出的事件。此外,网关还将检测持久事件和RequestedEvents列表中指定的事件,包括指定了“忽略”操作的事件。

Some events and signals, such as the in-line ringback or the quality alert, are performed or detected on connections terminating in the endpoint rather than on the endpoint itself. The structure of the event names (see Section 2.1.7) allows the Call Agent to specify the connection(s) on which the events should be performed or detected.

某些事件和信号(如在线回铃或质量警报)在终结于端点的连接上执行或检测,而不是在端点本身上。事件名称的结构(见第2.1.7节)允许呼叫代理指定应在其上执行或检测事件的连接。

The NotificationRequest command may carry an encapsulated EndpointConfiguration command, that will apply to the same endpoint(s). When this command is present, the parameters of the EndpointConfiguration command are included with the normal parameters of the NotificationRequest, with the exception of the EndpointId, which is not replicated.

NotificationRequest命令可能携带一个封装的EndpointConfiguration命令,该命令将应用于相同的端点。当此命令存在时,EndpointConfiguration命令的参数将包含在NotificationRequest的正常参数中,EndpointId除外,它不会被复制。

The encapsulated EndpointConfiguration command shares the fate of the NotificationRequest command. If the NotificationRequest is rejected, the EndpointConfiguration is not executed.

封装的EndpointConfiguration命令共享NotificationRequest命令的命运。如果NotificationRequest被拒绝,则不会执行EndpointConfiguration。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.4 Notify
2.3.4 通知

Notifications with the observed events are sent by the gateway via the Notify command when a triggering event occurs.

发生触发事件时,网关通过Notify命令发送带有观察到的事件的通知。

ReturnCode, [PackageList] <-- Notify(EndpointId, [NotifiedEntity,] RequestIdentifier, ObservedEvents)

ReturnCode,[PackageList]<--Notify(EndpointId,[NotifiedEntity,]RequestIdentifier,ObservedEvents)

EndpointId is the name for the endpoint in the gateway which is issuing the Notify command. The identifier MUST be a fully qualified endpoint identifier, including the domain name of the gateway. The local part of the name MUST NOT use any of the wildcard conventions.

EndpointId是网关中发出Notify命令的端点的名称。标识符必须是完全限定的端点标识符,包括网关的域名。名称的本地部分不得使用任何通配符约定。

NotifiedEntity is a parameter that identifies the entity which requested the notification. This parameter is equal to the NotifiedEntity parameter of the NotificationRequest that triggered this notification. The parameter is absent if there was no such parameter in the triggering request. Regardless of the value of the NotifiedEntity parameter, the notification MUST be sent to the current "notified entity" for the endpoint.

NotifiedEntity是一个参数,用于标识请求通知的实体。此参数等于触发此通知的NotificationRequest的NotificationIdentity参数。如果触发请求中没有此类参数,则该参数不存在。无论NotifiedEntity参数的值如何,都必须将通知发送到端点的当前“通知实体”。

RequestIdentifier is a parameter that repeats the RequestIdentifier parameter of the NotificationRequest that triggered this notification. It is used to correlate this notification with the request that triggered it. Persistent events will be viewed here as if they had been included in the last NotificationRequest. An implicit NotificationRequest MAY be in place right after restart - the RequestIdentifier used for it will be zero ("0") - see Section 4.4.1 for details.

RequestIdentifier是重复触发此通知的NotificationRequest的RequestIdentifier参数的参数。它用于将此通知与触发它的请求相关联。持久事件将在此处查看,就好像它们已包含在上次NotificationRequest中一样。隐式NotificationRequest可能在重新启动后立即就位-用于它的RequestIdentifier将为零(“0”)-有关详细信息,请参阅第4.4.1节。

ObservedEvents is a list of events that the gateway detected and accumulated. A single notification may report a list of events that will be reported in the order in which they were detected (FIFO).

ObservedEvents是网关检测到并累积的事件列表。单个通知可以报告事件列表,这些事件将按检测顺序报告(FIFO)。

The list will only contain the identification of events that were requested in the RequestedEvents parameter of the triggering NotificationRequest. It will contain the events that were either accumulated (but not notified) or treated according to digit map (but no match yet), and the final event that triggered the notification or provided a final match in the digit map. It should be noted that digits MUST be added to the list of observed events as they are accumulated, irrespective of whether they are accumulated according to the digit map or not. For example, if a user enters the digits "1234" and some event E is accumulated between the digits "3" and "4" being entered, the list of observed events would be "1, 2, 3, E, 4". Events that were detected on a connection SHALL include the name of that connection as in "R/qa@0A3F58" (see Section 2.1.7).

该列表将仅包含在触发NotificationRequest的RequestedEvents参数中请求的事件的标识。它将包含累积(但未通知)或根据数字映射处理(但尚未匹配)的事件,以及触发通知或在数字映射中提供最终匹配的最终事件。应注意的是,无论是否根据数字图进行累积,在累积观测事件时,必须将数字添加到观测事件列表中。例如,如果用户输入数字“1234”,并且某些事件E在输入的数字“3”和“4”之间累积,则观察到的事件列表将为“1、2、3、E、4”。在连接上检测到的事件应包括该连接的名称,如“R”中所示/qa@0A3F58“(见第2.1.7节)。

If the list of ObservedEvents reaches the capacity of the endpoint, an ObservedEvents Full event (see Appendix B) SHOULD be generated (the endpoint shall ensure it has capacity to include this event in the list of ObservedEvents). If the ObservedEvents Full event is not used to trigger a Notify, event processing continues as before (including digit map matching); however, the subsequent events will not be included in the list of ObservedEvents.

如果观察事件列表达到端点的容量,则应生成观察事件完整事件(见附录B)(端点应确保其有能力将该事件包括在观察事件列表中)。如果ObservedEvents Full事件未用于触发Notify,则事件处理将一如既往地继续(包括数字映射匹配);但是,后续事件将不包括在观测事件列表中。

ReturnCode is a parameter returned by the Call Agent. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是呼叫代理返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.5 CreateConnection
2.3.5 创建连接

This command is used to create a connection between two endpoints.

此命令用于在两个端点之间创建连接。

         ReturnCode,
         [ConnectionId,]
         [SpecificEndPointId,]
         [LocalConnectionDescriptor,]
         [SecondEndPointId,]
         [SecondConnectionId,]
         [PackageList]
         <-- CreateConnection(CallId,
                              EndpointId,
                              [NotifiedEntity,]
                              [LocalConnectionOptions,]
                              Mode,
                              [{RemoteConnectionDescriptor |
                              SecondEndpointId}, ]
                              [Encapsulated NotificationRequest,]
                              [Encapsulated EndpointConfiguration])
        
         ReturnCode,
         [ConnectionId,]
         [SpecificEndPointId,]
         [LocalConnectionDescriptor,]
         [SecondEndPointId,]
         [SecondConnectionId,]
         [PackageList]
         <-- CreateConnection(CallId,
                              EndpointId,
                              [NotifiedEntity,]
                              [LocalConnectionOptions,]
                              Mode,
                              [{RemoteConnectionDescriptor |
                              SecondEndpointId}, ]
                              [Encapsulated NotificationRequest,]
                              [Encapsulated EndpointConfiguration])
        

A connection is defined by its endpoints. The input parameters in CreateConnection provide the data necessary to build a gateway's "view" of a connection.

连接由其端点定义。CreateConnection中的输入参数提供构建网关连接“视图”所需的数据。

CallId is a parameter that identifies the call (or session) to which this connection belongs. This parameter SHOULD, at a minimum, be unique within the collection of Call Agents that control the same gateways. Connections that belong to the same call SHOULD share the same call-id. The call-id has little semantic meaning in the protocol; however it can be used to identify calls for reporting and accounting purposes. It does not affect the handling of connections by the gateway.

CallId是一个参数,用于标识此连接所属的调用(或会话)。在控制相同网关的呼叫代理集合中,此参数至少应是唯一的。属于同一呼叫的连接应共享相同的呼叫id。呼叫id在协议中几乎没有语义意义;但是,它可以用于识别报告和会计目的的调用。它不会影响网关对连接的处理。

EndpointId is the identifier for the connection endpoint in the gateway where CreateConnection executes. The EndpointId can be fully-specified by assigning a value to the parameter EndpointId in the function call or it may be under-specified by using the "any of" wildcard convention. If the endpoint is underspecified, the endpoint identifier SHALL be assigned by the gateway and its complete value returned in the SpecificEndPointId parameter of the response. When the "any of" wildcard is used, the endpoint assigned MUST be in-service and MUST NOT already have any connections on it. If no such endpoint is available, error code 410 (no endpoint available) SHOULD be returned. The "all of" wildcard MUST NOT be used.

EndpointId是执行CreateConnection的网关中连接端点的标识符。可以通过在函数调用中为参数EndpointId赋值来完全指定EndpointId,也可以使用“any of”通配符约定来指定。如果端点未指定,则网关应分配端点标识符,并在响应的SpecificEndPointId参数中返回其完整值。当使用“any of”通配符时,分配的端点必须是在用的,并且不能有任何连接。如果没有这样的端点可用,则应返回错误代码410(没有可用的端点)。不得使用“全部”通配符。

The NotifiedEntity is an optional parameter that specifies a new "notified entity" for the endpoint.

NotifiedEntity是一个可选参数,用于为端点指定新的“通知实体”。

LocalConnectionOptions is an optional structure used by the Call Agent to direct the handling of the connection by the gateway. The fields contained in a LocalConnectionOptions structure may include one or more of the following (each field MUST NOT be supplied more than once):

LocalConnectionOptions是呼叫代理用来指导网关处理连接的可选结构。LocalConnectionOptions结构中包含的字段可能包括以下一个或多个字段(每个字段不得提供多次):

* Codec compression algorithm: One or more codecs, listed in order of preference. For interoperability, it is RECOMMENDED to support G.711 mu-law encoding ("PCMU"). See Section 2.6 for details on the codec selection process.

* 编解码器压缩算法:一个或多个编解码器,按优先顺序列出。对于互操作性,建议支持G.711 mu法则编码(“PCMU”)。有关编解码器选择过程的详细信息,请参见第2.6节。

* Packetization period: A single millisecond value or a range may be specified. The packetization period SHOULD NOT contradict the specification of the codec compression algorithm. If a codec is specified that has a frame size which is inconsistent with the packetization period, and that codec is selected, the gateway is authorized to use a packetization period that is consistent with the frame size even if it is different from that specified. In so doing, the gateway SHOULD choose a non-zero packetization period as close to that specified as possible. If a packetization period is not specified, the endpoint SHOULD use the default packetization period(s) for the codec(s) selected.

* 打包周期:可以指定单个毫秒值或范围。打包周期不应与编解码器压缩算法的规范相矛盾。如果指定的编解码器的帧大小与打包周期不一致,并且选择了该编解码器,则网关有权使用与帧大小一致的打包周期,即使它与指定的不同。在这样做时,网关应选择尽可能接近指定的非零打包周期。如果未指定打包周期,端点应使用所选编解码器的默认打包周期。

* Bandwidth: The allowable bandwidth, i.e., payload plus any header overhead from the transport layer and up, e.g., IP, UDP, and RTP. The bandwidth specification SHOULD NOT contradict the specification of codec compression algorithm or packetization period. If a codec is specified, then the gateway is authorized to use it, even if it results in the usage of a larger bandwidth than specified. Any discrepancy between the bandwidth and codec specification will not be reported as an error.

* 带宽:允许的带宽,即有效负载加上传输层及以上的任何报头开销,如IP、UDP和RTP。带宽规格不应与编解码器压缩算法或打包周期的规格相矛盾。如果指定了编解码器,则网关有权使用该编解码器,即使其使用的带宽大于指定的带宽。带宽和编解码器规范之间的任何差异都不会作为错误报告。

* Type of Service: This indicates the class of service to be used for this connection. When the Type of Service is not specified, the gateway SHALL use a default value of zero unless provisioned otherwise.

* 服务类型:指示用于此连接的服务类别。未指定服务类型时,网关应使用默认值零,除非另有规定。

* Usage of echo cancellation: By default, the telephony gateways always perform echo cancellation on the endpoint. However, it may be necessary, for some calls, to turn off these operations. The echo cancellation parameter can have two values, "on" (when the echo cancellation is requested) and "off" (when it is turned off). The parameter is optional. If the parameter is omitted when creating a connection and there are no other connections on the endpoint, the endpoint SHALL apply echo cancellation initially. If the parameter is omitted when creating a connection and there are existing connections on the endpoint, echo cancellation is unchanged. The endpoint SHOULD subsequently enable or disable echo

* 回声消除的使用:默认情况下,电话网关始终在端点上执行回声消除。但是,对于某些呼叫,可能需要关闭这些操作。回声消除参数可以有两个值,“开”(请求回声消除时)和“关”(关闭时)。该参数是可选的。如果在创建连接时忽略了该参数,并且端点上没有其他连接,则端点应首先应用回声消除。如果在创建连接时忽略该参数,并且端点上存在现有连接,则回显取消将保持不变。端点应随后启用或禁用echo

cancellation when voiceband data is detected - see e.g., ITU-T recommendation V.8, V.25, and G.168. Following termination of voiceband data, the handling of echo cancellation SHALL then revert to the current value of the echo cancellation parameter. It is RECOMMENDED that echo cancellation handling is left to the gateway rather than having this parameter specified by the Call Agent.

检测到语音带数据时取消-例如,参见ITU-T建议V.8、V.25和g.168。语音带数据终止后,回声消除的处理应恢复为回声消除参数的当前值。建议将回声消除处理留给网关,而不是由呼叫代理指定此参数。

* Silence Suppression: The telephony gateways may perform voice activity detection, and avoid sending packets during periods of silence. However, it is necessary, for example for modem calls, to turn off this detection. The silence suppression parameter can have two values, "on" (when the detection is requested) and "off" (when it is not requested). The default is "off" (unless provisioned otherwise). Upon detecting voiceband data, the endpoint SHOULD disable silence suppression. Following termination of voiceband data, the handling of silence suppression SHALL then revert to the current value of the silence suppression parameter.

* 静音抑制:电话网关可以执行语音活动检测,并避免在静音期间发送数据包。但是,例如,对于调制解调器呼叫,必须关闭此检测。静音抑制参数可以有两个值,“on”(请求检测时)和“off”(未请求检测时)。默认值为“关闭”(除非另有规定)。检测到语音带数据后,端点应禁用静音抑制。语音带数据终止后,静音抑制的处理应恢复为静音抑制参数的当前值。

* Gain Control: The telephony gateways may perform gain control on the endpoint, in order to adapt the level of the signal. However, it is necessary, for example for some modem calls, to turn off this function. The gain control parameter may either be specified as "automatic", or as an explicit number of decibels of gain. The gain specified will be added to media sent out over the endpoint (as opposed to the connection) and subtracted from media received on the endpoint. The parameter is optional. When there are no other connections on the endpoint, and the parameter is omitted, the default is to not perform gain control (unless provisioned otherwise), which is equivalent to specifying a gain of 0 decibels. If there are other connections on the endpoint, and the parameter is omitted, gain control is unchanged. Upon detecting voiceband data, the endpoint SHOULD disable gain control if needed. Following termination of voiceband data, the handling of gain control SHALL then revert to the current value of the gain control parameter. It should be noted, that handling of gain control is normally best left to the gateway and hence use of this parameter is NOT RECOMMENDED.

* 增益控制:电话网关可在端点上执行增益控制,以适应信号电平。但是,有必要关闭此功能,例如对于某些调制解调器呼叫。增益控制参数可以指定为“自动”,也可以指定为明确的增益分贝数。指定的增益将添加到通过端点发送的介质(与连接相反)中,并从端点接收的介质中减去。该参数是可选的。如果端点上没有其他连接,并且省略了该参数,则默认情况下不执行增益控制(除非另有规定),这相当于指定0分贝的增益。如果端点上有其他连接,并且省略了该参数,则增益控制不变。一旦检测到语音带数据,端点应在需要时禁用增益控制。语音带数据终止后,增益控制的处理应恢复为增益控制参数的当前值。应注意,增益控制的处理通常最好留给网关,因此不建议使用此参数。

* RTP security: The Call agent can request the gateway to enable encryption of the audio Packets. It does so by providing a key specification, as specified in RFC 2327. By default, encryption is not performed.

* RTP安全性:呼叫代理可以请求网关对音频数据包进行加密。它通过提供RFC 2327中规定的密钥规范来实现。默认情况下,不执行加密。

* Network Type: The Call Agent may instruct the gateway to prepare the connection on a specified type of network. If absent, the value is based on the network type of the gateway being used.

* 网络类型:呼叫代理可以指示网关在指定类型的网络上准备连接。如果不存在,则该值基于正在使用的网关的网络类型。

* Resource reservation: The Call Agent may instruct the gateway to use network resource reservation for the connection. See Section 2.7 for details.

* 资源预留:呼叫代理可以指示网关为连接使用网络资源预留。详见第2.7节。

The Call Agent specifies the relevant fields it cares about in the command and leaves the rest to the discretion of the gateway. For those of the above parameters that were not explicitly included, the gateway SHOULD use the default values if possible. For a detailed list of local connection options included with this specification refer to section 3.2.2.10. The set of local connection options can be extended.

呼叫代理在命令中指定它关心的相关字段,其余字段由网关自行决定。对于上述未明确包含的参数,网关应尽可能使用默认值。有关本规范中包含的本地连接选项的详细列表,请参阅第3.2.2.10节。可以扩展本地连接选项集。

The Mode indicates the mode of operation for this side of the connection. The basic modes are "send", "receive", "send/receive", "conference", "inactive", "loopback", "continuity test", "network loop back" and "network continuity test". The expected handling of these modes is specified in the introduction of the "Gateway Control Commands", Section 2.3. Note that signals applied to a connection do not follow the connection mode. Some endpoints may not be capable of supporting all modes. If the command specifies a mode that the endpoint does not support, an error SHALL be returned (error 517 - unsupported mode, is RECOMMENDED). Also, if a connection has not yet received a RemoteConnectionDescriptor, an error MUST be returned if the connection is attempted to be placed in any of the modes "send only", "send/receive", "conference", "network loopback", "network continuity test", or if a signal (as opposed to detecting an event) is to be applied to the connection (error code 527 - missing RemoteConnectionDescriptor, is RECOMMENDED). The set of modes can be extended.

模式指示连接这一侧的操作模式。基本模式有“发送”、“接收”、“发送/接收”、“会议”、“非活动”、“环回”、“连续性测试”、“网络环回”和“网络连续性测试”。第2.3节“网关控制命令”的介绍中规定了这些模式的预期处理。请注意,应用于连接的信号不遵循连接模式。某些端点可能无法支持所有模式。如果命令指定端点不支持的模式,则应返回错误(建议使用错误517-不支持的模式)。此外,如果连接尚未收到RemoteConnectionDescriptor,则如果尝试将连接置于任何模式“仅发送”、“发送/接收”、“会议”、“网络环回”、“网络连续性测试”,或者如果要向连接应用信号(而不是检测事件),则必须返回错误(错误代码527-建议缺少RemoteConnectionDescriptor)。可以扩展模式集。

The gateway returns a ConnectionId, that uniquely identifies the connection within the endpoint, and a LocalConnectionDescriptor, which is a session description that contains information about the connection, e.g., IP address and port for the media, as defined in SDP.

网关返回一个唯一标识端点内连接的ConnectionId和一个LocalConnectionDescriptor,LocalConnectionDescriptor是一个会话描述,其中包含有关连接的信息,例如SDP中定义的媒体的IP地址和端口。

The SpecificEndPointId is an optional parameter that identifies the responding endpoint. It is returned when the EndpointId argument referred to an "any of" wildcard name and the command succeeded. When a SpecificEndPointId is returned, the Call Agent SHALL use it as the EndpointId value in successive commands referring to this connection.

SpecificEndPointId是标识响应端点的可选参数。当EndpointId参数引用“any of”通配符名称且命令成功时,将返回该参数。当返回SpecificEndPointId时,调用代理应在引用此连接的连续命令中将其用作EndpointId值。

The SecondEndpointId can be used instead of the RemoteConnectionDescriptor to establish a connection between two endpoints located on the same gateway. The connection is by definition a local connection. The SecondEndpointId can be fully-specified by assigning a value to the parameter SecondEndpointId in

可以使用SecondEndpointId而不是RemoteConnectionDescriptor在位于同一网关上的两个端点之间建立连接。根据定义,该连接是本地连接。可以通过为中的参数SecondEndpointId赋值来完全指定SecondEndpointId

the function call or it may be under-specified by using the "any of" wildcard convention. If the SecondEndpointId is underspecified, the second endpoint identifier will be assigned by the gateway and its complete value returned in the SecondEndPointId parameter of the response.

通过使用“任意”通配符约定,函数调用或它可能未被指定。如果未指定SecondEndpointId,则网关将分配第二个端点标识符,并在响应的SecondEndpointId参数中返回其完整值。

When a SecondEndpointId is specified, the command really creates two connections that can be manipulated separately through ModifyConnection and DeleteConnection commands. In addition to the ConnectionId and LocalConnectionDescriptor for the first connection, the response to the creation provides a SecondConnectionId parameter that identifies the second connection. The second connection is established in "send/receive" mode.

当指定SecondEndpointId时,该命令实际上创建了两个连接,可以通过ModifyConnection和DeleteConnection命令分别操作这两个连接。除了第一个连接的ConnectionId和LocalConnectionDescriptor之外,对创建的响应还提供了一个识别第二个连接的SecondConnectionId参数。第二个连接是在“发送/接收”模式下建立的。

After receiving a "CreateConnection" request that did not include a RemoteConnectionDescriptor parameter, a gateway is in an ambiguous situation. Because it has exported a LocalConnectionDescriptor parameter, it can potentially receive packets. Because it has not yet received the RemoteConnectionDescriptor parameter of the other gateway, it does not know whether the packets that it receives have been authorized by the Call Agent. It must thus navigate between two risks, i.e., clipping some important announcements or listening to insane data. The behavior of the gateway is determined by the value of the Mode parameter:

收到不包含RemoteConnectionDescriptor参数的“CreateConnection”请求后,网关处于不明确的状态。由于它已导出LocalConnectionDescriptor参数,因此可能会接收数据包。因为它尚未接收到另一个网关的RemoteConnectionDescriptor参数,所以它不知道它接收的数据包是否已被呼叫代理授权。因此,它必须在两种风险之间导航,即剪辑一些重要的公告或收听疯狂的数据。网关的行为由模式参数的值决定:

* If the mode was set to ReceiveOnly, the gateway MUST accept the media and transmit them through the endpoint.

* 如果模式设置为ReceiveOnly,网关必须接受媒体并通过端点传输。

* If the mode was set to Inactive, Loopback, or Continuity Test, the gateway MUST NOT transmit the media through to the endpoint.

* 如果模式设置为非活动、环回或连续性测试,网关不得将媒体传输到端点。

Note that the mode values SendReceive, Conference, SendOnly, Network Loopback and Network Continuity Test do not make sense in this situation. They MUST be treated as errors, and the command MUST be rejected (error code 527 - missing RemoteConnectionDescriptor, is RECOMMENDED).

请注意,模式值SendReceive、Conference、SendOnly、网络环回和网络连续性测试在这种情况下没有意义。必须将它们视为错误,并且必须拒绝该命令(建议使用错误代码527-缺少RemoteConnectionDescriptor)。

The command may optionally contain an encapsulated Notification Request command, which applies to the EndpointId, in which case a RequestIdentifier parameter MUST be present, as well as, optionally, other parameters of the NotificationRequest with the exception of the EndpointId, which is not replicated. The encapsulated NotificationRequest is executed simultaneously with the creation of the connection. For example, when the Call Agent wants to initiate a call to a residential gateway, it could:

该命令可以可选地包含一个封装的通知请求命令,该命令应用于EndpointId,在这种情况下,必须存在RequestIdentifier参数,还可以可选地包含NotificationRequest的其他参数,EndpointId除外,该参数不被复制。封装的NotificationRequest在创建连接的同时执行。例如,当呼叫代理想要发起对住宅网关的呼叫时,它可以:

* ask the residential gateway to prepare a connection, in order to be sure that the user can start speaking as soon as the phone goes off hook,

* 请住宅网关准备一个连接,以确保用户可以在电话挂断后立即开始通话,

* ask the residential gateway to start ringing,

* 要求住宅网关开始鸣响,

* ask the residential gateway to notify the Call Agent when the phone goes off-hook.

* 当电话挂断时,请住宅网关通知呼叫代理。

This can be accomplished in a single CreateConnection command, by also transmitting the RequestedEvents parameters for the off-hook event, and the SignalRequests parameter for the ringing signal.

这可以通过单个CreateConnection命令来实现,也可以通过传输摘机事件的RequestedEvents参数和振铃信号的SignalRequests参数来实现。

When these parameters are present, the creation and the NotificationRequest MUST be synchronized, which means that both MUST be accepted, or both MUST be refused. In our example, the CreateConnection may be refused if the gateway does not have sufficient resources, or cannot get adequate resources from the local network access, and the off-hook NotificationRequest can be refused in the glare condition, if the user is already off-hook. In this example, the phone must not ring if the connection cannot be established, and the connection must not be established if the user is already off-hook.

当存在这些参数时,必须同步创建和NotificationRequest,这意味着必须接受或拒绝这两个参数。在我们的示例中,如果网关没有足够的资源,或者无法从本地网络访问获得足够的资源,则可能会拒绝CreateConnection,如果用户已经脱离连接,则在眩光条件下可以拒绝脱离连接的NotificationRequest。在此示例中,如果无法建立连接,则手机不得响铃;如果用户已脱离连接,则不得建立连接。

The NotifiedEntity parameter, if present, defines the new "notified entity" for the endpoint.

NotifiedEntity参数(如果存在)定义端点的新“通知实体”。

The command may carry an encapsulated EndpointConfiguration command, which applies to the EndpointId. When this command is present, the parameters of the EndpointConfiguration command are included with the normal parameters of the CreateConnection with the exception of the EndpointId, which is not replicated. The EndpointConfiguration command may be encapsulated together with an encapsulated NotificationRequest command. Note that both of these apply to the EndpointId only.

该命令可能携带一个封装的EndpointConfiguration命令,该命令应用于EndpointId。当此命令存在时,EndpointConfiguration命令的参数将包含在CreateConnection的正常参数中,EndpointId除外,它不会被复制。EndpointConfiguration命令可以与封装的NotificationRequest命令一起封装。请注意,这两者都仅适用于EndpointId。

The encapsulated EndpointConfiguration command shares the fate of the CreateConnection command. If the CreateConnection is rejected, the EndpointConfiguration is not executed.

封装的EndpointConfiguration命令共享CreateConnection命令的命运。如果CreateConnection被拒绝,则不会执行EndpointConfiguration。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.6 ModifyConnection
2.3.6 修改连接

This command is used to modify the characteristics of a gateway's "view" of a connection. This "view" of the call includes both the local connection descriptor as well as the remote connection descriptor.

此命令用于修改网关连接“视图”的特征。该调用的“视图”包括本地连接描述符和远程连接描述符。

         ReturnCode,
         [LocalConnectionDescriptor,]
         [PackageList]
         <-- ModifyConnection(CallId,
                              EndpointId,
                              ConnectionId,
                              [NotifiedEntity,]
                              [LocalConnectionOptions,]
                              [Mode,]
                              [RemoteConnectionDescriptor,]
                              [Encapsulated NotificationRequest,]
                              [Encapsulated EndpointConfiguration])
        
         ReturnCode,
         [LocalConnectionDescriptor,]
         [PackageList]
         <-- ModifyConnection(CallId,
                              EndpointId,
                              ConnectionId,
                              [NotifiedEntity,]
                              [LocalConnectionOptions,]
                              [Mode,]
                              [RemoteConnectionDescriptor,]
                              [Encapsulated NotificationRequest,]
                              [Encapsulated EndpointConfiguration])
        

The parameters used are the same as in the CreateConnection command, with the addition of a ConnectionId that identifies the connection within the endpoint. This parameter was returned by the CreateConnection command, in addition to the local connection descriptor. It uniquely identifies the connection within the context of the endpoint. The CallId used when the connection was created MUST be included as well.

使用的参数与CreateConnection命令中的参数相同,只是添加了一个ConnectionId,用于标识端点内的连接。除了本地连接描述符之外,CreateConnection命令还返回了此参数。它唯一地标识端点上下文中的连接。创建连接时使用的CallId也必须包括在内。

The EndpointId MUST be a fully qualified endpoint identifier. The local name MUST NOT use the wildcard conventions.

EndpointId必须是完全限定的端点标识符。本地名称不得使用通配符约定。

The ModifyConnection command can be used to affect parameters of a connection in the following ways:

ModifyConnection命令可用于通过以下方式影响连接的参数:

* Provide information about the other end of the connection, through the RemoteConnectionDescriptor. If the parameter is omitted, it retains its current value.

* 通过RemoteConnectionDescriptor提供有关连接另一端的信息。如果省略该参数,它将保留其当前值。

* Activate or deactivate the connection, by changing the value of the Mode parameter. This can occur at any time during the connection, with arbitrary parameter values. If the parameter is omitted, it retains its current value.

* 通过更改模式参数的值来激活或停用连接。这可以在连接过程中的任何时候发生,参数值可以是任意的。如果省略该参数,它将保留其当前值。

* Change the parameters of the connection through the LocalConnectionOptions, for example by switching to a different coding scheme, changing the packetization period, or modifying the handling of echo cancellation. If one or more LocalConnectionOptions parameters are omitted, then the gateway

* 通过LocalConnectionOptions更改连接的参数,例如切换到不同的编码方案、更改打包周期或修改回声消除的处理。如果省略了一个或多个LocalConnectionOptions参数,则网关

SHOULD refrain from changing that parameter from its current value, unless another parameter necessitating such a change is explicitly provided. For example, a codec change might require a change in silence suppression. Note that if a RemoteConnectionDescriptor is supplied, then only the LocalConnectionOptions actually supplied with the ModifyConnection command will affect the codec negotiation (as described in Section 2.6).

应避免更改该参数的当前值,除非明确提供了需要进行此类更改的另一个参数。例如,更改编解码器可能需要更改静音抑制。请注意,如果提供了RemoteConnectionDescriptor,则只有ModifyConnection命令实际提供的LocalConnectionOptions会影响编解码器协商(如第2.6节所述)。

Connections can only be fully activated if the RemoteConnectionDescriptor has been provided to the gateway. The receive-only mode, however, can be activated without the provision of this descriptor.

只有向网关提供了RemoteConnectionDescriptor,才能完全激活连接。但是,可以在不提供此描述符的情况下激活仅接收模式。

The command will only return a LocalConnectionDescriptor if the local connection parameters, such as RTP ports, were modified. Thus, if, for example, only the mode of the connection is changed, a LocalConnectionDescriptor will not be returned. Note however, that inclusion of LocalConnectionOptions in the command is not a prerequisite for local connection parameter changes to occur. If a connection parameter is omitted, e.g., silence suppression, the old value of that parameter will be retained if possible. If a parameter change necessitates a change in one or more unspecified parameters, the gateway is free to choose suitable values for the unspecified parameters that must change. This can for instance happen if the packetization period was not specified. If the new codec supported the old packetization period, the value of this parameter would not change, as a change would not be necessary. However, if it did not support the old packetization period, it would choose a suitable value.

如果修改了本地连接参数(如RTP端口),则该命令将仅返回LocalConnectionDescriptor。因此,例如,如果仅更改了连接模式,则不会返回LocalConnectionDescriptor。但是请注意,在命令中包含LocalConnectionOptions并不是发生本地连接参数更改的先决条件。如果省略连接参数,例如静音抑制,则该参数的旧值将尽可能保留。如果参数更改需要更改一个或多个未指定参数,网关可以为必须更改的未指定参数自由选择合适的值。例如,如果未指定打包周期,则可能发生这种情况。如果新编解码器支持旧的打包周期,则此参数的值不会更改,因为不需要更改。但是,如果它不支持旧的打包周期,它将选择一个合适的值。

The command may optionally contain an encapsulated Notification Request command, in which case a RequestIdentifier parameter MUST be present, as well as, optionally, other parameters of the NotificationRequest with the exception of the EndpointId, which is not replicated. The encapsulated NotificationRequest is executed simultaneously with the modification of the connection. For example, when a connection is accepted, the calling gateway should be instructed to place the circuit in send-receive mode and to stop providing ringing tones. This can be accomplished in a single ModifyConnection command, by also transmitting the RequestedEvents parameters, for the on-hook event, and an empty SignalRequests parameter, to stop the provision of ringing tones.

该命令可以选择性地包含封装的通知请求命令,在这种情况下,必须存在RequestIdentifier参数,以及NotificationRequest的其他参数(EndpointId除外,该参数不被复制)。封装的NotificationRequest在修改连接的同时执行。例如,当连接被接受时,应指示呼叫网关将电路置于发送-接收模式并停止提供铃声。这可以通过一个ModifyConnection命令来完成,也可以通过传输挂机事件的RequestedEvents参数和空的SignalRequests参数来停止提供铃声。

When these parameters are present, the modification and the NotificationRequest MUST be synchronized, which means that both MUST be accepted, or both MUST be refused.

当这些参数存在时,修改和NotificationRequest必须同步,这意味着两者都必须被接受,或者两者都必须被拒绝。

The NotifiedEntity parameter, if present, defines the new "notified entity" for the endpoint.

NotifiedEntity参数(如果存在)定义端点的新“通知实体”。

The command may carry an encapsulated EndpointConfiguration command, that will apply to the same endpoint. When this command is present, the parameters of the EndpointConfiguration command are included with the normal parameters of the ModifyConnection with the exception of the EndpointId, which is not replicated. The EndpointConfiguration command may be encapsulated together with an encapsulated NotificationRequest command.

该命令可能携带一个封装的EndpointConfiguration命令,该命令将应用于同一端点。存在此命令时,EndpointConfiguration命令的参数将包含在ModifyConnection的正常参数中,EndpointId除外,该参数不会被复制。EndpointConfiguration命令可以与封装的NotificationRequest命令一起封装。

The encapsulated EndpointConfiguration command shares the fate of the ModifyConnection command. If the ModifyConnection is rejected, the EndpointConfiguration is not executed.

封装的EndpointConfiguration命令共享ModifyConnection命令的命运。如果ModifyConnection被拒绝,则不会执行EndpointConfiguration。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.7 DeleteConnection (from the Call Agent)
2.3.7 删除连接(从呼叫代理)

This command is used to terminate a connection. As a side effect, it collects statistics on the execution of the connection.

此命令用于终止连接。作为一个副作用,它收集连接执行的统计信息。

         ReturnCode,
         ConnectionParameters,
         [PackageList]
         <-- DeleteConnection(CallId,
                              EndpointId,
                              ConnectionId,
                              [NotifiedEntity,]
                              [Encapsulated NotificationRequest,]
                              [Encapsulated EndpointConfiguration])
        
         ReturnCode,
         ConnectionParameters,
         [PackageList]
         <-- DeleteConnection(CallId,
                              EndpointId,
                              ConnectionId,
                              [NotifiedEntity,]
                              [Encapsulated NotificationRequest,]
                              [Encapsulated EndpointConfiguration])
        

The endpoint identifier, in this form of the DeleteConnection command, SHALL be fully qualified. Wildcard conventions SHALL NOT be used.

这种形式的DeleteConnection命令中的端点标识符应完全合格。不得使用通配符约定。

The ConnectionId identifies the connection to be deleted. The CallId used when the connection was created is included as well.

ConnectionId标识要删除的连接。创建连接时使用的CallId也包括在内。

The NotifiedEntity parameter, if present, defines the new "notified entity" for the endpoint.

NotifiedEntity参数(如果存在)定义端点的新“通知实体”。

In the case of IP multicast, connections can be deleted individually and independently. However, in the unicast case where a connection has two ends, a DeleteConnection command has to be sent to both gateways involved in the connection. After the connection has been deleted, media streams previously supported by the connection are no longer available. Any media packets received for the old connection are simply discarded and no new media packets for the stream are sent.

在IP多播的情况下,可以单独和独立地删除连接。但是,在连接有两端的单播情况下,必须向连接中涉及的两个网关发送DeleteConnection命令。删除连接后,连接以前支持的媒体流将不再可用。为旧连接接收的任何媒体数据包都将被丢弃,并且不会发送流的新媒体数据包。

After the connection has been deleted, any loopback that has been requested for the connection must be cancelled (unless the endpoint has another connection requesting loopback).

删除连接后,必须取消为连接请求的任何环回(除非端点有另一个请求环回的连接)。

In response to the DeleteConnection command, the gateway returns a list of connection parameters that describe statistics for the connection.

作为对DeleteConnection命令的响应,网关返回描述连接统计信息的连接参数列表。

When the connection was for an Internet media stream, these parameters are:

当连接用于Internet媒体流时,这些参数为:

Number of packets sent:

发送的数据包数:

The total number of media packets transmitted by the sender since starting transmission on this connection. In the case of RTP, the count is not reset if the sender changes its synchronization source identifier (SSRC, as defined in RTP), for example as a result of a ModifyConnection command. The value is zero if the connection was always set in "receive only" mode and no signals were applied to the connection.

自在此连接上开始传输以来,发送方传输的媒体数据包总数。在RTP的情况下,如果发送方更改其同步源标识符(SSRC,如RTP中定义),例如由于ModifyConnection命令,则不会重置计数。如果连接始终设置为“仅接收”模式,且未向连接应用任何信号,则该值为零。

Number of octets sent:

发送的八位字节数:

The total number of payload octets (i.e., not including header or padding) transmitted in media packets by the sender since starting transmission on this connection. In the case of RTP, the count is not reset if the sender changes its SSRC identifier, for example as a result of a ModifyConnection command. The value is zero if the connection was always set in "receive only" mode and no signals were applied to the connection.

自在该连接上开始传输以来,发送方在媒体分组中传输的有效负载八位字节总数(即,不包括报头或填充)。在RTP情况下,如果发送方更改其SSRC标识符(例如,由于ModifyConnection命令),则不会重置计数。如果连接始终设置为“仅接收”模式,且未向连接应用任何信号,则该值为零。

Number of packets received:

收到的数据包数:

The total number of media packets received by the sender since starting reception on this connection. In the case of RTP, the count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was always set in "send only" mode.

自此连接上开始接收以来,发件人接收的媒体数据包总数。对于RTP,如果发送方使用了多个值,则计数包括从不同SSRC接收的数据包。如果连接始终设置为“仅发送”模式,则该值为零。

Number of octets received:

收到的八位字节数:

The total number of payload octets (i.e., not including header, e.g., RTP, or padding) transmitted in media packets by the sender since starting transmission on this connection. In the case of RTP, the count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was always set in "send only" mode.

自在该连接上开始传输以来,发送方在媒体分组中传输的有效负载八位字节总数(即,不包括报头,例如RTP或填充)。对于RTP,如果发送方使用了多个值,则计数包括从不同SSRC接收的数据包。如果连接始终设置为“仅发送”模式,则该值为零。

Number of packets lost:

丢失的数据包数:

The total number of media packets that have been lost since the beginning of reception. This number is defined to be the number of packets expected less the number of packets actually received, where the number of packets received includes any which are late or duplicates. For RTP, the count includes packets received from different SSRC, if the sender used several values. Thus packets that arrive late are not counted as lost, and the loss may be negative if there are duplicates. The count includes packets received from different SSRC, if the sender used several values. The number of packets expected is defined to be the extended last sequence number received, as defined next, less the initial sequence number received. The count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was always set in "send only" mode.

自接收开始以来丢失的媒体数据包总数。该数字被定义为预期的数据包数量减去实际接收的数据包数量,其中接收的数据包数量包括任何延迟或重复的数据包。对于RTP,如果发送方使用了多个值,则计数包括从不同SSRC接收的数据包。因此,延迟到达的数据包不被视为丢失,如果存在重复数据包,则丢失可能为负。如果发送方使用了多个值,则计数包括从不同SSRC接收的数据包。预期的数据包数定义为接收到的扩展的最后一个序列号,如下面定义的,减去接收到的初始序列号。如果发送方使用了多个值,则计数包括从不同SSRC接收的数据包。如果连接始终设置为“仅发送”模式,则该值为零。

Interarrival jitter:

到达间隔抖动:

An estimate of the statistical variance of the media packet interarrival time measured in milliseconds and expressed as an unsigned integer. For RTP, the interarrival jitter J is defined to be the mean deviation (smoothed absolute value) of the difference D in packet spacing at the receiver compared to the sender for a pair of packets. Detailed computation algorithms are found in RFC 1889. The count includes packets received from different SSRC, if the sender used several values. The value is zero if the connection was always set in "send only" mode.

媒体包到达间隔时间的统计方差估计值,以毫秒为单位,用无符号整数表示。对于RTP,到达间抖动J被定义为接收器处的分组间隔与发送器处的分组间隔之差D对于一对分组的平均偏差(平滑绝对值)。详细的计算算法见RFC1889。如果发送方使用了多个值,则计数包括从不同SSRC接收的数据包。如果连接始终设置为“仅发送”模式,则该值为零。

Average transmission delay:

平均传输延迟:

An estimate of the network latency, expressed in milliseconds. For RTP, this is the average value of the difference between the NTP timestamp indicated by the senders of the RTCP messages and the NTP timestamp of the receivers, measured when the messages are received. The average is obtained by summing all the estimates,

网络延迟的估计值,以毫秒为单位。对于RTP,这是RTCP消息的发送方指示的NTP时间戳与接收方的NTP时间戳之间差值的平均值,在接收消息时测量。平均值是通过将所有估计值相加得到的,

then dividing by the number of RTCP messages that have been received. When the gateway's clock is not synchronized by NTP, the latency value can be computed as one half of the round trip delay, as measured through RTCP. When the gateway cannot compute the one way delay or the round trip delay, the parameter conveys a null value.

然后除以已接收的RTCP消息数。当网关时钟未通过NTP同步时,延迟值可计算为通过RTCP测量的往返延迟的一半。当网关无法计算单向延迟或往返延迟时,该参数传递空值。

For a detailed definition of these variables, refer to RFC 1889.

有关这些变量的详细定义,请参阅RFC 1889。

When the connection was set up over a LOCAL interconnect, the meaning of these parameters is defined as follows:

当通过本地互连建立连接时,这些参数的含义定义如下:

Number of packets sent: Not significant - MAY be omitted.

发送的数据包数:不重要-可以省略。

Number of octets sent: The total number of payload octets transmitted over the local connection.

发送的八位字节数:通过本地连接传输的有效负载八位字节总数。

Number of packets received: Not significant - MAY be omitted.

接收的数据包数:不重要-可省略。

Number of octets received: The total number of payload octets received over the connection.

接收的八位字节数:通过连接接收的有效负载八位字节总数。

Number of packets lost: Not significant - MAY be omitted. A value of zero is assumed.

丢失的数据包数:不重要-可以忽略。假定值为零。

Interarrival jitter: Not significant - MAY be omitted. A value of zero is assumed.

到达间隔抖动:不显著-可省略。假定值为零。

Average transmission delay: Not significant - MAY be omitted. A value of zero is assumed.

平均传输延迟:不显著-可省略。假定值为零。

The set of connection parameters can be extended. Also, the meaning may be further defined by other types of networks which MAY furthermore elect to not return all, or even any, of the above specified parameters.

可以扩展连接参数集。此外,该含义可由其他类型的网络进一步定义,这些网络可进一步选择不返回所有或甚至任何上述指定参数。

The command may optionally contain an encapsulated Notification Request command, in which case a RequestIdentifier parameter MUST be present, as well as, optionally, other parameters of the NotificationRequest with the exception of the EndpointId, which is not replicated. The encapsulated NotificationRequest is executed simultaneously with the deletion of the connection. For example, when a user hang-up is notified, the gateway should be instructed to delete the connection and to start looking for an off-hook event.

该命令可以选择性地包含封装的通知请求命令,在这种情况下,必须存在RequestIdentifier参数,以及NotificationRequest的其他参数(EndpointId除外,该参数不被复制)。封装的NotificationRequest在删除连接的同时执行。例如,当通知用户挂断时,应指示网关删除连接并开始查找脱离连接的事件。

This can be accomplished in a single DeleteConnection command, by also transmitting the RequestedEvents parameters, for the off-hook event, and an empty SignalRequests parameter.

这可以通过一个DeleteConnection命令来完成,也可以通过为摘机事件传输RequestedEvents参数和空的SignalRequests参数来完成。

When these parameters are present, the DeleteConnection and the NotificationRequest must be synchronized, which means that both MUST be accepted, or both MUST be refused.

当这些参数存在时,DeleteConnection和NotificationRequest必须同步,这意味着两者都必须被接受,或者两者都必须被拒绝。

The command may carry an encapsulated EndpointConfiguration command, that will apply to the same endpoint. When this command is present, the parameters of the EndpointConfiguration command are included with the normal parameters of the DeleteConnection with the exception of the EndpointId, which is not replicated. The EndpointConfiguration command may be encapsulated together with an encapsulated NotificationRequest command.

该命令可能携带一个封装的EndpointConfiguration命令,该命令将应用于同一端点。存在此命令时,EndpointConfiguration命令的参数将包括在DeleteConnection的正常参数中,EndpointId除外,该参数不会被复制。EndpointConfiguration命令可以与封装的NotificationRequest命令一起封装。

The encapsulated EndpointConfiguration command shares the fate of the DeleteConnection command. If the DeleteConnection is rejected, the EndpointConfiguration is not executed.

封装的EndpointConfiguration命令共享DeleteConnection命令的命运。如果拒绝DeleteConnection,则不会执行EndpointConfiguration。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.8 DeleteConnection (from the gateway)
2.3.8 删除连接(从网关)

In some rare circumstances, a gateway may have to clear a connection, for example because it has lost the resource associated with the connection, or because it has detected that the endpoint no longer is capable or willing to send or receive media. The gateway may then terminate the connection by using a variant of the DeleteConnection command:

在一些罕见的情况下,网关可能必须清除连接,例如,因为它丢失了与连接相关联的资源,或者因为它检测到端点不再能够或愿意发送或接收媒体。然后,网关可以使用DeleteConnection命令的变体终止连接:

ReturnCode, [PackageList] <-- DeleteConnection(CallId, EndpointId, ConnectionId, ReasonCode, Connection-parameters)

ReturnCode,[PackageList]<--DeleteConnection(CallId、EndpointId、ConnectionId、ReasonCode、连接参数)

The EndpointId, in this form of the DeleteConnection command, MUST be fully qualified. Wildcard conventions MUST NOT be used.

这种形式的DeleteConnection命令的EndpointId必须是完全限定的。不得使用通配符约定。

The ReasonCode is a text string starting with a numeric reason code and optionally followed by a descriptive text string. The reason code indicates the cause of the DeleteConnection. A list of reason codes can be found in Section 2.5.

ReasonCode是一个文本字符串,以数字原因代码开头,后跟一个描述性文本字符串(可选)。原因代码表示删除连接的原因。原因代码列表见第2.5节。

In addition to the call, endpoint and connection identifiers, the gateway will also send the connection parameters that would have been returned to the Call Agent in response to a DeleteConnection command.

除了调用、端点和连接标识符之外,网关还将发送连接参数,这些参数将返回给调用代理以响应DeleteConnection命令。

ReturnCode is a parameter returned by the Call Agent. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是呼叫代理返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

Note that use of this command is generally discouraged and should only be done as a last resort. If a connection can be sustained, deletion of it should be left to the discretion of the Call Agent which is in a far better position to make intelligent decisions in this area.

请注意,通常不鼓励使用此命令,只能作为最后手段使用。如果一个连接可以维持,那么删除它应该由呼叫代理自行决定,而呼叫代理在这方面更能做出明智的决定。

2.3.9 DeleteConnection (multiple connections from the Call Agent)
2.3.9 DeleteConnection(来自呼叫代理的多个连接)

A variation of the DeleteConnection function can be used by the Call Agent to delete multiple connections at the same time. Note that encapsulating other commands with this variation of the DeleteConnection command is not permitted. The command can be used to delete all connections that relate to a Call for an endpoint:

调用代理可以使用DeleteConnection函数的变体同时删除多个连接。请注意,不允许使用DeleteConnection命令的此变体封装其他命令。该命令可用于删除与端点调用相关的所有连接:

ReturnCode, [PackageList] <-- DeleteConnection(CallId, EndpointId)

返回代码,[PackageList]<--DeleteConnection(CallId,EndpointId)

The EndpointId, in this form of the DeleteConnection command, MUST NOT use the "any of" wildcard. All connections for the endpoint(s) with the CallId specified will be deleted. Note that the command will still succeed if there were no connections with the CallId specified, as long as the EndpointId was valid. However, if the EndpointId is invalid, the command will fail. The command does not return any individual statistics or call parameters.

这种形式的DeleteConnection命令的EndpointId不能使用“any of”通配符。将删除具有指定CallId的端点的所有连接。请注意,如果没有使用指定CallId的连接,只要EndpointId有效,则该命令仍将成功。但是,如果EndpointId无效,则该命令将失败。该命令不返回任何单个统计信息或调用参数。

It can also be used to delete all connections that terminate in a given endpoint:

它还可用于删除在给定端点终止的所有连接:

ReturnCode, [PackageList] <-- DeleteConnection(EndpointId)

返回代码,[PackageList]<--DeleteConnection(端点ID)

The EndpointId, in this form of the DeleteConnection command, MUST NOT use the "any of" wildcard. Again, the command succeeds even if there were no connections on the endpoint(s).

这种形式的DeleteConnection命令的EndpointId不能使用“any of”通配符。同样,即使端点上没有连接,该命令也会成功。

Finally, Call Agents can take advantage of the hierarchical structure of endpoint names to delete all the connections that belong to a group of endpoints. In this case, the "local name" component of the EndpointId will be specified using the "all of" wildcarding convention. The "any of" convention SHALL NOT be used. For example, if endpoint names are structured as the combination of a physical interface name and a circuit number, as in "X35V3+A4/13", the Call Agent may replace the circuit number by the "all of" wild card character "*", as in "X35V3+A4/*". This "wildcard" command instructs the gateway to delete all the connections that were attached to circuits connected to the physical interface "X35V3+A4".

最后,调用代理可以利用端点名称的层次结构删除属于一组端点的所有连接。在这种情况下,将使用“全部”通配符约定指定EndpointId的“本地名称”组件。不得使用“任何”公约。例如,如果端点名称被构造为物理接口名称和电路号的组合,如“X35V3+A4/13”中所示,则呼叫代理可以将电路号替换为“全部”通配符“*”,如“X35V3+A4/*”。此“通配符”命令指示网关删除连接到物理接口“X35V3+A4”的电路的所有连接。

After all the connections have been deleted, any loopback that has been requested for the connections MUST be cancelled by the gateway.

删除所有连接后,网关必须取消为连接请求的任何环回。

This command does not return any individual statistics or call parameters.

此命令不返回任何单个统计信息或调用参数。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.10 AuditEndpoint
2.3.10 审核端点

The AuditEndPoint command can be used by the Call Agent to find out the status of a given endpoint.

调用代理可以使用AuditEndPoint命令来查找给定端点的状态。

         ReturnCode,
         EndPointIdList,|{
         [RequestedEvents,]
         [QuarantineHandling,]
         [DigitMap,]
         [SignalRequests,]
         [RequestIdentifier,]
         [NotifiedEntity,]
         [ConnectionIdentifiers,]
         [DetectEvents,]
         [ObservedEvents,]
         [EventStates,]
         [BearerInformation,]
         [RestartMethod,]
         [RestartDelay,]
         [ReasonCode,]
         [MaxMGCPDatagram,]
         [Capabilities]}
         [PackageList]
         <-- AuditEndPoint(EndpointId,
                           [RequestedInfo])
        
         ReturnCode,
         EndPointIdList,|{
         [RequestedEvents,]
         [QuarantineHandling,]
         [DigitMap,]
         [SignalRequests,]
         [RequestIdentifier,]
         [NotifiedEntity,]
         [ConnectionIdentifiers,]
         [DetectEvents,]
         [ObservedEvents,]
         [EventStates,]
         [BearerInformation,]
         [RestartMethod,]
         [RestartDelay,]
         [ReasonCode,]
         [MaxMGCPDatagram,]
         [Capabilities]}
         [PackageList]
         <-- AuditEndPoint(EndpointId,
                           [RequestedInfo])
        

The EndpointId identifies the endpoint(s) being audited. The "any of" wildcard convention MUST NOT be used.

EndpointId标识正在审核的端点。不得使用“任意”通配符约定。

The EndpointId identifies the endpoint(s) being audited. The "all of" wildcard convention can be used to start auditing of a group of endpoints (regardless of their service-state). If this convention is used, the gateway SHALL return the list of endpoint identifiers that match the wildcard in the EndPointIdList parameter, which is simply one or more SpecificEndpointIds (each supplied separately). In the case where the "all of" wildcard is used, RequestedInfo SHOULD NOT be included (if it is included, it MUST be ignored). Note that the use of the "all of" wildcard can potentially generate a large EndPointIdList. If the resulting EndPointIdList is considered too large, the gateway returns an error (error code 533 - response too large, is RECOMMENDED).

EndpointId标识正在审核的端点。“全部”通配符约定可用于开始审核一组端点(无论其服务状态如何)。如果使用此约定,网关应返回端点标识符列表,这些端点标识符与EndPointIdList参数中的通配符相匹配,该通配符只是一个或多个SpecificEndpointId(每个单独提供)。在使用“all of”通配符的情况下,不应包括RequestedInfo(如果包括它,则必须忽略它)。请注意,使用“all of”通配符可能会生成一个大的EndPointIdList。如果认为生成的EndpointIdle列表太大,网关将返回一个错误(建议使用错误代码533-响应太大)。

When a non-wildcard EndpointId is specified, the (possibly empty) RequestedInfo parameter describes the information that is requested for the EndpointId specified. The following endpoint info can be audited with this command:

指定非通配符EndpointId时,RequestedInfo参数(可能为空)描述为指定的EndpointId请求的信息。可以使用此命令审核以下端点信息:

RequestedEvents, DigitMap, SignalRequests, RequestIdentifier, QuarantineHandling, NotifiedEntity, ConnectionIdentifiers, DetectEvents, ObservedEvents, EventStates, BearerInformation, RestartMethod, RestartDelay, ReasonCode, PackageList, MaxMGCPDatagram, and Capabilities.

RequestedEvents、DigitMap、SignalRequests、RequestIdentifier、QuarantineHandling、NotifiedEntity、ConnectionIdentifiers、DetectedEvents、ObservedEvents、EventState、BealerInformation、RestartMethod、RestartDelay、ReasonCode、PackageList、MaxMGCPDatagram和功能。

The list may be extended by extension parameters. The response will in turn include information about each of the items for which auditing info was requested. Supported parameters with empty values MUST always be returned. However, if an endpoint is queried about a parameter it does not understand, the endpoint MUST NOT generate an error; instead the parameter MUST be omitted from the response:

列表可以通过扩展参数进行扩展。响应将依次包括关于请求审核信息的每个项目的信息。必须始终返回具有空值的受支持参数。但是,如果向端点查询其不理解的参数,则该端点不得生成错误;相反,必须从响应中省略参数:

* RequestedEvents: The current value of RequestedEvents the endpoint is using including the action(s) and event parameters associated with each event - if no actions are included, the default action is assumed. Persistent events are included in the list. If an embedded NotificationRequest is active, the RequestedEvents will reflect the events requested in the embedded NotificationRequest, not any surrounding RequestedEvents (whether embedded or not).

* RequestedEvents:端点正在使用的RequestedEvents的当前值,包括与每个事件关联的操作和事件参数-如果不包括任何操作,则假定默认操作。持久性事件包括在列表中。如果嵌入式NotificationRequest处于活动状态,则RequestedEvents将反映嵌入式NotificationRequest中请求的事件,而不是任何周围的RequestedEvents(无论是否嵌入)。

* DigitMap: The digit map the endpoint is currently using. The parameter will be empty if the endpoint does not have a digit map.

* DigitMap:端点当前使用的数字映射。如果端点没有数字映射,则参数将为空。

* SignalRequests: A list of the; Time-Out signals that are currently active, On/Off signals that are currently "on" for the endpoint (with or without parameter), and any pending Brief signals. Time-Out signals that have timed-out, and currently playing Brief signals are not included. Any signal parameters included in the original SignalRequests will be included.

* SignalRequests:请求的列表;当前处于活动状态的超时信号、端点当前处于“开启”状态的开/关信号(带或不带参数)以及任何挂起的简短信号。已超时的超时信号和当前播放的简短信号不包括在内。原始信号请求中包含的任何信号参数都将包括在内。

* RequestIdentifier: The RequestIdentifier for the last NotificationRequest received by this endpoint (includes NotificationRequests encapsulated in other commands). If no NotificationRequest has been received since reboot/restart, the value zero will be returned.

* RequestIdentifier:此端点接收的最后一个NotificationRequest的RequestIdentifier(包括封装在其他命令中的NotificationRequests)。如果重新启动/重新启动后未收到NotificationRequest,则返回值零。

* QuarantineHandling: The QuarantineHandling for the last NotificationRequest received by this endpoint. If QuarantineHandling was not included, or no notification request has been received, the default values will be returned.

* QuarantineHandling:此终结点接收到的最后一个NotificationRequest的隔离处理。如果未包含QuarantineHandling,或未收到通知请求,则将返回默认值。

* DetectEvents: The value of the most recently received DetectEvents parameter plus any persistent events implemented by the endpoint. If no DetectEvents parameter has been received, the (possibly empty) list only includes persistent events.

* DetecteEvents:最近接收到的DetecteEvents参数加上端点实现的任何持久事件的值。如果未收到DetecteEvents参数,则(可能为空)列表仅包括持久事件。

* NotifiedEntity: The current "notified entity" for the endpoint.

* NotifiedEntity:端点的当前“通知实体”。

* ConnectionIdentifiers: The list of ConnectionIdentifiers for all connections that currently exist for the specified endpoint.

* ConnectionIdentifiers:指定端点当前存在的所有连接的ConnectionIdentifiers列表。

* ObservedEvents: The current list of observed events for the endpoint.

* ObservedEvents:端点的当前观察事件列表。

* EventStates: For events that have auditable states associated with them, the event corresponding to the state the endpoint is in, e.g., off-hook if the endpoint is off-hook. Note that the definition of the individual events will state if the event in question has an auditable state associated with it.

* EventState:对于具有关联的可审核状态的事件,对应于端点所处状态的事件,例如,如果端点处于摘机状态,则为摘机状态。请注意,单个事件的定义将说明相关事件是否具有关联的可审核状态。

* BearerInformation: The value of the last received BearerInformation parameter for this endpoint (this includes the case where BearerInformation was provisioned). The parameter will be empty if the endpoint has not received a BearerInformation parameter and a value was also not provisioned.

* BealerInformation:此端点上一次接收的BealerInformation参数的值(包括提供BealerInformation的情况)。如果终结点未接收到承载信息参数且未设置值,则该参数将为空。

* RestartMethod: "restart" if the endpoint is in-service and operation is normal, or if the endpoint is in the process of becoming in-service (a non-zero RestartDelay will indicate the latter). Otherwise, the value of the restart method parameter in the last RestartInProgress command issued (or should have been issued) by the endpoint. Note that a "disconnected" endpoint will thus only report "disconnected" as long as it actually is disconnected, and "restart" will be reported once it is no longer disconnected. Similarly, "cancel-graceful" will not be reported, but "graceful" might (see Section 4.4.5 for further details).

* RestartMethod:如果端点处于服务中且操作正常,或者如果端点正在变为服务中(非零RestartDelay将指示后者),则“重新启动”。否则,端点发出(或应该发出)的最后一个RestartInProgress命令中restart method参数的值。请注意,“断开连接的”端点因此只会在其实际断开连接时报告“断开连接”,并且在不再断开连接时报告“重新启动”。同样,“取消优雅”也不会报告,但“优雅”可能会报告(更多详细信息,请参见第4.4.5节)。

* RestartDelay: The value of the restart delay parameter if a RestartInProgress command was to be issued by the endpoint at the time of this response, or zero if the command would not include this parameter.

* RestartDelay:如果端点在此响应时发出RestartInProgress命令,则为restart delay参数的值;如果命令不包含此参数,则为零。

* ReasonCode: The value of the ReasonCode parameter in the last RestartInProgress or DeleteConnection command issued by the gateway for the endpoint, or the special value 000 if the endpoint's state is normal.

* ReasonCode:网关为端点发出的上一次RestartInProgress或DeleteConnection命令中ReasonCode参数的值,或者如果端点的状态正常,则为特殊值000。

* PackageList: The packages supported by the endpoint including package version numbers. For backwards compatibility, support for the parameter is OPTIONAL although implementations with package versions higher than zero SHOULD support it.

* PackageList:端点支持的包,包括包版本号。为了向后兼容,对参数的支持是可选的,尽管包版本高于零的实现应该支持该参数。

* MaxMGCPDatagram: The maximum size of an MGCP datagram in bytes that can be received by the endpoint (see Section 3.5.4). The value excludes any lower layer overhead. For backwards compatibility, support for this parameter is OPTIONAL. The default maximum MGCP datagram size SHOULD be assumed if a value is not returned.

* MaxMGCPDatagram:端点可以接收的MGCP数据报的最大大小(以字节为单位)(参见第3.5.4节)。该值不包括任何较低的层开销。为了向后兼容,对该参数的支持是可选的。如果未返回值,则应假定默认的最大MGCP数据报大小。

* Capabilities: The capabilities for the endpoint similar to the LocalConnectionOptions parameter and including packages and connection modes. Extensions MAY be included as well. If any unknown capabilities are reported, they MUST simply be ignored. If there is a need to specify that some parameters, such as e.g., silence suppression, are only compatible with some codecs, then the gateway MUST return several capability sets, each of which may include:

* 功能:端点的功能类似于LocalConnectionOptions参数,包括包和连接模式。扩展也可以包括在内。如果报告了任何未知功能,则必须忽略它们。如果需要指定某些参数(例如静音抑制)仅与某些编解码器兼容,则网关必须返回多个功能集,每个功能集可能包括:

- Compression Algorithm: A list of supported codecs. The rest of the parameters in the capability set will apply to all codecs specified in this list.

- 压缩算法:支持的编解码器列表。功能集中的其余参数将应用于此列表中指定的所有编解码器。

- Packetization Period: A single value or a range may be specified.

- 打包周期:可以指定单个值或范围。

- Bandwidth: A single value or a range corresponding to the range for packetization periods may be specified (assuming no silence suppression).

- 带宽:可以指定单个值或与打包周期范围相对应的范围(假设没有静音抑制)。

- Echo Cancellation: Whether echo cancellation is supported or not for the endpoint.

- 回显取消:端点是否支持回显取消。

- Silence Suppression: Whether silence suppression is supported or not.

- 静音抑制:是否支持静音抑制。

- Gain Control: Whether gain control is supported or not.

- 增益控制:是否支持增益控制。

- Type of Service: Whether type of service is supported or not.

- 服务类型:是否支持服务类型。

- Resource Reservation: Whether resource reservation is supported or not.

- 资源预留:是否支持资源预留。

- Security: Whether media encryption is supported or not.

- 安全性:是否支持媒体加密。

- Type of network: The type(s) of network supported.

- 网络类型:支持的网络类型。

- Packages: A list of packages supported. The first package in the list will be the default package.

- 包:支持的包的列表。列表中的第一个包将是默认包。

- Modes: A list of supported connection modes.

- 模式:支持的连接模式列表。

The Call Agent may then decide to use the AuditConnection command to obtain further information about the connections.

然后,呼叫代理可以决定使用AuditConnection命令来获取有关连接的进一步信息。

If no info was requested and the EndpointId refers to a valid endpoint (in-service or not), the gateway simply returns a positive acknowledgement.

如果未请求任何信息,并且EndpointId引用了有效的端点(无论是否在服务中),网关只会返回肯定的确认。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

Note that PackageList MAY also be included with error code 518 (unsupported package).

请注意,PackageList也可能包含错误代码518(不支持的软件包)。

2.3.11 AuditConnection
2.3.11 审核连接

The AuditConnection command can be used by the Call Agent to retrieve the parameters attached to a connection.

调用代理可以使用AuditConnection命令来检索附加到连接的参数。

         ReturnCode,
         [CallId,]
         [NotifiedEntity,]
         [LocalConnectionOptions,]
         [Mode,]
         [RemoteConnectionDescriptor,]
         [LocalConnectionDescriptor,]
         [ConnectionParameters,]
         [PackageList]
         <-- AuditConnection(EndpointId,
                             ConnectionId,
                             RequestedInfo)
        
         ReturnCode,
         [CallId,]
         [NotifiedEntity,]
         [LocalConnectionOptions,]
         [Mode,]
         [RemoteConnectionDescriptor,]
         [LocalConnectionDescriptor,]
         [ConnectionParameters,]
         [PackageList]
         <-- AuditConnection(EndpointId,
                             ConnectionId,
                             RequestedInfo)
        

The EndpointId parameter specifies the endpoint that handles the connection. The wildcard conventions SHALL NOT be used.

EndpointId参数指定处理连接的端点。不得使用通配符约定。

The ConnectionId parameter is the identifier of the audited connection, within the context of the specified endpoint.

ConnectionId参数是指定端点上下文中已审核连接的标识符。

The (possibly empty) RequestedInfo describes the information that is requested for the ConnectionId within the EndpointId specified. The following connection info can be audited with this command:

RequestedInfo(可能为空)描述了为指定EndpointId内的ConnectionId请求的信息。使用此命令可以审核以下连接信息:

CallId, NotifiedEntity, LocalConnectionOptions, Mode, RemoteConnectionDescriptor, LocalConnectionDescriptor, ConnectionParameters

CallId、NotifiedEntity、LocalConnectionOptions、Mode、RemoteConnectionDescriptor、LocalConnectionDescriptor、ConnectionParameters

The AuditConnection response will in turn include information about each of the items auditing info was requested for:

AuditConnection响应将依次包括有关以下各项的信息:请求的审核信息:

* CallId, the CallId for the call the connection belongs to.

* CallId,连接所属呼叫的CallId。

* NotifiedEntity, the current "notified entity" for the Connection. Note this is the same as the "notified entity" for the endpoint (included here for backwards compatibility).

* NotifiedEntity,连接的当前“通知实体”。注意,这与端点的“通知实体”相同(此处包含该实体是为了向后兼容)。

* LocalConnectionOptions, the most recent LocalConnectionOptions parameters that was actually supplied for the connection (omitting LocalConnectionOptions from a command thus does not change this value). Note that default parameters omitted from the most recent LocalConnectionOptions will not be included. LocalConnectionOptions that retain their value across ModifyConnection commands and which have been included in a previous command for the connection are also included, regardless of whether they were supplied in the most recent LocalConnectionOptions or not.

* LocalConnectionOptions,实际为连接提供的最新LocalConnectionOptions参数(从命令中省略LocalConnectionOptions,因此不会更改此值)。请注意,将不包括最近的LocalConnectionOptions中省略的默认参数。还包括在ModifyConnection命令中保留其值的LocalConnectionOptions,以及已包含在连接的上一个命令中的选项,无论它们是否在最近的LocalConnectionOptions中提供。

* Mode, the current mode of the connection.

* 模式,连接的当前模式。

* RemoteConnectionDescriptor, the RemoteConnectionDescriptor that was supplied to the gateway for the connection.

* RemoteConnectionDescriptor,为连接提供给网关的RemoteConnectionDescriptor。

* LocalConnectionDescriptor, the LocalConnectionDescriptor the gateway supplied for the connection.

* LocalConnectionDescriptor,LocalConnectionDescriptor是为连接提供的网关。

* ConnectionParameters, the current values of the connection parameters for the connection.

* ConnectionParameters,连接的连接参数的当前值。

If no info was requested and the EndpointId is valid, the gateway simply checks that the connection exists, and if so returns a positive acknowledgement. Note, that by definition, the endpoint must be in-service for this to happen, as out-of-service endpoints do not have any connections.

如果未请求任何信息且EndpointId有效,网关只需检查连接是否存在,如果存在,则返回肯定确认。注意,根据定义,端点必须在服务中才能发生这种情况,因为服务外端点没有任何连接。

ReturnCode is a parameter returned by the gateway. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是网关返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.3.12 RestartInProgress
2.3.12 重新启动进程

The RestartInProgress command is used by the gateway to signal that an endpoint, or a group of endpoints, is put in-service or out-of-service.

网关使用RestartInProgress命令发出一个端点或一组端点投入服务或退出服务的信号。

         ReturnCode,
         [NotifiedEntity,]
         [PackageList]
         <-- RestartInProgress(EndPointId,
                               RestartMethod,
                               [RestartDelay,]
                               [ReasonCode])
        
         ReturnCode,
         [NotifiedEntity,]
         [PackageList]
         <-- RestartInProgress(EndPointId,
                               RestartMethod,
                               [RestartDelay,]
                               [ReasonCode])
        

The EndPointId identifies the endpoint(s) that are put in-service or out-of-service. The "all of" wildcard convention may be used to apply the command to a group of endpoints managed by the same Call Agent, such as for example all endpoints that are attached to a specified interface, or even all endpoints that are attached to a given gateway. The "any of" wildcard convention SHALL NOT be used.

EndPointId标识投入服务或退出服务的端点。“全部”通配符约定可用于将命令应用于由同一调用代理管理的一组端点,例如,连接到指定接口的所有端点,甚至连接到给定网关的所有端点。不得使用“任意”通配符约定。

The RestartMethod parameter specifies the type of restart. The following values have been defined:

RestartMethod参数指定重新启动的类型。已定义以下值:

* A "graceful" restart method indicates that the specified endpoints will be taken out-of-service after the specified delay. The established connections are not yet affected, but the Call Agent SHOULD refrain from establishing new connections, and SHOULD try to gracefully tear down the existing connections.

* “优雅”重新启动方法表示指定的端点将在指定的延迟后停止服务。已建立的连接尚未受到影响,但呼叫代理应避免建立新连接,并应尝试正常断开现有连接。

* A "forced" restart method indicates that the specified endpoints are taken abruptly out-of-service. The established connections, if any, are lost.

* “强制”重新启动方法表示指定的端点突然停止服务。已建立的连接(如果有)将丢失。

* A "restart" method indicates that service will be restored on the endpoints after the specified "restart delay", i.e., the endpoints will be in-service. The endpoints are in their clean default state and there are no connections that are currently established on the endpoints.

* “重新启动”方法表示在指定的“重新启动延迟”之后,将在端点上恢复服务,即,端点将处于服务中。端点处于干净的默认状态,并且当前没有在端点上建立连接。

* A "disconnected" method indicates that the endpoint has become disconnected and is now trying to establish connectivity (see Section 4.4.7). The "restart delay" specifies the number of seconds the endpoint has been disconnected. Established connections are not affected.

* “断开连接”方法表示端点已断开连接,并且正在尝试建立连接(参见第4.4.7节)。“重启延迟”指定端点断开连接的秒数。已建立的连接不受影响。

* A "cancel-graceful" method indicates that a gateway is canceling a previously issued "graceful" restart command. The endpoints are still in-service.

* “取消优雅”方法表示网关正在取消先前发出的“优雅”重启命令。端点仍在使用中。

The list of restart methods may be extended.

可以扩展重新启动方法的列表。

The optional "restart delay" parameter is expressed as a number of seconds. If the number is absent, the delay value MUST be considered null (i.e., zero). In the case of the "graceful" method, a null delay indicates that the Call Agent SHOULD simply wait for the natural termination of the existing connections, without establishing new connections. The restart delay is always considered null in the case of the "forced" and "cancel-graceful" methods, and hence the "restart delay" parameter MUST NOT be used with these restart methods. When the gateway sends a "restart" or "graceful"

可选的“重启延迟”参数表示为秒数。如果没有数字,则延迟值必须视为空(即零)。在“优雅”方法的情况下,空延迟表示呼叫代理应该只等待现有连接的自然终止,而不建立新连接。在“强制”和“取消”方法的情况下,重启延迟始终被视为null,因此“重启延迟”参数不得与这些重启方法一起使用。当网关发送“重启”或“优雅”时

RestartInProgress message with a non-zero restart delay, the gateway SHOULD send an updated RestartInProgress message after the "restart delay" has passed.

重启延迟为非零时,网关应在“重启延迟”过去后发送更新的重启进度消息。

A restart delay of null for the "restart" method indicates that service has already been restored. This typically will occur after gateway startup/reboot. To mitigate the effects of a gateway IP address change as a result of a re-boot, the Call Agent MAY wish to either flush its DNS cache for the gateway's domain name or resolve the gateway's domain name by querying the DNS regardless of the TTL of a current DNS resource record for the restarted gateway.

“restart”方法的restart delay为null表示服务已经恢复。这通常会在网关启动/重新启动后发生。为了减轻由于重新引导而导致的网关IP地址更改的影响,呼叫代理可能希望刷新其网关域名的DNS缓存,或者通过查询DNS解析网关域名,而不管重新启动的网关的当前DNS资源记录的TTL如何。

The optional reason code parameter indicates the cause of the restart.

可选的原因码参数指示重新启动的原因。

Gateways SHOULD send a "graceful" or "forced" RestartInProgress message (for the relevant endpoints) as a courtesy to the Call Agent when they are taken out-of-service, e.g., by being shutdown, or taken out-of-service by a network management system, however the Call Agent cannot rely on always receiving such a message. Gateways MUST send a "restart" RestartInProgress message (for the relevant endpoints) with a null delay to their Call Agent when they are back in-service according to the restart procedure specified in Section 4.4.6 - Call Agents can rely on receiving this message. Also, gateways MUST send a "disconnected" RestartInProgress message (for the relevant endpoints) to their current "notified entity" according to the "disconnected" procedure specified in Section 4.4.7.

当网关停止服务(例如,由于网络管理系统关闭或停止服务)时,网关应向呼叫代理发送“正常”或“强制”重新启动进程消息(针对相关端点),作为对呼叫代理的礼貌,但是呼叫代理不能依赖于始终接收此类消息。根据第4.4.6节“呼叫代理可以依赖于接收此消息”中规定的重新启动过程,网关返回服务时必须向其呼叫代理发送“重新启动”重新启动进程消息(针对相关端点),该消息具有空延迟。此外,网关必须根据第4.4.7节中规定的“断开连接”程序,向其当前的“通知实体”发送“断开连接的”重启进程消息(针对相关端点)。

The RestartInProgress message will be sent to the current "notified entity" for the EndpointId in question. It is expected that a default Call Agent, i.e., "notified entity", has been provisioned so that after a reboot/restart, the default Call Agent will always be the "notified entity" for the endpoint. Gateways SHOULD take full advantage of wild-carding to minimize the number of RestartInProgress messages generated when multiple endpoints in a gateway restart and the endpoints are managed by the same Call Agent.

RestartInProgress消息将被发送到有关EndpointId的当前“通知实体”。预计已设置默认呼叫代理,即“通知实体”,以便在重新启动/重新启动后,默认呼叫代理始终是端点的“通知实体”。网关应充分利用通配符,以最大限度地减少当网关中的多个端点重新启动且端点由同一呼叫代理管理时生成的重新启动进程消息数。

ReturnCode is a parameter returned by the Call Agent. It indicates the outcome of the command and consists of an integer number optionally followed by commentary.

ReturnCode是呼叫代理返回的参数。它指示命令的结果,并由一个整数(可选后跟注释)组成。

A NotifiedEntity may additionally be returned with the response to the RestartInProgress from the Call Agent - this SHOULD normally only be done in response to "restart" or "disconnected" (see also Section 4.4.6 and 4.4.7):

此外,还可以通过呼叫代理对重启进程的响应返回NotifiedEntity-这通常只能在响应“重启”或“断开连接”时执行(另请参见第4.4.6节和第4.4.7节):

* If the response indicated success (return code 200 - transaction executed), the restart in question completed successfully, and the NotifiedEntity returned is the new "notified entity" for the endpoint(s).

* 如果响应指示成功(返回代码200-已执行事务),则相关重启已成功完成,并且返回的NotifiedEntity是端点的新“通知实体”。

* If the response from the Call Agent indicated an error, the restart in question did not complete successfully. If a NotifiedEntity parameter was included in the response returned, it specifies a new "notified entity" for the endpoint(s), which MUST be used when retrying the restart in question (as a new transaction). This SHOULD only be done with error code 521 (endpoint redirected).

* 如果来自呼叫代理的响应指示错误,则有问题的重新启动未成功完成。如果在返回的响应中包含NotifiedEntity参数,它将为端点指定一个新的“通知实体”,在重试有问题的重新启动(作为新事务)时必须使用该实体。只能在错误代码521(端点重定向)的情况下执行此操作。

Note that the above behavior for returning a NotifiedEntity in the response is only defined for RestartInProgress responses and SHOULD NOT be done for responses to other commands. Any other behavior is undefined.

请注意,上述在响应中返回NotifiedEntity的行为仅针对RestartInProgress响应定义,不应针对其他命令的响应执行。任何其他行为都是未定义的。

PackageList is a list of supported packages that MAY be included with error code 518 (unsupported package).

PackageList是受支持的包的列表,可能包含错误代码518(不支持的包)。

2.4 Return Codes and Error Codes
2.4 返回代码和错误代码

All MGCP commands are acknowledged. The acknowledgment carries a return code, which indicates the status of the command. The return code is an integer number, for which the following ranges of values have been defined:

所有MGCP命令均已确认。确认带有一个返回码,指示命令的状态。返回码是一个整数,已为其定义了以下值范围:

* values between 000 and 099 indicate a response acknowledgement

* 000和099之间的值表示响应确认

* values between 100 and 199 indicate a provisional response

* 介于100和199之间的值表示临时响应

* values between 200 and 299 indicate a successful completion

* 值介于200和299之间表示成功完成

* values between 400 and 499 indicate a transient error

* 介于400和499之间的值表示瞬时错误

* values between 500 and 599 indicate a permanent error

* 介于500和599之间的值表示永久性错误

* values between 800 and 899 are package specific response codes.

* 800和899之间的值是特定于机组的响应代码。

A broad description of transient errors (4XX error codes) versus permanent errors (5XX error codes) is as follows:

瞬态错误(4XX错误代码)与永久错误(5XX错误代码)的广义描述如下:

* If a Call Agent receives a transient error, there is the expectation of the possibility that a future similar request will be honored by the endpoint. In some cases, this may require some state change in the environment of the endpoint (e.g., hook state as in the case of error codes 401 or 402; resource availability as in the case of error code 403, or bandwidth availability as in the case of error code 404).

* 如果呼叫代理接收到一个暂时性错误,那么端点可能会接受将来类似的请求。在某些情况下,这可能需要端点环境中的一些状态改变(例如,错误代码401或402情况下的挂钩状态;错误代码403情况下的资源可用性,或错误代码404情况下的带宽可用性)。

* Permanent errors (error codes 500 to 599) indicate one or more permanent conditions either due to protocol error or incompatibility between the endpoint and the Call Agent, or because of some error condition over which the Call Agent has no control. Examples are protocol errors, requests for endpoint capabilities that do not exist, errors on interfaces associated with the endpoint, missing or incorrect information in the request or any number of other conditions which will simply not disappear with time.

* 永久性错误(错误代码500至599)表示由于协议错误或端点与呼叫代理之间的不兼容,或由于呼叫代理无法控制的某些错误状况而导致的一个或多个永久性状况。例如协议错误、对不存在的端点功能的请求、与端点相关联的接口上的错误、请求中缺少或不正确的信息或任何数量的其他条件,这些条件不会随时间消失。

The values that have been already defined are the following:

已定义的值如下所示:

000 Response Acknowledgement.

000响应确认。

100 The transaction is currently being executed. An actual completion message will follow later.

100当前正在执行事务。稍后将出现实际的完成消息。

101 The transaction has been queued for execution. An actual completion message will follow later.

101事务已排队等待执行。稍后将出现实际的完成消息。

200 The requested transaction was executed normally. This return code can be used for a successful response to any command.

200请求的事务正常执行。此返回代码可用于成功响应任何命令。

250 The connection was deleted. This return code can only be used for a successful response to a DeleteConnection command.

250该连接已被删除。此返回代码只能用于成功响应DeleteConnection命令。

400 The transaction could not be executed, due to some unspecified transient error.

400由于某些未指定的暂时错误,事务无法执行。

401 The phone is already off hook.

401电话已经挂断了。

402 The phone is already on hook.

电话已经挂上了。

403 The transaction could not be executed, because the endpoint does not have sufficient resources at this time.

403无法执行事务,因为终结点此时没有足够的资源。

404 Insufficient bandwidth at this time.

404此时带宽不足。

405 The transaction could not be executed, because the endpoint is "restarting".

405无法执行事务,因为终结点正在“重新启动”。

406 Transaction time-out. The transaction did not complete in a reasonable period of time and has been aborted.

406事务超时。交易未在合理时间内完成,已中止。

407 Transaction aborted. The transaction was aborted by some external action, e.g., a ModifyConnection command aborted by a DeleteConnection command.

407事务中止。事务被某些外部操作中止,例如,由DeleteConnection命令中止的ModifyConnection命令。

409 The transaction could not be executed because of internal overload.

409由于内部过载,无法执行事务。

410 No endpoint available. A valid "any of" wildcard was used, however there was no endpoint available to satisfy the request.

410没有可用的端点。使用了有效的“任意”通配符,但是没有端点可用于满足请求。

500 The transaction could not be executed, because the endpoint is unknown.

500由于端点未知,无法执行事务。

501 The transaction could not be executed, because the endpoint is not ready. This includes the case where the endpoint is out-of-service.

501无法执行事务,因为终结点未就绪。这包括端点停止服务的情况。

502 The transaction could not be executed, because the endpoint does not have sufficient resources (permanent condition).

502无法执行事务,因为终结点没有足够的资源(永久条件)。

503 "All of" wildcard too complicated.

503“全部”通配符太复杂。

504 Unknown or unsupported command.

504未知或不支持的命令。

505 Unsupported RemoteConnectionDescriptor. This SHOULD be used when one or more mandatory parameters or values in the RemoteConnectionDescriptor is not supported.

505不支持的RemoteConnectionDescriptor。当RemoteConnectionDescriptor中的一个或多个必需参数或值不受支持时,应使用此选项。

506 Unable to satisfy both LocalConnectionOptions and RemoteConnectionDescriptor. This SHOULD be used when the LocalConnectionOptions and RemoteConnectionDescriptor contain one or more mandatory parameters or values that conflict with each other and/or cannot be supported at the same time (except for codec negotiation failure - see error code 534).

506无法同时满足LocalConnectionOptions和RemoteConnectionDescriptor。当LocalConnectionOptions和RemoteConnectionDescriptor包含一个或多个相互冲突和/或无法同时支持的强制性参数或值时,应使用此选项(编解码器协商失败除外-请参阅错误代码534)。

507 Unsupported functionality. Some unspecified functionality required to carry out the command is not supported. Note that several other error codes have been defined for specific areas of unsupported functionality (e.g. 508, 511, etc.), and this error code SHOULD only be used if there is no other more specific error code for the unsupported functionality.

507不支持的功能。不支持执行命令所需的某些未指定功能。请注意,已为不受支持功能的特定区域定义了几个其他错误代码(例如508、511等),并且仅当不受支持功能没有其他更具体的错误代码时,才应使用此错误代码。

508 Unknown or unsupported quarantine handling.

508未知或不支持的隔离处理。

509 Error in RemoteConnectionDescriptor. This SHOULD be used when there is a syntax or semantic error in the RemoteConnectionDescriptor.

RemoteConnectionDescriptor中出现509错误。当RemoteConnectionDescriptor中存在语法或语义错误时,应使用此选项。

510 The transaction could not be executed, because some unspecified protocol error was detected. Automatic recovery from such an error will be very difficult, and hence this code SHOULD only be used as a last resort.

510无法执行事务,因为检测到一些未指定的协议错误。从这样的错误中自动恢复是非常困难的,因此此代码只能作为最后手段使用。

511 The transaction could not be executed, because the command contained an unrecognized extension. This code SHOULD be used for unsupported critical parameter extensions ("X+").

511无法执行事务,因为该命令包含无法识别的扩展名。此代码应用于不受支持的关键参数扩展(“X+”)。

512 The transaction could not be executed, because the gateway is not equipped to detect one of the requested events.

512无法执行事务,因为网关未配备检测请求事件之一的功能。

513 The transaction could not be executed, because the gateway is not equipped to generate one of the requested signals.

513无法执行事务,因为网关未配备生成请求的信号之一。

514 The transaction could not be executed, because the gateway cannot send the specified announcement.

514无法执行事务,因为网关无法发送指定的通知。

515 The transaction refers to an incorrect connection-id (may have been already deleted).

515事务引用了不正确的连接id(可能已被删除)。

516 The transaction refers to an unknown call-id, or the call-id supplied is incorrect (e.g., connection-id not associated with this call-id).

516事务引用未知的呼叫id,或者提供的呼叫id不正确(例如,连接id与此呼叫id不关联)。

517 Unsupported or invalid mode.

517不支持或无效的模式。

518 Unsupported or unknown package. It is RECOMMENDED to include a PackageList parameter with the list of supported packages in the response, especially if the response is generated by the Call Agent.

518不支持或未知的包。建议将PackageList参数与支持的包列表一起包含在响应中,特别是当响应由Call Agent生成时。

519 Endpoint does not have a digit map.

519端点没有数字映射。

520 The transaction could not be executed, because the endpoint is "restarting". In most cases this would be a transient error, in which case, error code 405 SHOULD be used instead. The error code is only included here for backwards compatibility.

520无法执行事务,因为终结点正在“重新启动”。在大多数情况下,这将是一个瞬时错误,在这种情况下,应使用错误代码405。此处包含错误代码只是为了向后兼容。

521 Endpoint redirected to another Call Agent. The associated redirection behavior is only well-defined when this response is issued for a RestartInProgress command.

521终结点已重定向到另一个呼叫代理。只有在为RestartInProgress命令发出此响应时,才能很好地定义关联的重定向行为。

522 No such event or signal. The request referred to an event or signal that is not defined in the relevant package (which could be the default package).

522无此类事件或信号。请求引用了相关包(可能是默认包)中未定义的事件或信号。

523 Unknown action or illegal combination of actions.

523未知行为或行为的非法组合。

524 Internal inconsistency in LocalConnectionOptions.

524 LocalConnectionOptions中存在内部不一致。

525 Unknown extension in LocalConnectionOptions. This code SHOULD be used for unsupported mandatory vendor extensions ("x+").

525 LocalConnectionOptions中的未知扩展名。此代码应用于不受支持的强制性供应商扩展(“x+”)。

526 Insufficient bandwidth. In cases where this is a transient error, error code 404 SHOULD be used instead.

526带宽不足。如果这是暂时性错误,则应使用错误代码404。

527 Missing RemoteConnectionDescriptor.

527缺少RemoteConnectionDescriptor。

528 Incompatible protocol version.

528不兼容的协议版本。

529 Internal hardware failure.

529内部硬件故障。

530 CAS signaling protocol error.

530 CAS信令协议错误。

531 Failure of a grouping of trunks (e.g., facility failure).

531一组中继的故障(例如,设施故障)。

532 Unsupported value(s) in LocalConnectionOptions.

532 LocalConnectionOptions中不支持的值。

533 Response too large.

533响应太大。

534 Codec negotiation failure.

534编解码器协商失败。

535 Packetization period not supported.

535不支持打包周期。

536 Unknown or unsupported RestartMethod.

536未知或不支持的重新启动方法。

537 Unknown or unsupported digit map extension.

537未知或不支持的数字映射扩展名。

538 Event/signal parameter error (e.g., missing, erroneous, unsupported, unknown, etc.).

538事件/信号参数错误(例如,缺失、错误、不支持、未知等)。

539 Invalid or unsupported command parameter. This code SHOULD only be used when the parameter is neither a package or vendor extension parameter.

539无效或不支持的命令参数。仅当参数既不是程序包参数,也不是供应商扩展参数时,才应使用此代码。

540 Per endpoint connection limit exceeded.

超过了每个端点连接540的限制。

541 Invalid or unsupported LocalConnectionOptions. This code SHOULD only be used when the LocalConnectionOptions is neither a package nor a vendor extension LocalConnectionOptions.

541本地连接选项无效或不受支持。仅当LocalConnectionOptions既不是包也不是供应商扩展LocalConnectionOptions时,才应使用此代码。

The set of return codes may be extended in a future version of the protocol. Implementations that receive an unknown or unsupported return code SHOULD treat the return code as follows:

返回码集可以在协议的未来版本中扩展。接收未知或不受支持的返回代码的实现应按如下方式处理返回代码:

* Unknown 0xx code treated as 000.

* 未知的0xx代码被视为000。

* Unknown 1xx code treated as 100.

* 未知1xx代码被视为100。

* Unknown 2xx code treated as 200.

* 未知2xx代码被视为200。

* Unknown 3xx code treated as 521.

* 未知3xx代码被视为521。

* Unknown 4xx code treated as 400.

* 未知4xx代码被视为400。

* Unknown 5xx-9xx code treated as 510.

* 未知5xx-9xx代码被视为510。

2.5 Reason Codes
2.5 原因码

Reason codes are used by the gateway when deleting a connection to inform the Call Agent about the reason for deleting the connection. They may also be used in a RestartInProgress command to inform the Call Agent of the reason for the RestartInProgress.

网关在删除连接时使用原因码通知呼叫代理删除连接的原因。它们还可用于RestartInProgress命令中,以通知呼叫代理重新启动进程的原因。

The reason code is an integer number, and the following values have been defined:

原因码是一个整数,定义了以下值:

000 Endpoint state is normal (this code is only used in response to audit requests).

000端点状态正常(此代码仅用于响应审核请求)。

900 Endpoint malfunctioning.

900端点出现故障。

901 Endpoint taken out-of-service.

901终结点已停止服务。

902 Loss of lower layer connectivity (e.g., downstream sync).

902下层连接丢失(例如,下游同步)。

903 QoS resource reservation was lost.

903 QoS资源保留丢失。

904 Manual intervention.

904人工干预。

905 Facility failure (e.g., DS-0 failure).

905设施故障(例如DS-0故障)。

The set of reason codes can be extended.

可以扩展原因代码集。

2.6 Use of Local Connection Options and Connection Descriptors
2.6 使用本地连接选项和连接描述符

As indicated previously, the normal sequence in setting up a bi-directional connection involves at least 3 steps:

如前所述,设置双向连接的正常顺序至少包括3个步骤:

1) The Call Agent asks the first gateway to "create a connection" on an endpoint. The gateway allocates resources to that connection, and responds to the command by providing a "session description" (referred to as its LocalConnectionDescriptor). The session description contains the information necessary for another party to send packets towards the newly created connection.

1) 呼叫代理要求第一个网关在端点上“创建连接”。网关将资源分配给该连接,并通过提供“会话描述”(称为其LocalConnectionDescriptor)响应该命令。会话描述包含另一方向新创建的连接发送数据包所需的信息。

2) The Call Agent then asks the second gateway to "create a connection" on an endpoint. The command carries the "session description" provided by the first gateway (now referred to as the RemoteConnectionDescriptor). The gateway allocates resources to that connection, and responds to the command by providing its own "session description" (LocalConnectionDescriptor).

2) 呼叫代理然后要求第二个网关在端点上“创建连接”。该命令包含第一个网关(现在称为RemoteConnectionDescriptor)提供的“会话描述”。网关将资源分配给该连接,并通过提供自己的“会话描述”(LocalConnectionDescriptor)响应该命令。

3) The Call Agent uses a "modify connection" command to provide this second "session description" (now referred to as the RemoteConnectionDescriptor ) to the first endpoint. Once this is done, communication can proceed in both directions.

3) 调用代理使用“修改连接”命令向第一个端点提供第二个“会话描述”(现在称为RemoteConnectionDescriptor)。一旦完成,通信可以在两个方向上进行。

When the Call Agent issues a Create or Modify Connection command, there are thus three parameters that determine the media supported by that connection:

当Call Agent发出创建或修改连接命令时,有三个参数确定该连接支持的介质:

* LocalConnectionOptions: Supplied by the Call Agent to control the media parameters used by the gateway for the connection. When supplied, the gateway MUST conform to these media parameters until either the connection is deleted, or a ModifyConnection command with new media parameters (LocalConnectionOptions or RemoteConnectionDescriptor) is received.

* LocalConnectionOptions:由呼叫代理提供,用于控制网关用于连接的媒体参数。提供时,网关必须符合这些媒体参数,直到删除连接或接收到带有新媒体参数(LocalConnectionOptions或RemoteConnectionDescriptor)的ModifyConnection命令。

* RemoteConnectionDescriptor: Supplied by the Call Agent to convey the media parameters supported by the other side of the connection. When supplied, the gateway MUST conform to these media parameters until either the connection is deleted, or a ModifyConnection command with new media parameters (LocalConnectionOptions or RemoteConnectionDescriptor) is received.

* RemoteConnectionDescriptor:由呼叫代理提供,用于传递连接另一端支持的媒体参数。提供时,网关必须符合这些媒体参数,直到删除连接或接收到带有新媒体参数(LocalConnectionOptions或RemoteConnectionDescriptor)的ModifyConnection命令。

* LocalConnectionDescriptor: Supplied by the gateway to the Call Agent to convey the media parameters it supports for the connection. When supplied, the gateway MUST honor the media parameters until either the connection is deleted, or the gateway issues a new LocalConnectionDescriptor for that connection.

* LocalConnectionDescriptor:由网关提供给呼叫代理,以传递其支持的连接媒体参数。提供时,网关必须遵守媒体参数,直到连接被删除,或者网关为该连接发出新的LocalConnectionDescriptor。

In determining which codec(s) to provide in the LocalConnectionDescriptor, there are three lists of codecs that a gateway needs to consider:

在确定要在LocalConnectionDescriptor中提供哪些编解码器时,网关需要考虑三个编解码器列表:

* A list of codecs allowed by the LocalConnectionOptions in the current command (either explicitly by encoding method or implicitly by bandwidth and/or packetization period).

* 当前命令中LocalConnectionOptions允许的编解码器列表(通过编码方法显式地或通过带宽和/或打包周期隐式地)。

* A list of codecs in the RemoteConnectionDescriptor in the current command.

* 当前命令中RemoteConnectionDescriptor中的编解码器列表。

* An internal list of codecs that the gateway can support for the connection. A gateway MAY support one or more codecs for a given connection.

* 网关可支持连接的编解码器的内部列表。网关可以支持给定连接的一个或多个编解码器。

Codec selection (including all relevant media parameters) can then be described by the following steps:

编解码器选择(包括所有相关媒体参数)可通过以下步骤进行描述:

1. An approved list of codecs is formed by taking the intersection of the internal list of codecs and codecs allowed by the LocalConnectionOptions. If LocalConnectionOptions were not provided in the current command, the approved list of codecs thus contains the internal list of codecs.

1. 通过获取内部编解码器列表和LocalConnectionOptions允许的编解码器的交集,可以形成已批准的编解码器列表。如果当前命令中未提供LocalConnectionOptions,则核准的编解码器列表将包含编解码器的内部列表。

2. If the approved list of codecs is empty, a codec negotiation failure has occurred and an error response is generated (error code 534 - codec negotiation failure, is RECOMMENDED).

2. 如果批准的编解码器列表为空,则发生编解码器协商失败,并生成错误响应(建议使用错误代码534-编解码器协商失败)。

3. Otherwise, a negotiated list of codecs is formed by taking the intersection of the approved list of codecs and codecs allowed by the RemoteConnectionDescriptor. If a RemoteConnectionDescriptor was not provided in the current command, the negotiated list of codecs thus contains the approved list of codecs.

3. 否则,通过将已批准的编解码器列表与RemoteConnectionDescriptor允许的编解码器列表相交,形成协商的编解码器列表。如果当前命令中未提供RemoteConnectionDescriptor,则协商的编解码器列表将包含已批准的编解码器列表。

4. If the negotiated list of codecs is empty, a codec negotiation failure has occurred and an error response is generated (error code 534 - codec negotiation failure, is RECOMMENDED).

4. 如果协商的编解码器列表为空,则发生编解码器协商失败并生成错误响应(建议使用错误代码534-编解码器协商失败)。

5. Otherwise, codec negotiation has succeeded, and the negotiated list of codecs is returned in the LocalConnectionDescriptor.

5. 否则,编解码器协商已成功,协商的编解码器列表将在LocalConnectionDescriptor中返回。

Note that both LocalConnectionOptions and the RemoteConnectionDescriptor can contain a list of codecs ordered by preference. When both are supplied in the current command, the gateway MUST adhere to the preferences provided in the LocalConnectionOptions.

请注意,LocalConnectionOptions和RemoteConnectionDescriptor都可以包含按首选项排序的编解码器列表。当当前命令中提供了这两个选项时,网关必须遵守LocalConnectionOptions中提供的首选项。

2.7 Resource Reservations
2.7 资源保留

The gateways can be instructed to perform a reservation, for example using RSVP, on a given connection. When a reservation is needed, the call agent will specify the reservation profile to be used, which is either "controlled load" or "guaranteed service". The absence of reservation can be indicated by asking for the "best effort" service, which is the default value of this parameter in a CreateConnection command. For a ModifyConnection command, the default is simply to retain the current value. When reservation has been asked on a connection, the gateway will:

可以指示网关在给定连接上执行保留,例如使用RSVP。当需要预订时,呼叫代理将指定要使用的预订配置文件,即“受控负载”或“保证服务”。可以通过请求“尽力而为”服务来表示没有保留,这是CreateConnection命令中此参数的默认值。对于ModifyConnection命令,默认值只是保留当前值。当在连接上请求保留时,网关将:

* start emitting RSVP "PATH" messages if the connection is in "send-only", "send-receive", "conference", "network loop back" or "network continuity test" mode (if a suitable remote connection descriptor has been received,).

* 如果连接处于“仅发送”、“发送-接收”、“会议”、“网络环回”或“网络连续性测试”模式(如果已接收到合适的远程连接描述符),则开始发出RSVP“PATH”消息。

* start emitting RSVP "RESV" messages as soon as it receives "PATH" messages if the connection is in "receive-only", "send-receive", "conference", "network loop back" or "network continuity test" mode.

* 如果连接处于“仅接收”、“发送-接收”、“会议”、“网络环回”或“网络连续性测试”模式,则在收到“路径”消息后立即开始发送RSVP“RESV”消息。

The RSVP filters will be deduced from the characteristics of the connection. The RSVP resource profiles will be deduced from the connection's codecs, bandwidth and packetization period.

RSVP滤波器将根据连接的特性进行推导。RSVP资源配置文件将从连接的编解码器、带宽和打包周期中推导出来。

3. Media Gateway Control Protocol
3. 媒体网关控制协议

The Media Gateway Control Protocol (MGCP) implements the media gateway control interface as a set of transactions. The transactions are composed of a command and a mandatory response. There are nine commands:

媒体网关控制协议(MGCP)将媒体网关控制接口作为一组事务来实现。事务由命令和强制响应组成。共有九个命令:

* EndpointConfiguration

* 端点配置

* CreateConnection

* 创建连接

* ModifyConnection

* 修改连接

* DeleteConnection

* 删除连接

* NotificationRequest

* 通知请求

* Notify

* 通知

* AuditEndpoint

* 审核端点

* AuditConnection

* 审核连接

* RestartInProgress

* 重新启动进程

The first five commands are sent by the Call Agent to a gateway. The Notify command is sent by the gateway to the Call Agent. The gateway may also send a DeleteConnection as defined in Section 2.3.8. The Call Agent may send either of the Audit commands to the gateway, and the gateway may send a RestartInProgress command to the Call Agent.

前五个命令由呼叫代理发送到网关。Notify命令由网关发送给呼叫代理。网关还可以发送第2.3.8节中定义的DeleteConnection。呼叫代理可以向网关发送任一审计命令,网关可以向呼叫代理发送RestartInProgress命令。

3.1 General Description
3.1 一般说明

All commands are composed of a Command header, optionally followed by a session description.

所有命令都由一个命令头组成,后面可选地跟一个会话描述。

All responses are composed of a Response header, optionally followed by session description information.

所有响应都由一个响应头组成,可选地后跟会话描述信息。

Headers and session descriptions are encoded as a set of text lines, separated by a carriage return and line feed character (or, optionally, a single line-feed character). The session descriptions are preceded by an empty line.

标题和会话描述被编码为一组文本行,由回车符和换行符(或可选的单换行符)分隔。会话描述前面有一个空行。

MGCP uses a transaction identifier to correlate commands and responses. The transaction identifier is encoded as a component of the command header and repeated as a component of the response header (see sections 3.2.1.2 and 3.3).

MGCP使用事务标识符关联命令和响应。事务标识符编码为命令头的一个组件,并作为响应头的一个组件重复(见第3.2.1.2和3.3节)。

Note that an ABNF grammar for MGCP is provided in Appendix A. Commands and responses SHALL be encoded in accordance with the grammar, which, per RFC 2234, is case-insensitive except for the SDP part. Similarly, implementations SHALL be capable of decoding commands and responses that follow the grammar. Additionally, it is RECOMMENDED that implementations tolerate additional linear white space.

注意,附录A中提供了MGCP的ABNF语法。命令和响应应按照语法进行编码,根据RFC 2234,该语法不区分大小写,SDP部分除外。类似地,实现应能够解码遵循语法的命令和响应。此外,建议实现允许额外的线性空白。

Some productions allow for use of quoted strings, which can be necessary to avoid syntax problems. Where the quoted string form is used, the contents will be UTF-8 encoded [20], and the actual value provided is the unquoted string (UTF-8 encoded). Where both a quoted and unquoted string form is allowed, either form can be used provided it does not otherwise violate the grammar.

有些产品允许使用带引号的字符串,这是避免语法问题所必需的。如果使用带引号的字符串形式,则内容将采用UTF-8编码[20],提供的实际值为未带引号的字符串(UTF-8编码)。如果同时允许带引号和不带引号的字符串形式,则可以使用任何一种形式,前提是它不会违反语法。

In the following, we provide additional detail on the format of MGCP commands and responses.

在下文中,我们将提供有关MGCP命令和响应格式的更多详细信息。

3.2 Command Header
3.2 命令头

The command header is composed of:

命令头由以下部分组成:

* A command line, identifying the requested action or verb, the transaction identifier, the endpoint towards which the action is requested, and the MGCP protocol version,

* 命令行,标识请求的操作或动词、事务标识符、请求操作的端点以及MGCP协议版本,

* A set of zero or more parameter lines, composed of a parameter name followed by a parameter value.

* 一组零或多个参数行,由一个参数名后跟一个参数值组成。

Unless otherwise noted or dictated by other referenced standards (e.g., SDP), each component in the command header is case insensitive. This goes for verbs as well as parameters and values, and hence all comparisons MUST treat upper and lower case as well as combinations of these as being equal.

除非其他参考标准(如SDP)另有说明或规定,否则命令头中的每个组件都不区分大小写。这适用于动词以及参数和值,因此所有比较都必须将大小写以及它们的组合视为相等。

3.2.1 Command Line
3.2.1 命令行

The command line is composed of:

命令行由以下部分组成:

* The name of the requested verb,

* 请求的动词的名称,

* The identification of the transaction,

* 交易的识别,

* The name of the endpoint(s) that are to execute the command (in notifications or restarts, the name of the endpoint(s) that is issuing the command),

* 要执行命令的端点的名称(在通知或重新启动中,发出命令的端点的名称),

* The protocol version.

* 协议版本。

These four items are encoded as strings of printable ASCII characters, separated by white spaces, i.e., the ASCII space (0x20) or tabulation (0x09) characters. It is RECOMMENDED to use exactly one ASCII space separator. However, MGCP entities MUST be able to parse messages with additional white space characters.

这四个项目被编码为可打印ASCII字符的字符串,由空格分隔,即ASCII空格(0x20)或表格(0x09)字符。建议只使用一个ASCII空格分隔符。但是,MGCP实体必须能够解析带有额外空格字符的消息。

3.2.1.1 Coding of the Requested Verb
3.2.1.1 所请求动词的编码

The verbs that can be requested are encoded as four letter upper or lower case ASCII codes (comparisons SHALL be case insensitive) as defined in the following table:

可请求的动词编码为下表中定义的四字母大写或小写ASCII码(比较不区分大小写):

                  -----------------------------
                 |       Verb           | Code |
                 |----------------------|------|
                 | EndpointConfiguration| EPCF |
                 | CreateConnection     | CRCX |
                 | ModifyConnection     | MDCX |
                 | DeleteConnection     | DLCX |
                 | NotificationRequest  | RQNT |
                 | Notify               | NTFY |
                 | AuditEndpoint        | AUEP |
                 | AuditConnection      | AUCX |
                 | RestartInProgress    | RSIP |
                  -----------------------------
        
                  -----------------------------
                 |       Verb           | Code |
                 |----------------------|------|
                 | EndpointConfiguration| EPCF |
                 | CreateConnection     | CRCX |
                 | ModifyConnection     | MDCX |
                 | DeleteConnection     | DLCX |
                 | NotificationRequest  | RQNT |
                 | Notify               | NTFY |
                 | AuditEndpoint        | AUEP |
                 | AuditConnection      | AUCX |
                 | RestartInProgress    | RSIP |
                  -----------------------------
        

The transaction identifier is encoded as a string of up to 9 decimal digits. In the command line, it immediately follows the coding of the verb.

事务标识符编码为最多9位十进制数字的字符串。在命令行中,它紧跟着动词的编码。

New verbs may be defined in further versions of the protocol. It may be necessary, for experimentation purposes, to use new verbs before they are sanctioned in a published version of this protocol. Experimental verbs MUST be identified by a four letter code starting with the letter X, such as for example XPER.

新的动词可在协议的进一步版本中定义。出于实验目的,可能有必要在本协议的发布版本中批准新动词之前使用新动词。实验动词必须由以字母X开头的四个字母代码标识,例如XPER。

3.2.1.2 Transaction Identifiers
3.2.1.2 事务标识符

MGCP uses a transaction identifier to correlate commands and responses. A gateway supports two separate transaction identifier name spaces:

MGCP使用事务标识符关联命令和响应。网关支持两个独立的事务标识符名称空间:

* a transaction identifier name space for sending transactions, and

* 用于发送事务的事务标识符名称空间,以及

* a transaction identifier name space for receiving transactions.

* 用于接收事务的事务标识符名称空间。

At a minimum, transaction identifiers for commands sent to a given gateway MUST be unique for the maximum lifetime of the transactions within the collection of Call Agents that control that gateway. Thus, regardless of the sending Call Agent, gateways can always detect duplicate transactions by simply examining the transaction identifier. The coordination of these transaction identifiers between Call Agents is outside the scope of this specification though.

至少,发送到给定网关的命令的事务标识符在控制该网关的调用代理集合中的事务的最大生存期内必须是唯一的。因此,不管发送呼叫代理是什么,网关总是可以通过简单地检查事务标识符来检测重复的事务。不过,调用代理之间这些事务标识符的协调不在本规范的范围之内。

Transaction identifiers for all commands sent from a given gateway MUST be unique for the maximum lifetime of the transactions regardless of which Call Agent the command is sent to. Thus, a Call Agent can always detect a duplicate transaction from a gateway by the combination of the domain-name of the endpoint and the transaction identifier.

在事务的最长生存期内,从给定网关发送的所有命令的事务标识符必须是唯一的,无论命令发送到哪个调用代理。因此,呼叫代理始终可以通过端点的域名和事务标识符的组合来检测来自网关的重复事务。

The transaction identifier is encoded as a string of up to nine decimal digits. In the command lines, it immediately follows the coding of the verb.

事务标识符编码为最多九位十进制数字的字符串。在命令行中,它紧跟着动词的编码。

Transaction identifiers have values between 1 and 999,999,999 (both included). Transaction identifiers SHOULD NOT use any leading zeroes, although equality is based on numerical value, i.e., leading zeroes are ignored. An MGCP entity MUST NOT reuse a transaction identifier more quickly than three minutes after completion of the previous command in which the identifier was used.

事务标识符的值介于1和99999999之间(两者都包括在内)。事务标识符不应使用任何前导零,尽管相等性基于数值,即忽略前导零。MGCP实体重用事务标识符的速度不得超过使用该标识符的上一个命令完成后三分钟。

3.2.1.3 Coding of the Endpoint Identifiers and Entity Names
3.2.1.3 端点标识符和实体名称的编码

The endpoint identifiers and entity names are encoded as case insensitive e-mail addresses, as defined in RFC 821, although with some syntactic restrictions on the local part of the name. Furthermore, both the local endpoint name part and the domain name part can each be up to 255 characters. In these addresses, the domain name identifies the system where the endpoint is attached, while the left side identifies a specific endpoint or entity on that system.

端点标识符和实体名称编码为不区分大小写的电子邮件地址,如RFC 821中所定义,尽管名称的本地部分有一些语法限制。此外,本地端点名称部分和域名部分都可以最多包含255个字符。在这些地址中,域名标识端点所连接的系统,而左侧标识该系统上的特定端点或实体。

Examples of such addresses are:

这些地址的例子如下:

    ------------------------------------------------------------------
   | hrd4/56@gw23.example.net     |  Circuit number 56 in             |
   |                              |  interface "hrd4" of the Gateway  |
   |                              |  23 of the "Example" network      |
   | Call-agent@ca.example.net    |  Call Agent for the               |
   |                              |  "example" network                |
   | Busy-signal@ann12.example.net|  The "busy signal" virtual        |
   |                              |  endpoint in the announcement     |
   |                              |  server number 12.                |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | hrd4/56@gw23.example.net     |  Circuit number 56 in             |
   |                              |  interface "hrd4" of the Gateway  |
   |                              |  23 of the "Example" network      |
   | Call-agent@ca.example.net    |  Call Agent for the               |
   |                              |  "example" network                |
   | Busy-signal@ann12.example.net|  The "busy signal" virtual        |
   |                              |  endpoint in the announcement     |
   |                              |  server number 12.                |
    ------------------------------------------------------------------
        

The name of a notified entity is expressed with the same syntax, with the possible addition of a port number as in:

通知实体的名称用相同的语法表示,并可能添加端口号,如所示:

Call-agent@ca.example.net:5234

召唤-agent@ca.example.net:5234

In case the port number is omitted from the notified entity, the default MGCP Call Agent port (2727) MUST be used.

如果通知实体中省略了端口号,则必须使用默认的MGCP呼叫代理端口(2727)。

3.2.1.4 Coding of the Protocol Version
3.2.1.4 协议版本的编码

The protocol version is coded as the keyword MGCP followed by a white space and the version number, and optionally followed by a profile name. The version number is composed of a major version, coded by a decimal number, a dot, and a minor version number, coded as a decimal number. The version described in this document is version 1.0.

协议版本编码为关键字MGCP,后跟空格和版本号,还可以选择后跟配置文件名称。版本号由一个主要版本(由十进制数字编码)、一个点和一个次要版本(由十进制数字编码)组成。本文档中描述的版本为1.0版。

The profile name, if present, is represented by white-space separated strings of visible (printable) characters extending to the end of the line. Profile names may be defined for user communities who want to apply restrictions or other profiling to MGCP.

配置文件名称(如果存在)由延伸到行尾的可见(可打印)字符的空格分隔字符串表示。可以为想要对MGCP应用限制或其他配置文件的用户社区定义配置文件名称。

In the initial messages, the version will be coded as:

在初始消息中,版本将编码为:

MGCP 1.0

MGCP 1.0

An entity that receives a command with a protocol version it does not support, MUST respond with an error (error code 528 - incompatible protocol version, is RECOMMENDED). Note that this applies to unsupported profiles as well.

接收到不支持协议版本的命令的实体必须响应错误(建议使用错误代码528-不兼容的协议版本)。请注意,这也适用于不受支持的配置文件。

3.2.2 Parameter Lines
3.2.2 参数线

Parameter lines are composed of a parameter name, which in most cases is composed of one or two characters, followed by a colon, optional white space(s) and the parameter value. The parameters that can be present in commands are defined in the following table:

参数行由参数名称组成,在大多数情况下,参数名称由一个或两个字符组成,后跟冒号、可选空格和参数值。下表定义了命令中可能存在的参数:

    ------------------------------------------------------------------
   |Parameter name        | Code |  Parameter value                   |
   |----------------------|------|------------------------------------|
   |BearerInformation     |   B  |  See description (3.2.2.1).        |
   |CallId                |   C  |  See description (3.2.2.2).        |
   |Capabilities          |   A  |  See description (3.2.2.3).        |
   |ConnectionId          |   I  |  See description (3.2.2.5).        |
   |ConnectionMode        |   M  |  See description (3.2.2.6).        |
   |ConnectionParameters  |   P  |  See description (3.2.2.7).        |
   |DetectEvents          |   T  |  See description (3.2.2.8).        |
   |DigitMap              |   D  |  A text encoding of a digit map.   |
   |EventStates           |   ES |  See description (3.2.2.9).        |
   |LocalConnectionOptions|   L  |  See description (3.2.2.10).       |
   |MaxMGCPDatagram       |   MD |  See description (3.2.2.11).       |
   |NotifiedEntity        |   N  |  An identifier, in RFC 821 format, |
   |                      |      |  composed of an arbitrary string   |
   |                      |      |  and of the domain name of the     |
   |                      |      |  requesting entity, possibly com-  |
   |                      |      |  pleted by a port number, as in:   |
   |                      |      |    Call-agent@ca.example.net:5234  |
   |                      |      |  See also Section 3.2.1.3.         |
   |ObservedEvents        |   O  |  See description (3.2.2.12).       |
   |PackageList           |   PL |  See description (3.2.2.13).       |
   |QuarantineHandling    |   Q  |  See description (3.2.2.14).       |
   |ReasonCode            |   E  |  A string with a 3 digit integer   |
   |                      |      |  optionally followed by a set of   |
   |                      |      |  arbitrary characters (3.2.2.15).  |
   |RequestedEvents       |   R  |  See description (3.2.2.16).       |
   |RequestedInfo         |   F  |  See description (3.2.2.17).       |
   |RequestIdentifier     |   X  |  See description (3.2.2.18).       |
   |ResponseAck           |   K  |  See description (3.2.2.19).       |
   |RestartDelay          |   RD |  A number of seconds, encoded as   |
   |                      |      |  a decimal number.                 |
   |RestartMethod         |   RM |  See description (3.2.2.20).       |
   |SecondConnectionId    |   I2 |  Connection Id.                    |
   |SecondEndpointId      |   Z2 |  Endpoint Id.                      |
   |SignalRequests        |   S  |  See description (3.2.2.21).       |
   |SpecificEndPointId    |   Z  |  An identifier, in RFC 821 format, |
   |                      |      |  composed of an arbitrary string,  |
   |                      |      |  followed by an "@" followed by    |
   |                      |      |  the domain name of the gateway to |
   |                      |      |  which this endpoint is attached.  |
   |                      |      |  See also Section 3.2.1.3.         |
   |----------------------|------|------------------------------------|
        
    ------------------------------------------------------------------
   |Parameter name        | Code |  Parameter value                   |
   |----------------------|------|------------------------------------|
   |BearerInformation     |   B  |  See description (3.2.2.1).        |
   |CallId                |   C  |  See description (3.2.2.2).        |
   |Capabilities          |   A  |  See description (3.2.2.3).        |
   |ConnectionId          |   I  |  See description (3.2.2.5).        |
   |ConnectionMode        |   M  |  See description (3.2.2.6).        |
   |ConnectionParameters  |   P  |  See description (3.2.2.7).        |
   |DetectEvents          |   T  |  See description (3.2.2.8).        |
   |DigitMap              |   D  |  A text encoding of a digit map.   |
   |EventStates           |   ES |  See description (3.2.2.9).        |
   |LocalConnectionOptions|   L  |  See description (3.2.2.10).       |
   |MaxMGCPDatagram       |   MD |  See description (3.2.2.11).       |
   |NotifiedEntity        |   N  |  An identifier, in RFC 821 format, |
   |                      |      |  composed of an arbitrary string   |
   |                      |      |  and of the domain name of the     |
   |                      |      |  requesting entity, possibly com-  |
   |                      |      |  pleted by a port number, as in:   |
   |                      |      |    Call-agent@ca.example.net:5234  |
   |                      |      |  See also Section 3.2.1.3.         |
   |ObservedEvents        |   O  |  See description (3.2.2.12).       |
   |PackageList           |   PL |  See description (3.2.2.13).       |
   |QuarantineHandling    |   Q  |  See description (3.2.2.14).       |
   |ReasonCode            |   E  |  A string with a 3 digit integer   |
   |                      |      |  optionally followed by a set of   |
   |                      |      |  arbitrary characters (3.2.2.15).  |
   |RequestedEvents       |   R  |  See description (3.2.2.16).       |
   |RequestedInfo         |   F  |  See description (3.2.2.17).       |
   |RequestIdentifier     |   X  |  See description (3.2.2.18).       |
   |ResponseAck           |   K  |  See description (3.2.2.19).       |
   |RestartDelay          |   RD |  A number of seconds, encoded as   |
   |                      |      |  a decimal number.                 |
   |RestartMethod         |   RM |  See description (3.2.2.20).       |
   |SecondConnectionId    |   I2 |  Connection Id.                    |
   |SecondEndpointId      |   Z2 |  Endpoint Id.                      |
   |SignalRequests        |   S  |  See description (3.2.2.21).       |
   |SpecificEndPointId    |   Z  |  An identifier, in RFC 821 format, |
   |                      |      |  composed of an arbitrary string,  |
   |                      |      |  followed by an "@" followed by    |
   |                      |      |  the domain name of the gateway to |
   |                      |      |  which this endpoint is attached.  |
   |                      |      |  See also Section 3.2.1.3.         |
   |----------------------|------|------------------------------------|
        
   |RemoteConnection-     |   RC |  Session Description.              |
   |         Descriptor   |      |                                    |
   |LocalConnection-      |   LC |  Session Description.              |
   |         Descriptor   |      |                                    |
    ------------------------------------------------------------------
        
   |RemoteConnection-     |   RC |  Session Description.              |
   |         Descriptor   |      |                                    |
   |LocalConnection-      |   LC |  Session Description.              |
   |         Descriptor   |      |                                    |
    ------------------------------------------------------------------
        

The parameters are not necessarily present in all commands. The following table provides the association between parameters and commands. The letter M stands for mandatory, O for optional and F for forbidden. Unless otherwise specified, a parameter MUST NOT be present more than once.

参数不一定存在于所有命令中。下表提供了参数和命令之间的关联。字母M代表强制,O代表可选,F代表禁止。除非另有规定,否则参数不能出现多次。

    ------------------------------------------------------------------
   | Parameter name      | EP | CR | MD | DL | RQ | NT | AU | AU | RS |
   |                     | CF | CX | CX | CX | NT | FY | EP | CX | IP |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | BearerInformation   |  O*|  O |  O |  O |  O |  F |  F |  F |  F |
   | CallId              |  F |  M |  M |  O |  F |  F |  F |  F |  F |
   | Capabilities        |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | ConnectionId        |  F |  F |  M |  O |  F |  F |  F |  M |  F |
   | ConnectionMode      |  F |  M |  O |  F |  F |  F |  F |  F |  F |
   | Connection-         |  F |  F |  F |  O*|  F |  F |  F |  F |  F |
   |   Parameters        |    |    |    |    |    |    |    |    |    |
   | DetectEvents        |  F |  O |  O |  O |  O |  F |  F |  F |  F |
   | DigitMap            |  F |  O |  O |  O |  O |  F |  F |  F |  F |
   | EventStates         |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | LocalConnection-    |  F |  O |  O |  F |  F |  F |  F |  F |  F |
   |            Options  |    |    |    |    |    |    |    |    |    |
   | MaxMGCPDatagram     |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | NotifiedEntity      |  F |  O |  O |  O |  O |  O |  F |  F |  F |
   | ObservedEvents      |  F |  F |  F |  F |  F |  M |  F |  F |  F |
   | PackageList         |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | QuarantineHandling  |  F |  O |  O |  O |  O |  F |  F |  F |  F |
   | ReasonCode          |  F |  F |  F |  O |  F |  F |  F |  F |  O |
   | RequestedEvents     |  F |  O |  O |  O |  O*|  F |  F |  F |  F |
   | RequestIdentifier   |  F |  O*|  O*|  O*|  M |  M |  F |  F |  F |
   | RequestedInfo       |  F |  F |  F |  F |  F |  F |  O |  M |  F |
   | ResponseAck         |  O |  O |  O |  O |  O |  O |  O |  O |  O |
   | RestartDelay        |  F |  F |  F |  F |  F |  F |  F |  F |  O |
   | RestartMethod       |  F |  F |  F |  F |  F |  F |  F |  F |  M |
   | SecondConnectionId  |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | SecondEndpointId    |  F |  O |  F |  F |  F |  F |  F |  F |  F |
   | SignalRequests      |  F |  O |  O |  O |  O*|  F |  F |  F |  F |
   | SpecificEndpointId  |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | RemoteConnection-   |  F |  O |  O |  F |  F |  F |  F |  F |  F |
   |          Descriptor |    |    |    |    |    |    |    |    |    |
   | LocalConnection-    |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   |          Descriptor |    |    |    |    |    |    |    |    |    |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | Parameter name      | EP | CR | MD | DL | RQ | NT | AU | AU | RS |
   |                     | CF | CX | CX | CX | NT | FY | EP | CX | IP |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | BearerInformation   |  O*|  O |  O |  O |  O |  F |  F |  F |  F |
   | CallId              |  F |  M |  M |  O |  F |  F |  F |  F |  F |
   | Capabilities        |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | ConnectionId        |  F |  F |  M |  O |  F |  F |  F |  M |  F |
   | ConnectionMode      |  F |  M |  O |  F |  F |  F |  F |  F |  F |
   | Connection-         |  F |  F |  F |  O*|  F |  F |  F |  F |  F |
   |   Parameters        |    |    |    |    |    |    |    |    |    |
   | DetectEvents        |  F |  O |  O |  O |  O |  F |  F |  F |  F |
   | DigitMap            |  F |  O |  O |  O |  O |  F |  F |  F |  F |
   | EventStates         |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | LocalConnection-    |  F |  O |  O |  F |  F |  F |  F |  F |  F |
   |            Options  |    |    |    |    |    |    |    |    |    |
   | MaxMGCPDatagram     |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | NotifiedEntity      |  F |  O |  O |  O |  O |  O |  F |  F |  F |
   | ObservedEvents      |  F |  F |  F |  F |  F |  M |  F |  F |  F |
   | PackageList         |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | QuarantineHandling  |  F |  O |  O |  O |  O |  F |  F |  F |  F |
   | ReasonCode          |  F |  F |  F |  O |  F |  F |  F |  F |  O |
   | RequestedEvents     |  F |  O |  O |  O |  O*|  F |  F |  F |  F |
   | RequestIdentifier   |  F |  O*|  O*|  O*|  M |  M |  F |  F |  F |
   | RequestedInfo       |  F |  F |  F |  F |  F |  F |  O |  M |  F |
   | ResponseAck         |  O |  O |  O |  O |  O |  O |  O |  O |  O |
   | RestartDelay        |  F |  F |  F |  F |  F |  F |  F |  F |  O |
   | RestartMethod       |  F |  F |  F |  F |  F |  F |  F |  F |  M |
   | SecondConnectionId  |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | SecondEndpointId    |  F |  O |  F |  F |  F |  F |  F |  F |  F |
   | SignalRequests      |  F |  O |  O |  O |  O*|  F |  F |  F |  F |
   | SpecificEndpointId  |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | RemoteConnection-   |  F |  O |  O |  F |  F |  F |  F |  F |  F |
   |          Descriptor |    |    |    |    |    |    |    |    |    |
   | LocalConnection-    |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   |          Descriptor |    |    |    |    |    |    |    |    |    |
    ------------------------------------------------------------------
        

Notes (*):

附注(*):

* The BearerInformation parameter is only conditionally optional as explained in Section 2.3.2.

* 如第2.3.2节所述,轴承信息参数仅在条件下可选。

* The RequestIdentifier parameter is optional in connection creation, modification and deletion commands, however it becomes REQUIRED if the command contains an encapsulated notification request.

* RequestIdentifier参数在连接创建、修改和删除命令中是可选的,但是如果该命令包含封装的通知请求,则需要该参数。

* The RequestedEvents and SignalRequests parameters are optional in the NotificationRequest. If these parameters are omitted the corresponding lists will be considered empty.

* RequestedEvents和SignalRequests参数在NotificationRequest中是可选的。如果省略这些参数,则相应的列表将被视为空。

* The ConnectionParameters parameter is only valid in a DeleteConnection request sent by the gateway.

* ConnectionParameters参数仅在网关发送的DeleteConnection请求中有效。

The set of parameters can be extended in two different ways:

可通过两种不同的方式扩展参数集:

* Package Extension Parameters (preferred)

* 包扩展参数(首选)

* Vendor Extension Parameters

* 供应商扩展参数

Package Extension Parameters are defined in packages which provides the following benefits:

包扩展参数在包中定义,提供以下好处:

* a registration mechanism (IANA) for the package name.

* 包名称的注册机制(IANA)。

* a separate name space for the parameters.

* 参数的单独名称空间。

* a convenient grouping of the extensions.

* 一个方便的扩展分组。

* a simple way to determine support for them through auditing.

* 一种通过审核确定对它们的支持的简单方法。

The package extension mechanism is the preferred extension method.

包扩展机制是首选的扩展方法。

Vendor extension parameters can be used if implementers need to experiment with new parameters, for example when developing a new application of MGCP. Vendor extension parameters MUST be identified by names that start with the string "X-" or "X+", such as for example:

如果实现者需要试验新参数,例如在开发MGCP的新应用程序时,可以使用供应商扩展参数。供应商扩展参数必须由以字符串“X-”或“X+”开头的名称标识,例如:

X-Flower: Daisy

X花:黛西

Parameter names that start with "X+" are critical parameter extensions. An MGCP entity that receives a critical parameter extension that it cannot understand MUST refuse to execute the command. It SHOULD respond with error code 511 (unrecognized extension).

以“X+”开头的参数名称是关键的参数扩展。接收到无法理解的关键参数扩展的MGCP实体必须拒绝执行该命令。它应该响应错误代码511(无法识别的扩展名)。

Parameter names that start with "X-" are non-critical parameter extensions. An MGCP entity that receives a non-critical parameter extension that it cannot understand MUST simply ignore that parameter.

以“X-”开头的参数名称是非关键参数扩展。接收到无法理解的非关键参数扩展的MGCP实体必须忽略该参数。

Note that vendor extension parameters use an unmanaged name space, which implies a potential for name clashing. Vendors are consequently encouraged to include some vendor specific string, e.g., vendor name, in their vendor extensions.

请注意,供应商扩展参数使用非托管名称空间,这意味着可能存在名称冲突。因此,鼓励供应商在其供应商扩展中包含一些特定于供应商的字符串,例如供应商名称。

3.2.2.1 BearerInformation
3.2.2.1 承载信息

The values of the bearer information are encoded as a comma separated list of attributes, which are represented by an attribute name, and possibly followed by a colon and an attribute value.

承载信息的值被编码为以逗号分隔的属性列表,属性列表由属性名称表示,后面可能跟有冒号和属性值。

The only attribute that is defined is the "encoding" (code "e") attribute, which MUST have one of the values "A" (A-law) or "mu" (mu-law).

唯一定义的属性是“encoding”(代码“e”)属性,该属性必须具有值“A”(A-law)或“mu”(mu-law)之一。

An example of bearer information encoding is:

承载信息编码的一个示例是:

B: e:mu

B:e:mu

The set of bearer information attributes may be extended through packages.

承载信息属性的集合可以通过包来扩展。

3.2.2.2 CallId
3.2.2.2 呼唤

The Call Identifier is encoded as a hexadecimal string, at most 32 characters in length. Call Identifiers are compared as strings rather than numerical values.

调用标识符编码为十六进制字符串,长度最多为32个字符。调用标识符作为字符串而不是数值进行比较。

3.2.2.3 Capabilities
3.2.2.3 能力

Capabilities inform the Call Agent about endpoints' capabilities when audited. The encoding of capabilities is based on the Local Connection Options encoding for the parameters that are common to both, although a different parameter line code is used ("A"). In addition, capabilities can also contain a list of supported packages, and a list of supported modes.

功能在审核时通知呼叫代理端点的功能。虽然使用了不同的参数行代码(“a”),但功能的编码是基于本地连接选项编码的,这两个参数是通用的。此外,功能还可以包含受支持包的列表和受支持模式的列表。

The parameters used are:

使用的参数包括:

A list of supported codecs. The following parameters will apply to all codecs specified in this list. If there is a need to specify that some parameters, such as e.g., silence suppression, are only compatible with some codecs, then the gateway will return several Capability parameters; one for each set of codecs.

支持的编解码器列表。以下参数将应用于此列表中指定的所有编解码器。如果需要指定某些参数(例如静音抑制)仅与某些编解码器兼容,则网关将返回多个功能参数;每组编解码器一个。

Packetization Period: A range may be specified.

打包周期:可以指定一个范围。

Bandwidth: A range corresponding to the range for packetization periods may be specified (assuming no silence suppression). If absent, the values will be deduced from the codec type.

带宽:可以指定与打包周期范围相对应的范围(假设没有静音抑制)。如果不存在,则将从编解码器类型推断值。

Echo Cancellation: "on" if echo cancellation is supported, "off" otherwise. The default is support.

回音取消:如果支持回音取消,则为“开”,否则为“关”。默认值是支持。

Silence Suppression: "on" if silence suppression is supported for this codec, "off" otherwise. The default is support.

静音抑制:“开”如果此编解码器支持静音抑制,则“关”否则。默认值是支持。

Gain Control: "0" if gain control is not supported, all other values indicate support for gain control. The default is support.

增益控制:“0”如果不支持增益控制,所有其他值表示支持增益控制。默认值是支持。

Type of Service: The value "0" indicates no support for type of service, all other values indicate support for type of service. The default is support.

服务类型:值“0”表示不支持服务类型,所有其他值表示支持服务类型。默认值是支持。

Resource Reservation Service: The parameter indicates the reservation services that are supported, in addition to best effort. The value "g" is encoded when the gateway supports both the guaranteed and the controlled load service, "cl" when only the controlled load service is supported. The default is "best effort".

资源预订服务:该参数表示除“尽力而为”外,还支持哪些预订服务。当网关同时支持保证负载服务和控制负载服务时,对值“g”进行编码;当仅支持控制负载服务时,对值“cl”进行编码。默认为“尽力而为”。

Encryption Key: Encoding any value indicates support for encryption. Default is no support which is implied by omitting the parameter.

加密密钥:对任何值进行编码表示支持加密。默认值是不支持,这是通过省略参数暗示的。

Type of network: The keyword "nt", followed by a colon and a semicolon separated list of supported network types. This parameter is optional.

网络类型:关键字“nt”,后跟以冒号和分号分隔的受支持网络类型列表。此参数是可选的。

Packages: The packages supported by the endpoint encoded as the keyword "v", followed by a colon and a character string. If a list of values is specified, these values will be separated by a semicolon. The first value specified will be the default package for the endpoint.

包:端点支持的包,编码为关键字“v”,后跟冒号和字符串。如果指定了值列表,这些值将用分号分隔。指定的第一个值将是端点的默认包。

Modes: The modes supported by this endpoint encoded as the keyword "m", followed by a colon and a semicolon-separated list of supported connection modes for this endpoint.

模式:此端点支持的模式编码为关键字“m”,后跟一个冒号和分号分隔的此端点支持的连接模式列表。

Lack of support for a capability can also be indicated by excluding the parameter from the capability set.

还可以通过从功能集中排除该参数来表示缺乏对功能的支持。

An example capability is:

一个示例功能是:

     A: a:PCMU;G728, p:10-100, e:on, s:off, t:1, v:L,
                              m:sendonly;recvonly;sendrecv;inactive
        
     A: a:PCMU;G728, p:10-100, e:on, s:off, t:1, v:L,
                              m:sendonly;recvonly;sendrecv;inactive
        

The carriage return above is included for formatting reasons only and is not permissible in a real implementation.

包含上述回车符仅出于格式原因,在实际实现中是不允许的。

If multiple capabilities are to be returned, each will be returned as a separate capability line.

如果要返回多个功能,每个功能将作为单独的功能行返回。

Since Local Connection Options can be extended, the list of capability parameters can also be extended. Individual extensions may define how they are reported as capabilities. If no such definition is provided, the following defaults apply:

由于可以扩展本地连接选项,因此也可以扩展功能参数列表。单个扩展可以定义如何将它们报告为功能。如果未提供此类定义,则以下默认值适用:

* Package Extension attributes: The individual attributes are not reported. Instead, the name of the package is simply reported in the list of supported packages.

* 包扩展属性:不报告单个属性。相反,只需在支持的包列表中报告包的名称。

* Vendor Extension attributes: The name of the attribute is reported without any value.

* 供应商扩展属性:报告的属性名称没有任何值。

* Other Extension attributes: The name of the attribute is reported without any value.

* 其他扩展属性:报告的属性名称没有任何值。

3.2.2.4 Coding of Event Names
3.2.2.4 事件名称的编码

Event names are composed of an optional package name, separated by a slash (/) from the name of the actual event (see Section 2.1.7). The wildcard character star ("*") can be use to refer to all packages. The event name can optionally be followed by an at sign (@) and the identifier of a connection (possibly using a wildcard) on which the event should be observed. Event names are used in the RequestedEvents, SignalRequests, ObservedEvents, DetectEvents, and EventStates parameters.

事件名称由可选程序包名称组成,由斜杠(/)与实际事件名称分隔(见第2.1.7节)。通配符星号(“*”)可用于引用所有包。事件名称后面可以可选地跟一个at符号(@)和一个连接的标识符(可能使用通配符),在该连接上应该观察事件。事件名称用于RequestedEvents、SignalRequests、ObservedEvents、DetectedEvents和EventState参数。

Events and signals may be qualified by parameters defined for the event/signal. Such parameters may be enclosed in double-quotes (in fact, some parameters MUST be enclosed in double-quotes due to syntactic restrictions) in which case they are UTF-8 encoded [20].

事件和信号可通过为事件/信号定义的参数进行限定。这些参数可以用双引号括起来(事实上,由于语法限制,一些参数必须用双引号括起来),在这种情况下,它们是UTF-8编码的[20]。

The parameter name "!" (exclamation point) is reserved for future use for both events and signals.

参数名称“!”(感叹号)保留供事件和信号将来使用。

Each signal has one of the following signal-types associated with it: On/Off (OO), Time-out (TO), or Brief (BR). (These signal types are specified in the package definitions, and are not present in the messages.) On/Off signals can be parameterized with a "+" to turn the signal on, or a "-" to turn the signal off. If an on/off signal is not parameterized, the signal is turned on. Both of the following will turn the vmwi signal (from the line package "L") on:

每个信号都有以下与之关联的信号类型之一:开/关(OO)、超时(TO)或短暂(BR)。(这些信号类型在包定义中指定,在消息中不存在。)可以用“+”参数化开/关信号,或用“-”参数化关信号。如果on/off信号未参数化,则该信号开启。以下两项都将打开vmwi信号(来自线路包“L”):

      L/vmwi(+)
      L/vmwi
        
      L/vmwi(+)
      L/vmwi
        

In addition to "!", "+" and "-", the signal parameter "to" is reserved as well. It can be used with Time-Out signals to override the default time-out value for the current request. A decimal value in milliseconds will be supplied. The individual signal and/or package definition SHOULD indicate if this parameter is supported for one or more TO signals in the package. If not indicated, TO signals in package version zero are assumed to not support it, whereas TO signals in package versions one or higher are assumed to support it. By default, a supplied time-out value MAY be rounded to the nearest non-zero value divisible by 1000, i.e., whole second. The individual signal and/or package definition may define other rounding rules. All new package and TO signal definitions are strongly encouraged to support the "to" signal parameter.

除了“!”、“+”和“-”之外,还保留了信号参数“to”。它可以与超时信号一起使用,以覆盖当前请求的默认超时值。将提供以毫秒为单位的十进制值。单个信号和/或包定义应指明包中的一个或多个TO信号是否支持此参数。如果未指明,则假定软件包版本0中的TO信号不支持它,而假定软件包版本1或更高版本中的TO信号支持它。默认情况下,提供的超时值可以四舍五入到可被1000整除的最接近的非零值,即整秒。单个信号和/或包定义可定义其他舍入规则。强烈建议所有新的软件包和TO信号定义支持“TO”信号参数。

The following example illustrates how the "to" parameter can be used to apply a signal for 6 seconds:

以下示例说明了如何使用“to”参数应用信号6秒:

      L/rg(to=6000)
      L/rg(to(6000))
        
      L/rg(to=6000)
      L/rg(to(6000))
        

The following are examples of event names:

以下是事件名称的示例:

      -----------------------------------------------------------
     | L/hu        |   on-hook transition, in the line package   |
     | F/0         |   digit 0 in the MF package                 |
     | hf          |   Hook-flash, assuming that the line package|
     |             |   is the default package for the endpoint.  |
     | G/rt@0A3F58 |   Ring back signal on connection "0A3F58"   |
      -----------------------------------------------------------
        
      -----------------------------------------------------------
     | L/hu        |   on-hook transition, in the line package   |
     | F/0         |   digit 0 in the MF package                 |
     | hf          |   Hook-flash, assuming that the line package|
     |             |   is the default package for the endpoint.  |
     | G/rt@0A3F58 |   Ring back signal on connection "0A3F58"   |
      -----------------------------------------------------------
        

In addition, the range and wildcard notation of events can be used, instead of individual names, in the RequestedEvents and DetectEvents parameters. The event code "all" is reserved and refers to all events or signals in a package. The star sign ("*") can be used to denote "all connections", and the dollar sign ("$") can be used to denote the "current" connection (see Section 2.1.7 for details).

此外,在RequestedEvents和DetectedEvents参数中,可以使用事件的范围和通配符符号,而不是单个名称。事件代码“all”是保留的,指的是包中的所有事件或信号。星号(*)可用于表示“所有连接”,美元符号($)可用于表示“当前”连接(详情见第2.1.7节)。

The following are examples of such notations:

以下是此类标记的示例:

      ---------------------------------------------------------
     | M/[0-9]   |   Digits 0 to 9 in the MF package.          |
     | hf        |   Hook-flash, assuming that the line package|
     |           |   is a default package for the endpoint.    |
     | [0-9*#A-D]|   All digits and letters in the DTMF        |
     |           |   packages (default for endpoint).          |
     | T/all     |   All events in the trunk package.          |
     | R/qa@*    |   The quality alert event on all            |
     |           |   connections.                              |
     | G/rt@$    |   Ringback on current connection.           |
      ---------------------------------------------------------
        
      ---------------------------------------------------------
     | M/[0-9]   |   Digits 0 to 9 in the MF package.          |
     | hf        |   Hook-flash, assuming that the line package|
     |           |   is a default package for the endpoint.    |
     | [0-9*#A-D]|   All digits and letters in the DTMF        |
     |           |   packages (default for endpoint).          |
     | T/all     |   All events in the trunk package.          |
     | R/qa@*    |   The quality alert event on all            |
     |           |   connections.                              |
     | G/rt@$    |   Ringback on current connection.           |
      ---------------------------------------------------------
        
3.2.2.5 ConnectionId
3.2.2.5 连接性

The Connection Identifier is encoded as a hexadecimal string, at most 32 characters in length. Connection Identifiers are compared as strings rather than numerical values.

连接标识符编码为十六进制字符串,长度最多为32个字符。连接标识符作为字符串而不是数值进行比较。

3.2.2.6 ConnectionMode
3.2.2.6 连接模式

The connection mode describes the mode of operation of the connection. The possible values are:

连接模式描述连接的操作模式。可能的值为:

      --------------------------------------------------------
     |    Mode     |               Meaning                    |
     |-------------|------------------------------------------|
     | M: sendonly |  The gateway should only send packets    |
     | M: recvonly |  The gateway should only receive packets |
     | M: sendrecv |  The gateway should send                 |
     |             |  and receive packets                     |
     | M: confrnce |  The gateway should place                |
     |             |  the connection in conference mode       |
     | M: inactive |  The gateway should neither              |
     |             |  send nor receive packets                |
     | M: loopback |  The gateway should place                |
     |             |  the circuit in loopback mode.           |
     | M: conttest |  The gateway should place                |
     |             |  the circuit in test mode.               |
     | M: netwloop |  The gateway should place                |
     |             |  the connection in network loopback mode.|
     | M: netwtest |  The gateway should place the connection |
     |             |  in network continuity test mode.        |
      --------------------------------------------------------
        
      --------------------------------------------------------
     |    Mode     |               Meaning                    |
     |-------------|------------------------------------------|
     | M: sendonly |  The gateway should only send packets    |
     | M: recvonly |  The gateway should only receive packets |
     | M: sendrecv |  The gateway should send                 |
     |             |  and receive packets                     |
     | M: confrnce |  The gateway should place                |
     |             |  the connection in conference mode       |
     | M: inactive |  The gateway should neither              |
     |             |  send nor receive packets                |
     | M: loopback |  The gateway should place                |
     |             |  the circuit in loopback mode.           |
     | M: conttest |  The gateway should place                |
     |             |  the circuit in test mode.               |
     | M: netwloop |  The gateway should place                |
     |             |  the connection in network loopback mode.|
     | M: netwtest |  The gateway should place the connection |
     |             |  in network continuity test mode.        |
      --------------------------------------------------------
        

Note that irrespective of the connection mode, signals applied to the connection will still result in packets being sent (see Section 2.3.1).

请注意,无论连接模式如何,应用于连接的信号仍将导致发送数据包(见第2.3.1节)。

The set of connection modes can be extended through packages.

连接模式集可以通过包进行扩展。

3.2.2.7 ConnectionParameters
3.2.2.7 连接参数

Connection parameters are encoded as a string of type and value pairs, where the type is either a two-letter identifier of the parameter or an extension type, and the value a decimal integer. Types are separated from value by an '=' sign. Parameters are separated from each other by a comma. Connection parameter values can contain up to nine digits. If the maximum value is reached, the counter is no longer updated, i.e., it doesn't wrap or overflow.

连接参数编码为类型和值对的字符串,其中类型为参数的两个字母标识符或扩展类型,值为十进制整数。类型与值之间用“=”符号分隔。参数之间用逗号分隔。连接参数值最多可以包含九位数字。如果达到最大值,计数器将不再更新,即不会换行或溢出。

The connection parameter types are specified in the following table:

下表中指定了连接参数类型:

    -----------------------------------------------------------------
   | Connection parameter| Code |  Connection parameter              |
   | name                |      |  value                             |
   |---------------------|------|------------------------------------|
   | Packets sent        |  PS  |  The number of packets that        |
   |                     |      |  were sent on the connection.      |
   | Octets sent         |  OS  |  The number of octets that         |
   |                     |      |  were sent on the connection.      |
   | Packets received    |  PR  |  The number of packets that        |
   |                     |      |  were received on the connection.  |
   | Octets received     |  OR  |  The number of octets that         |
   |                     |      |  were received on the connection.  |
   | Packets lost        |  PL  |  The number of packets that        |
   |                     |      |  were lost on the connection       |
   |                     |      |  as deduced from gaps in the       |
   |                     |      |  RTP sequence number.              |
   | Jitter              |  JI  |  The average inter-packet arrival  |
   |                     |      |  jitter, in milliseconds,          |
   |                     |      |  expressed as an integer number.   |
   | Latency             |  LA  |  Average latency, in milliseconds, |
   |                     |      |  expressed as an integer number.   |
    -----------------------------------------------------------------
        
    -----------------------------------------------------------------
   | Connection parameter| Code |  Connection parameter              |
   | name                |      |  value                             |
   |---------------------|------|------------------------------------|
   | Packets sent        |  PS  |  The number of packets that        |
   |                     |      |  were sent on the connection.      |
   | Octets sent         |  OS  |  The number of octets that         |
   |                     |      |  were sent on the connection.      |
   | Packets received    |  PR  |  The number of packets that        |
   |                     |      |  were received on the connection.  |
   | Octets received     |  OR  |  The number of octets that         |
   |                     |      |  were received on the connection.  |
   | Packets lost        |  PL  |  The number of packets that        |
   |                     |      |  were lost on the connection       |
   |                     |      |  as deduced from gaps in the       |
   |                     |      |  RTP sequence number.              |
   | Jitter              |  JI  |  The average inter-packet arrival  |
   |                     |      |  jitter, in milliseconds,          |
   |                     |      |  expressed as an integer number.   |
   | Latency             |  LA  |  Average latency, in milliseconds, |
   |                     |      |  expressed as an integer number.   |
    -----------------------------------------------------------------
        

The set of connection parameters can be extended in two different ways:

可以通过两种不同的方式扩展连接参数集:

* Package Extension Parameters (preferred)

* 包扩展参数(首选)

* Vendor Extension Parameters

* 供应商扩展参数

Package Extension Connection Parameters are defined in packages which provides the following benefits:

包扩展连接参数在包中定义,可提供以下好处:

* A registration mechanism (IANA) for the package name.

* 包名称的注册机制(IANA)。

* A separate name space for the parameters.

* 参数的单独名称空间。

* A convenient grouping of the extensions.

* 一个方便的扩展分组。

* A simple way to determine support for them through auditing.

* 一种通过审核确定对它们的支持的简单方法。

The package extension mechanism is the preferred extension method.

包扩展机制是首选的扩展方法。

Vendor extension parameters names are composed of the string "X-" followed by a two or more letters extension parameter name.

供应商扩展参数名称由字符串“X-”和两个或多个字母的扩展参数名称组成。

Call agents that receive unrecognized package or vendor connection parameter extensions SHALL silently ignore these parameters.

接收无法识别的包或供应商连接参数扩展的呼叫代理应默默忽略这些参数。

An example of connection parameter encoding is:

连接参数编码的一个示例是:

      P: PS=1245, OS=62345, PR=0, OR=0, PL=0, JI=0, LA=48
        
      P: PS=1245, OS=62345, PR=0, OR=0, PL=0, JI=0, LA=48
        
3.2.2.8 DetectEvents
3.2.2.8 探测事件

The DetectEvents parameter is encoded as a comma separated list of events (see Section 3.2.2.4), such as for example:

DetecteEvents参数编码为逗号分隔的事件列表(见第3.2.2.4节),例如:

      T: L/hu,L/hd,L/hf,D/[0-9#*]
        
      T: L/hu,L/hd,L/hf,D/[0-9#*]
        

It should be noted, that no actions can be associated with the events, however event parameters may be provided.

应该注意的是,任何操作都不能与事件相关联,但可以提供事件参数。

3.2.2.9 EventStates
3.2.2.9 事件状态

The EventStates parameter is encoded as a comma separated list of events (see Section 3.2.2.4), such as for example:

EventState参数编码为逗号分隔的事件列表(见第3.2.2.4节),例如:

ES: L/hu

ES:L/hu

It should be noted, that no actions can be associated with the events, however event parameters may be provided.

应该注意的是,任何操作都不能与事件相关联,但可以提供事件参数。

3.2.2.10 LocalConnectionOptions
3.2.2.10 本地连接选项

The local connection options describe the operational parameters that the Call Agent provides to the gateway in connection handling commands. These include:

本地连接选项描述呼叫代理在连接处理命令中向网关提供的操作参数。这些措施包括:

* The allowed codec(s), encoded as the keyword "a", followed by a colon and a character string. If the Call Agent specifies a list of values, these values will be separated by a semicolon. For RTP, audio codecs SHALL be specified by using encoding names defined in the RTP AV Profile [4] or its replacement, or by encoding names registered with the IANA. Non-audio media registered as a MIME type MUST use the "<MIME type>/<MIME subtype>" form, as in "image/t38".

* 允许的编解码器,编码为关键字“a”,后跟冒号和字符串。如果调用代理指定值列表,则这些值将用分号分隔。对于RTP,音频编解码器应通过使用RTP AV配置文件[4]中定义的编码名称或其替代品,或通过向IANA注册的编码名称来指定。注册为MIME类型的非音频媒体必须使用“<MIME类型>/<MIME子类型>”格式,如“image/t38”中所示。

* The packetization period in milliseconds, encoded as the keyword "p", followed by a colon and a decimal number. If the Call Agent specifies a range of values, the range will be specified as two decimal numbers separated by a hyphen (as specified for the "ptime" parameter for SDP).

* 打包周期(以毫秒为单位),编码为关键字“p”,后跟冒号和十进制数。如果调用代理指定值的范围,则该范围将指定为两个由连字符分隔的十进制数字(如SDP的“ptime”参数所指定的)。

* The bandwidth in kilobits per second (1000 bits per second), encoded as the keyword "b", followed by a colon and a decimal number. If the Call Agent specifies a range of values, the range will be specified as two decimal numbers separated by a hyphen.

* 以千比特每秒(1000比特每秒)为单位的带宽,编码为关键字“b”,后跟冒号和十进制数。如果调用代理指定一个值范围,则该范围将指定为两个由连字符分隔的十进制数字。

* The type of service parameter, encoded as the keyword "t", followed by a colon and the value encoded as two hexadecimal digits. When the connection is transmitted over an IP network, the parameters encode the 8-bit type of service value parameter of the IP header (a.k.a. DiffServ field). The left-most "bit" in the parameter corresponds to the least significant bit in the IP header.

* 服务参数的类型,编码为关键字“t”,后跟冒号,值编码为两个十六进制数字。当通过IP网络传输连接时,参数对IP报头的8位服务值参数类型进行编码(也称为DiffServ字段)。参数中最左边的“位”对应于IP标头中的最低有效位。

* The echo cancellation parameter, encoded as the keyword "e", followed by a colon and the value "on" or "off".

* 回声消除参数,编码为关键字“e”,后跟冒号和值“开”或“关”。

* The gain control parameter, encoded as the keyword "gc", followed by a colon and a value which can be either the keyword "auto" or a decimal number (positive or negative) representing the number of decibels of gain.

* 增益控制参数,编码为关键字“gc”,后跟一个冒号和一个值,该值可以是关键字“auto”或表示增益分贝数的十进制数(正或负)。

* The silence suppression parameter, encoded as the keyword "s", followed by a colon and the value "on" or "off".

* 静音抑制参数,编码为关键字“s”,后跟冒号和值“开”或“关”。

* The resource reservation parameter, encoded as the keyword "r", followed by a colon and the value "g" (guaranteed service), "cl" (controlled load) or "be" (best effort).

* 资源保留参数,编码为关键字“r”,后跟冒号和值“g”(保证服务)、“cl”(控制负载)或“be”(尽力)。

* The encryption key, encoded as the keyword "k" followed by a colon and a key specification, as defined for the parameter "K" in SDP (RFC 2327).

* 加密密钥,编码为关键字“k”,后跟冒号和密钥规范,如SDP(RFC 2327)中为参数“k”定义的。

* The type of network, encoded as the keyword "nt" followed by a colon and the type of network encoded as the keyword "IN" (internet), "ATM", "LOCAL" (for a local connection), or possibly another type of network registered with the IANA as per SDP (RFC 2327).

* 网络类型,编码为关键字“nt”,后跟冒号,网络类型编码为关键字“IN”(互联网)、“ATM”、“LOCAL”(用于本地连接),或者可能是根据SDP(RFC 2327)向IANA注册的另一种网络类型。

* The resource reservation parameter, encoded as the keyword "r", followed by a colon and the value "g" (guaranteed service), "cl" (controlled load) or "be" (best effort).

* 资源保留参数,编码为关键字“r”,后跟冒号和值“g”(保证服务)、“cl”(控制负载)或“be”(尽力)。

The encoding of the first three attributes, when they are present, will be compatible with the SDP and RTP profiles. Note that each of the attributes is optional. When several attributes are present, they are separated by a comma.

前三个属性存在时的编码将与SDP和RTP配置文件兼容。请注意,每个属性都是可选的。当存在多个属性时,它们用逗号分隔。

Examples of local connection options are:

本地连接选项的示例包括:

      L: p:10, a:PCMU
      L: p:10, a:G726-32
      L: p:10-20, b:64
      L: b:32-64, e:off
        
      L: p:10, a:PCMU
      L: p:10, a:G726-32
      L: p:10-20, b:64
      L: b:32-64, e:off
        

The set of Local Connection Options attributes can be extended in three different ways:

可以通过三种不同的方式扩展本地连接选项属性集:

* Package Extension attributes (preferred)

* 包扩展属性(首选)

* Vendor Extension attributes

* 供应商扩展属性

* Other Extension attributes

* 其他扩展属性

Package Extension Local Connection Options attributes are defined in packages which provides the following benefits:

包扩展本地连接选项属性在包中定义,可提供以下好处:

* A registration mechanism (IANA) for the package name.

* 包名称的注册机制(IANA)。

* A separate name space for the attributes.

* 属性的单独名称空间。

* A convenient grouping of the extensions.

* 一个方便的扩展分组。

* A simple way to determine support for them through auditing.

* 一种通过审核确定对它们的支持的简单方法。

The package extension mechanism is the preferred extension method.

包扩展机制是首选的扩展方法。

Vendor extension attributes are composed of an attribute name, and possibly followed by a colon and an attribute value. The attribute name MUST start with the two characters "x+", for a mandatory extension, or "x-", for a non-mandatory extension. If a gateway receives a mandatory extension attribute that it does not recognize, it MUST reject the command (error code 525 - unknown extension in LocalConnectionOptions, is RECOMMENDED).

供应商扩展属性由属性名称组成,后面可能跟有冒号和属性值。属性名称必须以两个字符“x+”开头(对于强制扩展名),或以“x-”开头(对于非强制扩展名)。如果网关接收到它无法识别的强制扩展属性,它必须拒绝该命令(错误代码525-建议使用LocalConnectionOptions中的未知扩展)。

Note that vendor extension attributes use an unmanaged name space, which implies a potential for name clashing. Vendors are consequently encouraged to include some vendor specific string, e.g., vendor name, in their vendor extensions.

请注意,供应商扩展属性使用非托管名称空间,这意味着可能存在名称冲突。因此,鼓励供应商在其供应商扩展中包含一些特定于供应商的字符串,例如供应商名称。

Finally, for backwards compatibility with some existing implementations, MGCP allows for other extension attributes as well (see grammar in Appendix A). Note however, that these attribute extensions do not provide the package extension attribute benefits. Use of this mechanism for new extensions is discouraged.

最后,为了与一些现有实现向后兼容,MGCP还允许其他扩展属性(参见附录A中的语法)。但是请注意,这些属性扩展不提供包扩展属性的好处。不鼓励将此机制用于新的扩展。

3.2.2.11 MaxMGCPDatagram
3.2.2.11 MaxMGCPDatagram

The MaxMGCPDatagram can only be used for auditing, i.e., it is a valid RequestedInfo code and can be provided as a response parameter.

MaxMGCPDatagram只能用于审核,即它是有效的RequestedInfo代码,可以作为响应参数提供。

In responses, the MaxMGCPDatagram value is encoded as a string of up to nine decimal digits -- leading zeroes are not permitted. The following example illustrates the use of this parameter:

在响应中,MaxMGCPDatagram值被编码为最多九位十进制数字的字符串——不允许使用前导零。以下示例说明了此参数的使用:

MD: 8100

MD:8100

3.2.2.12 ObservedEvents
3.2.2.12 观察到的事件

The observed events parameter provides the list of events that have been observed. The event codes are the same as those used in the NotificationRequest. Events that have been accumulated according to the digit map may be grouped in a single string, however such practice is discouraged; they SHOULD be reported as lists of isolated events if other events were detected during the digit accumulation. Examples of observed events are:

“观察到的事件”参数提供已观察到的事件列表。事件代码与NotificationRequest中使用的代码相同。根据数字映射累积的事件可分组为单个字符串,但不鼓励这种做法;如果在数字累积过程中检测到其他事件,则应将其报告为孤立事件列表。观察到的事件包括:

      O: L/hu
      O: D/8295555T
      O: D/8,D/2,D/9,D/5,D/5,L/hf,D/5,D/5,D/T
      O: L/hf, L/hf, L/hu
        
      O: L/hu
      O: D/8295555T
      O: D/8,D/2,D/9,D/5,D/5,L/hf,D/5,D/5,D/T
      O: L/hf, L/hf, L/hu
        
3.2.2.13 PackageList
3.2.2.13 包装商

The Package List can only be used for auditing, i.e., it is a valid RequestedInfo code and can be provided as a response parameter.

包列表只能用于审核,即它是有效的RequestedInfo代码,可以作为响应参数提供。

The response parameter will consist of a comma separated list of packages supported. The first package returned in the list is the default package. Each package in the list consists of the package name followed by a colon, and the highest version number of the package supported.

response参数将由受支持的包的逗号分隔列表组成。列表中返回的第一个包是默认包。列表中的每个包都由包名、冒号和支持的包的最高版本号组成。

An example of a package list is:

包列表的一个示例是:

     PL: L:1,G:1,D:0,FOO:2,T:1
        
     PL: L:1,G:1,D:0,FOO:2,T:1
        

Note that for backwards compatibility, support for this parameter is OPTIONAL.

请注意,为了向后兼容,对该参数的支持是可选的。

3.2.2.14 QuarantineHandling
3.2.2.14 检疫处理

The quarantine handling parameter contains a list of comma separated keywords:

隔离处理参数包含逗号分隔的关键字列表:

* The keyword "process" or "discard" to indicate the treatment of quarantined and observed events. If neither "process" or "discard" is present, "process" is assumed.

* 关键字“处理”或“丢弃”,表示隔离和观察事件的处理。如果“过程”或“放弃”均不存在,则假定为“过程”。

* The keyword "step" or "loop" to indicate whether at most one notification per NotificationRequest is allowed, or whether multiple notifications per NotificationRequest are allowed. If neither "step" nor "loop" is present, "step" is assumed.

* 关键字“step”或“loop”指示每个NotificationRequest是否最多允许一个通知,或者每个NotificationRequest是否允许多个通知。如果既不存在“步骤”也不存在“循环”,则假定为“步骤”。

The following values are valid examples:

以下值是有效的示例:

Q: loop Q: process Q: loop,discard

Q:循环Q:过程Q:循环,放弃

3.2.2.15 ReasonCode
3.2.2.15 推理码

Reason codes are three-digit numeric values. The reason code is optionally followed by a white space and commentary, e.g.:

原因代码是三位数字值。原因码后面可以选择空白和注释,例如:

E: 900 Endpoint malfunctioning

E:900端点故障

A list of reason codes can be found in Section 2.5.

原因代码列表见第2.5节。

The set of reason codes can be extended through packages.

原因代码集可以通过包进行扩展。

3.2.2.16 RequestedEvents
3.2.2.16 请求事件

The RequestedEvents parameter provides the list of events that are requested. The event codes are described in Section 3.2.2.4.

RequestedEvents参数提供请求的事件列表。第3.2.2.4节描述了事件代码。

Each event can be qualified by a requested action, or by a list of actions. The actions, when specified, are encoded as a list of keywords, enclosed in parenthesis and separated by commas. The codes for the various actions are:

可以通过请求的操作或操作列表来限定每个事件。指定操作时,将其编码为关键字列表,用括号括起,并用逗号分隔。各种操作的代码为:

                -------------------------------------
               |          Action              | Code |
               |------------------------------|------|
               | Notify immediately           |  N   |
               | Accumulate                   |  A   |
               | Treat according to digit map |  D   |
               | Swap                         |  S   |
               | Ignore                       |  I   |
               | Keep Signal(s) active        |  K   |
               | Embedded Notification Request|  E   |
                -------------------------------------
        
                -------------------------------------
               |          Action              | Code |
               |------------------------------|------|
               | Notify immediately           |  N   |
               | Accumulate                   |  A   |
               | Treat according to digit map |  D   |
               | Swap                         |  S   |
               | Ignore                       |  I   |
               | Keep Signal(s) active        |  K   |
               | Embedded Notification Request|  E   |
                -------------------------------------
        

When no action is specified, the default action is to notify the event. This means that, for example, ft and ft(N) are equivalent. Events that are not listed are ignored (unless they are persistent).

未指定任何操作时,默认操作是通知事件。这意味着,例如,ft和ft(N)是等效的。未列出的事件将被忽略(除非它们是持久的)。

The digit-map action SHOULD only be specified for the digits, letters and interdigit timers in packages that define the encoding of digits, letters, and timers (including extension digit map letters).

应仅为定义数字、字母和计时器(包括扩展数字映射字母)编码的包中的数字、字母和叉指计时器指定数字映射操作。

The requested events list is encoded on a single line, with event/action groups separated by commas. Examples of RequestedEvents encodings are:

请求的事件列表编码在一行上,事件/操作组用逗号分隔。请求事件编码的示例包括:

      R: L/hu(N), L/hf(S,N)
      R: L/hu(N), D/[0-9#T](D)
        
      R: L/hu(N), L/hf(S,N)
      R: L/hu(N), D/[0-9#T](D)
        

In the case of the "Embedded Notification Request" action, the embedded notification request parameters are encoded as a list of up to three parameter groups separated by commas. Each group starts by a one letter identifier, followed by a list of parameters enclosed between parentheses. The first optional parameter group, identified by the letter "R", is the value of the embedded RequestedEvents parameter. The second optional group, identified by the letter "S", is the embedded value of the SignalRequests parameter. The third

在“嵌入式通知请求”操作的情况下,嵌入式通知请求参数编码为最多三个参数组的列表,由逗号分隔。每个组都以一个单字母标识符开头,后面是括号中包含的参数列表。第一个可选参数组(由字母“R”标识)是嵌入的RequestedEvents参数的值。第二个可选组由字母“S”标识,是SignalRequests参数的嵌入值。第三

optional group, identified by the letter "D", is the embedded value of the DigitMap. (Note that some existing implementations and profiles may encode these three components in a different order. Implementers are encouraged to accept such encodings, but they SHOULD NOT generate them.)

由字母“D”标识的可选组是DigitMap的嵌入值。(请注意,一些现有的实现和概要文件可能会以不同的顺序对这三个组件进行编码。我们鼓励实现者接受这种编码,但不应生成它们。)

If the RequestedEvents parameter is not present, the parameter will be set to a null value. If the SignalRequests parameter is not present, the parameter will be set to a null value. If the DigitMap is absent, the current value MUST be used. The following are valid examples of embedded requests:

如果RequestedEvents参数不存在,则该参数将设置为空值。如果SignalRequests参数不存在,则该参数将设置为空值。如果缺少DigitMap,则必须使用当前值。以下是嵌入式请求的有效示例:

      R: L/hd(E(R(D/[0-9#T](D),L/hu(N)),S(L/dl),D([0-9].[#T])))
      R: L/hd(E(R(D/[0-9#T](D),L/hu(N)),S(L/dl)))
        
      R: L/hd(E(R(D/[0-9#T](D),L/hu(N)),S(L/dl),D([0-9].[#T])))
      R: L/hd(E(R(D/[0-9#T](D),L/hu(N)),S(L/dl)))
        

Some events can be qualified by additional event parameters. Such event parameters will be separated by commas and enclosed within parentheses. Event parameters may be enclosed in double-quotes (in fact, some event parameters MUST be enclosed in double-quotes due to syntactic restrictions), in which case the quoted string itself is UTF-8 encoded. Please refer to Section 3.2.2.4 for additional detail on event parameters.

某些事件可以通过其他事件参数进行限定。此类事件参数将用逗号分隔,并用括号括起来。事件参数可以用双引号括起来(事实上,由于语法限制,某些事件参数必须用双引号括起来),在这种情况下,带引号的字符串本身是UTF-8编码的。有关事件参数的更多详细信息,请参阅第3.2.2.4节。

The following example shows the foobar event with an event parameter "epar":

以下示例显示具有事件参数“epar”的foobar事件:

      R: X/foobar(N)(epar=2)
        
      R: X/foobar(N)(epar=2)
        

Notice that the Action was included even though it is the default Notify action - this is required by the grammar.

请注意,尽管该操作是默认的Notify操作,但仍包含该操作-这是语法所必需的。

3.2.2.17 RequestedInfo
3.2.2.17 请求信息

The RequestedInfo parameter contains a comma separated list of parameter codes, as defined in Section 3.2.2. For example, if one wants to audit the value of the NotifiedEntity, RequestIdentifier, RequestedEvents, SignalRequests, DigitMap, QuarantineHandling and DetectEvents parameters, the value of the RequestedInfo parameter will be:

RequestedInfo参数包含以逗号分隔的参数代码列表,如第3.2.2节所定义。例如,如果要审核NotifiedIdentity、RequestIdentifier、RequestedEvents、SignalRequests、DigitMap、QuarantineHandling和DetecteEvents参数的值,RequestedInfo参数的值将为:

F: N,X,R,S,D,Q,T

F:N,X,R,S,D,Q,T

Note that extension parameters in general can be audited as well. The individual extension will define the auditing operation.

请注意,扩展参数通常也可以进行审核。单个扩展将定义审核操作。

The capabilities request, in the AuditEndPoint command, is encoded by the parameter code "A", as in:

AuditEndPoint命令中的能力请求由参数代码“A”编码,如中所示:

F: A

F:A

3.2.2.18 RequestIdentifier
3.2.2.18 请求标识符

The request identifier correlates a Notify command with the NotificationRequest that triggered it. A RequestIdentifier is a hexadecimal string, at most 32 characters in length. RequestIdentifiers are compared as strings rather than numerical value. The string "0" is reserved for reporting of persistent events in the case where a NotificationRequest has not yet been received after restart.

请求标识符将Notify命令与触发它的NotificationRequest关联起来。RequestIdentifier是十六进制字符串,长度最多为32个字符。RequestIdentifier作为字符串而不是数值进行比较。字符串“0”保留用于在重新启动后尚未收到NotificationRequest的情况下报告持久性事件。

3.2.2.19 ResponseAck
3.2.2.19 应答器

The response acknowledgement parameter is used to manage the "at-most-once" facility described in Section 3.5. It contains a comma separated list of "confirmed transaction-id ranges".

响应确认参数用于管理第3.5节所述的“最多一次”设施。它包含一个逗号分隔的“已确认事务id范围”列表。

Each "confirmed transaction-id range" is composed of either one decimal number, when the range includes exactly one transaction, or two decimal numbers separated by a single hyphen, describing the lower and higher transaction identifiers included in the range.

每个“已确认的交易id范围”由一个十进制数(当范围仅包括一个交易时)或两个十进制数(由一个连字符分隔)组成,用于描述范围中包含的较低和较高的交易标识符。

An example of a response acknowledgement is:

响应确认的一个示例是:

K: 6234-6255, 6257, 19030-19044

K:6234-6255625719030-19044

3.2.2.20 RestartMethod
3.2.2.20 重新启动方法

The RestartMethod parameter is encoded as one of the keywords "graceful", "forced", "restart", "disconnected" or "cancel-graceful" as for example:

RestartMethod参数编码为关键字“优雅”、“强制”、“重新启动”、“断开连接”或“取消优雅”之一,例如:

RM: restart

RM:重新启动

The set of restart methods can be extended through packages.

重启方法集可以通过包进行扩展。

3.2.2.21 SignalRequests
3.2.2.21 信号请求

The SignalRequests parameter provides the name of the signal(s) that have been requested. Each signal is identified by a name, as described in Section 3.2.2.4.

SignalRequests参数提供已请求的信号的名称。每个信号由一个名称标识,如第3.2.2.4节所述。

Some signals, such as for example announcement or ADSI display, can be qualified by additional parameters, e.g.:

某些信号,例如公告或ADSI显示,可以通过附加参数进行限定,例如:

* the name and parameters of the announcement,

* 公告的名称和参数,

* the string that should be displayed.

* 应显示的字符串。

Such parameters will be separated by commas and enclosed within parenthesis, as in:

这些参数将用逗号分隔,并用括号括起来,如:

      S: L/adsi("123456 Francois Gerard")
      S: A/ann(http://ann.example.net/no-such-number.au, 1234567)
        
      S: L/adsi("123456 Francois Gerard")
      S: A/ann(http://ann.example.net/no-such-number.au, 1234567)
        

When a quoted-string is provided, the string itself is UTF-8 encoded [20].

当提供带引号的字符串时,字符串本身是UTF-8编码的[20]。

When several signals are requested, their codes are separated by a comma, as in:

当请求多个信号时,它们的代码用逗号分隔,如:

      S: L/adsi("123456 Your friend"), L/rg
        
      S: L/adsi("123456 Your friend"), L/rg
        

Please refer to Section 3.2.2.4 for additional detail on signal parameters.

有关信号参数的更多详细信息,请参考第3.2.2.4节。

3.3 Format of response headers
3.3 响应头的格式

The response header is composed of a response line, optionally followed by headers that encode the response parameters.

响应头由响应行组成,可选地后跟对响应参数进行编码的头。

An example of a response header could be:

响应标头的示例可以是:

200 1203 OK

2001203好

The response line starts with the response code, which is a three digit numeric value. The code is followed by a white space, and the transaction identifier. Response codes defined in packages (8xx) are followed by white space, a slash ("/") and the package name. All response codes may furthermore be followed by optional commentary preceded by a white space.

响应行以响应代码开头,它是一个三位数的数值。代码后面是一个空格和事务标识符。软件包(8xx)中定义的响应代码后跟空格、斜杠(“/”)和软件包名称。此外,所有响应代码后面可能会有可选注释,注释前会有空白。

The following table describes the parameters whose presence is mandatory or optional in a response header, as a function of the command that triggered the response. The letter M stands for mandatory, O for optional and F for forbidden. Unless otherwise specified, a parameter MUST NOT be present more than once. Note that the table only reflects the default for responses that have not defined any other behavior. If a response is received with a parameter that is either not understood or marked as forbidden, the offending parameter(s) MUST simply be ignored.

下表描述了在响应头中作为触发响应的命令的函数出现的强制或可选参数。字母M代表强制,O代表可选,F代表禁止。除非另有规定,否则参数不能出现多次。请注意,该表仅反映未定义任何其他行为的响应的默认值。如果接收到的响应中有一个参数未被理解或标记为禁止,则必须忽略有问题的参数。

    ------------------------------------------------------------------
   | Parameter name      | EP | CR | MD | DL | RQ | NT | AU | AU | RS |
   |                     | CF | CX | CX | CX | NT | FY | EP | CX | IP |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | BearerInformation   |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | CallId              |  F |  F |  F |  F |  F |  F |  F |  O |  F |
   | Capabilities        |  F |  F |  F |  F |  F |  F |  O*|  F |  F |
   | ConnectionId        |  F |  O*|  F |  F |  F |  F |  O*|  F |  F |
   | ConnectionMode      |  F |  F |  F |  F |  F |  F |  F |  O |  F |
   | Connection-         |  F |  F |  F |  O*|  F |  F |  F |  O |  F |
   |   Parameters        |    |    |    |    |    |    |    |    |    |
   | DetectEvents        |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | DigitMap            |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | EventStates         |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | LocalConnection-    |  F |  F |  F |  F |  F |  F |  F |  O |  F |
   |            Options  |    |    |    |    |    |    |    |    |    |
   | MaxMGCPDatagram     |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | NotifiedEntity      |  F |  F |  F |  F |  F |  F |  O |  O |  O |
   | ObservedEvents      |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | QuarantineHandling  |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | PackageList         |  O*|  O*|  O*|  O*|  O*|  O*|  O |  O*|  O*|
   | ReasonCode          |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RequestIdentifier   |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | ResponseAck         |  O*|  O*|  O*|  O*|  O*|  O*|  O*|  O*|  O*|
   | RestartDelay        |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RestartMethod       |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RequestedEvents     |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RequestedInfo       |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | SecondConnectionId  |  F |  O |  F |  F |  F |  F |  F |  F |  F |
   | SecondEndpointId    |  F |  O |  F |  F |  F |  F |  F |  F |  F |
   | SignalRequests      |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | SpecificEndpointId  |  F |  O |  F |  F |  F |  F |  O*|  F |  F |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | LocalConnection-    |  F |  O*|  O |  F |  F |  F |  F |  O*|  F |
   |         Descriptor  |    |    |    |    |    |    |    |    |    |
   | RemoteConnection-   |  F |  F |  F |  F |  F |  F |  F |  O*|  F |
   |         Descriptor  |    |    |    |    |    |    |    |    |    |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | Parameter name      | EP | CR | MD | DL | RQ | NT | AU | AU | RS |
   |                     | CF | CX | CX | CX | NT | FY | EP | CX | IP |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | BearerInformation   |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | CallId              |  F |  F |  F |  F |  F |  F |  F |  O |  F |
   | Capabilities        |  F |  F |  F |  F |  F |  F |  O*|  F |  F |
   | ConnectionId        |  F |  O*|  F |  F |  F |  F |  O*|  F |  F |
   | ConnectionMode      |  F |  F |  F |  F |  F |  F |  F |  O |  F |
   | Connection-         |  F |  F |  F |  O*|  F |  F |  F |  O |  F |
   |   Parameters        |    |    |    |    |    |    |    |    |    |
   | DetectEvents        |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | DigitMap            |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | EventStates         |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | LocalConnection-    |  F |  F |  F |  F |  F |  F |  F |  O |  F |
   |            Options  |    |    |    |    |    |    |    |    |    |
   | MaxMGCPDatagram     |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | NotifiedEntity      |  F |  F |  F |  F |  F |  F |  O |  O |  O |
   | ObservedEvents      |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | QuarantineHandling  |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | PackageList         |  O*|  O*|  O*|  O*|  O*|  O*|  O |  O*|  O*|
   | ReasonCode          |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RequestIdentifier   |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | ResponseAck         |  O*|  O*|  O*|  O*|  O*|  O*|  O*|  O*|  O*|
   | RestartDelay        |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RestartMethod       |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RequestedEvents     |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | RequestedInfo       |  F |  F |  F |  F |  F |  F |  F |  F |  F |
   | SecondConnectionId  |  F |  O |  F |  F |  F |  F |  F |  F |  F |
   | SecondEndpointId    |  F |  O |  F |  F |  F |  F |  F |  F |  F |
   | SignalRequests      |  F |  F |  F |  F |  F |  F |  O |  F |  F |
   | SpecificEndpointId  |  F |  O |  F |  F |  F |  F |  O*|  F |  F |
   |---------------------|----|----|----|----|----|----|----|----|----|
   | LocalConnection-    |  F |  O*|  O |  F |  F |  F |  F |  O*|  F |
   |         Descriptor  |    |    |    |    |    |    |    |    |    |
   | RemoteConnection-   |  F |  F |  F |  F |  F |  F |  F |  O*|  F |
   |         Descriptor  |    |    |    |    |    |    |    |    |    |
    ------------------------------------------------------------------
        

Notes (*):

附注(*):

* The PackageList parameter is only allowed with return code 518 (unsupported package), except for AuditEndpoint, where it may also be returned if audited.

* PackageList参数仅允许返回代码为518(不支持的包),AuditEndpoint除外,在AuditEndpoint中,如果已审核,也可以返回该参数。

* The ResponseAck parameter MUST NOT be used with any other responses than a final response issued after a provisional response for the transaction in question. In that case, the presence of the ResponseAck parameter SHOULD trigger a Response Acknowledgement - any ResponseAck values provided will be ignored.

* ResponseAK参数不得与任何其他响应一起使用,除非是在相关事务的临时响应之后发出的最终响应。在这种情况下,responseak参数的存在应该触发响应确认-提供的任何responseak值都将被忽略。

* In the case of a CreateConnection message, the response line is followed by a Connection-Id parameter and a LocalConnectionDescriptor. It may also be followed a Specific-Endpoint-Id parameter, if the creation request was sent to a wildcarded Endpoint-Id. The connection-Id and LocalConnectionDescriptor parameter are marked as optional in the Table. In fact, they are mandatory with all positive responses, when a connection was created, and forbidden when the response is negative, and no connection was created.

* 对于CreateConnection消息,响应行后面跟着连接Id参数和LocalConnectionDescriptor。如果创建请求被发送到通配符的Endpoint-Id,则还可能在特定的Endpoint Id参数之后。连接Id和LocalConnectionDescriptor参数在表中标记为可选。事实上,在创建连接时,所有积极响应都必须使用这些选项,而在响应为消极且未创建连接时,则禁止使用这些选项。

* A LocalConnectionDescriptor MUST be transmitted with a positive response (code 200) to a CreateConnection. It MUST also be transmitted in response to a ModifyConnection command, if the modification resulted in a modification of the session parameters. The LocalConnectionDescriptor is encoded as a "session description", as defined in section 3.4. It is separated from the response header by an empty line.

* 必须向CreateConnection发送带有肯定响应(代码200)的LocalConnectionDescriptor。如果修改导致会话参数的修改,则还必须传输它以响应ModifyConnection命令。LocalConnectionDescriptor编码为“会话描述”,如第3.4节所定义。它与响应头之间用空行分隔。

* Connection-Parameters are only valid in a response to a non-wildcarded DeleteConnection command sent by the Call Agent.

* 连接参数仅在对调用代理发送的非通配符DeleteConnection命令的响应中有效。

* Multiple ConnectionId, SpecificEndpointId, and Capabilities parameters may be present in the response to an AuditEndpoint command.

* 对AuditEndpoint命令的响应中可能存在多个ConnectionId、SpecificEndpointId和Capabilities参数。

* When several session descriptors are encoded in the same response, they are encoded one after each other, separated by an empty line. This is the case for example when the response to an audit connection request carries both a local session description and a remote session description, as in:

* 当在同一响应中对多个会话描述符进行编码时,它们将依次编码,并用空行分隔。例如,当对审核连接请求的响应同时包含本地会话描述和远程会话描述时,就是这种情况,如:

          200 1203 OK
          C: A3C47F21456789F0
          N: [128.96.41.12]
          L: p:10, a:PCMU;G726-32
          M: sendrecv
          P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27,LA=48
        
          200 1203 OK
          C: A3C47F21456789F0
          N: [128.96.41.12]
          L: p:10, a:PCMU;G726-32
          M: sendrecv
          P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27,LA=48
        

v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 1296 RTP/AVP 0

v=0 o=-25678 753849在IP4 128.96.41.1中s=-c=在IP4 128.96.41.1中t=0 0 m=音频1296 RTP/AVP 0

          v=0
          o=- 33343 346463 IN IP4 128.96.63.25
          s=-
          c=IN IP4 128.96.63.25
          t=0 0
          m=audio 1296 RTP/AVP 0 96
          a=rtpmap:96 G726-32/8000
        
          v=0
          o=- 33343 346463 IN IP4 128.96.63.25
          s=-
          c=IN IP4 128.96.63.25
          t=0 0
          m=audio 1296 RTP/AVP 0 96
          a=rtpmap:96 G726-32/8000
        

In this example, according to the SDP syntax, each description starts with a "version" line, (v=...). The local description is always transmitted before the remote description. If a connection descriptor is requested, but it does not exist for the connection audited, that connection descriptor will appear with the SDP protocol version field only.

在本例中,根据SDP语法,每个描述都以“version”行开始,(v=…)。本地描述总是在远程描述之前传输。如果请求了连接描述符,但该连接描述符对于已审核的连接不存在,则该连接描述符将仅与SDP协议版本字段一起显示。

The response parameters are described for each of the commands in the following.

下面将描述每个命令的响应参数。

3.3.1 CreateConnection Response
3.3.1 CreateConnection响应

In the case of a CreateConnection message, the response line is followed by a Connection-Id parameter with a successful response (code 200). A LocalConnectionDescriptor is furthermore transmitted with a positive response. The LocalConnectionDescriptor is encoded as a "session description", as defined by SDP (RFC 2327). It is separated from the response header by an empty line, e.g.:

在CreateConnection消息的情况下,响应行后面跟着一个连接Id参数,该参数具有一个成功的响应(代码200)。LocalConnectionDescriptor还会以肯定响应进行传输。LocalConnectionDescriptor编码为SDP(RFC2327)定义的“会话描述”。它与响应标题之间用空行分隔,例如:

200 1204 OK I: FDE234C8

200 1204正常I:FDE234C8

      v=0
      o=- 25678 753849 IN IP4 128.96.41.1
      s=-
      c=IN IP4 128.96.41.1
      t=0 0
      m=audio 3456 RTP/AVP 96
      a=rtpmap:96 G726-32/8000
        
      v=0
      o=- 25678 753849 IN IP4 128.96.41.1
      s=-
      c=IN IP4 128.96.41.1
      t=0 0
      m=audio 3456 RTP/AVP 96
      a=rtpmap:96 G726-32/8000
        

When a provisional response has been issued previously, the final response SHOULD furthermore contain the Response Acknowledgement parameter (final responses issued by entities adhering to this specification will include the parameter, but older RFC 2705 implementations MAY not):

当先前已发布临时响应时,最终响应还应包含响应确认参数(由遵守本规范的实体发布的最终响应将包括该参数,但旧的RFC 2705实现可能不包括该参数):

200 1204 OK K: I: FDE234C8

200 1204正常K:I:FDE234C8

      v=0
      o=- 25678 753849 IN IP4 128.96.41.1
      s=-
      c=IN IP4 128.96.41.1
      t=0 0
      m=audio 3456 RTP/AVP 96
      a=rtpmap:96 G726-32/8000
        
      v=0
      o=- 25678 753849 IN IP4 128.96.41.1
      s=-
      c=IN IP4 128.96.41.1
      t=0 0
      m=audio 3456 RTP/AVP 96
      a=rtpmap:96 G726-32/8000
        

The final response SHOULD then be acknowledged by a Response Acknowledgement:

然后,应通过响应确认确认最终响应:

000 1204

000 1204

3.3.2 ModifyConnection Response
3.3.2 修改连接响应

In the case of a successful ModifyConnection message, the response line is followed by a LocalConnectionDescriptor, if the modification resulted in a modification of the session parameters (e.g., changing only the mode of a connection does not alter the session parameters). The LocalConnectionDescriptor is encoded as a "session description", as defined by SDP. It is separated from the response header by an empty line.

在ModifyConnection消息成功的情况下,如果修改导致会话参数修改(例如,仅更改连接模式不会更改会话参数),则响应行后面会跟着LocalConnectionDescriptor。LocalConnectionDescriptor编码为SDP定义的“会话描述”。它与响应头之间用空行分隔。

200 1207 OK

2001207好

v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-25678 753849在IP4 128.96.41.1中s=-c=在IP4 128.96.41.1中t=0 0 m=音频3456 RTP/AVP 0

When a provisional response has been issued previously, the final response SHOULD furthermore contain the Response Acknowledgement parameter as in:

当先前已发布临时响应时,最终响应还应包含响应确认参数,如下所示:

200 1207 OK K:

200 1207 OK K:

The final response SHOULD then be acknowledged by a Response Acknowledgement:

然后,应通过响应确认确认最终响应:

000 1207 OK

000 1207好的

3.3.3 DeleteConnection Response
3.3.3 删除连接响应

Depending on the variant of the DeleteConnection message, the response line may be followed by a Connection Parameters parameter line, as defined in Section 3.2.2.7.

根据DeleteConnection消息的不同,响应行后面可能会有连接参数行,如第3.2.2.7节所定义。

      250 1210 OK
      P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48
        
      250 1210 OK
      P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48
        
3.3.4 NotificationRequest Response
3.3.4 通知请求响应

A successful NotificationRequest response does not include any additional response parameters.

成功的NotificationRequest响应不包括任何其他响应参数。

3.3.5 Notify Response
3.3.5 通知响应

A successful Notify response does not include any additional response parameters.

成功的Notify响应不包括任何其他响应参数。

3.3.6 AuditEndpoint Response
3.3.6 审核端点响应

In the case of a successful AuditEndPoint the response line may be followed by information for each of the parameters requested - each parameter will appear on a separate line. Parameters for which no

如果AuditEndPoint成功,响应行后面可能会有每个请求参数的信息-每个参数将显示在单独的行上。参数,没有

value currently exists, e.g., digit map, will still be provided but with an empty value. Each local endpoint name "expanded" by a wildcard character will appear on a separate line using the "SpecificEndPointId" parameter code, e.g.:

当前存在的值,例如数字映射,仍将提供,但值为空。通过通配符“扩展”的每个本地端点名称将使用“SpecificEndPointId”参数代码显示在单独的一行上,例如:

      200 1200 OK
      Z: aaln/1@rgw.whatever.net
      Z: aaln/2@rgw.whatever.net
        
      200 1200 OK
      Z: aaln/1@rgw.whatever.net
      Z: aaln/2@rgw.whatever.net
        

When connection identifiers are audited and multiple connections exist on the endpoint, a comma-separated list of connection identifiers SHOULD be returned as in:

当审核连接标识符并且端点上存在多个连接时,应返回以逗号分隔的连接标识符列表,如中所示:

200 1200 OK I: FDE234C8, DFE233D1

200 1200正常输入:FDE234C8,DFE233D1

Alternatively, multiple connection id parameter lines may be returned - the two forms should not be mixed although doing so does not constitute an error.

或者,可以返回多个连接id参数行-不应混合使用这两种形式,尽管这样做并不构成错误。

When capabilities are audited, the response may include multiple capabilities parameter lines as in:

审核功能时,响应可能包括多个功能参数行,如所示:

      200 1200 OK
      A: a:PCMU;G728, p:10-100, e:on, s:off, t:1, v:L,
          m:sendonly;recvonly;sendrecv;inactive
      A: a:G729, p:30-90, e:on, s:on, t:1, v:L,
          m:sendonly;recvonly;sendrecv;inactive;confrnce
        
      200 1200 OK
      A: a:PCMU;G728, p:10-100, e:on, s:off, t:1, v:L,
          m:sendonly;recvonly;sendrecv;inactive
      A: a:G729, p:30-90, e:on, s:on, t:1, v:L,
          m:sendonly;recvonly;sendrecv;inactive;confrnce
        

Note: The carriage return for Capabilities shown above is present for formatting reasons only. It is not permissible in a real command encoding.

注:上述功能的回车仅出于格式原因。在实际命令编码中是不允许的。

3.3.7 AuditConnection Response
3.3.7 审核连接响应

In the case of a successful AuditConnection, the response may be followed by information for each of the parameters requested. Parameters for which no value currently exists will still be provided. Connection descriptors will always appear last and each will be preceded by an empty line, as for example:

在AuditConnection成功的情况下,响应之后可能会有请求的每个参数的信息。当前不存在值的参数仍将提供。连接描述符将始终显示在最后,每个描述符前面都有一个空行,例如:

      200 1203 OK
      C: A3C47F21456789F0
      N: [128.96.41.12]
      L: p:10, a:PCMU;G728
      M: sendrecv
      P: PS=622, OS=31172, PR=390, OR=22561, PL=5, JI=29, LA=50
        
      200 1203 OK
      C: A3C47F21456789F0
      N: [128.96.41.12]
      L: p:10, a:PCMU;G728
      M: sendrecv
      P: PS=622, OS=31172, PR=390, OR=22561, PL=5, JI=29, LA=50
        
      v=0
      o=- 4723891 7428910 IN IP4 128.96.63.25
      s=-
      c=IN IP4 128.96.63.25
      t=0 0
      m=audio 1296 RTP/AVP 96
      a=rtpmap:96 G726-32/8000
        
      v=0
      o=- 4723891 7428910 IN IP4 128.96.63.25
      s=-
      c=IN IP4 128.96.63.25
      t=0 0
      m=audio 1296 RTP/AVP 96
      a=rtpmap:96 G726-32/8000
        

If both a local and a remote connection descriptor are provided, the local connection descriptor will be the first of the two. If a connection descriptor is requested, but it does not exist for the connection audited, that connection descriptor will appear with the SDP protocol version field only ("v=0"), as for example:

如果同时提供了本地和远程连接描述符,则本地连接描述符将是这两个描述符中的第一个。如果请求了连接描述符,但该连接描述符对于已审核的连接不存在,则该连接描述符将仅与SDP协议版本字段(“v=0”)一起出现,例如:

200 1203 OK

2001203好

v=0

v=0

3.3.8 RestartInProgress Response
3.3.8 重新启动进程响应

A successful RestartInProgress response may include a NotifiedEntity parameter, but otherwise does not include any additional response parameters.

成功的RestartInProgress响应可能包括NotifiedEntity参数,但不包括任何其他响应参数。

Also, a 521 response to a RestartInProgress MUST include a NotifiedEntity parameter with the name of another Call Agent to contact when the first Call Agent redirects the endpoint to another Call Agent as in:

此外,对RestartInProgress的521响应必须包括一个NotifiedEntity参数,该参数带有当第一个呼叫代理将端点重定向到另一个呼叫代理时要联系的另一个呼叫代理的名称,如中所示:

521 1204 Redirect N: CA-1@whatever.net

5211204重定向N:CA-1@whatever.net

3.4 Encoding of the Session Description (SDP)
3.4 会话描述(SDP)的编码

The session description (SDP) is encoded in conformance with the session description protocol, SDP. MGCP implementations are REQUIRED to be fully capable of parsing any conformant SDP message, and MUST send session descriptions that strictly conform to the SDP standard.

会话描述(SDP)按照会话描述协议SDP进行编码。MGCP实现需要完全能够解析任何一致的SDP消息,并且必须发送严格符合SDP标准的会话描述。

The general description and explanation of SDP parameters can be found in RFC 2327 (or its successor). In particular, it should be noted that the

SDP参数的一般说明和解释见RFC 2327(或其后续版本)。应特别指出的是

* Origin ("o="),

* 原点(“o=”),

* Session Name ("s="), and

* 会话名称(“s=”),以及

* Time active ("t=")

* 激活时间(“t=”)

are all mandatory in RFC 2327. While they are of little use to MGCP, they MUST be provided in conformance with RFC 2327 nevertheless. The following suggests values to be used for each of the fields, however the reader is encouraged to consult RFC 2327 (or its successor) for details:

在RFC 2327中都是强制性的。尽管它们对MGCP用处不大,但必须按照RFC 2327提供。以下建议每个字段使用的值,但鼓励读者参考RFC 2327(或其后续版本)了解详细信息:

   Origin
   o = <username> <session id> <version> <network type> <address type>
       <address>
        
   Origin
   o = <username> <session id> <version> <network type> <address type>
       <address>
        

* The username SHOULD be set to hyphen ("-").

* 用户名应设置为连字符(“-”)。

* The session id is RECOMMENDED to be an NTP timestamp as suggested in RFC 2327.

* 建议会话id为RFC 2327中建议的NTP时间戳。

* The version is a version number that MUST increment with each change to the SDP. A counter initialized to zero or an NTP timestamp as suggested in RFC 2327 is RECOMMENDED.

* 版本是一个版本号,必须随SDP的每次更改而递增。建议使用初始化为零的计数器或RFC 2327中建议的NTP时间戳。

* The network type defines the type of network. For RTP sessions the network type SHOULD be "IN".

* 网络类型定义了网络的类型。对于RTP会话,网络类型应为“IN”。

* The address type defines the type of address. For RTP sessions the address type SHOULD be "IP4" (or "IP6").

* 地址类型定义了地址的类型。对于RTP会话,地址类型应为“IP4”(或“IP6”)。

* The address SHOULD be the same address as provided in the connection information ("c=") field.

* 地址应与连接信息(“c=”)字段中提供的地址相同。

   Session Name
   s = <session name>
        
   Session Name
   s = <session name>
        

The session name should be hyphen ("-").

会话名称应为连字符(“-”)。

   Time active
   t = <start time> <stop time>
        
   Time active
   t = <start time> <stop time>
        

* The start time may be set to zero.

* 开始时间可以设置为零。

* The stop time should be set to zero.

* 停止时间应设置为零。

Each of the three fields can be ignored upon reception.

三个字段中的每一个在接收时都可以忽略。

To further accommodate the extensibility principles of MGCP, implementations are ENCOURAGED to support the PINT "a=require" attribute - please refer to RFC 2848 for further details.

为了进一步适应MGCP的可扩展性原则,鼓励实现支持PINT“a=require”属性-有关更多详细信息,请参阅RFC 2848。

The usage of SDP actually depends on the type of session that is being established. Below we describe usage of SDP for an audio service using the RTP/AVP profile [4], or the LOCAL interconnect defined in this document. In case of any conflicts between what is described below and SDP (RFC 2327 or its successor), the SDP specification takes precedence.

SDP的使用实际上取决于正在建立的会话类型。下面,我们使用RTP/AVP配置文件[4]或本文档中定义的本地互连来描述SDP在音频服务中的用法。如果下文所述内容与SDP(RFC 2327或其后续版本)之间存在任何冲突,则以SDP规范为准。

3.4.1 Usage of SDP for an Audio Service
3.4.1 SDP在音频服务中的使用

In a telephony gateway, we only have to describe sessions that use exactly one media, audio. The usage of SDP for this is straightforward and described in detail in RFC 2327.

在电话网关中,我们只需描述只使用一种媒体(音频)的会话。SDP的使用非常简单,RFC2327对此进行了详细描述。

The following is an example of an RFC 2327 conformant session description for an audio connection:

以下是音频连接的符合RFC 2327的会话描述示例:

      v=0
      o=- A7453949499 0 IN IP4 128.96.41.1
      s=-
      c=IN IP4 128.96.41.1
      t=0 0
      m=audio 3456 RTP/AVP 0 96
      a=rtpmap:96 G726-32/8000
        
      v=0
      o=- A7453949499 0 IN IP4 128.96.41.1
      s=-
      c=IN IP4 128.96.41.1
      t=0 0
      m=audio 3456 RTP/AVP 0 96
      a=rtpmap:96 G726-32/8000
        
3.4.2 Usage of SDP for LOCAL Connections
3.4.2 对本地连接使用SDP

When MGCP is used to set up internal connections within a single gateway, the SDP format is used to encode the parameters of that connection. The connection and media parameters will be used as follows:

当MGCP用于在单个网关内建立内部连接时,SDP格式用于对该连接的参数进行编码。连接和介质参数将按如下方式使用:

* The connection parameter (c=) will specify that the connection is local, using the keyword "LOCAL" as network type, the keyword "EPN" (endpoint name) as address type, and the local name of the endpoint as the connection-address.

* 连接参数(c=)将指定连接是本地的,使用关键字“local”作为网络类型,关键字“EPN”(端点名称)作为地址类型,端点的本地名称作为连接地址。

* The "m=audio" parameter will specify a port number, which will always be set to 0, the type of protocol, always set to the keyword LOCAL, and the type of encoding, using the same conventions used for the RTP AVP profile (RTP payload numbers). The type of encoding should normally be set to 0 (PCMU).

* “m=audio”参数将使用RTP AVP配置文件(RTP有效负载号)使用的相同约定,指定端口号(始终设置为0)、协议类型(始终设置为关键字LOCAL)和编码类型。编码类型通常应设置为0(PCMU)。

A session-level attribute identifying the connection MAY furthermore be present. This enables endpoints to support multiple LOCAL connections. Use of this attribute is OPTIONAL and indeed unnecessary for endpoints that only support a single LOCAL connection. The attribute is defined as follows:

还可以存在识别连接的会话级属性。这使端点能够支持多个本地连接。对于仅支持单个本地连接的端点,此属性的使用是可选的,实际上是不必要的。该属性定义如下:

a=MGCPlocalcx:<ConnectionID> The MGCP Local Connection attribute is a session level only case-insensitive attribute that identifies the MGCP LOCAL connection, on the endpoint identified in the connection information, to which the SDP applies. The ConnectionId is a hexadecimal string containing at most 32 characters. The ConnectionId itself is case-insensitive. The MGCP Local Connection attribute is not subject to the charset attribute.

a=MGCPlocalcx:<ConnectionID>MGCP Local Connection属性是一个会话级别的不区分大小写的属性,用于在SDP应用的连接信息中标识的端点上标识MGCP本地连接。ConnectionId是一个十六进制字符串,最多包含32个字符。ConnectionId本身不区分大小写。MGCP本地连接属性不受字符集属性的约束。

An example of a LOCAL session description could be:

本地会话描述的示例可以是:

      v=0
      o=- A7453949499 0 LOCAL EPN X35V3+A4/13
      s=-
      c=LOCAL EPN X35V3+A4/13
      t=0 0
      a=MGCPlocalcx:FDE234C8
      m=audio 0 LOCAL 0
        
      v=0
      o=- A7453949499 0 LOCAL EPN X35V3+A4/13
      s=-
      c=LOCAL EPN X35V3+A4/13
      t=0 0
      a=MGCPlocalcx:FDE234C8
      m=audio 0 LOCAL 0
        

Note that the MGCP Local Connection attribute is specified at the session level and that it could have been omitted in case only a single LOCAL connection per endpoint is supported.

请注意,MGCP Local Connection属性是在会话级别指定的,如果每个端点只支持一个本地连接,则可以省略该属性。

3.5 Transmission over UDP
3.5 UDP传输

MGCP messages are transmitted over UDP. Commands are sent to one of the IP addresses defined in the DNS for the specified endpoint. The responses are sent back to the source address (i.e., IP address and UDP port number) of the commands - the response may or may not arrive from the same address as the command was sent to.

MGCP消息通过UDP传输。命令被发送到指定端点的DNS中定义的其中一个IP地址。响应被发送回命令的源地址(即IP地址和UDP端口号)-响应可能来自也可能不来自命令发送到的同一地址。

When no port is specified for the endpoint, the commands MUST by default be sent:

如果未为端点指定端口,则默认情况下必须发送以下命令:

* by the Call Agents, to the default MGCP port for gateways, 2427.

* 由呼叫代理发送到网关的默认MGCP端口2427。

* by the Gateways, to the default MGCP port for Call Agents, 2727.

* 通过网关连接到呼叫代理的默认MGCP端口2727。

3.5.1 Providing the At-Most-Once Functionality
3.5.1 提供最多一次的功能

MGCP messages, being carried over UDP, may be subject to losses. In the absence of a timely response, commands are retransmitted. Most MGCP commands are not idempotent. The state of the gateway would become unpredictable if, for example, CreateConnection commands were executed several times. The transmission procedures MUST thus provide an "at-most-once" functionality.

通过UDP传输的MGCP消息可能会丢失。在没有及时响应的情况下,将重新传输命令。大多数MGCP命令不是幂等的。例如,如果多次执行CreateConnection命令,网关的状态将变得不可预测。因此,传输程序必须提供“最多一次”功能。

MGCP entities are expected to keep in memory a list of the responses that they sent to recent transactions, and a list of the transactions that are currently being executed. The numerical value of transaction identifiers of incoming commands are compared to the transaction identifiers of the recent responses. If a match is found, the MGCP entity does not execute the transaction again, but simply resends the response. The remaining commands will be compared to the list of current transactions, i.e., transactions received previously which have not yet finished executing. If a match is found, the MGCP entity does not execute the transaction again, but a provisional response (Section 3.5.5) SHOULD be issued to acknowledge receipt of the command.

MGCP实体需要在内存中保存它们发送给最近事务的响应列表,以及当前正在执行的事务列表。将传入命令的事务标识符的数值与最近响应的事务标识符进行比较。如果找到匹配项,MGCP实体不会再次执行事务,而只是重新发送响应。剩余的命令将与当前事务列表进行比较,即之前收到的尚未完成执行的事务。如果找到匹配项,MGCP实体不会再次执行交易,但应发出临时响应(第3.5.5节)以确认收到命令。

The procedure uses a long timer value, noted T-HIST in the following. The timer MUST be set larger than the maximum duration of a transaction, which MUST take into account the maximum number of repetitions, the maximum value of the repetition timer and the maximum propagation delay of a packet in the network. A suggested value is 30 seconds.

该程序使用一个长定时器值,如下所示为T-HIST。计时器的设置必须大于事务的最大持续时间,这必须考虑最大重复次数、重复计时器的最大值以及网络中数据包的最大传播延迟。建议值为30秒。

The copy of the responses MAY be destroyed either T-HIST seconds after the response is issued, or when the gateway (or the Call Agent) receives a confirmation that the response has been received, through the "Response Acknowledgement". For transactions that are acknowledged through this attribute, the gateway SHALL keep a copy of the transaction-id (as opposed to the entire transaction response) for T-HIST seconds after the response is issued, in order to detect and ignore duplicate copies of the transaction request that could be produced by the network.

在发出响应后T-HIST秒,或者当网关(或呼叫代理)通过“响应确认”接收到已接收到响应的确认时,可以销毁响应的副本。对于通过此属性确认的交易,网关应在发出响应后的T-HIST秒内保留交易id的副本(与整个交易响应相反),以便检测和忽略网络可能产生的交易请求的副本。

3.5.2 Transaction Identifiers and Three Ways Handshake
3.5.2 事务标识符和三种握手方式

Transaction identifiers are integer numbers in the range from 1 to 999,999,999 (both included). Call-agents may decide to use a specific number space for each of the gateways that they manage, or to use the same number space for all gateways that belong to some arbitrary group. Call agents may decide to share the load of managing a large gateway between several independent processes. These processes MUST then share the transaction number space. There are multiple possible implementations of this sharing, such as having a centralized allocation of transaction identifiers, or pre-allocating non-overlapping ranges of identifiers to different processes. The implementations MUST guarantee that unique transaction identifiers are allocated to all transactions that originate from a logical call agent, as defined in Section 4. Gateways can simply detect duplicate transactions by looking at the transaction identifier only.

事务标识符是介于1到99999999之间的整数(均包括在内)。呼叫代理可能决定为其管理的每个网关使用特定的号码空间,或为属于某个任意组的所有网关使用相同的号码空间。呼叫代理可能决定在多个独立进程之间分担管理大型网关的负载。然后,这些进程必须共享事务编号空间。这种共享有多种可能的实现,例如事务标识符的集中分配,或者将不重叠的标识符范围预分配给不同的进程。这些实现必须保证将唯一的事务标识符分配给源自逻辑调用代理的所有事务,如第4节所定义。网关只需查看事务标识符即可检测重复事务。

The Response Acknowledgement Attribute can be found in any command. It carries a set of "confirmed transaction-id ranges" for final responses received - provisional responses MUST NOT be confirmed. A given response SHOULD NOT be confirmed in two separate messages.

响应确认属性可以在任何命令中找到。它为接收到的最终响应提供了一组“已确认的事务id范围”-临时响应不得确认。不应在两条单独的消息中确认给定的响应。

MGCP entities MAY choose to delete the copies of the responses (but not the transaction-id) to transactions whose id is included in "confirmed transaction-id ranges" received in the Response Confirmation messages (command or response). They SHOULD then silently discard further commands from that entity when the transaction-id falls within these ranges, and the response was issued less than T-HIST seconds ago.

MGCP实体可以选择删除对其id包含在响应确认消息(命令或响应)中收到的“已确认交易id范围”中的交易的响应副本(但不是交易id)。然后,当事务id在这些范围内,并且响应在不到T-HIST秒前发出时,它们应该默默地放弃来自该实体的进一步命令。

Entities MUST exercise due caution when acknowledging responses. In particular, a response SHOULD only be acknowledged if the response acknowledgement is sent to the same entity as the corresponding command (i.e., the command whose response is being acknowledged) was sent to.

实体在确认答复时必须谨慎行事。特别是,仅当响应确认被发送到与相应命令(即,其响应被确认的命令)相同的实体时,才应确认响应。

Likewise, entities SHOULD NOT blindly accept a response acknowledgement for a given response. However it is considered safe to accept a response acknowledgement for a given response, when that response acknowledgement is sent by the same entity as the command that generated that response.

同样,实体不应盲目接受给定响应的响应确认。但是,当响应确认与生成该响应的命令由同一实体发送时,接受给定响应的响应确认被认为是安全的。

It should be noted, that use of response acknowledgments in commands (as opposed to the Response Acknowledgement response following a provisional response) is OPTIONAL. The benefit of using it is that it reduces overall memory consumption. However, in order to avoid large messages, implementations SHOULD NOT generate large response

应注意,在命令中使用响应确认(与临时响应后的响应确认响应相反)是可选的。使用它的好处是减少了总体内存消耗。然而,为了避免大消息,实现不应该生成大响应

acknowledgement lists. One strategy is to manage responses to commands on a per endpoint basis. A command for an endpoint can confirm a response to an older command for that same endpoint. Responses to commands with wildcarded endpoint names can be confirmed selectively with due consideration to message sizes, or alternatively simply not be acknowledged (unless the response explicitly required a Response Acknowledgement). Care must be taken to not confirm the same response twice or a response that is more than T-HIST seconds old.

确认清单。一种策略是在每个端点的基础上管理对命令的响应。端点的命令可以确认对该端点的旧命令的响应。对具有通配符端点名称的命令的响应可以根据消息大小有选择地进行确认,或者干脆不进行确认(除非响应明确要求响应确认)。必须注意不要两次确认同一响应,或确认时间超过T-HIST秒的响应。

The "confirmed transaction-id ranges" values SHALL NOT be used if more than T-HIST seconds have elapsed since the entity issued its last response to the other entity, or when an entity resumes operation. In this situation, commands MUST be accepted and processed, without any test on the transaction-id.

如果自被审计单位向另一个被审计单位发出最后一次响应后已超过T-HIST秒,或者当一个被审计单位恢复运行时,不得使用“确认交易id范围”值。在这种情况下,必须接受和处理命令,而不需要对transaction-id进行任何测试。

Commands that carry the "Response Acknowledgement attribute" may be transmitted in disorder. The union of the "confirmed transaction-id ranges" received in recent messages SHALL be retained.

携带“响应确认属性”的命令可能会无序传输。应保留最近消息中收到的“已确认交易id范围”的并集。

3.5.3 Computing Retransmission Timers
3.5.3 计算重传计时器

It is the responsibility of the requesting entity to provide suitable time outs for all outstanding commands, and to retry commands when time outs have been exceeded. Furthermore, when repeated commands fail to be acknowledged, it is the responsibility of the requesting entity to seek redundant services and/or clear existing or pending associations.

请求实体负责为所有未完成的命令提供适当的超时,并在超过超时时重试命令。此外,当重复命令未被确认时,请求实体有责任寻求冗余服务和/或清除现有或未决关联。

The specification purposely avoids specifying any value for the retransmission timers. These values are typically network dependent. The retransmission timers SHOULD normally estimate the timer by measuring the time spent between the sending of a command and the return of the first response to the command. At a minimum, a retransmission strategy involving exponential backoff MUST be implemented. One possibility is to use the algorithm implemented in TCP/IP, which uses two variables:

该规范有意避免为重传定时器指定任何值。这些值通常依赖于网络。重传计时器通常应通过测量发送命令和返回命令的第一个响应之间的时间来估计计时器。至少,必须实施涉及指数退避的重传策略。一种可能性是使用TCP/IP中实现的算法,该算法使用两个变量:

* the average acknowledgement delay, AAD, estimated through an exponentially smoothed average of the observed delays,

* 通过观察到的延迟的指数平滑平均值估计的平均确认延迟AAD,

* the average deviation, ADEV, estimated through an exponentially smoothed average of the absolute value of the difference between the observed delay and the current average.

* 平均偏差ADEV,通过观察到的延迟与当前平均值之差的绝对值的指数平滑平均值进行估计。

The retransmission timer, RTO, in TCP, is set to the sum of the average delay plus N times the average deviation, where N is a constant. In MGCP, the maximum value of the timer SHOULD however be bounded, in order to guarantee that no repeated packet will be received by the gateways after T-HIST seconds. A suggested maximum value for RTO (RTO-MAX) is 4 seconds. Implementers SHOULD consider bounding the minimum value of this timer as well [19].

TCP中的重传计时器RTO设置为平均延迟加上N倍平均偏差之和,其中N为常数。然而,在MGCP中,计时器的最大值应该是有界的,以保证在T-HIST秒之后网关不会接收到重复的数据包。RTO的建议最大值(RTO-MAX)为4秒。实现者应该考虑绑定这个计时器的最小值(19)。

After any retransmission, the MGCP entity SHOULD do the following:

在任何重传之后,MGCP实体应执行以下操作:

* It should double the estimated value of the acknowledgement delay for this transaction, T-DELAY.

* 它应该是该事务的确认延迟估计值T-delay的两倍。

* It should compute a random value, uniformly distributed between 0.5 T-DELAY and T-DELAY.

* 它应该计算一个随机值,均匀分布在0.5 T-延迟和T-延迟之间。

* It should set the retransmission timer (RTO) to the minimum of: - the sum of that random value and N times the average deviation, - RTO-MAX.

* 它应将重传计时器(RTO)设置为最小值:-该随机值与平均偏差的N倍之和,-RTO-MAX。

This procedure has two effects. Because it includes an exponentially increasing component, it will automatically slow down the stream of messages in case of congestion. Because it includes a random component, it will break the potential synchronization between notifications triggered by the same external event.

这个过程有两个效果。因为它包含了一个指数级增长的组件,它会在拥塞情况下自动降低消息流的速度。因为它包含一个随机组件,它将破坏由同一外部事件触发的通知之间的潜在同步。

Note that the estimators AAD and ADEV SHOULD NOT be updated for transactions that involve retransmissions. Also, the first new transmission following a successful retransmission SHOULD use the RTO for that last retransmission. If this transmission succeeds without any retransmissions, the AAD and ADEV estimators are updated and RTO is determined as usual again. See, e.g., [18] for further details.

请注意,对于涉及重传的事务,不应更新估算值AAD和ADEV。此外,成功重传后的第一次新传输应使用RTO进行最后一次重传。如果此传输成功而没有任何重传,则AAD和ADEV估计器将更新,RTO将再次像往常一样确定。如需更多详细信息,请参见[18]。

3.5.4 Maximum Datagram Size, Fragmentation and Reassembly
3.5.4 最大数据报大小、碎片和重组

MGCP messages being transmitted over UDP rely on IP for fragmentation and reassembly of large datagrams. The maximum theoretical size of an IP datagram is 65535 bytes. With a 20-byte IP header and an 8- byte UDP header, this leaves us with a maximum theoretical MGCP message size of 65507 bytes when using UDP.

通过UDP传输的MGCP消息依赖IP进行大数据报的分段和重组。IP数据报的最大理论大小为65535字节。对于20字节的IP报头和8字节的UDP报头,使用UDP时,MGCP消息的最大理论大小为65507字节。

However, IP does not require a host to receive IP datagrams larger than 576 bytes [21], which would provide an unacceptably small MGCP message size. Consequently, MGCP mandates that implementations MUST support MGCP datagrams up to at least 4000 bytes, which requires the

然而,IP不要求主机接收大于576字节[21]的IP数据报,这将提供不可接受的小MGCP消息大小。因此,MGCP要求实现必须支持至少4000字节的MGCP数据报,这需要

corresponding IP fragmentation and reassembly to be supported. Note, that the 4000 byte limit applies to the MGCP level. Lower layer overhead will require support for IP datagrams that are larger than this: UDP and IP overhead will be at least 28 bytes, and, e.g., use of IPSec will add additional overhead.

支持相应的IP碎片和重新组装。注意,4000字节限制适用于MGCP级别。较低层的开销将需要对大于此值的IP数据报的支持:UDP和IP开销将至少为28字节,例如,使用IPSec将增加额外的开销。

It should be noted, that the above applies to both Call Agents and endpoints. Call Agents can audit endpoints to determine if they support larger MGCP datagrams than specified above. Endpoints do currently not have a similar capability to determine if a Call Agent supports larger MGCP datagram sizes.

应该注意的是,上述内容同时适用于调用代理和端点。调用代理可以审核端点,以确定它们是否支持比上面指定的更大的MGCP数据报。端点目前没有类似的能力来确定呼叫代理是否支持更大的MGCP数据报大小。

3.5.5 Piggybacking
3.5.5 背负

There are cases when a Call Agent will want to send several messages at the same time to the same gateways, and vice versa. When several MGCP messages have to be sent in the same datagram, they MUST be separated by a line of text that contains a single dot, as in for example:

在某些情况下,呼叫代理希望同时向同一网关发送多条消息,反之亦然。当必须在同一数据报中发送多个MGCP消息时,它们必须用一行包含单个点的文本分隔,例如:

200 2005 OK . DLCX 1244 card23/21@tgw-7.example.net MGCP 1.0 C: A3C47F21456789F0 I: FDE234C8

2002005OK。DLCX 1244卡23/21@tgw-7.example.net MGCP 1.0 C:A3C47F21456789F0 I:FDE234C8

The piggybacked messages MUST be processed exactly as if they had been received one at a time in several separate datagrams. Each message in the datagram MUST be processed to completion and in order starting with the first message, and each command MUST be responded to. Errors encountered in a message that was piggybacked MUST NOT affect any of the other messages received in that datagram - each message is processed on its own.

必须像在几个单独的数据报中一次接收一条消息一样,准确地处理这些消息。数据报中的每条消息都必须按照从第一条消息开始的顺序处理完成,并且必须响应每条命令。在搭载的消息中遇到的错误不得影响该数据报中接收到的任何其他消息-每条消息都是独立处理的。

Piggybacking can be used to achieve two things:

背驮可用于实现两件事:

* Guaranteed in-order delivery and processing of messages.

* 保证按顺序传递和处理消息。

* Fate sharing of message delivery.

* 消息传递的命运共享。

When piggybacking is used to guarantee in-order delivery of messages, entities MUST ensure that this in-order delivery property is retained on retransmissions of the individual messages. An example of this is when multiple Notify's are sent using piggybacking (as described in Section 4.4.1).

当使用搭载来保证按顺序传递消息时,实体必须确保在重新传输单个消息时保留此按顺序传递属性。这方面的一个例子是,使用搭载发送多个通知(如第4.4.1节所述)。

Fate sharing of message delivery ensures that either all the messages are delivered, or none of them are delivered. When piggybacking is used to guarantee this fate-sharing, entities MUST also ensure that this property is retained upon retransmission. For example, upon receiving a Notify from an endpoint operating in lockstep mode, the Call Agent may wish to send the response and a new NotificationRequest command in a single datagram to ensure message delivery fate-sharing of the two.

消息传递的命运共享确保所有消息都被传递,或者没有消息被传递。当使用搭载来保证这种命运共享时,实体还必须确保在重新传输时保留该属性。例如,在接收到来自以锁步模式运行的端点的通知时,呼叫代理可能希望在单个数据报中发送响应和新的NotificationRequest命令,以确保两者的消息传递命运共享。

3.5.6 Provisional Responses
3.5.6 临时答复

Executing some transactions may require a long time. Long execution times may interact with the timer based retransmission procedure.

执行某些事务可能需要很长时间。长执行时间可能与基于计时器的重传过程相互作用。

This may result either in an inordinate number of retransmissions, or in timer values that become too long to be efficient.

这可能导致重新传输的次数过多,或者导致计时器值变得太长而无法发挥效率。

Gateways (and Call Agents) that can predict that a transaction will require a long execution time SHOULD send a provisional response with response code 100. As a guideline, a transaction that requires external communication to complete, e.g., network resource reservation, SHOULD issue a provisional response. Furthermore entities SHOULD send a provisional response if they receive a repetition of a transaction that has not yet finished executing.

可以预测事务将需要较长执行时间的网关(和呼叫代理)应发送响应代码为100的临时响应。作为指导原则,需要外部通信才能完成的事务(如网络资源预留)应发出临时响应。此外,如果实体收到尚未完成执行的事务的重复,则应发送临时响应。

Gateways (or Call Agents) that start building up queues of transactions to be executed may send a provisional response with response code 101 to indicate this (see Section 4.4.8 for further details).

开始建立待执行事务队列的网关(或呼叫代理)可发送带有响应代码101的临时响应,以表明这一点(更多详细信息,请参阅第4.4.8节)。

Pure transactional semantics would imply, that provisional responses SHOULD NOT return any other information than the fact that the transaction is currently executing, however an optimistic approach allowing some information to be returned enables a reduction in the delay that would otherwise be incurred in the system.

纯事务语义意味着,临时响应不应返回除事务当前正在执行之外的任何其他信息,但是,允许返回某些信息的乐观方法可以减少系统中可能产生的延迟。

In order to reduce the delay in the system, it is RECOMMENDED to include a connection identifier and session description in a 100 provisional response to the CreateConnection command. If a session description would be returned by the ModifyConnection command, the session description SHOULD be included in the provisional response here as well. If the transaction completes successfully, the information returned in the provisional response MUST be repeated in the final response. It is considered a protocol error not to repeat this information or to change any of the previously supplied information in a successful response. If the transaction fails, an error code is returned - the information returned previously is no longer valid.

为了减少系统中的延迟,建议在对CreateConnection命令的100临时响应中包括连接标识符和会话描述。如果ModifyConnection命令将返回会话描述,则会话描述也应包含在此处的临时响应中。如果事务成功完成,则临时响应中返回的信息必须在最终响应中重复。在成功响应中不重复此信息或更改以前提供的任何信息被视为协议错误。如果事务失败,将返回错误代码-以前返回的信息不再有效。

A currently executing CreateConnection or ModifyConnection transaction MUST be cancelled if a DeleteConnection command for the endpoint is received. In that case, a final response for the cancelled transaction SHOULD still be returned automatically (error code 407 - transaction aborted, is RECOMMENDED), and a final response for the cancelled transaction MUST be returned if a retransmission of the cancelled transaction is detected (see also Section 4.4.4).

如果接收到端点的DeleteConnection命令,则必须取消当前正在执行的CreateConnection或ModifyConnection事务。在这种情况下,已取消交易的最终响应仍应自动返回(建议使用错误代码407-交易中止),如果检测到已取消交易的重新传输,则必须返回已取消交易的最终响应(另请参见第4.4.4节)。

MGCP entities that receive a provisional response SHALL switch to a longer repetition timer (LONGTRAN-TIMER) for that transaction. The purpose of this timer is primarily to detect processing failures. The default value of LONGTRAN-TIMER is 5 seconds, however the provisioning process may alter this. Note, that retransmissions MUST still satisfy the timing requirements specified in Section 3.5.1 and 3.5.3. Consequently LONGTRAN-TIMER MUST be smaller than T-HIST (it should in fact be considerably smaller). Also, entities MUST NOT let a transaction run forever. A transaction that is timed out by the entity SHOULD return error code 406 (transaction time-out). Per the definition of T-HIST (Section 3.5.1), the maximum transaction execution time is smaller than T-HIST (in a network with low delay, it can reasonably safely be approximated as T-HIST minus T-MAX), and a final response should be received no more than T-HIST seconds after the command was sent initially. Nevertheless, entities SHOULD wait for 2*T-HIST seconds before giving up on receiving a final response. Retransmission of the command MUST still cease after T-MAX seconds though. If a response is not received, the outcome of the transaction is not known. If the entity sending the command was a gateway, it now becomes "disconnected" and SHALL initiate the "disconnected" procedure (see Section 4.4.7).

接收临时响应的MGCP实体应为该事务切换到更长的重复计时器(LONGTRAN-timer)。此计时器的用途主要是检测处理故障。LONGTRAN-TIMER的默认值为5秒,但是配置过程可能会改变此值。注意,重传必须仍然满足第3.5.1节和第3.5.3节中规定的定时要求。因此,LONGTRAN-TIMER必须比T-HIST小(实际上应该小得多)。此外,实体不能让事务永远运行。实体超时的事务应返回错误代码406(事务超时)。根据T-HIST的定义(第3.5.1节),最大事务执行时间小于T-HIST(在低延迟的网络中,可以合理安全地近似为T-HIST减去T-MAX),并且在最初发送命令后不超过T-HIST秒应收到最终响应。然而,实体应该等待2*T-HIST秒,然后才放弃接收最终响应。但在T-MAX秒后,命令的重新传输仍必须停止。如果未收到响应,则不知道事务的结果。如果发送命令的实体是网关,则它现在变为“断开”,并应启动“断开”程序(见第4.4.7节)。

When the transaction finishes execution, the final response is sent and the by now obsolete provisional response is deleted. In order to ensure rapid detection of a lost final response, final responses issued after provisional responses for a transaction SHOULD be acknowledged (unfortunately older RFC 2705 implementations may not do this, which is the only reason it is not an absolute requirement).

当事务完成执行时,将发送最终响应,并删除目前已过时的临时响应。为了确保快速检测丢失的最终响应,应确认在事务的临时响应之后发出的最终响应(不幸的是,旧的RFC 2705实现可能不会这样做,这是它不是绝对要求的唯一原因)。

The endpoint SHOULD therefore include an empty "ResponseAck" parameter in those, and only those, final responses. The presence of the "ResponseAck" parameter in the final response SHOULD trigger a "Response Acknowledgement" response to be sent back to the endpoint. The Response Acknowledgement" response will then include the transaction-id of the response it acknowledges in the response header. Note that, for backwards compatibility, entities cannot depend on receiving such a "response acknowledgement", however it is strongly RECOMMENDED to support this behavior, as excessive delays in case of packet loss as well as excessive retransmissions may occur otherwise.

因此,端点应该在这些且仅在这些最终响应中包含一个空的“responseak”参数。在最终响应中出现“responseak”参数应触发“responseacknowledge”响应以发送回端点。然后,“响应确认”响应将在响应头中包含其确认的响应的事务id。请注意,为了向后兼容,实体不能依赖于接收此类“响应确认”“,但强烈建议支持此行为,否则可能会出现数据包丢失时的过度延迟以及过度重传。

Receipt of a "Response Acknowledgement" response is subject to the same time-out and retransmission strategies and procedures as responses to commands, i.e., the sender of the final response will retransmit it if a "Response Acknowledgement" is not received in time. For backwards compatibility, failure to receive a "response acknowledgement" SHOULD NOT affect the roundtrip time estimates for subsequent commands, and furthermore MUST NOT lead to the endpoint becoming "disconnected". The "Response Acknowledgment" response is never acknowledged.

“响应确认”响应的接收与命令响应遵循相同的超时和重传策略和程序,即,如果未及时收到“响应确认”,则最终响应的发送方将重传该响应。为了向后兼容,未能接收“响应确认”不应影响后续命令的往返时间估计,而且不得导致端点“断开连接”。“响应确认”响应从未被确认。

4. States, Failover and Race Conditions
4. 状态、故障转移和竞争条件

In order to implement proper call signaling, the Call Agent must keep track of the state of the endpoint, and the gateway must make sure that events are properly notified to the Call Agent. Special conditions exist when the gateway or the Call Agent are restarted: the gateway must be redirected to a new Call Agent during "failover" procedures, the Call Agent must take special action when the gateway is taken offline, or restarted.

为了实现正确的呼叫信令,呼叫代理必须跟踪端点的状态,网关必须确保事件被正确地通知给呼叫代理。重新启动网关或呼叫代理时存在特殊情况:在“故障切换”过程中,网关必须重定向到新的呼叫代理,当网关脱机或重新启动时,呼叫代理必须采取特殊操作。

4.1 Failover Assumptions and Highlights
4.1 故障转移假设和要点

The following protocol highlights are important to understanding Call Agent fail-over mechanisms:

以下协议重点对于理解呼叫代理故障转移机制非常重要:

* Call Agents are identified by their domain name (and optional port), not their network addresses, and several addresses can be associated with a domain name.

* 呼叫代理由其域名(和可选端口)而不是网络地址标识,并且多个地址可以与域名关联。

* An endpoint has one and only one Call Agent associated with it at any given point in time. The Call Agent associated with an endpoint is the current value of the "notified entity". The "notified entity" determines where the gateway will send it's commands. If the "notified entity" does not include a port number, the default Call Agent port number (2727) is assumed.

* 端点在任何给定时间点都有一个且只有一个与之关联的调用代理。与端点关联的调用代理是“通知实体”的当前值。“通知实体”确定网关将向何处发送其命令。如果“通知实体”不包括端口号,则假定默认呼叫代理端口号(2727)。

* NotifiedEntity is a parameter sent by the Call Agent to the gateway to set the "notified entity" for the endpoint.

* NotifiedEntity是呼叫代理发送到网关的参数,用于设置端点的“通知实体”。

* The "notified entity" for an endpoint is the last value of the NotifiedEntity parameter received for this endpoint. If no explicit NotifiedEntity parameter has ever been received, the "notified entity" defaults to a provisioned value. If no value was provisioned or an empty NotifiedEntity parameter was provided (both strongly discouraged) thereby making the "notified entity" empty, the "notified entity" is set to the source address of the last non-audit command for the endpoint. Thus auditing will not change the "notified entity".

* 端点的“notified entity”是为此端点接收的NotifiedEntity参数的最后一个值。如果从未收到任何明确的NotifiedEntity参数,“notified entity”默认为已设置的值。如果未设置任何值或提供了空的NotifiedEntity参数(两者都强烈反对),从而使“notified entity”为空,则“notified entity”将设置为端点的最后一个非审核命令的源地址。因此,审计不会改变“被通知实体”。

* Responses to commands are sent to the source address of the command, regardless of the current "notified entity". When a Notify message needs to be piggybacked with the response, the datagram is still sent to the source address of the new command received, regardless of the current "notified entity".

* 对命令的响应将发送到命令的源地址,而不考虑当前的“通知实体”。当Notify消息需要与响应一起携带时,数据报仍然会发送到接收到的新命令的源地址,而不管当前的“通知实体”是什么。

The ability for the "notified entity" to resolve to multiple network addresses, allows a "notified entity" to represent a Call Agent with multiple physical interfaces on it and/or a logical Call Agent made up of multiple physical systems. The order of network addresses when a DNS name resolves to multiple addresses is non-deterministic so Call Agent fail-over schemes MUST NOT depend on any order (e.g., a gateway MUST be able to send a "Notify" to any of the resolved network addresses). On the other hand, the system is likely to be most efficient if the gateway sends commands to the interface with which it already has a current association. It is RECOMMENDED that gateways use the following algorithm to achieve that goal:

“通知实体”解析为多个网络地址的能力允许“通知实体”表示具有多个物理接口的呼叫代理和/或由多个物理系统组成的逻辑呼叫代理。当DNS名称解析为多个地址时,网络地址的顺序是不确定的,因此呼叫代理故障转移方案不得依赖于任何顺序(例如,网关必须能够向任何解析的网络地址发送“通知”)。另一方面,如果网关向其已具有当前关联的接口发送命令,则系统可能效率最高。建议网关使用以下算法来实现该目标:

* If the "notified entity" resolves to multiple network addresses, and the source address of the request is one of those addresses, that network address is the preferred destination address for commands.

* 如果“通知实体”解析为多个网络地址,并且请求的源地址是这些地址之一,则该网络地址是命令的首选目标地址。

* If on the other hand, the source address of the request is not one of the resolved addresses, the gateway must choose one of the resolved addresses for commands.

* 另一方面,如果请求的源地址不是已解析的地址之一,则网关必须为命令选择一个已解析的地址。

* If the gateway fails to contact the network address chosen, it MUST try the alternatives in the resolved list as described in Section 4.3.

* 如果网关未能联系所选的网络地址,则必须尝试第4.3节所述的已解决列表中的备选方案。

If an entire Call Agent becomes unavailable, the endpoints managed by that Call Agent will eventually become "disconnected". The only way for these endpoints to become connected again is either for the failed Call Agent to become available, or for a backup call agent to contact the affected endpoints with a new "notified entity".

如果整个呼叫代理变得不可用,则由该呼叫代理管理的端点最终将变得“断开”。这些端点重新连接的唯一方法是让失败的呼叫代理变得可用,或者让备份呼叫代理使用新的“通知实体”联系受影响的端点。

When a backup Call Agent has taken over control of a group of endpoints, it is assumed that the failed Call Agent will communicate and synchronize with the backup Call Agent in order to transfer control of the affected endpoints back to the original Call Agent. Alternatively, the failed Call Agent could simply become the backup Call Agent.

当备份呼叫代理已接管一组端点的控制时,假定故障呼叫代理将与备份呼叫代理通信并同步,以便将受影响端点的控制权转移回原始呼叫代理。或者,失败的呼叫代理可以简单地成为备份呼叫代理。

We should note that handover conflict resolution between separate CA's is not in place - we are relying strictly on the CA's knowing what they are doing and communicating with each other (although AuditEndpoint can be used to learn about the current "notified entity"). If this is not the case, unexpected behavior may occur.

我们应该注意到,独立CA之间的切换冲突解决方案并不到位——我们严格依赖CA了解他们在做什么并相互通信(尽管AuditEndpoint可用于了解当前“通知实体”)。如果不是这样,可能会发生意外行为。

Note that as mentioned earlier, the default "notified entity" is provisioned and may include both domain name and port. For small gateways, provisioning may be done on a per endpoint basis. For much larger gateways, a single provisioning element may be provided for multiple endpoints or even for the entire gateway itself. In either case, once the gateway powers up, each endpoint MUST have its own "notified entity", so provisioned values for an aggregation of endpoints MUST be copied to the "notified entity" for each endpoint in the aggregation before operation proceeds. Where possible, the RestartInProgress command on restart SHOULD be sent to the provisioned "notified entity" based on an aggregation that allows the "all of" wild-card to be used. This will reduce the number of RestartInProgress messages.

请注意,如前所述,默认的“通知实体”已设置,可能包括域名和端口。对于小型网关,可以在每个端点的基础上进行资源调配。对于更大的网关,可以为多个端点甚至整个网关本身提供单个供应元素。在任何一种情况下,一旦网关通电,每个端点都必须有自己的“通知实体”,因此,在操作继续之前,必须将为端点聚合设置的值复制到聚合中每个端点的“通知实体”。在可能的情况下,应根据允许使用“全部”通配符的聚合将重新启动时的RestartInProgress命令发送给已设置的“通知实体”。这将减少重新启动进程消息的数量。

Another way of viewing the use of "notified entity" is in terms of associations between gateways and Call Agents. The "notified entity" is a means to set up that association, and governs where the gateway will send commands to. Commands received by the gateway however may come from any source. The association is initially provisioned with a provisioned "notified entity", so that on power up RestartInProgress and persistent events that occur prior to the first NotificationRequest from Call Agents will be sent to the provisioned Call Agent. Once a Call Agent makes a request, however it may include the NotifiedEntity parameter and set up a new association. Since the "notified entity" persists across calls, the association remains intact until a new "notified entity" is provided.

查看“通知实体”用法的另一种方式是网关和呼叫代理之间的关联。“通知实体”是建立该关联的一种方法,并控制网关将向何处发送命令。然而,网关接收到的命令可能来自任何来源。关联最初由一个已设置的“通知实体”设置,以便在通电重新启动时,在呼叫代理发出第一个通知请求之前发生的进程和持久事件将发送到已设置的呼叫代理。但是,一旦呼叫代理发出请求,它可能会包含NotifiedEntity参数并建立新的关联。由于“通知实体”在调用之间持续存在,因此在提供新的“通知实体”之前,关联保持不变。

4.2 Communicating with Gateways
4.2 与网关通信

Endpoint names in gateways include a local name indicating the specific endpoint and a domain name indicating the host/gateway where the endpoint resides. Gateways may have several interfaces for redundancy.

网关中的端点名称包括指示特定端点的本地名称和指示端点所在的主机/网关的域名。网关可能有多个冗余接口。

In gateways that have routing capability, the domain name may resolve to a single network address with internal routing to that address from any of the gateway's interfaces. In others, the domain name may resolve to multiple network addresses, one for each interface. In the latter case, if a Call Agent fails to contact the gateway on one of the addresses, it MUST try the alternates.

在具有路由功能的网关中,域名可以解析为单个网络地址,并从网关的任何接口内部路由到该地址。在其他情况下,域名可能解析为多个网络地址,每个接口一个。在后一种情况下,如果呼叫代理无法联系其中一个地址上的网关,它必须尝试其他地址。

4.3 Retransmission, and Detection of Lost Associations:

4.3 重新传输和检测丢失的关联:

The media gateway control protocol is organized as a set of transactions, each of which is composed of a command and a response, commonly referred to as an acknowledgement. The MGCP messages, being carried over UDP, may be subject to losses. In the absence of a timely response, commands are retransmitted. MGCP entities MUST keep in memory a list of the responses that they sent to recent transactions, i.e., a list of all the responses they sent over the last T-HIST seconds, and a list of the transactions that have not yet finished executing.

媒体网关控制协议被组织为一组事务,每个事务由命令和响应(通常称为确认)组成。通过UDP传输的MGCP消息可能会丢失。在没有及时响应的情况下,将重新传输命令。MGCP实体必须在内存中保留其发送到最近事务的响应列表,即,在过去T-HIST秒内发送的所有响应的列表,以及尚未完成执行的事务的列表。

The transaction identifiers of incoming commands are compared to the transaction identifiers of the recent responses. If a match is found, the MGCP entity does not execute the transaction, but simply repeats the response. If a match to a previously responded to transaction is not found, the transaction identifier of the incoming command is compared to the list of transactions that have not yet finished executing. If a match is found, the MGCP entity does not execute the transaction again, but SHOULD simply send a provisional response - a final response will be provided when the execution of the command is complete (see Section 3.5.6 for further detail).

将传入命令的事务标识符与最近响应的事务标识符进行比较。如果找到匹配项,则MGCP实体不执行事务,而只是重复响应。如果未找到与先前响应的事务的匹配项,则将传入命令的事务标识符与尚未完成执行的事务列表进行比较。如果找到匹配项,MGCP实体不会再次执行事务,但应简单地发送临时响应-当命令执行完成时,将提供最终响应(有关详细信息,请参阅第3.5.6节)。

The repetition mechanism is used to guard against four types of possible errors:

重复机制用于防止四种可能的错误:

* transmission errors, when for example a packet is lost due to noise on a line or congestion in a queue,

* 传输错误,例如,由于线路上的噪音或队列中的拥塞导致数据包丢失时,

* component failure, when for example an interface to a Call Agent becomes unavailable,

* 组件故障,例如呼叫代理接口不可用时,

* Call Agent failure, when for example an entire Call Agent becomes unavailable,

* 呼叫代理失败,例如,当整个呼叫代理变得不可用时,

* failover, when a new Call Agent is "taking over" transparently.

* 故障转移,当新呼叫代理以透明方式“接管”时。

The elements should be able to derive from the past history an estimate of the packet loss rate due to transmission errors. In a properly configured system, this loss rate should be very low, typically less than 1%. If a Call Agent or a gateway has to repeat a message more than a few times, it is very legitimate to assume that something other than a transmission error is occurring. For example, given a loss rate of 1%, the probability that 5 consecutive transmission attempts fail is 1 in 100 billion, an event that should occur less than once every 10 days for a Call Agent that processes 1,000 transactions per second. (Indeed, the number of retransmissions that is considered excessive should be a function of

这些元件应当能够从过去的历史中得出由于传输错误而导致的分组丢失率的估计值。在正确配置的系统中,此丢失率应非常低,通常小于1%。如果呼叫代理或网关必须将消息重复多次,则可以合理地假设正在发生传输错误以外的情况。例如,如果丢失率为1%,则5次连续传输尝试失败的概率为1000亿分之一,对于每秒处理1000个事务的呼叫代理,该事件应不到每10天发生一次。(事实上,被认为过度的重传次数应该是

the prevailing packet loss rate.) We should note that the "suspicion threshold", which we will call "Max1", is normally lower than the "disconnection threshold", which we will call "Max2". Max2 MUST be set to a larger value than Max1.

我们应该注意,“怀疑阈值”(我们称之为“Max1”)通常低于“断开阈值”(我们称之为“Max2”)。Max2必须设置为大于Max1的值。

The MGCP retransmission algorithm is illustrated in the Figure below and explained further in the following:

MGCP重传算法如下图所示,并在下文中进一步说明:

      Command issued: N=0, T=0
              |
              |  +------------ retransmission: N++ <--------------+
              |  |                                                |
              |  |     if T <= T-Max then                         |
              |  |      transmission                              |
              |  |  +-- to new address, <-+<----------------------|--+
              |  |  |       N=0           |                       |  |
              V  V  V                     |                       |  |
          +-----------+                   |                       |  |
      +-->| awaiting  |- new Call Agent ->+   +------------+      |  |
      |   |  response |--- timer elapsed  --->| T > T-Max ?|      |  |
      |   +-----------+                       +------------+      ^  ^
      |          |                             |    |             |  |
      |          v             +-----(yes)-----+   (no)           |  |
      |      (response         |                    |             |  |
      |       received)        |              +------------+      |  |
      |          |             |              | N >= Max1 ?|-(no)>+  |
      |          v             |              +------------+      ^  ^
      |      +--------+        |                    |             |  |
      +<(no)-| final ?|        |                  (yes)           |  |
      ^      +--------+        |                    |             |  |
      |          |             |     (if first address & N=Max1,  |  |
      |          v             |      or last address & N=Max2    |  |
      |        (yes)           |               check DNS)         |  |
      |          |             |                    |             |  |
      |          v             V           +---------------+      |  |
      |        (end)           |           |more addresses?|(yes)-|->+
      |                        |           +---------------+      |
      |                        |                    |             ^
      |                        |                  (no)            |
      |                        |                    |             |
      |                        |              +------------+      |
      |                        |              | N >= Max2 ?|(no)--+
      |                        |              +------------+
      |                        |                    |
      |                        |                  (yes)
      |                        |                    |
      |                        |            +----------------+
      |                        +----------->| T >= 2*T-HIST ?|
      |                                     +----------------+
      |                                       |       |
      |                                     (no)    (yes)
      +---------------<-----------------------+       |
                                                      v
                                                (disconnected)
        
      Command issued: N=0, T=0
              |
              |  +------------ retransmission: N++ <--------------+
              |  |                                                |
              |  |     if T <= T-Max then                         |
              |  |      transmission                              |
              |  |  +-- to new address, <-+<----------------------|--+
              |  |  |       N=0           |                       |  |
              V  V  V                     |                       |  |
          +-----------+                   |                       |  |
      +-->| awaiting  |- new Call Agent ->+   +------------+      |  |
      |   |  response |--- timer elapsed  --->| T > T-Max ?|      |  |
      |   +-----------+                       +------------+      ^  ^
      |          |                             |    |             |  |
      |          v             +-----(yes)-----+   (no)           |  |
      |      (response         |                    |             |  |
      |       received)        |              +------------+      |  |
      |          |             |              | N >= Max1 ?|-(no)>+  |
      |          v             |              +------------+      ^  ^
      |      +--------+        |                    |             |  |
      +<(no)-| final ?|        |                  (yes)           |  |
      ^      +--------+        |                    |             |  |
      |          |             |     (if first address & N=Max1,  |  |
      |          v             |      or last address & N=Max2    |  |
      |        (yes)           |               check DNS)         |  |
      |          |             |                    |             |  |
      |          v             V           +---------------+      |  |
      |        (end)           |           |more addresses?|(yes)-|->+
      |                        |           +---------------+      |
      |                        |                    |             ^
      |                        |                  (no)            |
      |                        |                    |             |
      |                        |              +------------+      |
      |                        |              | N >= Max2 ?|(no)--+
      |                        |              +------------+
      |                        |                    |
      |                        |                  (yes)
      |                        |                    |
      |                        |            +----------------+
      |                        +----------->| T >= 2*T-HIST ?|
      |                                     +----------------+
      |                                       |       |
      |                                     (no)    (yes)
      +---------------<-----------------------+       |
                                                      v
                                                (disconnected)
        

A classic retransmission algorithm would simply count the number of successive repetitions, and conclude that the association is broken after re-transmitting the packet an excessive number of times (typically between 7 and 11 times). In order to account for the possibility of an undetected or in-progress "failover", we modify the classic algorithm as follows:

经典的重传算法只需计算连续重复的次数,并得出结论,在重新发送数据包的次数过多(通常在7到11次之间)后,关联被破坏。为了考虑未检测到或正在进行的“故障转移”的可能性,我们对经典算法进行了如下修改:

* We require that the gateway always checks for the presence of a new Call Agent. It can be noticed either by:

* 我们要求网关始终检查是否存在新的呼叫代理。可以通过以下方式注意到:

- receiving a command where the NotifiedEntity points to the new Call Agent, or

- 接收通知身份指向新呼叫代理的命令,或

- receiving a redirection response pointing to a new Call Agent.

- 接收指向新呼叫代理的重定向响应。

If a new Call Agent is detected, the gateway MUST start retransmitting outstanding commands for the endpoint(s) redirected to that new Call Agent. Responses to new or old commands are still transmitted to the source address of the command.

如果检测到新的呼叫代理,网关必须开始为重定向到该新呼叫代理的端点重新传输未完成的命令。对新命令或旧命令的响应仍会传输到命令的源地址。

* Prior to any retransmission, it is checked that the time elapsed since the sending of the initial datagram is no greater than T-MAX. If more than T-MAX time has elapsed, then retransmissions MUST cease. If more than 2*T-HIST has elapsed, then the endpoint becomes disconnected.

* 在任何重新传输之前,检查初始数据报发送后经过的时间是否不大于T-MAX。如果经过的时间超过T-MAX,则必须停止重新传输。如果超过2*T-HIST,则端点将断开连接。

* If the number of repetitions for this Call Agent is equal to "Max1", and its domain name was not resolved recently (e.g., within the last 5 seconds or otherwise provisioned), and it is not in the process of being resolved, then the gateway MAY actively query the domain name server in order to detect the possible change of the Call Agent interfaces. Note that the first repetition is the second transmission.

* 如果此呼叫代理的重复次数等于“Max1”,且其域名最近未解析(例如,在最近5秒内或以其他方式设置),且未在解析过程中,然后,网关可以主动查询域名服务器,以便检测呼叫代理接口的可能变化。注意,第一次重复是第二次传输。

* The gateway may have learned several IP addresses for the call agent. If the number of repetitions for this IP address is greater than or equal to "Max1" and lower than "Max2", and there are more addresses that have not been tried, then the gateway MUST direct the retransmissions to alternate addresses. Also, receipt of explicit network notifications such as, e.g., ICMP network, host, protocol, or port unreachable SHOULD lead the gateway to try alternate addresses (with due consideration to possible security issues).

* 网关可能已读入呼叫代理的多个IP地址。如果此IP地址的重复次数大于或等于“Max1”且小于“Max2”,并且有更多地址尚未尝试,则网关必须将重传定向到备用地址。此外,收到显式网络通知(例如ICMP网络、主机、协议或无法访问的端口)时,网关应尝试其他地址(适当考虑可能的安全问题)。

* If there are no more interfaces to try, and the number of repetitions for this address is Max2, then the gateway SHOULD contact the DNS one more time to see if any other interfaces have become available, unless the domain name was resolved recently (e.g., within the last 5 seconds or otherwise provisioned), or it is already in the process of being resolved. If there still are no more interfaces to try, the gateway is then disconnected and MUST initiate the "disconnected" procedure (see Section 4.4.7).

* 如果没有更多接口可供尝试,且此地址的重复次数为Max2,则网关应再次联系DNS,以查看是否有任何其他接口可用,除非最近解析了域名(例如,在最后5秒内或以其他方式设置),或者它已经在被解决的过程中。如果仍然没有更多的接口可供尝试,则网关将断开连接,并且必须启动“断开连接”程序(参见第4.4.7节)。

In order to automatically adapt to network load, MGCP specifies exponentially increasing timers. If the initial timer is set to 200 milliseconds, the loss of a fifth retransmission will be detected after about 6 seconds. This is probably an acceptable waiting delay to detect a failover. The repetitions should continue after that delay not only in order to perhaps overcome a transient connectivity problem, but also in order to allow some more time for the execution of a failover - waiting a total delay of 30 seconds is probably acceptable.

为了自动适应网络负载,MGCP指定了指数增长的计时器。如果初始计时器设置为200毫秒,则在大约6秒后将检测到第五次重新传输的丢失。这可能是检测故障转移的可接受等待延迟。在该延迟之后,重复应该继续进行,这不仅是为了克服暂时的连接问题,也是为了允许更多的时间执行故障切换-等待30秒的总延迟可能是可以接受的。

It is however important that the maximum delay of retransmissions be bounded. Prior to any retransmission, it is checked that the time (T) elapsed since the sending of the initial datagram is no greater than T-MAX. If more than T-MAX time has elapsed, retransmissions MUST cease. If more than 2*T-HIST time has elapsed, the endpoint becomes disconnected. The value T-MAX is related to the T-HIST value: the T-HIST value MUST be greater than or equal to T-MAX plus the maximum propagation delay in the network.

然而,重要的是,重传的最大延迟是有界的。在任何重新传输之前,检查初始数据报发送后经过的时间(T)是否不大于T-MAX。如果经过的时间超过T-MAX,则必须停止重新传输。如果超过2*T-HIST时间,端点将断开连接。T-MAX值与T-HIST值相关:T-HIST值必须大于或等于T-MAX加上网络中的最大传播延迟。

The default value for T-MAX is 20 seconds. Thus, if the assumed maximum propagation delay is 10 seconds, then responses to old transactions would have to be kept for a period of at least 30 seconds. The importance of having the sender and receiver agree on these values cannot be overstated.

T-MAX的默认值为20秒。因此,如果假定最大传播延迟为10秒,则对旧事务的响应必须保持至少30秒。让发送方和接收方就这些价值达成一致的重要性怎么强调都不为过。

The default value for Max1 is 5 retransmissions and the default value for Max2 is 7 retransmissions. Both of these values may be altered by the provisioning process.

Max1的默认值为5次重传,Max2的默认值为7次重传。这两个值都可以通过设置过程进行更改。

The provisioning process MUST be able to disable one or both of the Max1 and Max2 DNS queries.

设置过程必须能够禁用一个或两个Max1和Max2 DNS查询。

4.4 Race Conditions
4.4 比赛条件

MGCP deals with race conditions through the notion of a "quarantine list" and through explicit detection of desynchronization, e.g., for mismatched hook state due to glare for an endpoint.

MGCP通过“隔离列表”的概念处理竞争条件,并通过显式检测去同步,例如,由于端点眩光导致的不匹配挂钩状态。

MGCP does not assume that the transport mechanism will maintain the order of commands and responses. This may cause race conditions, that may be obviated through a proper behavior of the Call Agent. (Note that some race conditions are inherent to distributed systems; they would still occur, even if the commands were transmitted in strict order.)

MGCP并不认为传输机制将维持命令和响应的顺序。这可能会导致竞争条件,这可以通过调用代理的正确行为来避免。(请注意,某些竞争条件是分布式系统固有的;即使命令以严格的顺序传输,它们仍然会发生。)

In some cases, many gateways may decide to restart operation at the same time. This may occur, for example, if an area loses power or transmission capability during an earthquake or an ice storm. When power and transmission are reestablished, many gateways may decide to send "RestartInProgress" commands simultaneously, leading to very unstable operation.

在某些情况下,许多网关可能决定同时重新启动操作。例如,如果一个地区在地震或冰暴期间失去电力或传输能力,则可能发生这种情况。当重新建立电源和传输时,许多网关可能决定同时发送“重新启动进程”命令,从而导致非常不稳定的操作。

4.4.1 Quarantine List
4.4.1 检疫清单

MGCP controlled gateways will receive "notification requests" that ask them to watch for a list of "events". The protocol elements that determine the handling of these events are the "Requested Events" list, the "Digit Map", the "Quarantine Handling", and the "Detect Events" list.

MGCP控制的网关将接收“通知请求”,要求它们监视“事件”列表。确定这些事件处理的协议元素是“请求事件”列表、“数字映射”、“隔离处理”和“检测事件”列表。

When the endpoint is initialized, the requested events list only consists of persistent events for the endpoint, and the digit map is assumed empty. At this point, the endpoint MAY use an implicit NotificationRequest with the reserved RequestIdentifier zero ("0") to detect and report a persistent event, e.g., off-hook. A pre-existing off-hook condition MUST here result in the off-hook event being generated as well.

初始化端点时,请求的事件列表仅包含端点的持久事件,并且数字映射假定为空。此时,端点可以使用带有保留RequestIdentifier零(“0”)的隐式NotificationRequest来检测和报告持久性事件,例如,摘机。预先存在的脱钩条件必须在这里导致脱钩事件也被生成。

The endpoint awaits the reception of a NotificationRequest command, after which the gateway starts observing the endpoint for occurrences of the events mentioned in the list, including persistent events.

端点等待NotificationRequest命令的接收,之后网关开始观察端点是否出现列表中提到的事件,包括持久性事件。

The events are examined as they occur. The action that follows is determined by the "action" parameter associated with the event in the list of requested events, and also by the digit map. The events that are defined as "accumulate" or "accumulate according to digit map" are accumulated in a list of events, the events that are marked as "accumulate according to the digit map" will additionally be accumulated in the "current dial string". This will go on until one event is encountered that triggers a notification which will be sent to the current "notified entity".

在事件发生时对其进行检查。接下来的操作由请求事件列表中与事件关联的“action”参数以及数字映射确定。定义为“累积”或“根据数字映射累积”的事件累积在事件列表中,标记为“根据数字映射累积”的事件将另外累积在“当前拨号字符串”中。这将一直持续到遇到一个触发通知的事件,该通知将被发送到当前的“已通知实体”。

The gateway, at this point, will transmit the Notify command and will place the endpoint in a "notification" state. As long as the endpoint is in this notification state, the events that are to be detected on the endpoint are stored in a "quarantine" buffer (FIFO)

此时,网关将发送Notify命令,并将端点置于“通知”状态。只要端点处于此通知状态,将在端点上检测到的事件存储在“隔离”缓冲区(FIFO)中

for later processing. The events are, in a sense, "quarantined". All events that are specified by the union of the RequestedEvents parameter and the most recently received DetectEvents parameter or, in the absence of the latter, all events that are referred to in the RequestedEvents, SHALL be detected and quarantined, regardless of the action associated with the event. Persistent events are here viewed as implicitly included in RequestedEvents. If the quarantine buffer reaches the capacity of the endpoint, a Quarantine Buffer Overflow event (see Appendix B) SHOULD be generated (when this event is supported, the endpoint MUST ensure it has capacity to include the event in the quarantine buffer). Excess events will now be discarded.

供以后处理。从某种意义上说,这些事件是“隔离的”。应检测并隔离由RequestedEvents参数和最近接收的DetectedEvents参数的联合指定的所有事件,或在没有后者的情况下,应检测并隔离RequestedEvents中引用的所有事件,而不考虑与事件相关的操作。持久性事件在这里被视为隐式包含在RequestedEvents中。如果隔离缓冲区达到端点的容量,则应生成隔离缓冲区溢出事件(参见附录B)(当支持此事件时,端点必须确保其有能力将事件包括在隔离缓冲区中)。多余的事件现在将被丢弃。

The endpoint exits the "notification state" when the response (whether success or failure) to the Notify command is received. The Notify command may be retransmitted in the "notification state", as specified in Section 3.5 and 4. If the endpoint is or becomes disconnected (see Section 4.3) during this, a response to the Notify command will never be received. The Notify command is then lost and hence no longer considered pending, yet the endpoint is still in the "notification state". Should that occur, completion of the disconnected procedure specified in Section 4.4.7 SHALL then lead the endpoint to exit the "notification state".

当接收到对Notify命令的响应(无论是成功还是失败)时,端点退出“通知状态”。Notify命令可在第3.5节和第4节规定的“通知状态”下重新传输。如果在此期间端点断开连接(参见第4.3节),则永远不会收到对Notify命令的响应。然后,Notify命令将丢失,因此不再被视为挂起,但端点仍处于“通知状态”。如果出现这种情况,完成第4.4.7节中规定的断开程序后,端点应退出“通知状态”。

When the endpoint exits the "notification state" it resets the list of observed events and the "current dial string" of the endpoint to a null value.

当端点退出“通知状态”时,它会将观察到的事件列表和端点的“当前拨号字符串”重置为空值。

Following that point, the behavior of the gateway depends on the value of the QuarantineHandling parameter in the triggering NotificationRequest command:

在此之后,网关的行为取决于触发NotificationRequest命令中QuarantineHandling参数的值:

If the Call Agent had specified, that it expected at most one notification in response to the notification request command, then the gateway SHALL simply keep on accumulating events in the quarantine buffer until it receives the next notification request command.

如果呼叫代理指定,它期望最多有一个通知响应通知请求命令,那么网关应继续在隔离缓冲区中累积事件,直到它收到下一个通知请求命令。

If, however, the gateway is authorized to send multiple successive Notify commands, it will proceed as follows. When the gateway exits the "notification state", it resets the list of observed events and the "current dial string" of the endpoint to a null value and starts processing the list of quarantined events, using the already received list of requested events and digit map. When processing these events, the gateway may encounter an event which triggers a Notify command to be sent. If that is the case, the gateway can adopt one of the two following behaviors:

但是,如果网关被授权发送多个连续的Notify命令,它将按如下方式进行。当网关退出“通知状态”时,它会将观察到的事件列表和端点的“当前拨号字符串”重置为空值,并使用已收到的请求事件列表和数字映射开始处理隔离事件列表。在处理这些事件时,网关可能会遇到触发要发送的Notify命令的事件。如果是这种情况,网关可以采用以下两种行为之一:

* it can immediately transmit a Notify command that will report all events that were accumulated in the list of observed events until the triggering event, included, leaving the unprocessed events in the quarantine buffer,

* 它可以立即发送Notify命令,该命令将报告观察到的事件列表中累积的所有事件,直到触发事件(包括在内),将未处理的事件保留在隔离缓冲区中,

* or it can attempt to empty the quarantine buffer and transmit a single Notify command reporting several sets of events (in a single list of observed events) and possibly several dial strings. The "current dial string" is reset to a null value after each triggering event. The events that follow the last triggering event are left in the quarantine buffer.

* 或者,它可以尝试清空隔离缓冲区并发送一个Notify命令,该命令报告多组事件(在一个观察到的事件列表中)以及可能的多个拨号字符串。每次触发事件后,“当前拨号字符串”重置为空值。上次触发事件之后的事件保留在隔离缓冲区中。

If the gateway transmits a Notify command, the endpoint will reenter and remain in the "notification state" until the acknowledgement is received (as described above). If the gateway does not find a quarantined event that triggers a Notify command, it places the endpoint in a normal state. Events are then processed as they come, in exactly the same way as if a Notification Request command had just been received.

如果网关发送Notify命令,端点将重新进入并保持“通知状态”,直到收到确认(如上所述)。如果网关未找到触发Notify命令的隔离事件,则会将端点置于正常状态。然后,事件在发生时进行处理,处理方式与刚刚收到通知请求命令完全相同。

A gateway may receive at any time a new Notification Request command for the endpoint, including the case where the endpoint is disconnected. Activating an embedded Notification Request is here viewed as receiving a new Notification Request as well, except that the current list of ObservedEvents remains unmodified rather than being processed again. When a new notification request is received in the notification state, the gateway SHALL ensure that the pending Notify is received by the Call Agent prior to a new Notify (note that a Notify that was lost due to being disconnected, is no longer considered pending). It does so by using the "piggybacking" functionality of the protocol. The messages will then be sent in a single packet to the current "notified entity". The steps involved are the following:

网关可随时接收端点的新通知请求命令,包括端点断开连接的情况。激活嵌入式通知请求在这里也被视为接收新的通知请求,但当前观察到的事件列表保持不变,而不是再次处理。当在通知状态下收到新的通知请求时,网关应确保呼叫代理在收到新通知之前收到待定通知(注意,由于断开连接而丢失的通知不再被视为待定)。它通过使用协议的“搭载”功能来实现这一点。然后,这些消息将以单个数据包的形式发送到当前的“通知实体”。涉及的步骤如下:

a) the gateway sends a response to the new notification request.

a) 网关发送对新通知请求的响应。

b) the endpoint is then taken out of the "notification state" without waiting for the acknowledgement of the pending Notify command.

b) 然后将端点从“通知状态”中取出,而无需等待挂起的Notify命令的确认。

c) a copy of the unacknowledged Notify command is kept until an acknowledgement is received. If a timer elapses, the Notify will be retransmitted.

c) 未确认的Notify命令的副本将保留,直到收到确认。如果计时器超时,将重新传输通知。

d) If the gateway has to transmit a new Notify before the previous Notify(s) is acknowledged, it constructs a packet that piggybacks a repetition of the old Notify(s) and the new Notify (ordered by age with the oldest first). This datagram will be sent to the current "notified entity".

d) 如果网关必须在确认前一个通知之前发送一个新通知,它将构造一个数据包,该数据包携带旧通知和新通知的重复(按年龄排序,最早的优先)。此数据报将发送到当前的“通知实体”。

f) Gateways that cannot piggyback several messages in the same datagram and hence guarantee in-order delivery of two (or more) Notify's SHALL leave the endpoint in the "notification" state as long as the last Notify is not acknowledged.

f) 如果网关不能在同一数据报中承载多个消息,因此不能保证两个(或多个)通知的有序传递,则只要最后一个通知未被确认,网关就应使端点处于“通知”状态。

The procedure is illustrated by the following diagram:

该程序如下图所示:

    +-------------------+
    | Processing Events |<--------------------------------------+
    +-------------------+                                       |
             |                                                  |
     Need to send NTFY                                          |
             |                                                  |
             v                                                  |
    +-------------------+                                       |
    | Outstanding NTFY  |---- No -------+                       |
    |                   |               |                       |
    +-------------------+               v                       |
             |                    +-----------+                 |
            Yes                   | Send NTFY |                 |
             |                    +-----------+                 |
             v                          |                       |
    +--------------------+              v                       |
    | Piggyback new NTFY |     +--------------------+           |
    | w. old outstanding |---->| Notification State |           |
    | NTFY(s)            |     +--------------------+           |
    +--------------------+       |               |              |
                             new RQNT        NTFY response      |
                             received        received           |
                                 |               |              |
                                 |               v              |
                                 |        +-------------+       |
                                 |        | Step mode ? |- No ->+
                                 |        +-------------+       ^
                                 |               |              |
                                 |              Yes             |
                                 |               |              |
                                 |               v              |
                                 |       +---------------+      |
                                 |       | Wait for RQNT |      |
                                 |       +---------------+      |
                                 |               |              |
                                 |         RQNT received        |
                                 |               |              |
                                 |               v              |
                                 |       +---------------+      |
                                 +------>| Apply RQNT and|----->+
                                         | send response |
                                         +---------------+
        
    +-------------------+
    | Processing Events |<--------------------------------------+
    +-------------------+                                       |
             |                                                  |
     Need to send NTFY                                          |
             |                                                  |
             v                                                  |
    +-------------------+                                       |
    | Outstanding NTFY  |---- No -------+                       |
    |                   |               |                       |
    +-------------------+               v                       |
             |                    +-----------+                 |
            Yes                   | Send NTFY |                 |
             |                    +-----------+                 |
             v                          |                       |
    +--------------------+              v                       |
    | Piggyback new NTFY |     +--------------------+           |
    | w. old outstanding |---->| Notification State |           |
    | NTFY(s)            |     +--------------------+           |
    +--------------------+       |               |              |
                             new RQNT        NTFY response      |
                             received        received           |
                                 |               |              |
                                 |               v              |
                                 |        +-------------+       |
                                 |        | Step mode ? |- No ->+
                                 |        +-------------+       ^
                                 |               |              |
                                 |              Yes             |
                                 |               |              |
                                 |               v              |
                                 |       +---------------+      |
                                 |       | Wait for RQNT |      |
                                 |       +---------------+      |
                                 |               |              |
                                 |         RQNT received        |
                                 |               |              |
                                 |               v              |
                                 |       +---------------+      |
                                 +------>| Apply RQNT and|----->+
                                         | send response |
                                         +---------------+
        

Gateways may also attempt to deliver the pending Notify prior to a successful response to the new NotificationRequest by using the "piggybacking" functionality of the protocol. This was in fact required behavior in RFC 2705, however there are several complications in doing this, and the benefits are questionable. In particular, the RFC 2705 mechanism did not guarantee in-order delivery of Notify's and responses to NotificationRequests in general, and hence Call Agents had to handle out-of-order delivery of these messages anyway. The change to optional status is thus backwards compatible while greatly reducing complexity.

网关还可以尝试在成功响应新的NotificationRequest之前,通过使用协议的“搭载”功能来传递挂起的Notify。事实上,这是RFC 2705中所要求的行为,但是这样做会有一些复杂的情况,其好处是值得怀疑的。特别是,RFC 2705机制不能保证Notify和NotificationRequests响应的顺序传递,因此呼叫代理无论如何都必须处理这些消息的无序传递。因此,对可选状态的更改是向后兼容的,同时大大降低了复杂性。

After receiving the Notification Request command, the requested events list and digit map (if a new one was provided) are replaced by the newly received parameters, and the current dial string is reset to a null value. Furthermore, when the Notification Request was received in the "notification state", the list of observed events is reset to a null value. The subsequent behavior is conditioned by the value of the QuarantineHandling parameter. The parameter may specify that quarantined events (and observed events which in this case is now an empty list), should be discarded, in which case they will be. If the parameter specifies that the quarantined (and observed) events are to be processed, the gateway will start processing the list of quarantined (and observed) events, using the newly received list of requested events and digit map (if provided). When processing these events, the gateway may encounter an event which requires a Notify command to be sent. If that is the case, the gateway will immediately transmit a Notify command that will report all events that were accumulated in the list of observed events until the triggering event, included leaving the unprocessed events in the quarantine buffer, and will enter the "notification state".

接收到通知请求命令后,请求的事件列表和数字映射(如果提供了新的)将替换为新接收的参数,并且当前拨号字符串将重置为空值。此外,当在“通知状态”下收到通知请求时,观察到的事件列表被重置为空值。后续行为由QuarantineHandling参数的值决定。该参数可以指定应丢弃隔离的事件(以及在本例中为空列表的观察到的事件),在这种情况下,它们将被丢弃。如果该参数指定要处理隔离(和观察到的)事件,网关将使用新收到的请求事件列表和数字映射(如果提供)开始处理隔离(和观察到的)事件列表。在处理这些事件时,网关可能会遇到需要发送Notify命令的事件。如果是这种情况,网关将立即发送Notify命令,该命令将报告在触发事件之前观察事件列表中累积的所有事件,包括将未处理的事件留在隔离缓冲区中,并将进入“通知状态”。

A new notification request may be received while the gateway has accumulated events according to the previous notification request, but has not yet detected a notification-triggering events, i.e., the endpoint is not in the "notification state". The handling of not-yet-notified events is determined, as with the quarantined events, by the quarantine handling parameter:

当网关已根据先前的通知请求累积事件,但尚未检测到通知触发事件时,即,端点未处于“通知状态”,可接收新的通知请求。与隔离事件一样,未通知事件的处理由隔离处理参数确定:

* If the quarantine-handling parameter specifies that quarantined events shall be ignored, the observed events list is simply reset.

* 如果隔离处理参数指定应忽略隔离事件,则只需重置观察到的事件列表。

* If the quarantine-handling parameter specifies that quarantined events shall be processed, the observed event list is transferred to the quarantined event list. The observed event list is then reset, and the quarantined event list is processed.

* 如果隔离处理参数指定应处理隔离事件,则观察到的事件列表将传输到隔离事件列表。然后重置观察到的事件列表,并处理隔离的事件列表。

Call Agents controlling endpoints in lockstep mode SHOULD provide the response to a successful Notify message and the new NotificationRequest in the same datagram using the piggybacking mechanism.

在lockstep模式下控制端点的调用代理应使用搭载机制在同一数据报中提供对成功Notify消息和新NotificationRequest的响应。

4.4.2 Explicit Detection
4.4.2 显式检测

A key element of the state of several endpoints is the position of the hook. A race condition may occur when the user decides to go off-hook before the Call Agent has the time to ask the gateway to notify an off-hook event (the "glare" condition well known in telephony), or if the user goes on-hook before the Call Agent has the time to request the event's notification.

多个端点状态的一个关键元素是挂钩的位置。当用户决定在呼叫代理有时间要求网关通知脱钩事件之前脱钩(电话中众所周知的“眩光”情况),或者如果用户在呼叫代理有时间请求事件通知之前脱钩,则可能发生竞态情况。

To avoid this race condition, the gateway MUST check the condition of the endpoint before acknowledging a NotificationRequest. It MUST return an error:

为了避免这种竞争状况,网关必须在确认NotificationRequest之前检查端点的状况。它必须返回一个错误:

1. If the gateway is requested to notify an "off-hook" transition while the phone is already off-hook, (error code 401 - phone off hook)

1. 如果请求网关在手机已摘机时通知“摘机”转换,(错误代码401-手机摘机)

2. If the gateway is requested to notify an "on-hook" or "flash hook" condition while the phone is already on-hook (error code 402 - phone on hook).

2. 如果请求网关在电话已挂起时通知“挂起”或“闪存挂起”情况(错误代码402-电话挂起)。

Additionally, individual signal definitions can specify that a signal will only operate under certain conditions, e.g., ringing may only be possible if the phone is already off-hook. If such prerequisites exist for a given signal, the gateway MUST return the error specified in the signal definition if the prerequisite is not met.

此外,单个信号定义可以指定信号仅在特定条件下工作,例如,只有在手机已挂断的情况下才可能响铃。如果给定信号存在此类先决条件,如果不满足先决条件,网关必须返回信号定义中指定的错误。

It should be noted, that the condition check is performed at the time the notification request is received, whereas the actual event that caused the current condition may have either been reported, or ignored earlier, or it may currently be quarantined.

应注意的是,条件检查在收到通知请求时执行,而导致当前条件的实际事件可能已被报告,或在之前被忽略,或当前已被隔离。

The other state variables of the gateway, such as the list of RequestedEvents or list of requested signals, are entirely replaced after each successful NotificationRequest, which prevents any long term discrepancy between the Call Agent and the gateway.

网关的其他状态变量,如请求事件列表或请求信号列表,在每次成功的通知请求后都会被完全替换,这防止了呼叫代理和网关之间的任何长期差异。

When a NotificationRequest is unsuccessful, whether it is included in a connection-handling command or not, the gateway MUST simply continue as if the command had never been received. As all other transactions, the NotificationRequest MUST operate as an atomic transaction, thus any changes initiated as a result of the command MUST be reverted.

当NotificationRequest不成功时,无论它是否包含在连接处理命令中,网关都必须像从未收到命令一样继续。与所有其他事务一样,NotificationRequest必须作为原子事务运行,因此,由于该命令而启动的任何更改都必须还原。

Another race condition may occur when a Notify is issued shortly before the reception by the gateway of a NotificationRequest. The RequestIdentifier is used to correlate Notify commands with NotificationRequest commands thereby enabling the Call Agent to determine if the Notify command was generated before or after the gateway received the new NotificationRequest. This is especially important to avoid deadlocks in "step" mode.

当网关在接收NotificationRequest之前不久发出通知时,可能会发生另一种竞争情况。RequestIdentifier用于将Notify命令与NotificationRequest命令关联起来,从而使呼叫代理能够确定Notify命令是在网关接收到新NotificationRequest之前还是之后生成的。这对于避免“步进”模式中的死锁尤其重要。

4.4.3 Transactional Semantics
4.4.3 事务语义

As the potential transaction completion times increase, e.g., due to external resource reservations, a careful definition of the transactional semantics becomes increasingly important. In particular the issue of race conditions, e.g., as it relates to hook-state, must be defined carefully.

随着潜在事务完成时间的增加(例如,由于外部资源保留),事务语义的仔细定义变得越来越重要。特别是竞争条件的问题,例如,当它与钩子状态相关时,必须仔细定义。

An important point to consider is, that the status of a pre-condition (e.g., hook-state) may in fact change between the time a transaction starts and the time it either completes successfully (transaction commit) or fails. In general, we can say that the successful execution of a transaction depends on one or more pre-conditions where the status of one or more of the pre-conditions may change dynamically between the transaction start and transaction commit.

要考虑的一个重要点是,预条件(例如,钩子状态)的状态可能实际上在事务开始的时间和它成功完成(事务提交)或失败的时间之间变化。通常,我们可以说事务的成功执行取决于一个或多个前置条件,其中一个或多个前置条件的状态可能在事务启动和事务提交之间动态变化。

The simplest semantics for this is simply to require that all pre-conditions be met from the time the transaction is initiated until the transaction commits. If any pre-condition is not met before the completion of the transaction, the transaction will also fail.

最简单的语义是简单地要求从事务启动到事务提交都满足所有的先决条件。如果在交易完成前未满足任何先决条件,交易也将失败。

As an example, consider a transaction that includes a request for the "off-hook" event. When the transaction is initiated the phone is "on-hook" and this pre-condition is therefore met. If the hook-state changes to "off-hook" before the transaction completes, the pre-condition is no longer met, and the transaction therefore immediately fails.

作为一个例子,考虑一个包含“摘机”事件请求的事务。当交易启动时,手机处于“挂机”状态,因此满足此先决条件。如果钩子状态在事务完成之前更改为“off hook”,则前提条件不再满足,因此事务立即失败。

Finally, we need to consider the point in time when a new transaction takes effect and endpoint processing according to an old transaction stops. For example, assume that transaction T1 has been executed successfully and event processing is currently being done according to transaction T1. Now we receive a new transaction T2 specifying new event processing (for example a CreateConnection with an encapsulated NotificationRequest). Since we don't know whether T2 will complete successfully or not, we cannot start processing events according to T2 until the outcome of T2 is known. While we could suspend all event processing until the outcome of T2 is known, this would make for a less responsive system and hence SHOULD NOT be done. Instead, when a new transaction Ty is received and Ty modifies

最后,我们需要考虑新事务生效时的时间点,以及根据旧事务停止的端点处理。例如,假设事务T1已成功执行,并且当前正在根据事务T1进行事件处理。现在,我们收到一个新事务T2,指定新的事件处理(例如,带有封装NotificationRequest的CreateConnection)。因为我们不知道T2是否会成功完成,所以在T2的结果已知之前,我们无法根据T2开始处理事件。虽然我们可以暂停所有事件处理,直到T2的结果已知,但这将导致系统响应性较低,因此不应这样做。相反,当接收到新事务Ty并修改Ty时

processing according to an old transaction Tx, processing according to Tx SHOULD remain active for as long as possible, until a successful outcome of Ty is known to occur. If Ty fails, then processing according to Tx will of course continue as usual. Any changes incurred by Ty logically takes effect when Ty commits. Thus, if the endpoint was in the notification state when Ty commits, and Ty contained a NotificationRequest, the endpoint will be taken out of the notification state when Ty commits. Note that this is independent of whether the endpoint was in the notification state when Ty was initiated. For example, a Notify could be generated due to processing according to Tx between the start and commit of Ty. If the commit of Ty leads to the endpoint entering the notification state, a new NotificationRequest (Tz) is needed to exit the notification state. This follows from the fact that transaction execution respects causal order.

根据旧事务Tx进行处理,根据Tx进行的处理应尽可能长时间保持活动状态,直到已知Ty的成功结果。如果Ty失败,那么根据Tx进行的处理当然将照常继续。Ty发生的任何更改在Ty提交时在逻辑上生效。因此,如果在Ty提交时端点处于通知状态,并且Ty包含NotificationRequest,那么在Ty提交时端点将脱离通知状态。请注意,这与启动Ty时端点是否处于通知状态无关。例如,由于在Ty的开始和提交之间根据Tx进行处理,可能会生成通知。如果Ty的提交导致端点进入通知状态,则需要一个新的NotificationRequest(Tz)来退出通知状态。这源于事务执行尊重因果顺序这一事实。

Another related issue is the use of wildcards, especially the "all of" wildcard, which may match more than one endpoint. When a command is requested, and the endpoint identifier matches more than one endpoint, transactional semantics still apply. Thus, the command MUST either succeed for all the endpoints, or it MUST fail for all of them. A single response is consequently always issued.

另一个相关问题是通配符的使用,尤其是“all-of”通配符,它可能匹配多个端点。当请求一个命令,并且端点标识符匹配多个端点时,事务语义仍然适用。因此,该命令必须对所有端点成功,或者对所有端点失败。因此,始终会发出一个响应。

4.4.4 Ordering of Commands, and Treatment of Misorder
4.4.4 命令的排序和错误排序的处理

MGCP does not mandate that the underlying transport protocol guarantees in-order delivery of commands to a gateway or an endpoint. This property tends to maximize the timeliness of actions, but it has a few drawbacks. For example:

MGCP并不要求底层传输协议保证命令按顺序传递到网关或端点。此属性倾向于最大化操作的及时性,但它有一些缺点。例如:

* Notify commands may be delayed and arrive at the Call Agent after the transmission of a new Notification Request command,

* 在传输新的通知请求命令后,通知命令可能会延迟并到达呼叫代理,

* If a new NotificationRequest is transmitted before a previous one is acknowledged, there is no guarantee that the previous one will not be received and executed after the new one.

* 如果在确认前一个NotificationRequest之前发送了新的NotificationRequest,则不能保证前一个NotificationRequest在新的NotificationRequest之后不会被接收和执行。

Call Agents that want to guarantee consistent operation of the endpoints can use the following rules:

希望确保端点一致操作的调用代理可以使用以下规则:

1) When a gateway handles several endpoints, commands pertaining to the different endpoints can be sent in parallel, for example following a model where each endpoint is controlled by its own process or its own thread.

1) 当网关处理多个端点时,可以并行发送与不同端点相关的命令,例如,遵循一个模型,其中每个端点由其自己的进程或线程控制。

2) When several connections are created on the same endpoint, commands pertaining to different connections can be sent in parallel.

2) 在同一端点上创建多个连接时,可以并行发送与不同连接相关的命令。

3) On a given connection, there should normally be only one outstanding command (create or modify). However, a DeleteConnection command can be issued at any time. In consequence, a gateway may sometimes receive a ModifyConnection command that applies to a previously deleted connection. Such commands will fail, and an error code MUST be returned (error code 515 - incorrect connection-id, is RECOMMENDED).

3) 在给定的连接上,通常只有一个未完成的命令(创建或修改)。但是,可以随时发出DeleteConnection命令。因此,网关有时可能会收到适用于先前删除的连接的ModifyConnection命令。此类命令将失败,并且必须返回错误代码(错误代码515-建议使用不正确的连接id)。

4) On a given endpoint, there should normally be only one outstanding NotificationRequest command at any time. The RequestId parameter MUST be used to correlate Notify commands with the triggering notification request.

4) 在给定的端点上,任何时候通常只有一个未完成的NotificationRequest命令。RequestId参数必须用于将Notify命令与触发通知请求相关联。

5) In some cases, an implicitly or explicitly wildcarded DeleteConnection command that applies to a group of endpoints can step in front of a pending CreateConnection command. The Call Agent should individually delete all connections whose completion was pending at the time of the global DeleteConnection command. Also, new CreateConnection commands for endpoints named by the wild-carding SHOULD NOT be sent until the wild-carded DeleteConnection command is acknowledged.

5) 在某些情况下,应用于一组端点的隐式或显式通配符DeleteConnection命令可以在挂起的CreateConnection命令之前执行。调用代理应单独删除在执行全局DeleteConnection命令时等待完成的所有连接。另外,在确认通配符的DeleteConnection命令之前,不应发送由通配符命名的端点的新CreateConnection命令。

6) When commands are embedded within each other, sequencing requirements for all commands must be adhered to. For example a Create Connection command with a Notification Request in it must adhere to the sequencing requirements associated with both CreateConnection and NotificationRequest at the same time.

6) 当命令相互嵌入时,必须遵守所有命令的顺序要求。例如,包含通知请求的Create Connection命令必须同时遵守与CreateConnection和NotificationRequest关联的顺序要求。

7) AuditEndpoint and AuditConnection are not subject to any sequencing requirements.

7) AuditEndpoint和AuditConnection不受任何排序要求的约束。

8) RestartInProgress MUST always be the first command sent by an endpoint as defined by the restart procedure. Any other command or non-restart response (see Section 4.4.6), except for responses to auditing, MUST be delivered after this RestartInProgress command (piggybacking allowed).

8) RestartInProgress必须始终是由重新启动过程定义的端点发送的第一个命令。任何其他命令或非重启响应(参见第4.4.6节),除了对审核的响应外,必须在该重启进程命令(允许搭载)之后交付。

9) When multiple messages are piggybacked in a single packet, the messages are always processed in order.

9) 当在单个数据包中承载多条消息时,消息总是按顺序处理。

10) On a given endpoint, there should normally be only one outstanding EndpointConfiguration command at any time.

10) 在给定的端点上,通常在任何时候只有一个未完成的EndpointConfiguration命令。

Gateways MUST NOT make any assumptions as to whether Call Agents follow these rules or not. Consequently gateways MUST always respond to commands, regardless of whether they adhere to the above rules or not. To ensure consistent operation, gateways SHOULD behave as specified below when one or more of the above rules are not followed:

网关不得对呼叫代理是否遵守这些规则做出任何假设。因此,网关必须始终响应命令,无论它们是否遵守上述规则。为确保一致的操作,当不遵守上述一个或多个规则时,网关应按以下规定运行:

* Where a single outstanding command is expected (ModifyConnection, NotificationRequest, and EndpointConfiguration), but the same command is received in a new transaction before the old finishes executing, the gateway SHOULD fail the previous command. This includes the case where one or more of the commands were encapsulated. The use of error code 407 (transaction aborted) is RECOMMENDED.

* 如果需要单个未完成的命令(ModifyConnection、NotificationRequest和EndpointConfiguration),但在旧事务完成执行之前在新事务中接收到相同的命令,则网关应使上一个命令失败。这包括封装了一个或多个命令的情况。建议使用错误代码407(事务中止)。

* If a ModifyConnection command is received for a pending CreateConnection command, the ModifyConnection command SHOULD simply be rejected. The use of error code 400 (transient error) is RECOMMENDED. Note that this situation constitutes a Call Agent programming error.

* 如果接收到挂起的CreateConnection命令的ModifyConnection命令,则应该简单地拒绝ModifyConnection命令。建议使用错误代码400(瞬时错误)。请注意,这种情况构成呼叫代理程序编程错误。

* If a DeleteConnection command is received for a pending CreateConnection or ModifyConnection command, the pending command MUST be aborted. The use of error code 407 (transaction aborted) is RECOMMENDED.

* 如果收到挂起的CreateConnection或ModifyConnection命令的DeleteConnection命令,则必须中止挂起的命令。建议使用错误代码407(事务中止)。

Note, that where reception of a new command leads to aborting an old command, the old command SHOULD be aborted regardless of whether the new command succeeds or not. For example, if a ModifyConnection command is aborted by a DeleteConnection command which itself fails due to an encapsulated NotificationRequest, the ModifyConnection command is still aborted.

请注意,如果接收新命令导致中止旧命令,则无论新命令是否成功,都应中止旧命令。例如,如果ModifyConnection命令被DeleteConnection命令中止,而DeleteConnection命令本身由于封装的NotificationRequest而失败,则ModifyConnection命令仍然中止。

4.4.5 Endpoint Service States
4.4.5 端点服务状态

As described earlier, endpoints configured for operation may be either in-service or out-of-service. The actual service-state of the endpoint is reflected by the combination of the RestartMethod and RestartDelay parameters, which are sent with RestartInProgress commands (Section 2.3.12) and furthermore may be audited in AuditEndpoint commands (Section 2.3.10).

如前所述,为操作配置的端点可以是服务中的,也可以是服务外的。端点的实际服务状态通过RestartMethod和RestartDelay参数的组合来反映,这些参数与RestartInProgress命令一起发送(第2.3.12节),并且可以在AuditEndpoint命令中进行审核(第2.3.10节)。

The service-state of an endpoint affects how it processes a command. An endpoint in-service MUST process any command received, whereas an endpoint that is out-of-service MUST reject non-auditing commands, but SHOULD process auditing commands if possible. For backwards compatibility, auditing commands for an out-of-service endpoint may alternatively be rejected as well. Any command rejected due to an endpoint being out-of-service SHOULD generate error code 501 (endpoint not ready/out-of-service).

端点的服务状态影响其处理命令的方式。服务中的端点必须处理接收到的任何命令,而服务外的端点必须拒绝非审核命令,但应尽可能处理审核命令。为了向后兼容,服务外端点的审核命令也可能被拒绝。由于端点停止服务而被拒绝的任何命令都应生成错误代码501(端点未就绪/停止服务)。

Note that (per Section 2.1.2), unless otherwise specified for a command, endpoint names containing the "any of" wildcard only refer to endpoints in-service, whereas endpoint names containing the "all of" wildcard refer to all endpoints, regardless of service state.

请注意(根据第2.1.2节),除非对命令另有规定,否则包含“任意”通配符的端点名称仅指服务中的端点,而包含“全部”通配符的端点名称指所有端点,而不管服务状态如何。

The above relationships are illustrated in the table below which shows the current service-states and gateway processing of commands as a function of the RestartInProgress command sent and the response (if any) received to it. The last column also lists (in parentheses) the RestartMethod to be returned if audited:

下表说明了上述关系,其中显示了当前服务状态和网关对命令的处理,作为发送的RestartInProgress命令和接收到的响应(如果有)的函数。最后一列还列出了(在括号中)要在审核时返回的RestartMethod:

    ------------------------------------------------------------------
   | Restart-  | Restart- |    2xx    | Service- |   Response to      |
   |    Method |    Delay | received ?|    State |   new command      |
   |------------------------------------------------------------------|
   | graceful  |   zero   |   Yes/No  |   In     | non-audit: 2xx     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |        (graceful)  |
   |-----------+----------+-----------+----------+--------------------|
   | graceful  | non-zero |   Yes/No  |   In*    | non-audit: 2xx     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |        (graceful)  |
   |-----------+----------+-----------+----------+--------------------|
   | forced    |   N/A    |   Yes/No  |   Out    | non-audit: 501     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (forced)   |
   |-----------+----------+-----------+----------+--------------------|
   | restart   |   zero   |    No     |   In     | non-audit: 2xx,405*|
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | restart   |   zero   |    Yes    |   In     | non-audit: 2xx     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | restart   | non-zero |    No     |   Out*   | non-audit: 501*    |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | restart   | non-zero |    Yes    |   Out*   | non-audit: 501*    |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | discon-   |   zero/  |    No     |   In     | non-audit: 2xx,    |
   |    nected | non-zero |           |          | audit:     2xx     |
   |           |          |           |          |      (disconnected)|
   |-----------+----------+-----------+----------+--------------------|
   | discon-   |   zero/  |    Yes    |   In     | non-audit: 2xx     |
   |    nected | non-zero |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | cancel-   |   N/A    |   Yes/No  |   In     | non-audit: 2xx     |
   |  graceful |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | Restart-  | Restart- |    2xx    | Service- |   Response to      |
   |    Method |    Delay | received ?|    State |   new command      |
   |------------------------------------------------------------------|
   | graceful  |   zero   |   Yes/No  |   In     | non-audit: 2xx     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |        (graceful)  |
   |-----------+----------+-----------+----------+--------------------|
   | graceful  | non-zero |   Yes/No  |   In*    | non-audit: 2xx     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |        (graceful)  |
   |-----------+----------+-----------+----------+--------------------|
   | forced    |   N/A    |   Yes/No  |   Out    | non-audit: 501     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (forced)   |
   |-----------+----------+-----------+----------+--------------------|
   | restart   |   zero   |    No     |   In     | non-audit: 2xx,405*|
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | restart   |   zero   |    Yes    |   In     | non-audit: 2xx     |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | restart   | non-zero |    No     |   Out*   | non-audit: 501*    |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | restart   | non-zero |    Yes    |   Out*   | non-audit: 501*    |
   |           |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | discon-   |   zero/  |    No     |   In     | non-audit: 2xx,    |
   |    nected | non-zero |           |          | audit:     2xx     |
   |           |          |           |          |      (disconnected)|
   |-----------+----------+-----------+----------+--------------------|
   | discon-   |   zero/  |    Yes    |   In     | non-audit: 2xx     |
   |    nected | non-zero |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
   |-----------+----------+-----------+----------+--------------------|
   | cancel-   |   N/A    |   Yes/No  |   In     | non-audit: 2xx     |
   |  graceful |          |           |          | audit:     2xx     |
   |           |          |           |          |         (restart)  |
    ------------------------------------------------------------------
        

Notes (*):

附注(*):

* The three service-states marked with "*" will change after the expiration of the RestartDelay at which time an updated RestartInProgress command SHOULD be sent.

* 标有“*”的三个服务状态将在RestartDelay过期后更改,此时应发送更新的RestartInProgress命令。

* If the endpoint returns 2xx when the restart procedure has not yet completed, then in-order delivery MUST still be satisfied, i.e., piggy-backing is to be used. If instead, the command is not processed, 405 SHOULD be returned.

* 如果端点在重新启动过程尚未完成时返回2xx,则仍必须满足订单交付,即使用piggy backing。相反,如果未处理该命令,则应返回405。

* Following a "restart" RestartInProgress with a non-zero RestartDelay, error code 501 is only returned until the endpoint goes in-service, i.e., until the expiration of the RestartDelay.

* 在以非零RestartDelay进行“重新启动”RestartInProgress之后,仅在端点投入服务之前(即,直到RestartDelay过期之前)返回错误代码501。

4.4.6 Fighting the Restart Avalanche
4.4.6 抗击雪崩

Let's suppose that a large number of gateways are powered on simultaneously. If they were to all initiate a RestartInProgress transaction, the Call Agent would very likely be swamped, leading to message losses and network congestion during the critical period of service restoration. In order to prevent such avalanches, the following behavior is REQUIRED:

让我们假设大量网关同时通电。如果他们都要启动RestartInProgress事务,则呼叫代理很可能会被淹没,从而在服务恢复的关键时期导致消息丢失和网络拥塞。为了防止此类雪崩,需要以下行为:

1) When a gateway is powered on, it MUST initiate a restart timer to a random value, uniformly distributed between 0 and a maximum waiting delay (MWD). Care should be taken to avoid synchronicity of the random number generation between multiple gateways that would use the same algorithm.

1) 当网关通电时,它必须启动一个随机值的重启计时器,该值均匀分布在0和最大等待延迟(MWD)之间。应注意避免使用相同算法的多个网关之间随机数生成的同步性。

2) The gateway MUST then wait for either the end of this timer, the reception of a command from the Call Agent, or the detection of a local user activity, such as for example an off-hook transition on a residential gateway.

2) 然后,网关必须等待该计时器结束、从呼叫代理接收命令或检测到本地用户活动,例如住宅网关上的脱钩转换。

3) When the timer elapses, when a command is received, or when an activity is detected, the gateway MUST initiate the restart procedure.

3) 当计时器过期、收到命令或检测到活动时,网关必须启动重启过程。

The restart procedure simply requires the endpoint to guarantee that the first

重新启动过程只需要端点保证第一个

* non-audit command, or

* 非审计命令,或

* non-restart response (i.e., error codes other than 405, 501, and 520) to a non-audit command

* 对非审计命令的非重启响应(即405、501和520以外的错误代码)

that the Call Agent sees from this endpoint is a "restart" RestartInProgress command. The endpoint is free to take full advantage of piggybacking to achieve this. Endpoints that are considered in-service will have a RestartMethod of "restart", whereas endpoints considered out-of-service will have a RestartMethod of "forced" (also see Section 4.4.5). Commands rejected due to an endpoint not yet having completed the restart procedure SHOULD use error code 405 (endpoint "restarting").

调用代理从该端点看到的是“restart”RestartInProgress命令。端点可以自由地充分利用搭载来实现这一点。被视为在用的端点将具有“重启”的重启方法,而被视为停用的端点将具有“强制”的重启方法(另请参见第4.4.5节)。由于端点尚未完成重新启动过程而拒绝的命令应使用错误代码405(端点“重新启动”)。

The restart procedure is complete once a success response has been received. If an error response is received, the subsequent behavior depends on the error code in question:

收到成功响应后,重启过程即告完成。如果收到错误响应,则后续行为取决于相关错误代码:

* If the error code indicates a transient error (4xx), then the restart procedure MUST be initiated again (as a new transaction).

* 如果错误代码指示瞬时错误(4xx),则必须再次启动重启过程(作为新事务)。

* If the error code is 521, then the endpoint is redirected, and the restart procedure MUST be initiated again (as a new transaction). The 521 response MUST have included a NotifiedEntity which then is the "notified entity" towards which the restart is initiated. If it did not include a NotifiedEntity, the response is treated as any other permanent error (see below).

* 如果错误代码为521,则会重定向端点,并且必须再次启动重新启动过程(作为新事务)。521响应必须包含一个NotifiedEntity,该NotifiedEntity是重新启动所针对的“通知实体”。如果未包含NotifiedEntity,则响应将被视为任何其他永久性错误(见下文)。

* If the error is any other permanent error (5xx), and the endpoint is not able to rectify the error, then the endpoint no longer initiates the restart procedure on its own (until rebooted/restarted) unless otherwise specified. If a command is received for the endpoint, the endpoint MUST initiate the restart procedure again.

* 如果该错误是任何其他永久性错误(5xx),并且终结点无法纠正该错误,则除非另有规定,否则终结点不再自行启动重新启动过程(直到重新启动/重新启动)。如果接收到端点的命令,端点必须再次启动重新启动过程。

Note that if the RestartInProgress is piggybacked with the response (R) to a command received while restarting, then retransmission of the RestartInProgress does not require piggybacking of the response R. However, while the endpoint is restarting, a resend of the response R does require the RestartInProgress to be piggybacked to ensure in-order delivery of the two.

请注意,如果RestartInProgress与重新启动时接收到的命令响应(R)一起承载,则重新传输RestartInProgress不需要承载响应R。但是,当端点重新启动时,重新发送响应R确实需要重新启动进程,以确保按顺序交付这两个进程。

Should the gateway enter the "disconnected" state while carrying out the restart procedure, the disconnected procedure specified in Section 4.4.7 MUST be carried out, except that a "restart" rather than "disconnected" message is sent during the procedure.

如果网关在执行重启程序时进入“断开”状态,则必须执行第4.4.7节中规定的断开程序,除非在该程序期间发送“重启”而不是“断开”消息。

Each endpoint in a gateway will have a provisionable Call Agent, i.e., "notified entity", to direct the initial restart message towards. When the collection of endpoints in a gateway is managed by more than one Call Agent, the above procedure MUST be performed for each collection of endpoints managed by a given Call Agent. The gateway MUST take full advantage of wild-carding to minimize the

网关中的每个端点都将有一个可配置的呼叫代理,即“通知实体”,用于将初始重启消息指向。当网关中的端点集合由多个调用代理管理时,必须对给定调用代理管理的每个端点集合执行上述过程。网关必须充分利用野生梳理,以最大限度地降低成本

number of RestartInProgress messages generated when multiple endpoints in a gateway restart and the endpoints are managed by the same Call Agent. Note that during startup, it is possible for endpoints to start out as being out-of-service, and then become in-service as part of the gateway initialization procedure. A gateway may thus choose to send first a "forced" RestartInProgress for all its endpoints, and subsequently a "restart" RestartInProgress for the endpoints that come in-service. Alternatively, the gateway may simply send "restart" RestartInProgress for only those endpoints that are in-service, and "forced" RestartInProgress for the specific endpoints that are out-of-service. Wild-carding MUST still be used to minimize the number of messages sent though.

网关中的多个终结点重新启动且终结点由同一呼叫代理管理时生成的RestartInProgress消息数。请注意,在启动过程中,端点可能会以停止服务的状态启动,然后作为网关初始化过程的一部分变为在用状态。因此,网关可以选择首先为其所有端点发送“强制”重启进程,然后为服务中的端点发送“重启”重启进程。或者,网关可以仅为正在使用的那些端点发送“重新启动”重新启动进程,并为停止使用的特定端点发送“强制”重新启动进程。但仍必须使用通配符来最小化发送的消息数量。

The value of MWD is a configuration parameter that depends on the type of the gateway. The following reasoning can be used to determine the value of this delay on residential gateways.

MWD的值是一个配置参数,取决于网关的类型。以下推理可用于确定住宅网关上此延迟的值。

Call agents are typically dimensioned to handle the peak hour traffic load, during which, in average, 10% of the lines will be busy, placing calls whose average duration is typically 3 minutes. The processing of a call typically involves 5 to 6 MGCP transactions between each endpoint and the Call Agent. This simple calculation shows that the Call Agent is expected to handle 5 to 6 transactions for each endpoint, every 30 minutes on average, or, to put it otherwise, about one transaction per endpoint every 5 to 6 minutes on average. This suggest that a reasonable value of MWD for a residential gateway would be 10 to 12 minutes. In the absence of explicit configuration, residential gateways should adopt a value of 600 seconds for MWD.

呼叫代理通常用于处理高峰时段的流量负载,在此期间,平均有10%的线路处于繁忙状态,呼叫的平均持续时间通常为3分钟。呼叫处理通常涉及每个端点和呼叫代理之间的5到6个MGCP事务。这个简单的计算表明,呼叫代理平均每30分钟为每个端点处理5到6个事务,或者,换句话说,平均每5到6分钟为每个端点处理一个事务。这表明住宅网关的MWD合理值为10至12分钟。在没有明确配置的情况下,住宅网关的MWD值应为600秒。

The same reasoning suggests that the value of MWD should be much shorter for trunking gateways or for business gateways, because they handle a large number of endpoints, and also because the usage rate of these endpoints is much higher than 10% during the peak busy hour, a typical value being 60%. These endpoints, during the peak hour, are thus expected to contribute about one transaction per minute to the Call Agent load. A reasonable algorithm is to make the value of MWD per "trunk" endpoint six times shorter than the MWD per residential gateway, and also inversely proportional to the number of endpoints that are being restarted. For example MWD should be set to 2.5 seconds for a gateway that handles a T1 line, or to 60 milliseconds for a gateway that handles a T3 line.

同样的推理表明,对于中继网关或业务网关,MWD的值应该短得多,因为它们处理大量端点,而且这些端点的使用率在高峰繁忙时间远高于10%,典型值为60%。因此,在高峰时段,这些端点预计每分钟为调用代理负载贡献大约一个事务。一个合理的算法是使每个“中继”端点的MWD值比每个住宅网关的MWD值短六倍,并且与正在重新启动的端点数量成反比。例如,对于处理T1线路的网关,MWD应设置为2.5秒;对于处理T3线路的网关,MWD应设置为60毫秒。

4.4.7 Disconnected Endpoints
4.4.7 断开连接的端点

In addition to the restart procedure, gateways also have a "disconnected" procedure, which MUST be initiated when an endpoint becomes "disconnected" as described in Section 4.3. It should here be noted, that endpoints can only become disconnected when they attempt to communicate with the Call Agent. The following steps MUST be followed by an endpoint that becomes "disconnected":

除重启程序外,网关还具有“断开”程序,如第4.3节所述,当端点变得“断开”时,必须启动该程序。这里应该注意的是,端点只有在尝试与呼叫代理通信时才能断开连接。以下步骤之后必须有一个变为“断开连接”的端点:

1. A "disconnected" timer is initialized to a random value, uniformly distributed between 1 and a provisionable "disconnected" initial waiting delay (Tdinit), e.g., 15 seconds. Care MUST be taken to avoid synchronicity of the random number generation between multiple gateways and endpoints that would use the same algorithm.

1. “断开”计时器初始化为随机值,均匀分布在1和可提供的“断开”初始等待延迟(Tdinit)之间,例如15秒。必须注意避免使用相同算法的多个网关和端点之间随机数生成的同步性。

2. The gateway then waits for either the end of this timer, the reception of a command for the endpoint from the Call Agent, or the detection of a local user activity for the endpoint, such as for example an off-hook transition.

2. 然后,网关等待该计时器结束、从呼叫代理接收端点的命令或检测端点的本地用户活动,例如脱钩转换。

3. When the "disconnected" timer elapses for the endpoint, when a command is received for the endpoint, or when local user activity is detected for the endpoint, the gateway initiates the "disconnected" procedure for the endpoint - if a disconnected procedure was already in progress for the endpoint, it is simply replaced by the new one. Furthermore, in the case of local user activity, a provisionable "disconnected" minimum waiting delay (Tdmin) MUST have elapsed since the endpoint became disconnected or the last time it ended the "disconnected" procedure in order to limit the rate at which the procedure is performed. If Tdmin has not passed, the endpoint simply proceeds to step 2 again, without affecting any disconnected procedure already in progress.

3. 当端点的“断开连接”计时器过期时,当接收到端点的命令时,或当检测到端点的本地用户活动时,网关将启动端点的“断开连接”过程-如果端点的断开连接过程已在进行中,则只需将其替换为新的过程即可。此外,在本地用户活动的情况下,自端点断开连接或最后一次结束“断开连接”过程以来,必须经过可设置的“断开连接”最小等待延迟(Tdmin),以限制过程的执行速率。如果Tdmin未通过,端点只需再次进入步骤2,而不影响任何已断开连接的过程。

4. If the "disconnected" procedure still left the endpoint disconnected, the "disconnected" timer is then doubled, subject to a provisionable "disconnected" maximum waiting delay (Tdmax), e.g., 600 seconds, and the gateway proceeds with step 2 again (using a new transaction-id).

4. 如果“断开连接”过程仍然保持端点断开连接,则“断开连接”计时器将加倍,并遵循可提供的“断开连接”最大等待延迟(Tdmax),例如600秒,并且网关再次继续执行步骤2(使用新的事务id)。

The "disconnected" procedure is similar to the restart procedure in that it simply states that the endpoint MUST send a RestartInProgress command to the Call Agent informing it that the endpoint was disconnected. Furthermore, the endpoint MUST guarantee that the first non-audit message (non-audit command or response to non-audit command) that the Call Agent sees from this endpoint MUST inform the Call Agent that the endpoint is disconnected (unless the endpoint goes out-of-service). When a command (C) is received, this is achieved by sending a piggy-backed datagram with a "disconnected"

“断开连接”过程与重新启动过程类似,因为它只是声明端点必须向呼叫代理发送RestartInProgress命令,通知其端点已断开连接。此外,端点必须保证调用代理从该端点看到的第一条非审核消息(非审核命令或对非审核命令的响应)必须通知调用代理端点已断开连接(除非端点停止服务)。当接收到命令(C)时,这是通过发送带有“断开连接”的piggy-backed数据报来实现的

RestartInProgress command and the response to command C to the source address of command C as opposed to the current "notified entity". This piggy-backed RestartInProgress is not automatically retransmitted by the endpoint but simply relies on fate-sharing with the piggy-backed response to guarantee the in-order delivery requirement. The Call Agent still sends a response to the piggy-backed RestartInProgress, however, as usual, the response may be lost. In addition to the piggy-backed RestartInProgress command, a new "disconnected" procedure is triggered by the command received. This will lead to a non piggy-backed copy (i.e., same transaction) of the "disconnected" RestartInProgress command being sent reliably to the current "notified entity".

将RestartInProgress命令和对命令C的响应返回到命令C的源地址,而不是当前的“通知实体”。此piggy-backed RestartInProgress不会由端点自动重新传输,而只是依赖于piggy-backed响应的命运共享来保证按订单交付要求。呼叫代理仍然向piggy backed RestartInProgress发送响应,但是,与往常一样,响应可能会丢失。除了piggy backed RestartInProgress命令外,接收到的命令还会触发一个新的“断开”过程。这将导致“断开连接的”RestartInProgress命令的非piggy-backed副本(即同一事务)可靠地发送到当前的“通知实体”。

When the Call Agent learns that the endpoint is disconnected, the Call Agent may then for instance decide to audit the endpoint, or simply clear all connections for the endpoint. Note that each such "disconnected" procedure will result in a new RestartInProgress command, which will be subject to the normal retransmission procedures specified in Section 4.3. At the end of the procedure, the endpoint may thus still be "disconnected". Should the endpoint go out-of-service while being disconnected, it SHOULD send a "forced" RestartInProgress message as described in Section 2.3.12.

当呼叫代理得知端点已断开连接时,呼叫代理可以例如决定审计端点,或者简单地清除端点的所有连接。请注意,每个“断开连接”程序将产生一个新的重新启动进程命令,该命令将遵循第4.3节中规定的正常重新传输程序。在程序结束时,端点可能仍处于“断开”状态。如果端点在断开连接时停止服务,它应发送“强制”重新启动进程消息,如第2.3.12节所述。

The disconnected procedure is complete once a success response has been received. Error responses are handled similarly to the restart procedure (Section 4.4.6). If the "disconnected" procedure is to be initiated again following an error response, the rate-limiting timer considerations specified above still apply.

一旦收到成功响应,断开连接的过程即告完成。错误响应的处理类似于重启程序(第4.4.6节)。如果在错误响应后再次启动“断开”程序,则上述限速计时器注意事项仍然适用。

Note, that if the RestartInProgress is piggybacked with the response (R) to a command received while being disconnected, then retransmission of this particular RestartInProgress does not require piggybacking of the response R. However, while the endpoint is disconnected, resending the response R does require the RestartInProgress to be piggybacked with the response to ensure the in-order delivery of the two.

请注意,如果RestartInProgress与断开连接时接收到的命令响应(R)一起承载,则重新传输此特定RestartInProgress不需要承载响应R。但是,当端点断开连接时,重新发送响应R确实需要将RestartInProgress与响应捆绑在一起,以确保按顺序交付这两个响应。

If a set of disconnected endpoints have the same "notified entity", and the set of endpoints can be named with a wildcard, the gateway MAY replace the individual disconnected procedures with a suitably wildcarded disconnected procedure instead. In that case, the Restart Delay for the wildcarded "disconnected" RestartInProgress command SHALL be the Restart Delay corresponding to the oldest disconnected procedure replaced. Note that if only a subset of these endpoints subsequently have their "notified entity" changed and/or are no longer disconnected, then that wildcarded disconnected procedure can no longer be used. The remaining individual disconnected procedures MUST then be resumed again.

如果一组断开连接的端点具有相同的“通知实体”,并且该组端点可以用通配符命名,则网关可以用适当的通配符断开连接的过程替换各个断开连接的过程。在这种情况下,通配符为“disconnected”的RestartInProgress命令的重启延迟应为与最旧的已断开连接的程序相对应的重启延迟。请注意,如果这些端点中只有一个子集的“通知实体”随后发生更改和/或不再断开连接,则不能再使用通配符断开连接的过程。然后,必须再次恢复其余单独断开连接的程序。

A disconnected endpoint may wish to send a command (besides RestartInProgress) while it is disconnected. Doing so will only succeed once the Call Agent is reachable again, which raises the question of what to do with such a command meanwhile. At one extreme, the endpoint could drop the command right away, however that would not work very well when the Call Agent was in fact available, but the endpoint had not yet completed the "disconnected" procedure (consider for example the case where a NotificationRequest was just received which immediately resulted in a Notify being generated). To prevent such scenarios, disconnected endpoints SHALL NOT blindly drop new commands to be sent for a period of T-MAX seconds after they receive a non-audit command.

断开连接的端点可能希望在断开连接时发送命令(除了RestartInProgress)。这样做只会在调用代理再次可访问时成功,这就提出了如何处理此类命令的问题。在一个极端情况下,端点可以立即删除命令,但是,如果调用代理实际上可用,但端点尚未完成“断开连接”过程,那么这将无法很好地工作(例如,考虑刚刚收到NotificationRequest的情况,这将立即生成通知)。为了防止这种情况,断开连接的端点在接收到非审计命令后,不得在T-MAX秒内盲目删除要发送的新命令。

One way of satisfying this requirement is to employ a temporary buffering of commands to be sent, however in doing so, the endpoint MUST ensure, that it:

满足此要求的一种方法是对要发送的命令使用临时缓冲,但是在这样做时,端点必须确保:

* does not build up a long queue of commands to be sent,

* 不会建立要发送的命令的长队列,

* does not swamp the Call Agent by rapidly sending too many commands once it is connected again.

* 一旦再次连接,不会通过快速发送太多命令来淹没呼叫代理。

Buffering commands for T-MAX seconds and, once the endpoint is connected again, limiting the rate at which buffered commands are sent to one outstanding command per endpoint is considered acceptable (see also Section 4.4.8, especially if using wildcards). If the endpoint is not connected within T-MAX seconds, but a "disconnected" procedure is initiated within T-MAX seconds, the endpoint MAY piggyback the buffered command(s) with that RestartInProgress. Note, that once a command has been sent, regardless of whether it was buffered initially, or piggybacked earlier, retransmission of that command MUST cease T-MAX seconds after the initial send as described in Section 4.3.

缓冲命令的时间为T-MAX秒,并且在端点再次连接后,将缓冲命令发送到每个端点一个未完成命令的速率限制在可接受的范围内(另请参见第4.4.8节,特别是在使用通配符的情况下)。如果端点未在T-MAX秒内连接,但在T-MAX秒内启动了“断开连接”过程,则端点可能会在重新启动过程中携带缓冲命令。注意,一旦命令被发送,无论它最初是缓冲的,还是较早地被携带,该命令的重新传输必须在初始发送后T-MAX秒停止,如第4.3节所述。

This specification purposely does not specify any additional behavior for a disconnected endpoint. Vendors MAY for instance choose to provide silence, play reorder tone, or even enable a downloaded wav file to be played.

本规范有意不为断开连接的端点指定任何其他行为。例如,供应商可以选择提供静音、播放重新订购音,甚至可以播放下载的wav文件。

The default value for Tdinit is 15 seconds, the default value for Tdmin, is 15 seconds, and the default value for Tdmax is 600 seconds.

Tdinit的默认值为15秒,Tdmin的默认值为15秒,Tdmax的默认值为600秒。

4.4.8 Load Control in General
4.4.8 一般负荷控制

The previous sections have described several MGCP mechanisms to deal with congestion and overload, namely:

前面几节描述了几种MGCP机制来处理拥塞和过载,即:

* the UDP retransmission strategy which adapts to network and call agent congestion on a per endpoint basis,

* UDP重传策略,适用于每个端点的网络和呼叫代理拥塞,

* the guidelines on the ordering of commands which limit the number of commands issued in parallel,

* 关于命令顺序的指南限制了并行发出的命令数量,

* the restart procedure which prevents flooding in case of a restart avalanche, and

* 在重启雪崩情况下防止洪水的重启程序,以及

* the disconnected procedure which prevents flooding in case of a large number of disconnected endpoints.

* 断开连接的过程,在大量断开连接的端点的情况下防止泛洪。

It is however still possible for a given set of endpoints, either on the same or different gateways, to issue one or more commands at a given point in time. Although it can be argued, that Call Agents should be sized to handle one message per served endpoint at any given point in time, this may not always be the case in practice. Similarly, gateways may not be able to handle a message for all of its endpoints at any given point in time. In general, such issues can be dealt with through the use of a credit-based mechanism, or by monitoring and automatically adapting to the observed behavior. We opt for the latter approach as follows.

但是,对于相同或不同网关上的一组给定端点,仍然可以在给定的时间点发出一个或多个命令。尽管可以说,调用代理的大小应该能够在任何给定的时间点处理每个服务端点的一条消息,但在实践中可能并不总是这样。类似地,网关可能无法在任何给定时间点为其所有端点处理消息。一般来说,这些问题可以通过使用基于信用的机制来解决,或者通过监控和自动适应观察到的行为来解决。我们选择后一种方法如下。

Conceptually, we assume that Call Agents and gateways maintain a queue of incoming transactions to be executed. Associated with this transaction queue is a high-water and a low-water mark. Once the queue length reaches the high-water mark, the entity SHOULD start issuing 101 provisional responses (transaction queued) until the queue length drops to the low-water mark. This applies to new transactions as well as to retransmissions. If the entity is unable to process any new transactions at this time, it SHOULD return error code 409 (processing overload).

从概念上讲,我们假设呼叫代理和网关维护要执行的传入事务队列。与此事务队列关联的是高水位和低水位线。一旦队列长度达到高水位线,实体应开始发出101个临时响应(事务排队),直到队列长度降至低水位线。这适用于新事务以及重新传输。如果实体此时无法处理任何新事务,则应返回错误代码409(处理过载)。

Furthermore, gateways SHOULD adjust the sending rate of new commands to a given Call Agent by monitoring the observed response times from that Call Agent to a *set* of endpoints. If the observed smoothed average response time suddenly rises significantly over some threshold, or the gateway receives a 101 (transaction queued) or 409 (overload) response, the gateway SHOULD adjust the sending rate of new commands to that Call Agent accordingly. The details of the smoothing average algorithm, the rate adjustments, and the thresholds involved are for further study, however they MUST be configurable.

此外,网关应该通过监视从呼叫代理到*一组*端点的观察到的响应时间来调整向给定呼叫代理发送新命令的速率。如果观察到的平滑平均响应时间突然显著超过某个阈值,或者网关接收到101(事务排队)或409(过载)响应,则网关应相应地调整向该呼叫代理发送新命令的速率。平滑平均算法的细节、速率调整和涉及的阈值有待进一步研究,但它们必须是可配置的。

Similarly, Call Agents SHOULD adjust the sending rate of new transactions to a given gateway by monitoring the observed response times from that gateway for a *set* of endpoints. If the observed smoothed average response time suddenly rises significantly over some threshold, or the Call Agent receives a 101 (transaction queued) or 409 (overloaded), the Call Agent SHOULD adjust the sending rate of new commands to that gateway accordingly. The details of the smoothing average algorithm, the rate adjustments, and the thresholds involved are for further study, however they MUST be configurable.

类似地,呼叫代理应该通过监视来自给定网关的*一组*端点的观察到的响应时间来调整新事务发送到该网关的速率。如果观察到的平滑平均响应时间突然显著超过某个阈值,或者呼叫代理接收到101(事务排队)或409(过载),则呼叫代理应相应地调整新命令发送到该网关的速率。平滑平均算法的细节、速率调整和涉及的阈值有待进一步研究,但它们必须是可配置的。

5. Security Requirements
5. 安全要求

Any entity can send a command to an MGCP endpoint. If unauthorized entities could use the MGCP, they would be able to set-up unauthorized calls, or to interfere with authorized calls. We expect that MGCP messages will always be carried over secure Internet connections, as defined in the IP security architecture as defined in RFC 2401, using either the IP Authentication Header, defined in RFC 2402, or the IP Encapsulating Security Payload, defined in RFC 2406. The complete MGCP protocol stack would thus include the following layers:

任何实体都可以向MGCP端点发送命令。如果未经授权的实体可以使用MGCP,他们将能够建立未经授权的呼叫,或干扰授权呼叫。我们期望MGCP消息将始终通过安全的Internet连接进行传输,如RFC 2401中定义的IP安全体系结构所定义,使用RFC 2402中定义的IP身份验证报头或RFC 2406中定义的IP封装安全负载。因此,完整的MGCP协议栈将包括以下层:

                -------------------------------
               |              MGCP             |
               |-------------------------------|
               |              UDP              |
               |-------------------------------|
               |          IP security          |
               | (authentication or encryption)|
               |-------------------------------|
               |              IP               |
               |-------------------------------|
               |       transmission media      |
                -------------------------------
        
                -------------------------------
               |              MGCP             |
               |-------------------------------|
               |              UDP              |
               |-------------------------------|
               |          IP security          |
               | (authentication or encryption)|
               |-------------------------------|
               |              IP               |
               |-------------------------------|
               |       transmission media      |
                -------------------------------
        

Adequate protection of the connections will be achieved if the gateways and the Call Agents only accept messages for which IP security provided an authentication service. An encryption service will provide additional protection against eavesdropping, thus preventing third parties from monitoring the connections set up by a given endpoint.

如果网关和呼叫代理只接受IP安全为其提供身份验证服务的消息,则可以实现对连接的充分保护。加密服务将提供额外的防窃听保护,从而防止第三方监视给定端点建立的连接。

The encryption service will also be requested if the session descriptions are used to carry session keys, as defined in SDP.

如果会话描述用于携带SDP中定义的会话密钥,则还将请求加密服务。

These procedures do not necessarily protect against denial of service attacks by misbehaving gateways or misbehaving Call Agents. However, they will provide an identification of these misbehaving entities, which should then be deprived of their authorization through maintenance procedures.

这些过程不一定能够防止行为不当的网关或呼叫代理的拒绝服务攻击。但是,他们将提供这些行为不端实体的身份证明,然后通过维护程序剥夺这些实体的授权。

5.1 Protection of Media Connections
5.1 保护媒体连接

MGCP allows Call Agent to provide gateways with "session keys" that can be used to encrypt the audio messages, protecting against eavesdropping.

MGCP允许呼叫代理为网关提供“会话密钥”,用于加密音频消息,防止窃听。

A specific problem of packet networks is "uncontrolled barge-in". This attack can be performed by directing media packets to the IP address and UDP port used by a connection. If no protection is implemented, the packets will be decoded and the signals will be played on the "line side".

分组网络的一个具体问题是“不受控制的闯入”。可以通过将媒体数据包定向到连接使用的IP地址和UDP端口来执行此攻击。如果未实施保护,数据包将被解码,信号将在“线路侧”播放。

A basic protection against this attack is to only accept packets from known sources, however this tends to conflict with RTP principles. This also has two inconveniences: it slows down connection establishment and it can be fooled by source spoofing:

针对这种攻击的一个基本保护是只接受来自已知来源的数据包,但是这往往与RTP原则相冲突。这也有两个不便之处:它会减慢连接的建立速度,并且可能被源欺骗所愚弄:

* To enable the address-based protection, the Call Agent must obtain the source address of the egress gateway and pass it to the ingress gateway. This requires at least one network round trip, and leaves us with a dilemma: either allow the call to proceed without waiting for the round trip to complete, and risk for example "clipping" a remote announcement, or wait for the full round trip and settle for slower call-set-up procedures.

* 要启用基于地址的保护,呼叫代理必须获取出口网关的源地址并将其传递给入口网关。这至少需要一次网络往返,让我们陷入两难境地:要么允许呼叫继续进行而不等待往返完成,并冒着“剪辑”远程公告等风险,要么等待完整的往返并满足于较慢的呼叫设置过程。

* Source spoofing is only effective if the attacker can obtain valid pairs of source and destination addresses and ports, for example by listening to a fraction of the traffic. To fight source spoofing, one could try to control all access points to the network. But this is in practice very hard to achieve.

* 只有当攻击者能够获得有效的源地址和目标地址及端口对时,源欺骗才有效,例如通过监听一小部分流量。为了打击源欺骗,可以尝试控制网络的所有接入点。但这在实践中很难实现。

An alternative to checking the source address is to encrypt and authenticate the packets, using a secret key that is conveyed during the call set-up procedure. This will not slow down the call set-up, and provides strong protection against address spoofing.

检查源地址的另一种方法是使用在呼叫建立过程中传递的密钥对数据包进行加密和身份验证。这不会减慢呼叫设置,并提供强大的地址欺骗保护。

6. Packages
6. 包装

As described in Section 2.1.6, packages are the preferred way of extending MGCP. In this section we describe the requirements associated with defining a package.

如第2.1.6节所述,包是扩展MGCP的首选方式。在本节中,我们将描述与定义包相关的需求。

A package MUST have a unique package name defined. The package name MUST be registered with the IANA, unless it starts with the characters "x-" or "x+" which are reserved for experimental packages. Please refer to Appendix C for IANA considerations.

包必须定义唯一的包名称。包名必须向IANA注册,除非它以字符“x-”或“x+”开头,这是为实验包保留的。请参考附录C了解IANA注意事项。

A package MUST also have a version defined which is simply a non-negative integer. The default and initial version of a package is zero, the next version is one, etc. New package versions MUST be completely backwards compatible, i.e., a new version of a package MUST NOT redefine or remove any of the extensions provided in an earlier version of the package. If such a need arises, a new package name MUST be used instead.

包还必须定义一个版本,该版本仅为非负整数。包的默认和初始版本为零,下一个版本为一,等等。新的包版本必须完全向后兼容,即包的新版本不得重新定义或删除包的早期版本中提供的任何扩展。如果需要,则必须使用新的包名。

Packages containing signals of type time-out MAY indicate if the "to" parameter is supported for all the time-out signals in the package as well as the default rounding rules associated with these (see Section 3.2.2.4). If no such definition is provided, each time-out signal SHOULD provide these definitions.

包含超时类型信号的软件包可能表明,软件包中的所有超时信号是否支持“to”参数,以及与这些信号相关的默认舍入规则(见第3.2.2.4节)。如果未提供此类定义,则每个超时信号应提供这些定义。

A package defines one or more of the following extensions:

包定义以下一个或多个扩展:

* Actions

* 行动

* BearerInformation

* 承载信息

* ConnectionModes

* 连接模式

* ConnectionParameters

* 连接参数

* DigitMapLetters

* 数码相机

* Events and Signals

* 事件和信号

* ExtensionParameters

* 扩展参数

* LocalConnectionOptions

* 本地连接选项

* ReasonCodes

* 理由码

* RestartMethods

* 重新启动方法

* Return codes

* 返回码

For each of the above types of extensions supported by the package, the package definition MUST contain a description of the extension as defined in the following sections. Please note, that package extensions, just like any other extension, MUST adhere to the MGCP grammar.

对于包支持的上述每种类型的扩展,包定义必须包含以下部分中定义的扩展描述。请注意,包扩展与任何其他扩展一样,必须遵守MGCP语法。

6.1 Actions
6.1 行动

Extension Actions SHALL include:

扩展行动应包括:

* The name and encoding of the extension action.

* 扩展操作的名称和编码。

* If the extension action takes any action parameters, then the name, encoding, and possible values of those parameters.

* 如果扩展操作采用任何操作参数,则这些参数的名称、编码和可能的值。

* A description of the operation of the extension action.

* 扩展操作的操作说明。

* A listing of the actions in this specification the extension can be combined with. If such a listing is not provided, it is assumed that the extension action cannot be combined with any other action in this specification.

* 此扩展可与此规范中的操作列表相结合。如果未提供此类列表,则假定扩展操作不能与本规范中的任何其他操作组合。

* If more than one extension action is defined in the package, then a listing of the actions in the package the extension can be combined with. If such a listing is not provided, it is assumed that the extension action cannot be combined with any other action in the package.

* 如果在包中定义了多个扩展操作,则可以将扩展与包中的操作列表组合在一起。如果未提供此类列表,则假定扩展操作不能与包中的任何其他操作组合。

Extension actions defined in two or more different packages SHOULD NOT be used simultaneously, unless very careful consideration to their potential interaction and side-effects has been given.

在两个或多个不同包中定义的扩展操作不应同时使用,除非非常仔细地考虑了它们的潜在交互作用和副作用。

6.2 BearerInformation
6.2 承载信息

BearerInformation extensions SHALL include:

信息扩展应包括:

* The name and encoding of the BearerInformation extension.

* 承载信息扩展名的名称和编码。

* The possible values and encoding of those values that can be assigned to the BearerInformation extension.

* 可分配给承载信息扩展的可能值和这些值的编码。

* A description of the operation of the BearerInformation extension. As part of this description the default value (if any) if the extension is omitted in an EndpointConfiguration command MUST be defined. It may be necessary to make a distinction between the default value before and after the initial application of the parameter, for example if the parameter retains its previous value once specified, until explicitly altered. If default values are not described, then the extension parameter simply defaults to empty in all EndpointConfiguration commands.

* 轴承信息扩展的操作说明。作为本说明的一部分,如果EndpointConfiguration命令中省略了扩展,则必须定义默认值(如果有)。可能需要在初始应用参数之前和之后对默认值进行区分,例如,如果参数在指定后保留其先前的值,直到显式更改为止。如果未描述默认值,则在所有EndpointConfiguration命令中,扩展参数默认为空。

Note that the extension SHALL be included in the result for an AuditEndpoint command auditing the BearerInformation.

请注意,扩展应包含在审核承载信息的AuditEndpoint命令的结果中。

6.3 ConnectionModes
6.3 连接模式

Extension Connection Modes SHALL include:

延伸连接方式应包括:

* The name and encoding of the extension connection mode.

* 扩展连接模式的名称和编码。

* A description of the operation of the extension connection mode.

* 扩展连接模式的操作说明。

* A description of the interaction a connection in the extension connection mode will have with other connections in each of the modes defined in this specification. If such a description is not provided, the extension connection mode MUST NOT have any interaction with other connections on the endpoint.

* 描述扩展连接模式下的连接与本规范中定义的每个模式下的其他连接之间的交互。如果未提供此类描述,则扩展连接模式不得与端点上的其他连接进行任何交互。

Extension connection modes SHALL NOT be included in the list of modes in a response to an AuditEndpoint for Capabilities, since the package will be reported in the list of packages.

扩展连接模式不应包括在对AuditEndpoint功能的响应的模式列表中,因为包将在包列表中报告。

6.4 ConnectionParameters
6.4 连接参数

Extension Connection Parameters SHALL include:

延伸连接参数应包括:

* The name and encoding of the connection parameter extension.

* 连接参数扩展名的名称和编码。

* The possible values and encoding of those values that can be assigned to the connection parameter extension.

* 可以分配给连接参数扩展的可能值和这些值的编码。

* A description of how those values are derived.

* 这些值是如何导出的描述。

Note that the extension connection parameter MUST be included in the result for an AuditConnection command auditing the connection parameters.

请注意,对于审核连接参数的AuditConnection命令,结果中必须包含扩展连接参数。

6.5 DigitMapLetters
6.5 数码相机

Extension Digit Map Letters SHALL include:

扩展数字地图字母应包括:

* The name and encoding of the extension digit map letter(s).

* 扩展数字映射字母的名称和编码。

* A description of the meaning of the extension digit map letter(s).

* 扩展数字映射字母含义的说明。

Note that extension DigitMapLetters in a digit map do not follow the normal naming conventions for extensions defined in packages. More specifically the package name and slash ("/") will not be part of the extension name, thereby forming a flat and limited name space with potential name clashing.

请注意,数字映射中的扩展digitmapletter不遵循包中定义的扩展的正常命名约定。更具体地说,包名和斜杠(“/”)将不会是扩展名的一部分,从而形成一个平坦、有限的名称空间,可能会产生名称冲突。

Therefore, a package SHALL NOT define a digit map letter extension whose encoding has already been used in another package. If two packages have used the same encoding for a digit map letter extension, and those two packages are supported by the same endpoint, the result of using that digit map letter extension is undefined.

因此,一个包不应定义编码已在另一个包中使用的数字映射字母扩展名。如果两个包对数字映射字母扩展使用了相同的编码,并且这两个包受相同端点的支持,则使用该数字映射字母扩展的结果是未定义的。

Note that although an extension DigitMapLetter does not include the package name prefix and slash ("/") as part of the extension name within a digit map, the package name prefix and slash are included when the event code for the event that matched the DigitMapLetter is reported as an observed event. In other words, the digit map just define the matching rule(s), but the event is still reported like any other event.

请注意,尽管扩展DigitMapLetter不包括包名前缀和斜杠(“/”),作为数字映射中扩展名的一部分,但当与DigitMapLetter匹配的事件的事件代码报告为观察到的事件时,会包括包名前缀和斜杠。换句话说,数字映射只定义了匹配规则,但事件仍然像任何其他事件一样报告。

6.6 Events and Signals
6.6 事件和信号

The event/signal definition SHALL include the precise name of the event/signal (i.e., the code used in MGCP), a plain text definition of the event/signal, and, when appropriate, the precise definition of the corresponding events/signals, for example the exact frequencies of audio signals such as dial tones or DTMF tones.

事件/信号定义应包括事件/信号的准确名称(即MGCP中使用的代码)、事件/信号的纯文本定义,以及相应事件/信号的准确定义,如拨号音或DTMF音等音频信号的准确频率。

The package description MUST provide, for each event/signal, the following information:

对于每个事件/信号,包装说明必须提供以下信息:

* The description of the event/signal and its purpose, which SHOULD include the actual signal that is generated by the client (e.g., xx ms FSK tone) as well as the resulting user observed result (e.g., Message Waiting light on/off).

* 事件/信号及其用途的描述,应包括客户端生成的实际信号(例如xx ms FSK音调)以及由此产生的用户观察结果(例如,消息等待灯打开/关闭)。

The event code used for the event/signal.

用于事件/信号的事件代码。

* The detailed characteristics of the event/signal, such as for example frequencies and amplitude of audio signals, modulations and repetitions. Such details may be country specific.

* 事件/信号的详细特征,例如音频信号的频率和振幅、调制和重复。这些细节可能因国家而异。

* The typical and maximum duration of the event/signal if applicable.

* 事件/信号的典型和最大持续时间(如适用)。

* If the signal or event can be applied to a connection (across a media stream), it MUST be indicated explicitly. If no such indication is provided, it is assumed that the signal or event cannot be applied to a connection.

* 如果信号或事件可应用于连接(通过媒体流),则必须明确指示。如果未提供此类指示,则假定信号或事件无法应用于连接。

For events, the following MUST be provided as well:

对于活动,还必须提供以下内容:

* An indication if the event is persistent. By default, events are not persistent - defining events as being persistent is discouraged (see Appendix B for a preferred alternative). Note that persistent

* 事件是否持续的指示。默认情况下,事件不是持久性的-不鼓励将事件定义为持久性的(有关首选方案,请参阅附录B)。注意,持久的

events will automatically trigger a Notify when they occur, unless the Call Agent explicitly instructed the endpoint otherwise. This not only violates the normal MGCP model, but also assumes the Call Agent supports the package in question. Such an assumption is unlikely to hold in general.

事件发生时将自动触发通知,除非调用代理明确指示端点另有指示。这不仅违反了正常的MGCP模型,而且还假设调用代理支持所讨论的包。这种假设不太可能普遍成立。

* An indication if there is an auditable event-state associated with the event. By default, events do not have auditable event-states.

* 指示是否存在与事件关联的可审核事件状态。默认情况下,事件没有可审核的事件状态。

* If event parameters are supported, it MUST be stated explicitly. The precise syntax and semantics of these MUST then be provided (subject to the grammar provided in Appendix A). It SHOULD also be specified whether these parameters apply to RequestedEvents, ObservedEvents, DetectEvents and EventStates. If not specified otherwise, it is assumed that:

* 如果支持事件参数,则必须明确说明。然后必须提供准确的语法和语义(以附录A中提供的语法为准)。还应指定这些参数是否适用于RequestedEvents、ObservedEvents、DetectedEvents和EventState。如果未另行规定,则假定:

* they do not apply to RequestedEvents,

* 它们不适用于请求的事件,

* they do apply to ObservedEvents,

* 它们确实适用于观察到的事件,

* they apply in the same way to DetectEvents as they do to RequestedEvents for a given event parameter,

* 它们应用于检测事件的方式与应用于给定事件参数的RequestedEvents的方式相同,

* they apply in the same way to EventStates as they do to ObservedEvents for a given event parameter.

* 它们应用于EventState的方式与应用于给定事件参数的ObservedEvents的方式相同。

* If the event is expected to be used in digit map matching, it SHOULD explicitly state so. Note that only events with single letter or digit parameter codes can do this. See Section 2.1.5 for further details.

* 如果该事件预期用于数字映射匹配,则应明确说明。请注意,只有具有单字母或数字参数代码的事件才能执行此操作。详见第2.1.5节。

For signals, the following MUST be provided as well:

对于信号,还必须提供以下内容:

* The type of signal (OO, TO, BR).

* 信号类型(OO、TO、BR)。

* Time-Out signals SHOULD have an indication of the default time-out value. In some cases, time-out values may be variable (if dependent on some action to complete such as out-pulsing digits).

* 超时信号应具有默认超时值的指示。在某些情况下,超时值可能是可变的(如果取决于要完成的某些操作,如输出脉冲数字)。

* If signal parameters are supported, it MUST be stated explicitly. The precise syntax and semantics of these MUST then be provided (subject to the grammar provided in Appendix A).

* 如果支持信号参数,则必须明确说明。然后必须提供准确的语法和语义(以附录A中提供的语法为准)。

* Time-Out signals may also indicate whether the "to" parameter is supported or not as well as what the rounding rules associated with them are. If omitted from the signal definition, the package-wide definition is assumed (see Section 6). If the package definition did not specify this, rounding rules default to the nearest non-

* 超时信号还可以指示是否支持“to”参数以及与之相关的舍入规则。如果从信号定义中省略,则假定为封装范围的定义(见第6节)。如果包定义未指定此项,则舍入规则默认为最接近的非整数-

zero second, whereas support for the "to" parameter defaults to "no" for package version zero, and "yes" for package versions one and higher.

零秒,而对于包版本0,对“to”参数的支持默认为“no”,对于包版本1及更高版本,支持“yes”。

The following format is RECOMMENDED for defining events and signals in conformance with the above:

建议使用以下格式定义符合上述要求的事件和信号:

    ------------------------------------------------------------------
   | Symbol  |   Definition               |  R  |   S     Duration    |
   |---------|----------------------------|-----|---------------------|
   |         |                            |     |                     |
   |         |                            |     |                     |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | Symbol  |   Definition               |  R  |   S     Duration    |
   |---------|----------------------------|-----|---------------------|
   |         |                            |     |                     |
   |         |                            |     |                     |
    ------------------------------------------------------------------
        

where:

哪里:

* Symbol indicates the event code used for the event/signal, e.g., "hd".

* 符号表示用于事件/信号的事件代码,例如“hd”。

* Definition gives a brief definition of the event/signal

* 定义给出了事件/信号的简要定义

* R contains an "x" if the event can be detected or one or more of the following symbols:

* 如果可以检测到事件或以下一个或多个符号,则R包含一个“x”:

- "P" if the event is persistent.

- 如果事件持续发生,则为“P”。

- "S" if the events is an event-state that may be audited.

- 如果事件是可审核的事件状态,则为“S”。

- "C" if the event can be detected on a connection.

- 如果可以在连接上检测到事件,则为“C”。

* S contains one of the following if it is a signal:

* 如果是信号,则S包含以下内容之一:

- "OO" if the signal is On/Off signal.

- 如果信号为开/关信号,则为“OO”。

- "TO" if the signal is a Time-Out signal.

- 如果信号是超时信号,则为“至”。

- "BR" if the signal is a Brief signal.

- 如果信号为短信号,则为“BR”。

* S also contains:

* S还包括:

- "C" if the signal can be applied on a connection.

- 如果信号可应用于连接,则为“C”。

The table SHOULD then be followed by a more comprehensive description of each event/signal defined.

然后,应在表格后面对定义的每个事件/信号进行更全面的描述。

6.6.1 Default and Reserved Events
6.6.1 默认和保留事件

All packages that contain Time-Out type signals contain the operation failure ("of") and operation complete ("oc") events, irrespective of whether they are provided as part of the package description or not. These events are needed to support Time-Out signals and cannot be overridden in packages with Time-Out signals. They MAY be extended if necessary, however such practice is discouraged.

所有包含超时类型信号的软件包都包含操作失败(“of”)和操作完成(“oc”)事件,无论它们是否作为软件包说明的一部分提供。这些事件是支持超时信号所必需的,不能在带有超时信号的包中被重写。如有必要,可予以延长,但不鼓励这种做法。

If a package without Time-Out signals does contain definitions for the "oc" and "of" events, the event definitions provided in the package MAY over-ride those indicated here. Such practice is however discouraged and is purely allowed to avoid potential backwards compatibility problems.

如果没有超时信号的程序包包含“oc”和“of”事件的定义,则程序包中提供的事件定义可能超过此处所示的定义。然而,这种做法是不鼓励的,纯粹是为了避免潜在的向后兼容性问题。

It is considered good practice to explicitly mention that the two events are supported in accordance with their default definitions, which are as follows:

明确提及这两个事件是根据其默认定义支持的,这被视为良好实践,如下所示:

    ------------------------------------------------------------------
   | Symbol  |   Definition               |  R  |   S     Duration    |
   |---------|----------------------------|-----|---------------------|
   | oc      | Operation Complete         |  x  |                     |
   | of      | Operation Failure          |  x  |                     |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | Symbol  |   Definition               |  R  |   S     Duration    |
   |---------|----------------------------|-----|---------------------|
   | oc      | Operation Complete         |  x  |                     |
   | of      | Operation Failure          |  x  |                     |
    ------------------------------------------------------------------
        

Operation complete (oc): The operation complete event is generated when the gateway was asked to apply one or several signals of type TO on the endpoint or connection, and one or more of those signals completed without being stopped by the detection of a requested event such as off-hook transition or dialed digit. The completion report should carry as a parameter the name of the signal that came to the end of its live time, as in:

Operation complete(oc):当要求网关在端点或连接上应用一个或多个类型的信号时,会生成Operation complete事件,并且这些信号中的一个或多个已完成,而不会因检测到请求的事件(如摘机转换或拨号数字)而停止。完工报告应将到达现场时间结束的信号名称作为参数,如:

      O: G/oc(G/rt)
        
      O: G/oc(G/rt)
        

In this case, the observed event occurred because the "rt" signal in the "G" package timed out.

在这种情况下,发生观察到的事件是因为“G”包中的“rt”信号超时。

If the reported signal was applied on a connection, the parameter supplied will include the name of the connection as well, as in:

如果报告的信号应用于连接,则提供的参数也将包括连接的名称,如:

      O: G/oc(G/rt@0A3F58)
        
      O: G/oc(G/rt@0A3F58)
        

When the operation complete event is requested, it cannot be parameterized with any event parameters. When the package name is omitted (which is discouraged) as part of the signal name, the default package is assumed.

请求操作完成事件时,不能使用任何事件参数对其进行参数化。当包名作为信号名的一部分被省略(不鼓励使用)时,将采用默认包。

Operation failure (of): The operation failure event is generated when the endpoint was asked to apply one or several signals of type TO on the endpoint or connection, and one or more of those signals failed prior to timing out. The completion report should carry as a parameter the name of the signal that failed, as in:

操作失败(of):当要求端点将一个或多个类型的信号应用于端点或连接上,并且其中一个或多个信号在超时之前失败时,将生成操作失败事件。完成报告应包含失败信号的名称作为参数,如:

      O: G/of(G/rt)
        
      O: G/of(G/rt)
        

In this case a failure occurred in producing the "rt" signal in the "G" package.

在这种情况下,在“G”包中产生“rt”信号时发生故障。

When the reported signal was applied on a connection, the parameter supplied will include the name of the connection as well, as in:

当报告的信号应用于连接时,提供的参数也将包括连接的名称,如:

      O: G/of(G/rt@0A3F58)
        
      O: G/of(G/rt@0A3F58)
        

When the operation failure event is requested, event parameters can not be specified. When the package name is omitted (which is discouraged), the default package name is assumed.

请求操作失败事件时,无法指定事件参数。如果省略包名(不鼓励使用),则假定默认包名。

6.7 ExtensionParameters
6.7 扩展参数

Extension parameter extensions SHALL include:

扩展参数扩展应包括:

* The name and encoding of the extension parameter.

* 扩展参数的名称和编码。

* The possible values and encoding of those values that can be assigned to the extension parameter.

* 可分配给扩展参数的值的可能值和编码。

* For each of the commands defined in this specification, whether the extension parameter is Mandatory, Optional, or Forbidden in requests as well as responses. Note that extension parameters SHOULD NOT normally be mandatory.

* 对于本规范中定义的每个命令,扩展参数在请求和响应中是必需的、可选的还是禁止的。请注意,扩展参数通常不应是强制性的。

* A description of the operation of the extension parameter. As part of this description the default value (if any) if the extension is omitted in a command MUST be defined. It may be necessary to make a distinction between the default value before and after the initial application of the parameter, for example if the parameter retains its previous value once specified, until explicitly altered. If default values are not described, then the extension parameter simply defaults to empty in all commands.

* 扩展参数操作的说明。作为本说明的一部分,如果在命令中省略了扩展名,则必须定义默认值(如果有)。可能需要在初始应用参数之前和之后对默认值进行区分,例如,如果参数在指定后保留其先前的值,直到显式更改为止。如果没有描述默认值,那么扩展参数在所有命令中都默认为空。

* Whether the extension can be audited in AuditEndpoint and/or AuditConnection as well as the values returned. If nothing is specified, then auditing of the extension parameter can only be done for AuditEndpoint, and the value returned SHALL be the current value for the extension. Note that this may be empty.

* 是否可以在AuditEndpoint和/或AuditConnection中审核扩展以及返回的值。如果未指定任何内容,则只能对AuditEndpoint执行扩展参数的审核,返回的值应为扩展的当前值。请注意,这可能是空的。

6.8 LocalConnectionOptions
6.8 本地连接选项

LocalConnectionOptions extensions SHALL include:

本地连接选项扩展应包括:

* The name and encoding of the LocalConnectionOptions extension.

* LocalConnectionOptions扩展的名称和编码。

* The possible values and encoding of those values that can be assigned to the LocalConnectionOptions extension.

* 可以分配给LocalConnectionOptions扩展的可能值和这些值的编码。

* A description of the operation of the LocalConnectionOptions extension. As part of this description the following MUST be specified:

* LocalConnectionOptions扩展的操作说明。作为本说明的一部分,必须指定以下内容:

- The default value (if any) if the extension is omitted in a CreateConnection command.

- 如果CreateConnection命令中省略了扩展名,则为默认值(如果有)。

- The default value if omitted in a ModifyConnection command. This may be to simply retain the previous value (if any) or to apply the default value. If nothing is specified, the current value is retained if possible.

- 如果在ModifyConnection命令中省略,则为默认值。这可能只是保留以前的值(如果有)或应用默认值。如果未指定任何内容,则尽可能保留当前值。

- If Auditing of capabilities will result in the extension being returned, then a description to that effect as well as with what possible values and their encoding (note that the package itself will always be returned). If nothing is specified, the extension SHALL NOT be returned when auditing capabilities.

- 如果对功能的审核将导致返回扩展名,那么将给出相应的描述以及可能的值及其编码(请注意,包本身将始终返回)。如果未指定任何内容,则在审核功能时不应返回扩展。

Also note, that the extension MUST be included in the result for an AuditConnection command auditing the LocalConnectionOptions.

还要注意,对于审核LocalConnectionOptions的AuditConnection命令,扩展必须包含在结果中。

6.9 Reason Codes
6.9 原因码

Extension reason codes SHALL include:

扩展原因代码应包括:

* The number for the reason code. The number MUST be in the range 800 to 899.

* 原因代码的编号。数字必须在800到899之间。

* A description of the extension reason code including the circumstances that leads to the generation of the reason code. Those circumstances SHOULD be limited to events caused by another extension defined in the package to ensure the recipient will be able to interpret the extension reason code correctly.

* 扩展原因代码的说明,包括导致生成原因代码的情况。这些情况应限于由包中定义的另一个扩展导致的事件,以确保收件人能够正确解释扩展原因代码。

Note that the extension reason code may have to be provided in the result for an AuditEndpoint command auditing the reason code.

请注意,可能必须在审核原因代码的AuditEndpoint命令的结果中提供扩展原因代码。

6.10 RestartMethods
6.10 重新启动方法

Extension Restart Methods SHALL include:

扩展重启方法应包括:

* The name and encoding for the restart method.

* 重新启动方法的名称和编码。

* A description of the restart method including the circumstances that leads to the generation of the restart method. Those circumstances SHOULD be limited to events caused by another extension defined in the package to ensure the recipient will be able to interpret the extension restart method correctly.

* 重新启动方法的说明,包括导致生成重新启动方法的情况。这些情况应限于由包中定义的另一个扩展引起的事件,以确保收件人能够正确解释扩展重新启动方法。

* An indication of whether the RestartDelay parameter is to be used with the extension. If nothing is specified, it is assumed that it is not to be used. In that case, RestartDelay MUST be ignored if present.

* 指示RestartDelay参数是否与扩展一起使用。如果未指定任何内容,则假定不使用。在这种情况下,如果存在RestartDelay,则必须忽略它。

* If the restart method defines a service state, the description MUST explicitly state and describe this. In that case, the extension restart method can then be provided in the result for an AuditEndpoint command auditing the restart method.

* 如果restart方法定义了服务状态,那么说明必须显式地说明和描述该状态。在这种情况下,可以在审计重启方法的AuditEndpoint命令的结果中提供扩展重启方法。

6.11 Return Codes
6.11 返回码

Extension Return Codes SHALL include:

扩展返回代码应包括:

* The number for the extension return code. The number MUST be in the range 800 to 899.

* 扩展返回代码的编号。数字必须在800到899之间。

* A description of the extension return code including the circumstances that leads to the generation of the extension return code. Those circumstances SHOULD be limited to events caused by another extension defined in the package to ensure the recipient will be able to interpret the extension return code correctly.

* 扩展返回码的描述,包括导致生成扩展返回码的情况。这些情况应限于由包中定义的另一个扩展引起的事件,以确保收件人能够正确解释扩展返回代码。

7. Versions and Compatibility
7. 版本和兼容性
7.1 Changes from RFC 2705
7.1 RFC 2705的变更

RFC 2705 was issued in October 1999, as the last update of draft version 0.5. This updated document benefits from further implementation experience. The main changes from RFC 2705 are:

RFC 2705于1999年10月发布,作为0.5版草案的最后一次更新。本更新文件得益于进一步的实施经验。RFC 2705的主要变化是:

* Contains several clarifications, editorial changes and resolution of known inconsistencies.

* 包含若干澄清、编辑更改和已知不一致的解决方案。

* Firmed up specification language in accordance with RFC 2119 and added RFC 2119 conventions section.

* 根据RFC 2119确定了规范语言,并增加了RFC 2119惯例部分。

* Clarified behavior of mixed wild-carding in endpoint names.

* 阐明了端点名称中的混合野生梳理行为。

* Deleted naming requirement about having first term identify the physical gateway when the gateway consists of multiple physical gateways. Also added recommendations on wild-carding naming usage from the right only, as well as mixed wildcard usage.

* 删除了当网关由多个物理网关组成时,有关让第一个术语标识物理网关的命名要求。还添加了关于仅从右侧使用通配符以及混合通配符的建议。

* Clarified that synonymous forms and values for endpoint names are not freely interchangeable.

* 阐明端点名称的同义形式和值不能自由互换。

* Allowed IPv6 addresses in endpoint names.

* 端点名称中允许的IPv6地址。

* Clarified Digit Map matching rules.

* 澄清了数字地图匹配规则。

* Added missing semantics for symbols used in digit maps.

* 为数字地图中使用的符号添加了缺少的语义。

* Added Timer T description in Digit Maps.

* 在数字地图中添加了计时器T说明。

* Added recommendation to support digit map sizes of at least 2048 bytes per endpoint.

* 增加了支持每个端点至少2048字节的数字映射大小的建议。

* Clarified use of wildcards in several commands.

* 阐明了在几个命令中使用通配符。

* Event and Signal Parameters formally defined for events and signals.

* 为事件和信号正式定义的事件和信号参数。

* Persistent events now allowed in base MGCP protocol.

* 基本MGCP协议中现在允许持久事件。

* Added additional detail on connection wildcards.

* 添加了有关连接通配符的其他详细信息。

* Clarified behavior of loopback, and continuity test connection modes for mixing and multiple connections in those modes.

* 阐明了环回的行为,以及在这些模式下混合和多个连接的连续性测试连接模式。

* Modified BearerInformation to be conditional optional in the EndpointConfiguration command.

* 在EndpointConfiguration命令中将BearerInformation修改为条件可选。

* Clarified "swap audio" action operation for one specific scenario and noted that operation for other scenarios is undefined.

* 澄清了一个特定场景的“交换音频”操作,并指出其他场景的操作未定义。

* Added recommendation that all implementations support PCMU encoding for interoperability.

* 增加了所有实现都支持PCMU编码以实现互操作性的建议。

* Changed Bandwidth LocalConnectionOptions value from excluding to including overhead from the IP layer and up for consistency with SDP.

* 为了与SDP保持一致,已将带宽LocalConnectionOptions值从排除更改为包括IP层的开销。

* Clarified that mode of second connection in a CreateConnection command will be set to "send/receive".

* 阐明CreateConnection命令中的第二个连接模式将设置为“发送/接收”。

* Type of service default changed to zero.

* 服务默认类型更改为零。

* Additional detail on echo cancellation, silence suppression, and gain control. Also added recommendation for Call Agents not to specify handling of echo cancellation and gain control.

* 关于回声消除、静音抑制和增益控制的更多详细信息。还增加了建议呼叫代理不要指定回声消除和增益控制的处理。

* Added requirement for a connection to have a RemoteConnectionDescriptor in order to use the "network loopback" and "network continuity test" modes.

* 为了使用“网络环回”和“网络连续性测试”模式,增加了对连接使用RemoteConnectionDescriptor的要求。

* Removed procedures and specification for NAS's (will be provided as package instead).

* 删除了NAS的程序和规范(将作为软件包提供)。

* Removed procedures and specification for ATM (will be provided as package instead).

* 删除ATM的程序和规范(将作为包装提供)。

* Added missing optional NotifiedEntity parameter to the DeleteConnection (from the Call Agent) MGCI command.

* 将缺少的可选NotifiedEntity参数添加到DeleteConnection(从调用代理)MGCI命令中。

* Added optional new MaxMGCPDatagram RequestedInfo code for AuditEndpoint to enable auditing of maximum size of MGCP datagrams supported.

* 为AuditEndpoint添加可选的新MaxMGCPDatagram RequestedInfo代码,以支持对所支持的最大MGCP数据报大小进行审核。

* Added optional new PackageList RequestedInfo code for AuditEndpoint to enable auditing of packages with a package version number. PackageList parameter also allowed with return code 518 (unsupported package).

* 为AuditEndpoint添加了可选的新PackageList RequestedInfo代码,以启用对具有包版本号的包的审核。还允许使用PackageList参数,返回代码为518(不支持的包)。

* Added missing attributes in Capabilities.

* 在功能中添加了缺少的属性。

* Clarified that at the expiration of a non-zero restart delay, an updated RestartInProgress should be sent. Also clarified that a new NotifiedEntity can only be returned in response to a RestartInProgress command.

* 阐明在非零重启延迟到期时,应发送更新的重启进度。还阐明了新的NotifiedEntity只能在响应RestartInProgress命令时返回。

* Added Response Acknowledgement response (return code 000) and included in three-way handshake.

* 添加了响应确认响应(返回代码000)并包含在三向握手中。

* ResponseAck parameter changed to be allowed in all commands.

* responseak参数已更改为允许在所有命令中使用。

* Added return codes 101, 405, 406, 407, 409, 410, 503, 504, 505, 506, 507, 508, 509, 533, 534, 535, 536, 537, 538, 539, 540, 541, and defined return codes in range 800-899 to be package specific return codes. Additional text provided for some return codes and additional detail on how to handle unknown return codes added.

* 增加了返回码101、405、406、407、409、410、503、504、505、506、507、508、509、533、534、535、536、537、538、539、540、541,并将范围800-899的返回码定义为特定于包的返回码。为某些返回代码提供了附加文本,并添加了有关如何处理未知返回代码的附加详细信息。

* Added reason code 903, 904, 905 and defined reason codes 800-899 to be package specific reason codes.

* 增加原因代码903、904、905,并将定义的原因代码800-899作为机组特定的原因代码。

* Added section clarifying codec negotiation procedure.

* 增加了一节,澄清编解码器协商过程。

* Clarified that resource reservation parameters in a ModifyConnection command defaults to the current value used.

* 阐明ModifyConnection命令中的资源保留参数默认为使用的当前值。

* Clarified that connection mode is optional in ModifyConnection commands.

* 阐明了连接模式在ModifyConnection命令中是可选的。

* Corrected LocalConnectionDescriptor to be optional in response to CreateConnection commands (in case of failure).

* 已更正LocalConnectionDescriptor为可选的,以响应CreateConnection命令(在失败的情况下)。

* Clarified that quoted-strings are UTF-8 encoded and interchangeability of quoted strings and unquoted strings.

* 阐明了带引号的字符串是UTF-8编码的,并说明了带引号的字符串和不带引号的字符串的互换性。

* Clarified that Transaction Identifiers are compared as numerical values.

* 阐明将事务标识符作为数值进行比较。

* Clarified bit-ordering for Type Of Service LocalConnectionOptions.

* 阐明了服务类型LocalConnectionOptions的位顺序。

* Clarified the use of RequestIdentifier zero.

* 阐明了RequestIdentifier零的用法。

* Added example sections for commands, responses, and some call flows.

* 添加了命令、响应和一些调用流的示例部分。

* Corrected usage of and requirements for SDP to be strictly RFC 2327 compliant.

* SDP的正确使用和要求严格符合RFC 2327。

* Added requirement that all MGCP implementations must support MGCP datagrams up to at least 4000 bytes. Also added new section on Maximum Datagram Size, Fragmentation and reassembly.

* 增加了所有MGCP实现必须支持至少4000字节的MGCP数据报的要求。还增加了关于最大数据报大小、碎片和重组的新章节。

* Generalized piggybacking retransmission scheme to only state underlying requirements to be satisfied.

* 广义背驮重传方案,仅说明要满足的基本要求。

* Clarified the section on computing retransmission timers.

* 澄清了有关计算重传计时器的部分。

* Clarified operation of long-running transactions, including provisional responses, retransmissions and failures.

* 阐明了长期运行事务的操作,包括临时响应、重新传输和故障。

* Enhanced description of provisional responses and interaction with three-way handshake.

* 增强了对临时响应和三方握手交互的描述。

* Enhanced description of fail-over and the role of "notified entity". An empty "notified entity" has been allowed, although strongly discouraged.

* 增强了对故障转移和“通知实体”角色的描述。允许使用空的“通知实体”,但强烈建议不要使用。

* Clarified retransmission procedure and removed "wrong key" considerations from it. Also fixed inconsistencies between Max1 and Max2 retransmission boundaries and the associated flow diagram.

* 阐明了重新传输过程,并从中删除了“错误密钥”的考虑因素。还修复了Max1和Max2重传边界和相关流程图之间的不一致。

* Updated domain name resolution for retransmission procedure to incur less overhead when multiple endpoints are retransmitting.

* 更新了重新传输过程的域名解析,以在多个端点重新传输时减少开销。

* Removed requirement for in-order delivery of NotificationRequests response and Notify commands. Notify commands are still delivered in-order.

* 删除了顺序传递NotificationRequests响应和Notify命令的要求。通知命令仍按顺序传递。

* Clarified that activating an embedded Notification Request does not clear the list of ObservedEvents.

* 阐明激活嵌入式通知请求不会清除观察到的事件列表。

* Defined interactions between disconnected state and notification state.

* 已定义断开连接状态和通知状态之间的交互。

* Added section on transactional semantics.

* 增加了关于事务语义的部分。

* Defined gateway behavior when multiple interacting transactions are received.

* 收到多个交互事务时定义的网关行为。

* Additional details provided on service states. Clarified relationship between endpoint service states, restart methods, and associated processing of commands.

* 提供了有关服务状态的其他详细信息。阐明了端点服务状态、重启方法和相关命令处理之间的关系。

* Clarified operation for transitioning from "restart procedure" to "disconnected state".

* 阐明了从“重启程序”过渡到“断开状态”的操作。

* Allowed auditing commands and responses to bypass the "restart" and "disconnected" procedures.

* 允许审核命令和响应绕过“重新启动”和“断开连接”过程。

* Clarified operation of "disconnected procedure" and in particular the operation of piggy-backed "disconnected" RestartInProgress messages.

* 阐明了“断开连接程序”的操作,特别是清管式“断开连接”重启进程消息的操作。

* Added option to aggregate "disconnected" RestartInProgress messages under certain conditions to reduce message volume.

* 添加了在特定条件下聚合“断开连接的”重新启动消息以减少消息量的选项。

* Defined additional behavior for endpoints wishing to send commands while in the "disconnected" state.

* 为希望在“断开连接”状态下发送命令的端点定义了其他行为。

* Added new section on Load Control in General which includes two new error codes (101 and 409) to handle overload.

* 增加了关于负载控制的新章节,其中包括处理过载的两个新错误代码(101和409)。

* Deleted the "Proposed MoveConnection command".

* 删除了“建议的移动连接命令”。

* Removed packages from protocol specification (will be provided in separate documents instead).

* 从协议规范中删除包(将在单独的文件中提供)。

* Package concept formally extended to be primary extension mechanism now allowing extensions for the following to be defined in packages as well:

* 包概念正式扩展为主要扩展机制,现在允许在包中定义以下扩展:

- BearerInformation

- 承载信息

- LocalConnectionOptions

- 本地连接选项

- ExtensionParameters

- 扩展参数

- Connection Modes

- 连接方式

- Actions

- 行动

- Digit Map Letters

- 数字地图字母

- Connection Parameters

- 连接参数

- Restart Methods

- 重启方法

- Reason Codes

- 原因码

- Return Codes

- 返回码

* Requirements and suggested format for package definitions added.

* 增加了包装定义的要求和建议格式。

* Defined "operation complete" and "operation failure" events to be automatically present in packages with Time-Out signals.

* 定义的“操作完成”和“操作失败”事件将自动出现在带有超时信号的包中。

* Deleted list of differences that were prior to RFC 2705.

* 已删除RFC 2705之前的差异列表。

* Added Base Package to deal with quarantine buffer overflow, ObservedEvents overflow, embedded NotificationRequest failure, and to enable events to be requested persistently. A new "Message" command is included as well.

* 添加了基本包以处理隔离缓冲区溢出、ObservedEvents溢出、嵌入式NotificationRequest失败,并支持持久请求事件。还包括一个新的“消息”命令。

* IANA registration procedures for packages and other extensions added.

* 增加了包和其他扩展的IANA注册程序。

* Updated grammar to fix known errors and support new extensions in a backwards compatible manner. Added new (optional) PackageList and MaxMGCPDatagram for auditing. Changed explicit white space rules in some productions to make grammar more consistent.

* 更新语法以修复已知错误并以向后兼容的方式支持新扩展。添加了用于审核的新(可选)PackageList和MaxMGCPDatagram。更改了某些产品中的显式空白规则,以使语法更加一致。

* Connection Mode interaction table added.

* 添加了连接模式交互表。

* Added additional detail on virtual endpoint naming conventions. Also added suggested gateway endpoint convention and a "Range Wildcard" option to the Endpoint Naming Conventions.

* 添加了有关虚拟端点命名约定的其他详细信息。还向端点命名约定添加了建议的网关端点约定和“范围通配符”选项。

8. Security Considerations
8. 安全考虑

Security issues are discussed in section 5.

第5节讨论了安全问题。

9. Acknowledgements
9. 致谢

Special thanks are due to the authors of the original MGCP 1.0 specification: Mauricio Arango, Andrew Dugan, Isaac Elliott, Christian Huitema, and Scott Picket.

特别感谢原始MGCP 1.0规范的作者:Mauricio Arango、Andrew Dugan、Isaac Elliott、Christian Huitema和Scott Picket。

We also want to thank the many reviewers who provided advice on the design of SGCP and then MGCP, notably Sankar Ardhanari, Francois Berard, David Auerbach, Bob Biskner, David Bukovinsky, Charles Eckel, Mario Edini, Ed Guy, Barry Hoffner, Jerry Kamitses, Oren Kudevitzki, Rajesh Kumar, Troy Morley, Dave Oran, Jeff Orwick, John Pickens, Lou Rubin, Chip Sharp, Paul Sijben, Kurt Steinbrenner, Joe Stone, and Stuart Wray.

我们还要感谢为SGCP和MGCP的设计提供建议的众多评论家,特别是桑卡尔·阿尔达纳里、弗朗索瓦·贝拉德、大卫·奥尔巴赫、鲍勃·比斯克纳、大卫·布科文斯基、查尔斯·埃克尔、马里奥·埃迪尼、埃德·盖伊、巴里·霍夫纳、杰里·卡米特斯、奥伦·库德维茨基、拉杰什·库马尔、特洛伊·莫利、大卫·奥兰、杰夫·奥维克、约翰·皮肯斯、卢·鲁宾,奇普·夏普、保罗·西杰本、库尔特·斯坦布雷纳、乔·斯通和斯图亚特·瑞。

The version 0.1 of MGCP was heavily inspired by the "Internet Protocol Device Control" (IPDC) designed by the Technical Advisory Committee set up by Level 3 Communications. Whole sets of text were retrieved from the IP Connection Control protocol, IP Media Control protocol, and IP Device Management. The authors wish to acknowledge the contribution to these protocols made by Ilya Akramovich, Bob Bell, Dan Brendes, Peter Chung, John Clark, Russ Dehlinger, Andrew Dugan, Isaac Elliott, Cary FitzGerald, Jan Gronski, Tom Hess, Geoff Jordan, Tony Lam, Shawn Lewis, Dave Mazik, Alan Mikhak, Pete O'Connell, Scott Pickett, Shyamal Prasad, Eric Presworsky, Paul Richards, Dale Skran, Louise Spergel, David Sprague, Raj Srinivasan, Tom Taylor and Michael Thomas.

MGCP的0.1版深受3级通信公司成立的技术咨询委员会设计的“互联网协议设备控制”(IPDC)的启发。从IP连接控制协议、IP媒体控制协议和IP设备管理中检索整套文本。作者希望感谢Ilya Akramovich、Bob Bell、Dan Brendes、Peter Chung、John Clark、Russ Dehlinger、Andrew Dugan、Isaac Elliott、Cary FitzGerald、Jan Gronski、Tom Hess、Geoff Jordan、Tony Lam、Shawn Lewis、Dave Mazik、Alan Mikhak、Pete O'Connell、Scott Pickett、Shymal Prasad、,Eric Presworsky、Paul Richards、Dale Skran、Louise Spergel、David Sprague、Raj Srinivasan、Tom Taylor和Michael Thomas。

10. References
10. 工具书类

[1] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.

[1] Bradner,S.,“互联网标准过程——第3版”,BCP 9,RFC 2026,1996年10月。

[2] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[2] Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[3] Schulzrinne, H., Casner, S., Frederick, R. and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", RFC 1889, January 1996.

[3] Schulzrinne,H.,Casner,S.,Frederick,R.和V.Jacobson,“RTP:实时应用的传输协议”,RFC 1889,1996年1月。

[4] Schulzrinne, H., "RTP Profile for Audio and Video Conferences with Minimal Control", RFC 1890, January 1996.

[4] Schulzrinne,H.,“具有最小控制的音频和视频会议的RTP配置文件”,RFC 1890,1996年1月。

[5] Handley, M. and V. Jacobson, "SDP: Session Description Protocol", RFC 2327, April 1998.

[5] Handley,M.和V.Jacobson,“SDP:会话描述协议”,RFC 2327,1998年4月。

[6] Handley, M., Perkins, C. and E. Whelan, "Session Announcement Protocol", RFC 2974, October 2000.

[6] Handley,M.,Perkins,C.和E.Whelan,“会话公告协议”,RFC 29742000年10月。

[7] Rosenberg, J., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., Schulzrinne, H. and E. Schooler, "Session Initiation Protocol (SIP)", RFC 3261, June 2002.

[7] Rosenberg,J.,Camarillo,G.,Johnston,A.,Peterson,J.,Sparks,R.,Handley,M.,Schulzrinne,H.和E.Schooler,“会话启动协议(SIP)”,RFC 3261,2002年6月。

[8] Schulzrinne, H., Rao, A. and R. Lanphier, "Real Time Streaming Protocol (RTSP)", RFC 2326, April 1998.

[8] Schulzrinne,H.,Rao,A.和R.Lanphier,“实时流协议(RTSP)”,RFC2326,1998年4月。

[9] ITU-T, Recommendation Q.761, "FUNCTIONAL DESCRIPTION OF THE ISDN USER PART OF SIGNALING SYSTEM No. 7", (Malaga-Torremolinos, 1984; modified at Helsinki, 1993).

[9] ITU-T,建议Q.761,“第7号信令系统的ISDN用户部分的功能描述”(Malaga Torremolinos,1984年;在赫尔辛基修改,1993年)。

[10] ITU-T, Recommendation Q.762, "GENERAL FUNCTION OF MESSAGES AND SIGNALS OF THE ISDN USER PART OF SIGNALING SYSTEM No. 7", (MalagaTorremolinos, 1984; modified at Helsinki, 1993).

[10] ITU-T,建议Q.762,“第7号信令系统ISDN用户部分消息和信号的一般功能”,(Malagatoremolinos,1984年;在赫尔辛基修改,1993年)。

[11] ITU-T, Recommendation H.323 (02/98), "PACKET-BASED MULTIMEDIA COMMUNICATIONS SYSTEMS".

[11] ITU-T,建议H.323(02/98),“基于分组的多媒体通信系统”。

[12] ITU-T, Recommendation H.225, "Call Signaling Protocols and Media Stream Packetization for Packet Based Multimedia Communications Systems".

[12] ITU-T,建议H.225,“基于分组的多媒体通信系统的呼叫信令协议和媒体流分组”。

[13] ITU-T, Recommendation H.245 (02/98), "CONTROL PROTOCOL FOR MULTIMEDIA COMMUNICATION".

[13] ITU-T,建议H.245(02/98),“多媒体通信控制协议”。

[14] Kent, S. and R. Atkinson, "Security Architecture for the Internet Protocol", RFC 2401, November 1998.

[14] Kent,S.和R.Atkinson,“互联网协议的安全架构”,RFC 2401,1998年11月。

[15] Kent, S. and R. Atkinson, "IP Authentication Header", RFC 2402, November 1998.

[15] Kent,S.和R.Atkinson,“IP认证头”,RFC 2402,1998年11月。

[16] Kent, S. and R. Atkinson, "IP Encapsulating Security Payload (ESP)", RFC 2406, November 1998.

[16] Kent,S.和R.Atkinson,“IP封装安全有效载荷(ESP)”,RFC 2406,1998年11月。

[17] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.

[17] Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。

[18] Stevens, W. Richard, "TCP/IP Illustrated, Volume 1, The Protocols", Addison-Wesley, 1994.

[18] Stevens,W.Richard,“TCP/IP图解,第1卷,协议”,Addison-Wesley,1994年。

[19] Allman, M., Paxson, V. "On Estimating End-to-End Network Path Properties", Proc. SIGCOMM'99, 1999.

[19] Allman,M.,Paxson,V.“关于估算端到端网络路径属性”,过程。SIGCOMM'991999。

[20] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2279, January 1998.

[20] “UTF-8,ISO 10646的转换格式”,RFC 2279,1998年1月。

[21] Braden, R., "Requirements for Internet Hosts -- Communication Layers", STD 3, RFC 1122, October 1989.

[21] Braden,R.,“互联网主机的要求——通信层”,STD 3,RFC 1122,1989年10月。

[22] Bellcore, "LSSGR: Switching System Generic Requirements for Call Control Using the Integrated Services Digital Network User Part (ISDNUP)", GR-317-CORE, Issue 2, December 1997.

[22] Bellcore,“LSSGR:使用综合业务数字网络用户部分(ISDNUP)的呼叫控制的交换系统通用要求”,GR-317-CORE,第2期,1997年12月。

[23] Narten, T., and Alvestrand H., "Guidelines for Writing an IANA Considerations Section in RFCs", RFC 2434, October 1998.

[23] Narten,T.和Alvestrand H.,“在RFCs中编写IANA注意事项部分的指南”,RFC 2434,1998年10月。

Appendix A: Formal Syntax Description of the Protocol

附录A:协议的正式语法描述

In this section, we provide a formal description of the protocol syntax, following the "Augmented BNF for Syntax Specifications" defined in RFC 2234. The syntax makes use of the core rules defined in RFC 2234, Section 6.1, which are not included here. Furthermore, the syntax follows the case-sensitivity rules of RFC 2234, i.e., MGCP is case-insensitive (but SDP is not). It should be noted, that ABNF does not provide for implicit specification of linear white space and MGCP messages MUST thus follow the explicit linear white space rules provided in the grammar below. However, in line with general robustness principles, implementers are strongly encouraged to tolerate additional linear white space in messages received.

在本节中,我们将按照RFC 2234中定义的“语法规范的扩充BNF”对协议语法进行正式描述。该语法使用RFC 2234第6.1节中定义的核心规则,此处不包括这些规则。此外,语法遵循RFC 2234的区分大小写规则,即MGCP不区分大小写(但SDP不区分大小写)。应该注意的是,ABNF不提供线性空白的隐式规范,因此MGCP消息必须遵循下面语法中提供的显式线性空白规则。然而,根据一般健壮性原则,强烈鼓励实现者在接收到的消息中容忍额外的线性空白。

MGCPMessage = MGCPCommand / MGCPResponse
        
MGCPMessage = MGCPCommand / MGCPResponse
        
MGCPCommand = MGCPCommandLine 0*(MGCPParameter) [EOL *SDPinformation]
        
MGCPCommand = MGCPCommandLine 0*(MGCPParameter) [EOL *SDPinformation]
        
MGCPCommandLine = MGCPVerb 1*(WSP) transaction-id 1*(WSP)
                        endpointName 1*(WSP) MGCPversion EOL
        
MGCPCommandLine = MGCPVerb 1*(WSP) transaction-id 1*(WSP)
                        endpointName 1*(WSP) MGCPversion EOL
        
MGCPVerb = "EPCF" / "CRCX" / "MDCX" / "DLCX" / "RQNT"
         / "NTFY" / "AUEP" / "AUCX" / "RSIP" / extensionVerb
        
MGCPVerb = "EPCF" / "CRCX" / "MDCX" / "DLCX" / "RQNT"
         / "NTFY" / "AUEP" / "AUCX" / "RSIP" / extensionVerb
        
extensionVerb  = ALPHA 3(ALPHA / DIGIT) ; experimental starts with X
        
extensionVerb  = ALPHA 3(ALPHA / DIGIT) ; experimental starts with X
        
transaction-id = 1*9(DIGIT)
        
transaction-id = 1*9(DIGIT)
        
endpointName      = LocalEndpointName "@" DomainName
LocalEndpointName = LocalNamePart 0*("/" LocalNamePart)
LocalNamePart     = AnyName / AllName / NameString
AnyName           = "$"
AllName           = "*"
NameString        = 1*(range-of-allowed-characters)
; VCHAR except "$", "*", "/", "@"
range-of-allowed-characters  = %x21-23 / %x25-29 / %x2B-2E
                             / %x30-3F / %x41-7E
        
endpointName      = LocalEndpointName "@" DomainName
LocalEndpointName = LocalNamePart 0*("/" LocalNamePart)
LocalNamePart     = AnyName / AllName / NameString
AnyName           = "$"
AllName           = "*"
NameString        = 1*(range-of-allowed-characters)
; VCHAR except "$", "*", "/", "@"
range-of-allowed-characters  = %x21-23 / %x25-29 / %x2B-2E
                             / %x30-3F / %x41-7E
        
DomainName = 1*255(ALPHA / DIGIT / "." / "-")    ; as defined
           / "#" number                          ; in RFC 821
           / "[" IPv4address / IPv6address "]"   ; see RFC 2373
        
DomainName = 1*255(ALPHA / DIGIT / "." / "-")    ; as defined
           / "#" number                          ; in RFC 821
           / "[" IPv4address / IPv6address "]"   ; see RFC 2373
        

; Rewritten to ABNF from RFC 821 number = 1*DIGIT

; 从RFC 821号重写为ABNF,数字=1*位

;From RFC 2373
IPv6address = hexpart [ ":" IPv4address ]
IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
        
;From RFC 2373
IPv6address = hexpart [ ":" IPv4address ]
IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
        
; this production, while occurring in RFC2373, is not referenced
; IPv6prefix  = hexpart "/" 1*2DIGIT
hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ]
hexseq  = hex4 *( ":" hex4)
hex4    = 1*4HEXDIG
        
; this production, while occurring in RFC2373, is not referenced
; IPv6prefix  = hexpart "/" 1*2DIGIT
hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ]
hexseq  = hex4 *( ":" hex4)
hex4    = 1*4HEXDIG
        
MGCPversion = "MGCP" 1*(WSP) 1*(DIGIT) "." 1*(DIGIT)
                            [1*(WSP) ProfileName]
ProfileName = VCHAR *( WSP / VCHAR)
        
MGCPversion = "MGCP" 1*(WSP) 1*(DIGIT) "." 1*(DIGIT)
                            [1*(WSP) ProfileName]
ProfileName = VCHAR *( WSP / VCHAR)
        
MGCPParameter = ParameterValue EOL
        
MGCPParameter = ParameterValue EOL
        
; Check infoCode if more parameter values defined
; Most optional values can only be omitted when auditing
ParameterValue = ("K"  ":" 0*(WSP)  [ResponseAck])
               / ("B"  ":" 0*(WSP)  [BearerInformation])
               / ("C"  ":" 0*(WSP)  CallId)
               / ("I"  ":" 0*(WSP)  [ConnectionId])
               / ("N"  ":" 0*(WSP)  [NotifiedEntity])
               / ("X"  ":" 0*(WSP)  [RequestIdentifier])
               / ("L"  ":" 0*(WSP)  [LocalConnectionOptions])
               / ("M"  ":" 0*(WSP)  ConnectionMode)
               / ("R"  ":" 0*(WSP)  [RequestedEvents])
               / ("S"  ":" 0*(WSP)  [SignalRequests])
               / ("D"  ":" 0*(WSP)  [DigitMap])
               / ("O"  ":" 0*(WSP)  [ObservedEvents])
               / ("P"  ":" 0*(WSP)  [ConnectionParameters])
               / ("E"  ":" 0*(WSP)  ReasonCode)
               / ("Z"  ":" 0*(WSP)  [SpecificEndpointID])
               / ("Z2" ":" 0*(WSP)  SecondEndpointID)
               / ("I2" ":" 0*(WSP)  SecondConnectionID)
               / ("F"  ":" 0*(WSP)  [RequestedInfo])
               / ("Q"  ":" 0*(WSP)  QuarantineHandling)
               / ("T"  ":" 0*(WSP)  [DetectEvents])
               / ("RM" ":" 0*(WSP)  RestartMethod)
               / ("RD" ":" 0*(WSP)  RestartDelay)
               / ("A"  ":" 0*(WSP)  [Capabilities])
               / ("ES" ":" 0*(WSP)  [EventStates])
               / ("PL" ":" 0*(WSP)  [PackageList])    ; Auditing only
               / ("MD" ":" 0*(WSP)  MaxMGCPDatagram)  ; Auditing only
               / (extensionParameter ":" 0*(WSP) [parameterString])
        
; Check infoCode if more parameter values defined
; Most optional values can only be omitted when auditing
ParameterValue = ("K"  ":" 0*(WSP)  [ResponseAck])
               / ("B"  ":" 0*(WSP)  [BearerInformation])
               / ("C"  ":" 0*(WSP)  CallId)
               / ("I"  ":" 0*(WSP)  [ConnectionId])
               / ("N"  ":" 0*(WSP)  [NotifiedEntity])
               / ("X"  ":" 0*(WSP)  [RequestIdentifier])
               / ("L"  ":" 0*(WSP)  [LocalConnectionOptions])
               / ("M"  ":" 0*(WSP)  ConnectionMode)
               / ("R"  ":" 0*(WSP)  [RequestedEvents])
               / ("S"  ":" 0*(WSP)  [SignalRequests])
               / ("D"  ":" 0*(WSP)  [DigitMap])
               / ("O"  ":" 0*(WSP)  [ObservedEvents])
               / ("P"  ":" 0*(WSP)  [ConnectionParameters])
               / ("E"  ":" 0*(WSP)  ReasonCode)
               / ("Z"  ":" 0*(WSP)  [SpecificEndpointID])
               / ("Z2" ":" 0*(WSP)  SecondEndpointID)
               / ("I2" ":" 0*(WSP)  SecondConnectionID)
               / ("F"  ":" 0*(WSP)  [RequestedInfo])
               / ("Q"  ":" 0*(WSP)  QuarantineHandling)
               / ("T"  ":" 0*(WSP)  [DetectEvents])
               / ("RM" ":" 0*(WSP)  RestartMethod)
               / ("RD" ":" 0*(WSP)  RestartDelay)
               / ("A"  ":" 0*(WSP)  [Capabilities])
               / ("ES" ":" 0*(WSP)  [EventStates])
               / ("PL" ":" 0*(WSP)  [PackageList])    ; Auditing only
               / ("MD" ":" 0*(WSP)  MaxMGCPDatagram)  ; Auditing only
               / (extensionParameter ":" 0*(WSP) [parameterString])
        

; A final response may include an empty ResponseAck ResponseAck = confirmedTransactionIdRange *( "," 0*(WSP) confirmedTransactionIdRange )

; 最终响应可能包括空响应eack responseak=confirmedTransactionIdRange*(“,”0*(WSP)confirmedTransactionIdRange)

confirmedTransactionIdRange = transaction-id ["-" transaction-id]

确认交易IDrange=交易id[“-”交易id]

BearerInformation = BearerAttribute 0*("," 0*(WSP) BearerAttribute)
BearerAttribute   = ("e" ":" BearerEncoding)
                  / (BearerExtensionName [":" BearerExtensionValue])
BearerExtensionName  = PackageLCOExtensionName
BearerExtensionValue = LocalOptionExtensionValue
BearerEncoding = "A" / "mu"
        
BearerInformation = BearerAttribute 0*("," 0*(WSP) BearerAttribute)
BearerAttribute   = ("e" ":" BearerEncoding)
                  / (BearerExtensionName [":" BearerExtensionValue])
BearerExtensionName  = PackageLCOExtensionName
BearerExtensionValue = LocalOptionExtensionValue
BearerEncoding = "A" / "mu"
        
CallId = 1*32(HEXDIG)
        
CallId = 1*32(HEXDIG)
        
; The audit request response may include a list of identifiers
ConnectionId = 1*32(HEXDIG) 0*("," 0*(WSP) 1*32(HEXDIG))
SecondConnectionID = ConnectionId
        
; The audit request response may include a list of identifiers
ConnectionId = 1*32(HEXDIG) 0*("," 0*(WSP) 1*32(HEXDIG))
SecondConnectionID = ConnectionId
        
NotifiedEntity = [LocalName "@"] DomainName [":" portNumber]
LocalName  = LocalEndpointName            ; No internal structure
        
NotifiedEntity = [LocalName "@"] DomainName [":" portNumber]
LocalName  = LocalEndpointName            ; No internal structure
        
portNumber = 1*5(DIGIT)
        
portNumber = 1*5(DIGIT)
        
RequestIdentifier = 1*32(HEXDIG)
        
RequestIdentifier = 1*32(HEXDIG)
        
LocalConnectionOptions = LocalOptionValue 0*(WSP)
                           0*("," 0*(WSP) LocalOptionValue 0*(WSP))
LocalOptionValue = ("p"  ":" packetizationPeriod)
                 / ("a"  ":" compressionAlgorithm)
                 / ("b"  ":" bandwidth)
                 / ("e"  ":" echoCancellation)
                 / ("gc" ":" gainControl)
                 / ("s"  ":" silenceSuppression)
                 / ("t"  ":" typeOfService)
                 / ("r"  ":" resourceReservation)
                 / ("k"  ":" encryptiondata)
                 / ("nt" ":" ( typeOfNetwork /
                                    supportedTypeOfNetwork))
                 / (LocalOptionExtensionName
                         [":" LocalOptionExtensionValue])
        
LocalConnectionOptions = LocalOptionValue 0*(WSP)
                           0*("," 0*(WSP) LocalOptionValue 0*(WSP))
LocalOptionValue = ("p"  ":" packetizationPeriod)
                 / ("a"  ":" compressionAlgorithm)
                 / ("b"  ":" bandwidth)
                 / ("e"  ":" echoCancellation)
                 / ("gc" ":" gainControl)
                 / ("s"  ":" silenceSuppression)
                 / ("t"  ":" typeOfService)
                 / ("r"  ":" resourceReservation)
                 / ("k"  ":" encryptiondata)
                 / ("nt" ":" ( typeOfNetwork /
                                    supportedTypeOfNetwork))
                 / (LocalOptionExtensionName
                         [":" LocalOptionExtensionValue])
        
Capabilities    =  CapabilityValue 0*(WSP)
                     0*("," 0*(WSP) CapabilityValue 0*(WSP))
CapabilityValue = LocalOptionValue
                / ("v" ":" supportedPackages)
                / ("m" ":" supportedModes)
        
Capabilities    =  CapabilityValue 0*(WSP)
                     0*("," 0*(WSP) CapabilityValue 0*(WSP))
CapabilityValue = LocalOptionValue
                / ("v" ":" supportedPackages)
                / ("m" ":" supportedModes)
        
PackageList     = pkgNameAndVers 0*("," pkgNameAndVers)
pkgNameAndVers  = packageName ":" packageVersion
packageVersion  = 1*(DIGIT)
        
PackageList     = pkgNameAndVers 0*("," pkgNameAndVers)
pkgNameAndVers  = packageName ":" packageVersion
packageVersion  = 1*(DIGIT)
        
packetizationPeriod  = 1*4(DIGIT) ["-" 1*4(DIGIT)]
compressionAlgorithm = algorithmName 0*(";" algorithmName)
        
packetizationPeriod  = 1*4(DIGIT) ["-" 1*4(DIGIT)]
compressionAlgorithm = algorithmName 0*(";" algorithmName)
        
algorithmName        = 1*(SuitableLCOCharacter)
bandwidth            = 1*4(DIGIT) ["-" 1*4(DIGIT)]
echoCancellation     = "on" / "off"
gainControl          = "auto" / ["-"] 1*4(DIGIT)
silenceSuppression   = "on" / "off"
typeOfService        = 1*2(HEXDIG)     ; 1 hex only for capabilities
resourceReservation  = "g" / "cl" / "be"
        
algorithmName        = 1*(SuitableLCOCharacter)
bandwidth            = 1*4(DIGIT) ["-" 1*4(DIGIT)]
echoCancellation     = "on" / "off"
gainControl          = "auto" / ["-"] 1*4(DIGIT)
silenceSuppression   = "on" / "off"
typeOfService        = 1*2(HEXDIG)     ; 1 hex only for capabilities
resourceReservation  = "g" / "cl" / "be"
        
;encryption parameters are coded as in SDP (RFC 2327)
;NOTE: encryption key may contain an algorithm as specified in RFC 1890
encryptiondata = ( "clear" ":" encryptionKey )
               / ( "base64" ":" encodedEncryptionKey )
               / ( "uri" ":" URItoObtainKey )
               / ( "prompt" ) ; defined in SDP, not usable in MGCP!
        
;encryption parameters are coded as in SDP (RFC 2327)
;NOTE: encryption key may contain an algorithm as specified in RFC 1890
encryptiondata = ( "clear" ":" encryptionKey )
               / ( "base64" ":" encodedEncryptionKey )
               / ( "uri" ":" URItoObtainKey )
               / ( "prompt" ) ; defined in SDP, not usable in MGCP!
        
encryptionKey = 1*(SuitableLCOCharacter) / quotedString
; See RFC 2045
encodedEncryptionKey = 1*(ALPHA / DIGIT / "+" / "/" / "=")
URItoObtainKey = 1*(SuitableLCOCharacter) / quotedString
        
encryptionKey = 1*(SuitableLCOCharacter) / quotedString
; See RFC 2045
encodedEncryptionKey = 1*(ALPHA / DIGIT / "+" / "/" / "=")
URItoObtainKey = 1*(SuitableLCOCharacter) / quotedString
        
typeOfNetwork = "IN" / "ATM" / "LOCAL" / OtherTypeOfNetwork
; Registered with IANA - see RFC 2327
OtherTypeOfNetwork     = 1*(SuitableLCOCharacter)
supportedTypeOfNetwork = typeOfNetwork *(";" typeOfNetwork)
        
typeOfNetwork = "IN" / "ATM" / "LOCAL" / OtherTypeOfNetwork
; Registered with IANA - see RFC 2327
OtherTypeOfNetwork     = 1*(SuitableLCOCharacter)
supportedTypeOfNetwork = typeOfNetwork *(";" typeOfNetwork)
        
supportedModes    = ConnectionMode 0*(";" ConnectionMode)
        
supportedModes    = ConnectionMode 0*(";" ConnectionMode)
        
supportedPackages = packageName 0*(";" packageName)
        
supportedPackages = packageName 0*(";" packageName)
        
packageName = 1*(ALPHA / DIGIT / HYPHEN) ; Hyphen neither first or last
        
packageName = 1*(ALPHA / DIGIT / HYPHEN) ; Hyphen neither first or last
        
LocalOptionExtensionName = VendorLCOExtensionName
                         / PackageLCOExtensionName
                         / OtherLCOExtensionName
VendorLCOExtensionName   = "x" ("+"/"-") 1*32(SuitableExtLCOCharacter)
PackageLCOExtensionName  = packageName "/"
                            1*32(SuitablePkgExtLCOCharacter)
; must not start with "x-" or "x+"
OtherLCOExtensionName    = 1*32(SuitableExtLCOCharacter)
        
LocalOptionExtensionName = VendorLCOExtensionName
                         / PackageLCOExtensionName
                         / OtherLCOExtensionName
VendorLCOExtensionName   = "x" ("+"/"-") 1*32(SuitableExtLCOCharacter)
PackageLCOExtensionName  = packageName "/"
                            1*32(SuitablePkgExtLCOCharacter)
; must not start with "x-" or "x+"
OtherLCOExtensionName    = 1*32(SuitableExtLCOCharacter)
        
LocalOptionExtensionValue = (1*(SuitableExtLCOValChar)
                                                    / quotedString)
                              *(";" (1*(SuitableExtLCOValChar)
                                                      / quotedString))
        
LocalOptionExtensionValue = (1*(SuitableExtLCOValChar)
                                                    / quotedString)
                              *(";" (1*(SuitableExtLCOValChar)
                                                      / quotedString))
        
;Note: No "data" mode.
ConnectionMode = "sendonly" / "recvonly" / "sendrecv"
               / "confrnce" / "inactive" / "loopback"
        
;Note: No "data" mode.
ConnectionMode = "sendonly" / "recvonly" / "sendrecv"
               / "confrnce" / "inactive" / "loopback"
        
               / "conttest" / "netwloop" / "netwtest"
               / ExtensionConnectionMode
ExtensionConnectionMode = PkgExtConnectionMode
PkgExtConnectionMode    = packageName "/" 1*(ALPHA / DIGIT)
        
               / "conttest" / "netwloop" / "netwtest"
               / ExtensionConnectionMode
ExtensionConnectionMode = PkgExtConnectionMode
PkgExtConnectionMode    = packageName "/" 1*(ALPHA / DIGIT)
        
RequestedEvents = requestedEvent 0*("," 0*(WSP) requestedEvent)
requestedEvent  = (eventName ["(" requestedActions ")"])
                / (eventName "(" requestedActions ")"
                                       "(" eventParameters ")" )
eventName = [(packageName / "*") "/"]
                (eventId / "all" / eventRange
                                        / "*" / "#") ; for DTMF
                              ["@" (ConnectionId / "$" / "*")]
eventId = 1*(ALPHA / DIGIT / HYPHEN)   ; Hyphen neither first nor last
eventRange = "[" 1*(DigitMapLetter / (DIGIT "-" DIGIT) /
                        (DTMFLetter "-" DTMFLetter)) "]"
DTMFLetter = "A" / "B" / "C" / "D"
        
RequestedEvents = requestedEvent 0*("," 0*(WSP) requestedEvent)
requestedEvent  = (eventName ["(" requestedActions ")"])
                / (eventName "(" requestedActions ")"
                                       "(" eventParameters ")" )
eventName = [(packageName / "*") "/"]
                (eventId / "all" / eventRange
                                        / "*" / "#") ; for DTMF
                              ["@" (ConnectionId / "$" / "*")]
eventId = 1*(ALPHA / DIGIT / HYPHEN)   ; Hyphen neither first nor last
eventRange = "[" 1*(DigitMapLetter / (DIGIT "-" DIGIT) /
                        (DTMFLetter "-" DTMFLetter)) "]"
DTMFLetter = "A" / "B" / "C" / "D"
        
requestedActions = requestedAction 0*("," 0*(WSP) requestedAction)
requestedAction  = "N" / "A" / "D" / "S" / "I" / "K"
                 / "E" "(" EmbeddedRequest ")"
                 / ExtensionAction
ExtensionAction  = PackageExtAction
PackageExtAction = packageName "/" Action ["(" ActionParameters ")"]
Action           = 1*ALPHA
ActionParameters = eventParameters        ; May contain actions
        
requestedActions = requestedAction 0*("," 0*(WSP) requestedAction)
requestedAction  = "N" / "A" / "D" / "S" / "I" / "K"
                 / "E" "(" EmbeddedRequest ")"
                 / ExtensionAction
ExtensionAction  = PackageExtAction
PackageExtAction = packageName "/" Action ["(" ActionParameters ")"]
Action           = 1*ALPHA
ActionParameters = eventParameters        ; May contain actions
        
;NOTE: Should tolerate different order when receiving, e.g., for NCS.
EmbeddedRequest = (      "R" "(" EmbeddedRequestList ")"
                    ["," 0*(WSP) "S" "(" EmbeddedSignalRequest ")"]
                    ["," 0*(WSP) "D" "(" EmbeddedDigitMap ")"]      )
                / (      "S" "(" EmbeddedSignalRequest ")"
                    ["," 0*(WSP) "D" "(" EmbeddedDigitMap ")"] )
                / (      "D" "(" EmbeddedDigitMap ")" )
        
;NOTE: Should tolerate different order when receiving, e.g., for NCS.
EmbeddedRequest = (      "R" "(" EmbeddedRequestList ")"
                    ["," 0*(WSP) "S" "(" EmbeddedSignalRequest ")"]
                    ["," 0*(WSP) "D" "(" EmbeddedDigitMap ")"]      )
                / (      "S" "(" EmbeddedSignalRequest ")"
                    ["," 0*(WSP) "D" "(" EmbeddedDigitMap ")"] )
                / (      "D" "(" EmbeddedDigitMap ")" )
        

EmbeddedRequestList = RequestedEvents EmbeddedSignalRequest = SignalRequests EmbeddedDigitMap = DigitMap

EmbeddedRequestList=RequestedEvents EmbeddedSignalRequest=SignalRequests EmbeddedDigitMap=DigitMap

SignalRequests   = SignalRequest 0*("," 0*(WSP) SignalRequest )
SignalRequest    = eventName [ "(" eventParameters ")" ]
        
SignalRequests   = SignalRequest 0*("," 0*(WSP) SignalRequest )
SignalRequest    = eventName [ "(" eventParameters ")" ]
        
eventParameters  = eventParameter 0*("," 0*(WSP) eventParameter)
eventParameter   = eventParameterValue
                 / eventParameterName "=" eventParameter
                 / eventParameterName "(" eventParameters ")"
eventParameterString = 1*(SuitableEventParamCharacter)
eventParameterName   = eventParameterString
        
eventParameters  = eventParameter 0*("," 0*(WSP) eventParameter)
eventParameter   = eventParameterValue
                 / eventParameterName "=" eventParameter
                 / eventParameterName "(" eventParameters ")"
eventParameterString = 1*(SuitableEventParamCharacter)
eventParameterName   = eventParameterString
        
eventParameterValue  = eventParameterString / quotedString
        
eventParameterValue  = eventParameterString / quotedString
        
DigitMap           = DigitString  / "(" DigitStringList ")"
DigitStringList    = DigitString 0*( "|" DigitString )
DigitString        = 1*(DigitStringElement)
DigitStringElement = DigitPosition ["."]
DigitPosition      = DigitMapLetter / DigitMapRange
; NOTE "X" is now included
DigitMapLetter     = DIGIT / "#" / "*" / "A" / "B" / "C" / "D" / "T"
                   / "X" / ExtensionDigitMapLetter
ExtensionDigitMapLetter = "E" / "F" / "G" / "H" / "I" / "J" / "K"
                        / "L" / "M" / "N" / "O" / "P" / "Q" / "R"
                        / "S" / "U" / "V" / "W" / "Y" / "Z"
; NOTE "[x]" is now allowed
DigitMapRange = "[" 1*DigitLetter "]"
DigitLetter   = *((DIGIT "-" DIGIT) / DigitMapLetter)
        
DigitMap           = DigitString  / "(" DigitStringList ")"
DigitStringList    = DigitString 0*( "|" DigitString )
DigitString        = 1*(DigitStringElement)
DigitStringElement = DigitPosition ["."]
DigitPosition      = DigitMapLetter / DigitMapRange
; NOTE "X" is now included
DigitMapLetter     = DIGIT / "#" / "*" / "A" / "B" / "C" / "D" / "T"
                   / "X" / ExtensionDigitMapLetter
ExtensionDigitMapLetter = "E" / "F" / "G" / "H" / "I" / "J" / "K"
                        / "L" / "M" / "N" / "O" / "P" / "Q" / "R"
                        / "S" / "U" / "V" / "W" / "Y" / "Z"
; NOTE "[x]" is now allowed
DigitMapRange = "[" 1*DigitLetter "]"
DigitLetter   = *((DIGIT "-" DIGIT) / DigitMapLetter)
        
ObservedEvents = SignalRequests
        
ObservedEvents = SignalRequests
        
EventStates    = SignalRequests
        
EventStates    = SignalRequests
        

ConnectionParameters = ConnectionParameter 0*( "," 0*(WSP) ConnectionParameter )

ConnectionParameters=ConnectionParameter 0*(“,”0*(WSP)ConnectionParameter)

ConnectionParameter  = ( "PS" "=" packetsSent )
                     / ( "OS" "=" octetsSent )
                     / ( "PR" "=" packetsReceived )
                     / ( "OR" "=" octetsReceived )
                     / ( "PL" "=" packetsLost )
                     / ( "JI" "=" jitter )
                     / ( "LA" "=" averageLatency )
                     / ( ConnectionParameterExtensionName
                              "=" ConnectionParameterExtensionValue )
packetsSent     = 1*9(DIGIT)
octetsSent      = 1*9(DIGIT)
packetsReceived = 1*9(DIGIT)
octetsReceived  = 1*9(DIGIT)
packetsLost     = 1*9(DIGIT)
jitter          = 1*9(DIGIT)
averageLatency  = 1*9(DIGIT)
        
ConnectionParameter  = ( "PS" "=" packetsSent )
                     / ( "OS" "=" octetsSent )
                     / ( "PR" "=" packetsReceived )
                     / ( "OR" "=" octetsReceived )
                     / ( "PL" "=" packetsLost )
                     / ( "JI" "=" jitter )
                     / ( "LA" "=" averageLatency )
                     / ( ConnectionParameterExtensionName
                              "=" ConnectionParameterExtensionValue )
packetsSent     = 1*9(DIGIT)
octetsSent      = 1*9(DIGIT)
packetsReceived = 1*9(DIGIT)
octetsReceived  = 1*9(DIGIT)
packetsLost     = 1*9(DIGIT)
jitter          = 1*9(DIGIT)
averageLatency  = 1*9(DIGIT)
        
ConnectionParameterExtensionName = VendorCPExtensionName
                                 /    PackageCPExtensionName
VendorCPExtensionName  = "X" "-" 2*ALPHA
PackageCPExtensionName = packageName "/" CPName
CPName = 1*(ALPHA / DIGIT / HYPHEN)
ConnectionParameterExtensionValue = 1*9(DIGIT)
        
ConnectionParameterExtensionName = VendorCPExtensionName
                                 /    PackageCPExtensionName
VendorCPExtensionName  = "X" "-" 2*ALPHA
PackageCPExtensionName = packageName "/" CPName
CPName = 1*(ALPHA / DIGIT / HYPHEN)
ConnectionParameterExtensionValue = 1*9(DIGIT)
        
MaxMGCPDatagram = 1*9(DIGIT)
        
MaxMGCPDatagram = 1*9(DIGIT)
        
ReasonCode = 3DIGIT
             [1*(WSP) "/" packageName]     ; Only for 8xx
             [WSP 1*(%x20-7E)]
        
ReasonCode = 3DIGIT
             [1*(WSP) "/" packageName]     ; Only for 8xx
             [WSP 1*(%x20-7E)]
        

SpecificEndpointID = endpointName SecondEndpointID = endpointName

SpecificEndpointID=endpointName SecondEndpointID=endpointName

RequestedInfo = infoCode 0*("," 0*(WSP) infoCode)
        
RequestedInfo = infoCode 0*("," 0*(WSP) infoCode)
        
infoCode = "B" / "C" / "I" / "N" / "X" / "L" / "M" / "R" / "S"
         / "D" / "O" / "P" / "E" / "Z" / "Q" / "T" / "RC" / "LC"
         / "A" / "ES" / "RM" / "RD" / "PL" / "MD" / extensionParameter
        
infoCode = "B" / "C" / "I" / "N" / "X" / "L" / "M" / "R" / "S"
         / "D" / "O" / "P" / "E" / "Z" / "Q" / "T" / "RC" / "LC"
         / "A" / "ES" / "RM" / "RD" / "PL" / "MD" / extensionParameter
        
QuarantineHandling = loopControl / processControl
                   / (loopControl "," 0*(WSP) processControl )
loopControl    = "step" / "loop"
processControl = "process" / "discard"
        
QuarantineHandling = loopControl / processControl
                   / (loopControl "," 0*(WSP) processControl )
loopControl    = "step" / "loop"
processControl = "process" / "discard"
        
DetectEvents = SignalRequests
        
DetectEvents = SignalRequests
        
RestartMethod = "graceful" / "forced" / "restart" / "disconnected"
              / "cancel-graceful" / extensionRestartMethod
extensionRestartMethod = PackageExtensionRM
PackageExtensionRM     = packageName "/" 1*32(ALPHA / DIGIT / HYPHEN)
RestartDelay = 1*6(DIGIT)
        
RestartMethod = "graceful" / "forced" / "restart" / "disconnected"
              / "cancel-graceful" / extensionRestartMethod
extensionRestartMethod = PackageExtensionRM
PackageExtensionRM     = packageName "/" 1*32(ALPHA / DIGIT / HYPHEN)
RestartDelay = 1*6(DIGIT)
        
extensionParameter = VendorExtensionParameter
                   / PackageExtensionParameter
                   / OtherExtensionParameter
VendorExtensionParameter  = "X" ("-"/"+") 1*6(ALPHA / DIGIT)
PackageExtensionParameter = packageName "/"
                            1*32(ALPHA / DIGIT / HYPHEN)
; must not start with "x-" or x+"
OtherExtensionParameter   = 1*32(ALPHA / DIGIT / HYPHEN)
        
extensionParameter = VendorExtensionParameter
                   / PackageExtensionParameter
                   / OtherExtensionParameter
VendorExtensionParameter  = "X" ("-"/"+") 1*6(ALPHA / DIGIT)
PackageExtensionParameter = packageName "/"
                            1*32(ALPHA / DIGIT / HYPHEN)
; must not start with "x-" or x+"
OtherExtensionParameter   = 1*32(ALPHA / DIGIT / HYPHEN)
        
;If first character is a double-quote, then it is a quoted-string
parameterString = (%x21 / %x23-7F) *(%x20-7F) ; first and last must not
                                              ; be white space
                    / quotedString
        
;If first character is a double-quote, then it is a quoted-string
parameterString = (%x21 / %x23-7F) *(%x20-7F) ; first and last must not
                                              ; be white space
                    / quotedString
        
MGCPResponse = MGCPResponseLine 0*(MGCPParameter)
                                        *2(EOL *SDPinformation)
        
MGCPResponse = MGCPResponseLine 0*(MGCPParameter)
                                        *2(EOL *SDPinformation)
        
MGCPResponseLine = responseCode 1*(WSP) transaction-id
                        [1*(WSP) "/" packageName]    ; Only for 8xx
                             [WSP responseString] EOL
        
MGCPResponseLine = responseCode 1*(WSP) transaction-id
                        [1*(WSP) "/" packageName]    ; Only for 8xx
                             [WSP responseString] EOL
        
responseCode = 3DIGIT
responseString = *(%x20-7E)
        
responseCode = 3DIGIT
responseString = *(%x20-7E)
        
SuitablePkgExtLCOCharacter =  SuitableLCOCharacter
        
SuitablePkgExtLCOCharacter =  SuitableLCOCharacter
        
SuitableExtLCOCharacter = DIGIT / ALPHA / "+" / "-" / "_" / "&"
              / "!" / "'" / "|" / "=" / "#" / "?"
              / "." / "$" / "*" /       "@" / "[" / "]"
              / "^" / "`" / "{" / "}" / "~"
        
SuitableExtLCOCharacter = DIGIT / ALPHA / "+" / "-" / "_" / "&"
              / "!" / "'" / "|" / "=" / "#" / "?"
              / "." / "$" / "*" /       "@" / "[" / "]"
              / "^" / "`" / "{" / "}" / "~"
        
SuitableLCOCharacter   = SuitableExtLCOCharacter / "/"
        
SuitableLCOCharacter   = SuitableExtLCOCharacter / "/"
        
SuitableExtLCOValChar  = SuitableLCOCharacter / ":"
        
SuitableExtLCOValChar  = SuitableLCOCharacter / ":"
        
; VCHAR except """, "(", ")", ",", and "="
SuitableEventParamCharacter = %x21 / %x23-27 / %x2A-2B
                            / %x2D-3C / %x3E-7E
        
; VCHAR except """, "(", ")", ",", and "="
SuitableEventParamCharacter = %x21 / %x23-27 / %x2A-2B
                            / %x2D-3C / %x3E-7E
        
; NOTE: UTF8 encoded
quotedString  = DQUOTE 0*(quoteEscape / quoteChar) DQUOTE
quoteEscape   = DQUOTE DQUOTE
quoteChar = (%x00-21 / %x23-FF)
        
; NOTE: UTF8 encoded
quotedString  = DQUOTE 0*(quoteEscape / quoteChar) DQUOTE
quoteEscape   = DQUOTE DQUOTE
quoteChar = (%x00-21 / %x23-FF)
        
EOL = CRLF / LF
        
EOL = CRLF / LF
        
HYPHEN = "-"
        
HYPHEN = "-"
        

; See RFC 2327 for proper SDP grammar instead. SDPinformation = SDPLine CRLF *(SDPLine CRLF) ; see RFC 2327 SDPLine = 1*(%x01-09 / %x0B / %x0C / %x0E-FF) ; for proper def.

; 有关正确的SDP语法,请参见RFC 2327。SDP信息=SDPLine CRLF*(SDPLine CRLF);参见RFC 2327 SDPLine=1*(%x01-09/%x0B/%x0C/%x0E FF);为了获得合适的def。

Appendix B: Base Package

附录B:基本包

Package name: B Version: 0

包名称:B版本:0

The MGCP specification defines a base package which contains a set of events and extension parameters that are of general use to the protocol. Although not required, it is highly RECOMMENDED to support this package as it provides important functionality for the base protocol.

MGCP规范定义了一个基本包,其中包含一组对协议通用的事件和扩展参数。尽管不是必需的,但强烈建议支持此软件包,因为它为基本协议提供了重要的功能。

B.1 Events
B.1活动

The table below lists the events:

下表列出了事件:

    ------------------------------------------------------------------
   | Symbol  |   Definition               |  R  |   S     Duration    |
   |---------|----------------------------|-----|---------------------|
   | enf(##) | embedded RQNT failure      |  x  |                     |
   | oef     | observed events full       |  x  |                     |
   | qbo     | quarantine buffer overflow |  x  |                     |
    ------------------------------------------------------------------
        
    ------------------------------------------------------------------
   | Symbol  |   Definition               |  R  |   S     Duration    |
   |---------|----------------------------|-----|---------------------|
   | enf(##) | embedded RQNT failure      |  x  |                     |
   | oef     | observed events full       |  x  |                     |
   | qbo     | quarantine buffer overflow |  x  |                     |
    ------------------------------------------------------------------
        

The events are defined as follows:

事件定义如下:

Embedded NotificationRequest failure (enf): The Embedded NotificationRequest Failure (enf) event is generated when an embedded Notification Request failure occurs. When the event is requested, it should be as part of the Embedded NotificationRequest itself. When the event is reported, it may be parameterized with an error code (see Section 2.4) detailing the error that occurred. When requested, it cannot be parameterized.

嵌入式NotificationRequest failure(enf):嵌入式NotificationRequest failure(enf)事件在嵌入式通知请求失败时生成。当请求事件时,它应该作为嵌入式NotificationRequest本身的一部分。报告事件时,可使用详细说明发生错误的错误代码(见第2.4节)对其进行参数化。请求时,无法对其进行参数化。

Observed events full (oef): The event is generated when the endpoint is unable to accumulate any more events in the list of ObservedEvents. If this event occurs, and it is not used to trigger a Notify, subsequent events that should have been added to the list will be lost.

观察到的事件已满(oef):当端点无法在观察到的事件列表中累积更多事件时,将生成该事件。如果此事件发生,且未用于触发通知,则应添加到列表中的后续事件将丢失。

Quarantine buffer overflow (qbo): The event is generated when the quarantine buffer overflows and one or more events have been lost.

隔离缓冲区溢出(qbo):隔离缓冲区溢出且一个或多个事件丢失时生成该事件。

B.2 Extension Parameters
B.2扩展参数
B.2.1 PersistentEvents
B.2.1 持久事件

PersistentEvents: A list of events that the gateway is requested to detect and report persistently. The parameter is optional but can be provided in any command where the DetectEvents parameter can be provided. The initial default value of the parameter is empty. When the parameter is omitted from a command, it retains its current value. When the parameter is provided, it completely replaces the current value. Providing an event in this list, is similar (but preferable) to defining that particular event as being persistent. The current list of PersistentEvents will implicitly apply to the current as well as subsequent NotificationRequests, however no glare detection etc. will be performed (similarly to DetectEvents). If an event provided in this list is included in a RequestedEvents list, the action and event parameters used in the RequestedEvents will replace the action and event parameters associated with the event in the PersistentEvents list for the life of the RequestedEvents list, after which the PersistentEvents action and event parameters are restored. Events with event states requested through this parameter will be included in the list of EventStates if audited.

PersistentEvents:请求网关持续检测和报告的事件列表。该参数是可选的,但可在可提供DetectEvents参数的任何命令中提供。参数的初始默认值为空。如果从命令中省略该参数,它将保留其当前值。提供参数后,它将完全替换当前值。在此列表中提供事件与将特定事件定义为持久事件类似(但更可取)。PersistentEvents的当前列表将隐式应用于当前以及后续通知请求,但不会执行眩光检测等(类似于检测事件)。如果此列表中提供的事件包含在RequestedEvents列表中,则RequestedEvents中使用的操作和事件参数将在RequestedEvents列表的生命周期内替换与PersistentEvents列表中的事件关联的操作和事件参数,之后,将恢复PersistentEvents操作和事件参数。如果已审核,则通过此参数请求具有事件状态的事件将包括在事件状态列表中。

PersistentEvents can also be used to detect events on connections. Use of the "all connections" wildcard is straightforward, whereas using PersistentEvents with one or more specific connections must be considered carefully. Once the connection in question is deleted, a subsequent NotificationRequest without a new PersistentEvents value will fail (error code 515 - incorrect connection-id, is RECOMMENDED), as it implicitly refers to the deleted connection.

PersistentEvents还可用于检测连接上的事件。使用“all connections”通配符很简单,但必须仔细考虑将PersistentEvents与一个或多个特定连接一起使用。删除相关连接后,没有新PersistentEvents值的后续NotificationRequest将失败(错误代码515-建议使用不正确的连接id),因为它隐式引用已删除的连接。

The parameter generates the relevant error codes from the base protocol, e.g., error code 512 if an unknown event is specified.

该参数从基本协议生成相关错误代码,例如,如果指定了未知事件,则生成错误代码512。

The PersistentEvents parameter can be audited, in which case it will return its current value. Auditing of RequestedEvents is not affected by this extension, i.e., events specified in this list are not automatically reported when auditing RequestedEvents.

可以审核PersistentEvents参数,在这种情况下,它将返回其当前值。此扩展不影响RequestedEvents的审核,即在审核RequestedEvents时不会自动报告此列表中指定的事件。

The parameter name for PersistentEvents is "PR" and it is defined by the production:

PersistentEvents的参数名为“PR”,由生产部门定义:

     PersistentEvents = "PR" ":" 0*WSP  [RequestedEvents]
        
     PersistentEvents = "PR" ":" 0*WSP  [RequestedEvents]
        

The following example illustrates the use of the parameter:

以下示例说明了参数的使用:

     B/PR: L/hd(N), L/hf(N), L/hu(N), B/enf, B/oef, B/qbo
        
     B/PR: L/hd(N), L/hf(N), L/hu(N), B/enf, B/oef, B/qbo
        

which instructs the endpoint to persistently detect and report off-hook, hook-flash, and on-hook. It also instructs the endpoint to persistently detect and report Embedded Notification Request failure, Observed events full, and Quarantine buffer overflow.

它指示端点持续检测并报告挂机、挂机闪烁和挂机。它还指示端点持续检测和报告嵌入式通知请求失败、观察到的事件已满以及隔离缓冲区溢出。

B.2.2 NotificationState
B.2.2 通知状态

NotificationState is a RequestedInfo parameter that can be audited with the AuditEndpoint command. It can be used to determine if the endpoint is in the notification state or not.

NotificationState是一个RequestedInfo参数,可以使用AuditEndpoint命令对其进行审核。它可用于确定端点是否处于通知状态。

The parameter is forbidden in any command. In responses, it is a valid response parameter for AuditEndpoint only.

任何命令中都禁止使用该参数。在响应中,它仅是AuditEndpoint的有效响应参数。

It is defined by the following grammar:

它由以下语法定义:

     NotificationState        = "NS" ":" 0*WSP NotificationStateValue
     NotificationStateValue   = "ns" / "ls" / "o"
        
     NotificationState        = "NS" ":" 0*WSP NotificationStateValue
     NotificationStateValue   = "ns" / "ls" / "o"
        

It is requested as part of auditing by including the parameter code in RequestedInfo, as in:

通过在RequestedInfo中包含参数代码作为审核的一部分进行请求,如下所示:

F: B/NS

F:B/N

The response parameter will contain the value "ns" if the endpoint is in the "notification state", the value "ls" if the endpoint is in the "lockstep state" (i.e., waiting for an RQNT after a response to a NTFY has been received when operating in "step" mode), or the value "o" otherwise, as for example:

如果端点处于“通知状态”,响应参数将包含值“ns”;如果端点处于“锁定步骤状态”(即,在“步骤”模式下操作时,在收到对NTFY的响应后等待RQNT),响应参数将包含值“ls”;否则,将包含值“o”,例如:

B/NS: ns

B/N:NS

B.3 Verbs
B.3动词

MGCP packages are not intended to define new commands, however an exception is made in this case in order to add an important general capability currently missing, namely the ability for the gateway to send a generic message to the Call Agent.

MGCP包不打算定义新命令,但是在这种情况下,为了添加当前缺少的重要通用功能(即网关向呼叫代理发送通用消息的功能),会出现一个例外。

The definition of the new command is:

新命令的定义为:

ReturnCode <-- Message(EndpointId [, ...])

返回代码<--消息(端点ID[,…])

EndpointId is the name for the endpoint(s) in the gateway which is issuing the Message command. The identifier MUST be a fully qualified endpoint identifier, including the domain name of the gateway. The local part of the endpoint name MUST NOT use the "any of" wildcard.

EndpointId是发出消息命令的网关中端点的名称。标识符必须是完全限定的端点标识符,包括网关的域名。端点名称的本地部分不得使用“any of”通配符。

The only parameter specified in the definition of the Message command is the EndpointId, however, it is envisioned that extensions will define additional parameters to be used with the Message command. Such extensions MUST NOT alter or otherwise interfere with the normal operation of the basic MGCP protocol. They may however define additional capabilities above and beyond that provided by the basic MGCP protocol. For example, an extension to enable the gateway to audit the packages supported by the Call Agent could be defined, whereas using the Message command as an alternative way of reporting observed events would be illegal, as that would alter the normal MGCP protocol behavior.

消息命令定义中指定的唯一参数是EndpointId,但是,可以预见扩展将定义与消息命令一起使用的其他参数。此类扩展不得改变或以其他方式干扰基本MGCP协议的正常运行。但是,它们可以定义超出基本MGCP协议提供的附加功能。例如,可以定义一个扩展,使网关能够审核呼叫代理支持的包,而使用Message命令作为报告观察到的事件的替代方式是非法的,因为这将改变正常的MGCP协议行为。

In order to not interfere with normal MGCP operation, lack of a response to the Message command MUST NOT lead the endpoint to become disconnected. The endpoint(s) MUST be prepared to handle this transparently and continue normal processing unaffected.

为了不干扰正常的MGCP操作,对消息命令的响应不足不得导致端点断开连接。端点必须准备好透明地处理此问题,并继续正常处理而不受影响。

If the endpoint(s) receive a response indicating that the Call Agent does not support the Message command, the endpoint(s) MUST NOT send a Message command again until the current "notified entity" has changed. Similarly, if the endpoint(s) receive a response indicating that the Call Agent does not support one or more parameters in the Message command, the endpoint(s) MUST NOT send a Message command with those parameters again until the current "notified entity" has changed.

如果端点接收到指示呼叫代理不支持消息命令的响应,则在当前“通知实体”发生更改之前,端点不得再次发送消息命令。类似地,如果端点接收到指示呼叫代理不支持消息命令中的一个或多个参数的响应,则在当前“通知实体”发生更改之前,端点不得再次发送包含这些参数的消息命令。

The Message command is encoded as MESG, as shown in the following example:

消息命令编码为MESG,如下例所示:

MESG 1200 aaln/1@rgw.whatever.net MGCP 1.0

MESG 1200 aaln/1@rgw.whatever.netMGCP 1.0

Appendix C: IANA Considerations

附录C:IANA考虑事项

C.1 New MGCP Package Sub-Registry
C.1新的MGCP包子注册表

The IANA has established a new sub-registry for MGCP packages under http://www.iana.org/assignments/mgcp-packages.

IANA已经为MGCP包建立了一个新的子注册表http://www.iana.org/assignments/mgcp-packages.

Packages can be registered with the IANA according to the following procedure:

可以按照以下程序向IANA注册软件包:

The package MUST have a unique string name which MUST NOT start with the two characters "x-" or "x+".

包必须具有唯一的字符串名称,该名称不得以两个字符“x-”或“x+”开头。

The package title, name, and version (zero assumed by default) MUST be registered with IANA as well as a reference to the document that describes the package. The document MUST have a stable URL and MUST be contained on a public web server.

包的标题、名称和版本(默认情况下为零)必须向IANA注册,并提供对描述包的文档的引用。文档必须具有稳定的URL,并且必须包含在公共web服务器上。

Packages may define one or more Extension Digit Map Letters, however these are taken from a limited and flat name space. To prevent name clashing, IANA SHALL NOT register a package that defines an Extension Digit Map Letter already defined in another package registered by IANA. To ease this task, such packages SHALL contain the line "Extension Digit Map Letters: " followed by a list of the Extension Digit Map Letters defined in the package at the beginning of the package definition.

包可以定义一个或多个扩展数字映射字母,但是这些字母来自有限的平面名称空间。为防止名称冲突,IANA不得注册定义扩展数字映射字母的包,该扩展数字映射字母已在IANA注册的另一个包中定义。为了简化此任务,此类文件包应包含“扩展数字映射字母:”行,然后是文件包定义开头定义的扩展数字映射字母列表。

A contact name, e-mail and postal address for the package MUST be provided. The contact information SHALL be updated by the defining organization as necessary.

必须提供包裹的联系人姓名、电子邮件和邮政地址。必要时,定义组织应更新联系信息。

Finally, prior to registering a package, the IANA MUST have a designated expert [23] review the package. The expert reviewer will send e-mail to the IANA on the overall review determination.

最后,在注册软件包之前,IANA必须指定专家[23]审查软件包。专家评审员将向IANA发送关于总体评审决定的电子邮件。

C.2 New MGCP Package
C.2新的MGCP包

This document defines a new MGCP Base Package in Appendix B, which has been registered by IANA.

本文件在附录B中定义了一个新的MGCP基本包,该包已由IANA注册。

C.3 New MGCP LocalConnectionOptions Sub-Registry
C.3新的MGCP LocalConnectionOptions子注册表

The IANA has established a new sub-registry for MGCP LocalConnectionOptions under http://www.iana.org/assignments/mgcp-localconnectionoptions.

IANA已经为MGCP LocalConnectionOptions建立了一个新的子注册表,该注册表位于http://www.iana.org/assignments/mgcp-localconnectionoptions.

Packages are the preferred extension mechanism, however for backwards compatibility, local connection options beyond those provided in this specification can be registered with IANA. Each such local connection option MUST have a unique string name which MUST NOT start with "x-" or "x+". The local connection option field name and encoding name MUST be registered with IANA as well as a reference to the document that describes the local connection option. The document MUST have a stable URL and MUST be contained on a public web server.

包是首选的扩展机制,但是为了向后兼容,可以向IANA注册本规范中提供的本地连接选项之外的本地连接选项。每个这样的本地连接选项必须有一个唯一的字符串名称,该名称不得以“x-”或“x+”开头。必须向IANA注册本地连接选项字段名和编码名,以及对描述本地连接选项的文档的引用。文档必须具有稳定的URL,并且必须包含在公共web服务器上。

A contact name, e-mail and postal address for the local connection option MUST be provided. The contact information SHALL be updated by the defining organization as necessary.

必须提供本地连接选项的联系人姓名、电子邮件和邮政地址。必要时,定义组织应更新联系信息。

Finally, prior to registering a LocalConnectionOption, the IANA MUST have a designated expert [23] review the LocalConnectionOption. The expert reviewer will send e-mail to the IANA on the overall review determination.

最后,在注册LocalConnectionOption之前,IANA必须指定一名专家[23]审查LocalConnectionOption。专家评审员将向IANA发送关于总体评审决定的电子邮件。

Appendix D: Mode Interactions

附录D:模式交互

An MGCP endpoint can establish one or more media streams. These streams are either incoming (from a remote endpoint) or outgoing (generated at the handset microphone). The "connection mode" parameter establishes the direction and generation of these streams. When there is only one connection to an endpoint, the mapping of these streams is straightforward; the handset plays the incoming stream over the handset speaker and generates the outgoing stream from the handset microphone signal, depending on the mode parameter.

MGCP端点可以建立一个或多个媒体流。这些流要么传入(来自远程端点),要么传出(在手持话筒上生成)。“连接模式”参数确定这些流的方向和生成。当一个端点只有一个连接时,这些流的映射是直接的;手机通过手机扬声器播放传入流,并根据模式参数从手机麦克风信号生成传出流。

However, when several connections are established to an endpoint, there can be many incoming and outgoing streams. Depending on the connection mode used, these streams may interact differently with each other and the streams going to/from the handset.

但是,当与一个端点建立多个连接时,可能会有许多传入和传出流。根据所使用的连接模式,这些流之间的交互可能不同,进出手机的流也可能不同。

The table below describes how different connections SHALL be mixed when one or more connections are concurrently "active". An active connection is here defined as a connection that is in one of the following modes:

下表描述了当一个或多个连接同时处于“活动”状态时,应如何混合不同的连接。活动连接在此定义为处于以下模式之一的连接:

* "send/receive" * "send only" * "receive only" * "conference"

* “发送/接收”*“仅发送”*“仅接收”*“会议”

Connections in "network loopback", "network continuity test", or "inactive" modes are not affected by connections in the "active" modes. The Table uses the following conventions:

“网络环回”、“网络连续性测试”或“非活动”模式下的连接不受“活动”模式下的连接的影响。该表使用以下约定:

* Ai is the incoming media stream from Connection A * Bi is the incoming media stream from Connection B * Hi is the incoming media stream from the Handset Microphone * Ao is the outgoing media stream to Connection A * Bo is the outgoing media stream to Connection B * Ho is the outgoing media stream to the Handset earpiece * NA indicates no stream whatsoever (assuming there are no signals applied on the connection)

* Ai是来自连接A的传入媒体流*Bi是来自连接B的传入媒体流*Hi是来自手持话筒的传入媒体流*Ao是来自连接A的传出媒体流*Bo是来自连接B的传出媒体流*Ho是来自手持话筒的传出媒体流*NA表示没有流无论如何(假设连接上没有应用信号)

"netw" in the following table indicates either "netwloop" or "netwtest" mode.

下表中的“netw”表示“netwloop”或“netwtest”模式。

     -------------------------------------------------------------
    |       |               Connection A Mode                     |
    |       |-----------------------------------------------------
    |       |sendonly|recvonly|sendrecv|confrnce|inactive|  netw  |
    |-------|-----------------------------------------------------|
    | |Send | Ao=Hi  | Ao=NA  | Ao=Hi  | Ao=Hi  | Ao=NA  | Ao=Ai  |
    |C|only | Bo=Hi  | Bo=Hi  | Bo=Hi  | Bo=Hi  | Bo=Hi  | Bo=Hi  |
    |o|     | Ho=NA  | Ho=Ai  | Ho=Ai  | Ho=Ai  | Ho=NA  | Ho=NA  |
    |n|-----------------------------------------------------------
    |n|recv |        |Ao=NA   |Ao=Hi   |Ao=Hi   | Ao=NA  | Ao=Ai  |
    |e|only |        |Bo=NA   |Bo=NA   |Bo=NA   | Bo=NA  | Bo=NA  |
    |c|     |        |Ho=Ai+Bi|Ho=Ai+Bi|Ho=Ai+Bi| Ho=Bi  | Ho=Bi  |
    |t|-----------------------------------------------------------|
    |i|send |        |        |Ao=Hi   |Ao=Hi   | Ao=NA  | Ao=Ai  |
    |o|recv |        |        |Bo=Hi   |Bo=Hi   | Bo=Hi  | Bo=Hi  |
    |n|     |        |        |Ho=Ai+Bi|Ho=Ai+Bi| Ho=Bi  | Ho=Bi  |
    | |-----------------------------------------------------------|
    |B|conf |        |        |        |Ao=Hi+Bi| Ao=NA  | Ao=Ai  |
    | |rnce |        |        |        |Bo=Hi+Ai| Bo=Hi  | Bo=Hi  |
    |M|     |        |        |        |Ho=Ai+Bi| Ho=Bi  | Ho=Bi  |
    |o|-----------------------------------------------------------|
    |d|Inac |        |        |        |        | Ao=NA  | Ao=Ai  |
    |e|tive |        |        |        |        | Bo=NA  | Bo=NA  |
    | |     |        |        |        |        | Ho=NA  | Ho=NA  |
    | |-----------------------------------------------------------|
    | |netw |        |        |        |        |        | Ao=Ai  |
    | |     |        |        |        |        |        | Bo=Bi  |
    | |     |        |        |        |        |        | Ho=NA  |
     -------------------------------------------------------------
        
     -------------------------------------------------------------
    |       |               Connection A Mode                     |
    |       |-----------------------------------------------------
    |       |sendonly|recvonly|sendrecv|confrnce|inactive|  netw  |
    |-------|-----------------------------------------------------|
    | |Send | Ao=Hi  | Ao=NA  | Ao=Hi  | Ao=Hi  | Ao=NA  | Ao=Ai  |
    |C|only | Bo=Hi  | Bo=Hi  | Bo=Hi  | Bo=Hi  | Bo=Hi  | Bo=Hi  |
    |o|     | Ho=NA  | Ho=Ai  | Ho=Ai  | Ho=Ai  | Ho=NA  | Ho=NA  |
    |n|-----------------------------------------------------------
    |n|recv |        |Ao=NA   |Ao=Hi   |Ao=Hi   | Ao=NA  | Ao=Ai  |
    |e|only |        |Bo=NA   |Bo=NA   |Bo=NA   | Bo=NA  | Bo=NA  |
    |c|     |        |Ho=Ai+Bi|Ho=Ai+Bi|Ho=Ai+Bi| Ho=Bi  | Ho=Bi  |
    |t|-----------------------------------------------------------|
    |i|send |        |        |Ao=Hi   |Ao=Hi   | Ao=NA  | Ao=Ai  |
    |o|recv |        |        |Bo=Hi   |Bo=Hi   | Bo=Hi  | Bo=Hi  |
    |n|     |        |        |Ho=Ai+Bi|Ho=Ai+Bi| Ho=Bi  | Ho=Bi  |
    | |-----------------------------------------------------------|
    |B|conf |        |        |        |Ao=Hi+Bi| Ao=NA  | Ao=Ai  |
    | |rnce |        |        |        |Bo=Hi+Ai| Bo=Hi  | Bo=Hi  |
    |M|     |        |        |        |Ho=Ai+Bi| Ho=Bi  | Ho=Bi  |
    |o|-----------------------------------------------------------|
    |d|Inac |        |        |        |        | Ao=NA  | Ao=Ai  |
    |e|tive |        |        |        |        | Bo=NA  | Bo=NA  |
    | |     |        |        |        |        | Ho=NA  | Ho=NA  |
    | |-----------------------------------------------------------|
    | |netw |        |        |        |        |        | Ao=Ai  |
    | |     |        |        |        |        |        | Bo=Bi  |
    | |     |        |        |        |        |        | Ho=NA  |
     -------------------------------------------------------------
        

If there are three or more "active" connections they will still interact as defined in the table above with the outgoing media streams mixed for each interaction (union of all streams). If internal resources are used up and the streams cannot be mixed, the gateway MUST return an error (error code 403 or 502, not enough resources, are RECOMMENDED).

如果有三个或三个以上的“活动”连接,它们仍将按照上表中的定义进行交互,并为每次交互混合传出媒体流(所有流的联合)。如果内部资源用完且流不能混合,网关必须返回错误(建议错误代码403或502,资源不足)。

Appendix E: Endpoint Naming Conventions

附录E:端点命名约定

The following sections provide some RECOMMENDED endpoint naming conventions.

以下各节提供了一些推荐的端点命名约定。

E.1 Analog Access Line Endpoints
E.1模拟接入线端点

The string "aaln", should be used as the first term in a local endpoint name for analog access line endpoints. Terms following "aaln" should follow the physical hierarchy of the gateway so that if the gateway has a number of RJ11 ports, the local endpoint name could look like the following:

字符串“aaln”应用作模拟接入线端点的本地端点名称中的第一个术语。“aaln”后面的术语应遵循网关的物理层次结构,因此,如果网关具有多个RJ11端口,则本地端点名称可能如下所示:

aaln/#

阿伦/#

where "#" is the number of the analog line (RJ11 port) on the gateway.

其中“#”是网关上模拟线(RJ11端口)的编号。

On the other hand, the gateway may have a number of physical plug-in units, each of which contain some number of RJ11 ports, in which case, the local endpoint name might look like the following:

另一方面,网关可能有多个物理插件,每个插件都包含一些RJ11端口,在这种情况下,本地端点名称可能如下所示:

      aaln/<unit #>/#
        
      aaln/<unit #>/#
        

where <unit #> is the number of the plug in unit in the gateway and "#" is the number of the analog line (RJ11 port) on that unit. Leading zeroes MUST NOT be used in any of the numbers ("#") above.

其中,<unit#>是网关中插入式单元的编号,“#”是该单元上模拟线(RJ11端口)的编号。前导零不得用于上述任何数字(“#”)中。

E.2 Digital Trunks
E.2数字中继

The string "ds" should be used for the first term of digital endpoints with a naming convention that follows the physical and digital hierarchy such as:

字符串“ds”应用于数字端点的第一个术语,其命名约定遵循物理和数字层次结构,例如:

      ds/<unit-type1>-<unit #>/<unit-type2>-<unit #>/.../<channel #>
        
      ds/<unit-type1>-<unit #>/<unit-type2>-<unit #>/.../<channel #>
        

where: <unit-type> identifies the particular hierarchy level. Some example values of <unit-type> are: "s", "su", "oc3", "ds3", "e3", "ds2", "e2", "ds1", "e1" where "s" indicates a slot number and "su" indicates a sub-unit within a slot. Leading zeroes MUST NOT be used in any of the numbers ("#") above.

其中:<unit type>标识特定的层次结构级别。<unit type>的一些示例值是:“s”、“su”、“oc3”、“ds3”、“e3”、“ds2”、“e2”、“ds1”、“e1”,其中“s”表示插槽编号,“su”表示插槽内的子单元。前导零不得用于上述任何数字(“#”)中。

The <unit #> is a decimal number which is used to reference a particular instance of a <unit-type> at that level of the hierarchy. The number of levels and naming of those levels is based on the physical hierarchy within the media gateway.

<unit#>是一个十进制数,用于引用该层次结构级别上的<unit type>的特定实例。级别的数量和命名基于媒体网关中的物理层次结构。

E.3 Virtual Endpoints
E.3虚拟端点

Another type of endpoint is one that is not associated with a physical interface (such as an analog or digital endpoint). This type of endpoint is called a virtual endpoint and is often used to represent some DSP resources that gives the endpoint some capability. Examples are announcement, IVR or conference bridge devices. These devices may have multiple instances of DSP functions so that a possible naming convention is:

另一种类型的端点是与物理接口(如模拟或数字端点)无关的端点。这种类型的端点称为虚拟端点,通常用于表示为端点提供某种功能的一些DSP资源。例如公告、IVR或会议桥接设备。这些设备可能具有多个DSP功能实例,因此可能的命名约定为:

      <virtual-endpoint-type>/<endpoint-#>
        
      <virtual-endpoint-type>/<endpoint-#>
        

where <virtual-endpoint-type> may be some string representing the type of endpoint (such as "ann" for announcement server or "cnf" for conference server) and <endpoint-#> would identify a particular virtual endpoint within the device. Leading zeroes MUST NOT be used in the number ("#") above. If the physical hierarchy of the server includes plug-in DSP cards, another level of hierarchy in the local endpoint name may be used to describe the plug in unit.

其中,<virtual endpoint type>可能是表示端点类型的字符串(如announcement server的“ann”或会议服务器的“cnf”),并且<endpoint-#>将标识设备内的特定虚拟端点。前导零不得用于上述数字(“#”)中。如果服务器的物理层次结构包括插件DSP卡,则可以使用本地端点名称中的另一层次结构来描述插件单元。

A virtual endpoint may be created as the result of using the "any of" wildcard. Similarly, a virtual endpoint may cease to exist once the last connection on the virtual endpoint is deleted. The definition of the virtual endpoint MUST detail both of these aspects.

使用“任意”通配符可以创建虚拟端点。类似地,一旦虚拟端点上的最后一个连接被删除,虚拟端点可能会停止存在。虚拟端点的定义必须详细说明这两个方面。

When a <virtual-endpoint-type> creates and deletes virtual endpoints automatically, there will be cases where no virtual endpoints exist at the time a RestartInProgress command is to be issued. In such cases, the gateway SHOULD simply use the "all of" wildcard in lieu of any specific <endpoint-#> as in, e.g.:

当<virtual endpoint type>自动创建和删除虚拟端点时,会出现在发出RestartInProgress命令时不存在虚拟端点的情况。在这种情况下,网关应该简单地使用“all of”通配符代替任何特定的<endpoint-#>通配符,例如:

     ann/*@mygateway.whatever.net
        
     ann/*@mygateway.whatever.net
        

If the RestartInProgress command refers to all endpoints in the gateway (virtual or not), the <virtual-endpoint-id> can be omitted as in, e.g.:

如果RestartInProgress命令引用网关中的所有端点(虚拟或非虚拟),则可以省略<virtual endpoint id>,如中所示,例如:

*@mygateway.whatever.net

*@mygateway.whatever.net

Commands received by the gateway will still have to refer to an actual endpoint (possibly created by that command by use of the "any of" wildcard) in order for the command to be processed though.

网关接收到的命令仍然必须引用实际端点(可能由该命令使用“any of”通配符创建),以便处理该命令。

E.4 Media Gateway
E.4媒体网关

MGCP only defines operation on endpoints in a media gateway. It may be beneficial to define an endpoint that represents the gateway itself as opposed to the endpoints managed by the gateway. Implementations that wish to do so should use the local endpoint name "mg" (for media gateway) as in:

MGCP仅定义媒体网关中端点上的操作。与网关管理的端点相反,定义一个表示网关本身的端点可能是有益的。希望这样做的实现应使用本地端点名称“mg”(用于媒体网关),如中所示:

mg@mygateway.whatever.net

mg@mygateway.whatever.net

Note that defining such an endpoint does not change any of the protocol semantics, i.e., the "mg" endpoint and other endpoints (e.g., digital trunks) in the gateway are still independent endpoints and MUST be treated as such. For example, RestartInProgress commands MUST still be issued for all endpoints in the gateway as usual.

请注意,定义这样一个端点不会改变任何协议语义,即网关中的“mg”端点和其他端点(例如,数字中继)仍然是独立的端点,必须如此对待。例如,仍然必须像往常一样为网关中的所有端点发出RestartInProgress命令。

E.5 Range Wildcards
E.5范围通配符

As described in Section 2.1.2, the MGCP endpoint naming scheme defines the "all of" and "any of" wildcards for the individual terms in a local endpoint name. While the "all of" wildcard is very useful for reducing the number of messages, it can by definition only be used when we wish to refer to all instances of a given term in the local endpoint name. Furthermore, in the case where a command is to be sent by the gateway to the Call Agent, the "all of" wildcard can only be used if all of the endpoints named by it have the same "notified entity". Implementations that prefer a finer-grained wildcarding scheme can use the range wildcarding scheme described here.

如第2.1.2节所述,MGCP端点命名方案为本地端点名称中的各个术语定义了“all of”和“any of”通配符。虽然“all of”通配符对于减少消息数量非常有用,但根据定义,它只能在希望引用本地端点名称中给定术语的所有实例时使用。此外,在网关向呼叫代理发送命令的情况下,仅当由其命名的所有端点具有相同的“通知实体”时,才能使用“全部”通配符。更喜欢细粒度通配符方案的实现可以使用此处描述的范围通配符方案。

A range wildcard is defined as follows:

范围通配符的定义如下:

   RangeWildcard    = "[" NumericalRange *( "," NumericalRange ) "]"
   NumericalRange   = 1*(DIGIT) [ "-" 1*(DIGIT) ]
        
   RangeWildcard    = "[" NumericalRange *( "," NumericalRange ) "]"
   NumericalRange   = 1*(DIGIT) [ "-" 1*(DIGIT) ]
        

Note that white space is not permitted. Also, since range wildcards use the character "[" to indicate the start of a range, the "[" character MUST NOT be used in endpoint names that use range wildcards. The length of a range wildcard SHOULD be bounded to a reasonably small value, e.g., 128 characters.

请注意,不允许使用空白。此外,由于范围通配符使用“[”字符表示范围的开始,因此在使用范围通配符的端点名称中不得使用“[”字符。范围通配符的长度应限定为合理的较小值,例如128个字符。

Range wildcards can be used anywhere an "all of" wildcard can be used. The semantics are identical for the endpoints named. However, it MUST be noted, that use of the range wildcarding scheme requires support on both the gateway and the Call Agent. Therefore, a gateway MUST NOT assume that it's Call Agent supports range wildcarding and vice versa. In practice, this typically means that both the gateway and Call Agent will need to be provisioned consistently in order to

范围通配符可以在任何可以使用“全部”通配符的地方使用。对于名为的端点,语义是相同的。但是,必须注意,使用范围通配符方案需要网关和呼叫代理都支持。因此,网关不能假定其呼叫代理支持范围通配符,反之亦然。在实践中,这通常意味着网关和呼叫代理都需要一致地配置,以便

use range wildcards. Also, if a gateway or Call Agent using range wildcards receives an error response that could indicate a possible endpoint naming problem, they MUST be able to automatically revert to not using range wildcards.

使用范围通配符。此外,如果使用范围通配符的网关或呼叫代理收到可能指示端点命名问题的错误响应,则它们必须能够自动恢复为不使用范围通配符。

The following examples illustrates the use of range wildcards:

以下示例说明了范围通配符的使用:

      ds/ds1-1/[1-12]
      ds/ds1-1/[1,3,20-24]
      ds/ds1-[1-2]/*
      ds/ds3-1/[1-96]
        
      ds/ds1-1/[1-12]
      ds/ds1-1/[1,3,20-24]
      ds/ds1-[1-2]/*
      ds/ds3-1/[1-96]
        

The following example illustrates how to use it in a command:

以下示例说明了如何在命令中使用它:

      RSIP 1204 ds/ds3-1/[1-96]@tgw-18.whatever.net MGCP 1.0
      RM: restart
      RD: 0
        
      RSIP 1204 ds/ds3-1/[1-96]@tgw-18.whatever.net MGCP 1.0
      RM: restart
      RD: 0
        

Appendix F: Example Command Encodings

附录F:命令编码示例

This appendix provides examples of commands and responses shown with the actual encoding used. Examples are provided for each command. All commentary shown in the commands and responses is optional.

本附录提供了使用实际编码显示的命令和响应示例。为每个命令提供了示例。命令和响应中显示的所有注释都是可选的。

F.1 NotificationRequest
F.1通知请求

The first example illustrates a NotificationRequest that will ring a phone and look for an off-hook event:

第一个示例演示了一个NotificationRequest,它将拨打电话并查找脱钩事件:

      RQNT 1201 aaln/1@rgw-2567.whatever.net MGCP 1.0
      N: ca@ca1.whatever.net:5678
      X: 0123456789AC
      R: l/hd(N)
      S: l/rg
        
      RQNT 1201 aaln/1@rgw-2567.whatever.net MGCP 1.0
      N: ca@ca1.whatever.net:5678
      X: 0123456789AC
      R: l/hd(N)
      S: l/rg
        

The response indicates that the transaction was successful:

响应表明事务已成功:

200 1201 OK

2001201好的

The second example illustrates a NotificationRequest that will look for and accumulate an off-hook event, and then provide dial-tone and accumulate digits according to the digit map provided. The "notified entity" is set to "ca@ca1.whatever.net:5678", and since the SignalRequests parameter is empty (it could have been omitted as well), all currently active TO signals will be stopped. All events in the quarantine buffer will be processed, and the list of events to detect in the "notification" state will include fax tones in addition to the "requested events" and persistent events:

第二个示例演示了NotificationRequest,该NotificationRequest将查找并累积摘机事件,然后根据提供的数字映射提供拨号音并累积数字。“通知实体”设置为“ca@ca1.whatever.net:5678“,由于SignalRequests参数为空(也可以省略),所有当前激活的TO信号都将停止。将处理隔离缓冲区中的所有事件,除“请求的事件”和持续事件外,“通知”状态下要检测的事件列表将包括传真音:

      RQNT 1202 aaln/1@rgw-2567.whatever.net MGCP 1.0
      N: ca@ca1.whatever.net:5678
      X: 0123456789AC
      R: L/hd(A, E(S(L/dl),R(L/oc, L/hu, D/[0-9#*T](D))))
      D: (0T|00T|#xxxxxxx|*xx|91xxxxxxxxxx|9011x.T)
      S:
      Q: process
      T: G/ft
        
      RQNT 1202 aaln/1@rgw-2567.whatever.net MGCP 1.0
      N: ca@ca1.whatever.net:5678
      X: 0123456789AC
      R: L/hd(A, E(S(L/dl),R(L/oc, L/hu, D/[0-9#*T](D))))
      D: (0T|00T|#xxxxxxx|*xx|91xxxxxxxxxx|9011x.T)
      S:
      Q: process
      T: G/ft
        

The response indicates that the transaction was successful:

响应表明事务已成功:

200 1202 OK

2001202好

F.2 Notify
F.2通知

The example below illustrates a Notify message that notifies an off-hook event followed by a 12-digit number beginning with "91". A transaction identifier correlating the Notify with the NotificationRequest it results from is included. The command is sent to the current "notified entity", which typically will be the actual value supplied in the NotifiedEntity parameter, i.e., "ca@ca1.whatever.net:5678" - a failover situation could have changed this:

下面的示例演示了一条通知消息,该消息通知脱钩事件,后跟以“91”开头的12位数字。其中包括一个事务标识符,该标识符将通知与其产生的NotificationRequest相关联。命令被发送到当前“通知实体”,该实体通常是NotifiedEntity参数中提供的实际值,即“ca@ca1.whatever.net:5678”-故障转移情况可能会改变以下情况:

      NTFY 2002 aaln/1@rgw-2567.whatever.net MGCP 1.0
      N: ca@ca1.whatever.net:5678
      X: 0123456789AC
      O: L/hd,D/9,D/1,D/2,D/0,D/1,D/8,D/2,D/9,D/4,D/2,D/6,D/6
        
      NTFY 2002 aaln/1@rgw-2567.whatever.net MGCP 1.0
      N: ca@ca1.whatever.net:5678
      X: 0123456789AC
      O: L/hd,D/9,D/1,D/2,D/0,D/1,D/8,D/2,D/9,D/4,D/2,D/6,D/6
        

The Notify response indicates that the transaction was successful:

Notify响应表示事务已成功:

200 2002 OK

200200200OK

F.3 CreateConnection
F.3创建连接

The first example illustrates a CreateConnection command to create a connection on the endpoint specified. The connection will be part of the specified CallId. The LocalConnectionOptions specify that G.711 mu-law will be the codec used and the packetization period will be 10 ms. The connection mode will be "receive only":

第一个示例演示了CreateConnection命令,用于在指定的端点上创建连接。该连接将是指定CallId的一部分。LocalConnectionOptions指定使用G.711 mu law编解码器,打包周期为10毫秒。连接模式为“仅接收”:

      CRCX 1204 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      L: p:10, a:PCMU
      M: recvonly
        
      CRCX 1204 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      L: p:10, a:PCMU
      M: recvonly
        

The response indicates that the transaction was successful, and a connection identifier for the newly created connection is therefore included. A session description for the new connection is included as well - note that it is preceded by an empty line.

响应表明事务成功,因此包含新创建连接的连接标识符。还包括新连接的会话描述-请注意,它前面有一个空行。

200 1204 OK I: FDE234C8

200 1204正常I:FDE234C8

v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-25678 753849在IP4 128.96.41.1中s=-c=在IP4 128.96.41.1中t=0 0 m=音频3456 RTP/AVP 0

The second example illustrates a CreateConnection command containing a notification request and a RemoteConnectionDescriptor:

第二个示例演示了包含通知请求和RemoteConnectionDescriptor的CreateConnection命令:

      CRCX 1205 aaln/1@rgw-2569.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      L: p:10, a:PCMU
      M: sendrecv
      X: 0123456789AD
      R: L/hd
      S: L/rg
        
      CRCX 1205 aaln/1@rgw-2569.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      L: p:10, a:PCMU
      M: sendrecv
      X: 0123456789AD
      R: L/hd
      S: L/rg
        

v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-25678 753849在IP4 128.96.41.1中s=-c=在IP4 128.96.41.1中t=0 0 m=音频3456 RTP/AVP 0

The response indicates that the transaction failed, because the phone was already off-hook. Consequently, neither a connection-id nor a session description is returned:

响应表明事务失败,因为电话已挂断。因此,既不返回连接id也不返回会话描述:

401 1205 Phone off-hook

4011205电话挂机

Our third example illustrates the use of the provisional response and the three-way handshake. We create another connection and acknowledge the previous response received by using the response acknowledgement parameter:

我们的第三个示例演示了临时响应和三方握手的使用。我们创建另一个连接,并使用response acknowledge参数确认之前收到的响应:

      CRCX 1206 aaln/1@rgw-2569.whatever.net MGCP 1.0
      K: 1205
      C: A3C47F21456789F0
      L: p:10, a:PCMU
      M: inactive
        
      CRCX 1206 aaln/1@rgw-2569.whatever.net MGCP 1.0
      K: 1205
      C: A3C47F21456789F0
      L: p:10, a:PCMU
      M: inactive
        

v=0 o=- 25678 753849 IN IP4 128.96.41.1 s=- c=IN IP4 128.96.41.1 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-25678 753849在IP4 128.96.41.1中s=-c=在IP4 128.96.41.1中t=0 0 m=音频3456 RTP/AVP 0

A provisional response is returned initially:

最初会返回一个临时响应:

100 1206 Pending I: DFE233D1

100 1206待定I:DFE233D1

v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-4723891 7428910在IP4 128.96.63.25中s=-c=在IP4 128.96.63.25中t=0 0 m=音频3456 RTP/AVP 0

A little later, the final response is received:

稍后,收到最终响应:

200 1206 OK K: I: DFE233D1

200 1206正常K:I:DFE233D1

v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-4723891 7428910在IP4 128.96.63.25中s=-c=在IP4 128.96.63.25中t=0 0 m=音频3456 RTP/AVP 0

The Call Agent acknowledges the final response as requested:

呼叫代理根据请求确认最终响应:

000 1206

000 1206

and the transaction is complete.

交易完成了。

F.4 ModifyConnection
F.4修改连接

The first example shows a ModifyConnection command that simply sets the connection mode of a connection to "send/receive" - the "notified entity" is set as well:

第一个示例显示ModifyConnection命令,该命令仅将连接的连接模式设置为“发送/接收”-同时设置“通知实体”:

      MDCX 1209 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      I: FDE234C8
      N: ca@ca1.whatever.net
      M: sendrecv
        
      MDCX 1209 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      I: FDE234C8
      N: ca@ca1.whatever.net
      M: sendrecv
        

The response indicates that the transaction was successful:

响应表明事务已成功:

200 1209 OK

2001209好

In the second example, we pass a session description and include a notification request with the ModifyConnection command. The endpoint will start playing ring-back tones to the user:

在第二个示例中,我们传递一个会话描述,并使用ModifyConnection命令包含一个通知请求。端点将开始向用户播放铃声:

      MDCX 1210 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      I: FDE234C8
      M: recvonly
      X: 0123456789AE
      R: L/hu
      S: G/rt
        
      MDCX 1210 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      I: FDE234C8
      M: recvonly
      X: 0123456789AE
      R: L/hu
      S: G/rt
        

v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 3456 RTP/AVP 0

v=0 o=-4723891 7428910在IP4 128.96.63.25中s=-c=在IP4 128.96.63.25中t=0 0 m=音频3456 RTP/AVP 0

The response indicates that the transaction was successful:

响应表明事务已成功:

200 1206 OK

2001206好

F.5 DeleteConnection (from the Call Agent)
F.5删除连接(来自呼叫代理)

In this example, the Call Agent simply instructs the gateway to delete the connection "FDE234C8" on the endpoint specified:

在此示例中,呼叫代理仅指示网关删除指定端点上的连接“FDE234C8”:

DLCX 1210 aaln/1@rgw-2567.whatever.net MGCP 1.0 C: A3C47F21456789F0 I: FDE234C8

DLCX 1210 aaln/1@rgw-2567.net MGCP 1.0 C:A3C47F21456789F0 I:FDE234C8

The response indicates success, and that the connection was deleted. Connection parameters for the connection are therefore included as well:

响应表示成功,并且连接已被删除。因此,连接的连接参数也包括在内:

      250 1210 OK
      P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48
        
      250 1210 OK
      P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48
        
F.6 DeleteConnection (from the gateway)
F.6删除连接(从网关)

In this example, the gateway sends a DeleteConnection command to the Call Agent to instruct it that a connection on the specified endpoint has been deleted. The ReasonCode specifies the reason for the deletion, and Connection Parameters for the connection are provided as well:

在本例中,网关向呼叫代理发送DeleteConnection命令,以指示指定端点上的连接已被删除。ReasonCode指定删除的原因,并提供连接的连接参数:

      DLCX 1210 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      I: FDE234C8
      E: 900 - Hardware error
      P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48
        
      DLCX 1210 aaln/1@rgw-2567.whatever.net MGCP 1.0
      C: A3C47F21456789F0
      I: FDE234C8
      E: 900 - Hardware error
      P: PS=1245, OS=62345, PR=780, OR=45123, PL=10, JI=27, LA=48
        

The Call Agent sends a success response to the gateway:

呼叫代理向网关发送成功响应:

200 1210 OK

200 1210好

F.7 DeleteConnection (multiple connections from the Call Agent)
F.7删除连接(来自呼叫代理的多个连接)

In the first example, the Call Agent instructs the gateway to delete all connections related to call "A3C47F21456789F0" on the specified endpoint:

在第一个示例中,呼叫代理指示网关删除指定端点上与呼叫“A3C47F21456789F0”相关的所有连接:

DLCX 1210 aaln/1@rgw-2567.whatever.net MGCP 1.0 C: A3C47F21456789F0

DLCX 1210 aaln/1@rgw-2567.net MGCP 1.0 C:A3C47F21456789F0

The response indicates success and that the connection(s) were deleted:

响应表示成功,并且连接已被删除:

250 1210 OK

250 1210好

In the second example, the Call Agent instructs the gateway to delete all connections related to all of the endpoints specified:

在第二个示例中,呼叫代理指示网关删除与指定的所有端点相关的所有连接:

      DLCX 1210 aaln/*@rgw-2567.whatever.net MGCP 1.0
        
      DLCX 1210 aaln/*@rgw-2567.whatever.net MGCP 1.0
        

The response indicates success:

答复表明成功:

250 1210 OK

250 1210好

F.8 AuditEndpoint
F.8审计终结点

In the first example, the Call Agent wants to learn what endpoints are present on the gateway specified, hence the use of the "all of" wild-card for the local portion of the endpoint-name:

在第一个示例中,调用代理希望了解指定网关上存在哪些端点,因此对端点名称的本地部分使用“全部”通配符:

AUEP 1200 *@rgw-2567.whatever.net MGCP 1.0

AUEP 1200*@rgw-2567.net MGCP 1.0

The gateway indicates success and includes a list of endpoint names:

网关指示成功,并包括端点名称列表:

      200 1200 OK
      Z: aaln/1@rgw-2567.whatever.net
      Z: aaln/2@rgw-2567.whatever.net
        
      200 1200 OK
      Z: aaln/1@rgw-2567.whatever.net
      Z: aaln/2@rgw-2567.whatever.net
        

In the second example, the capabilities of one of the endpoints is requested:

在第二个示例中,请求其中一个端点的功能:

AUEP 1201 aaln/1@rgw-2567.whatever.net MGCP 1.0 F: A

AUEP 1201 aaln/1@rgw-2567.net MGCP 1.0 F:A

The response indicates success and the capabilities as well. Two codecs are supported, however with different capabilities. Consequently two separate capability sets are returned:

响应表明成功,也表明能力。支持两种编解码器,但功能不同。因此,将返回两个单独的功能集:

      200 1201 OK
      A: a:PCMU, p:10-100, e:on, s:off, v:L;S, m:sendonly;
               recvonly;sendrecv;inactive;netwloop;netwtest
      A: a:G729, p:30-90, e:on, s:on, v:L;S, m:sendonly;
               recvonly;sendrecv;inactive;confrnce;netwloop
        
      200 1201 OK
      A: a:PCMU, p:10-100, e:on, s:off, v:L;S, m:sendonly;
               recvonly;sendrecv;inactive;netwloop;netwtest
      A: a:G729, p:30-90, e:on, s:on, v:L;S, m:sendonly;
               recvonly;sendrecv;inactive;confrnce;netwloop
        

Note that the carriage return in the Capabilities lines are shown for formatting reasons only - they are not permissible in a real implementation.

请注意,功能行中显示的回车符仅出于格式化原因-在实际实现中不允许这样做。

In the third example, the Call Agent audits several types of information for the endpoint:

在第三个示例中,调用代理审核端点的几种类型的信息:

AUEP 2002 aaln/1@rgw-2567.whatever.net MGCP 1.0 F: R,D,S,X,N,I,T,O,ES

AUEP 2002 aaln/1@rgw-2567.net MGCP 1.0 F:R、D、S、X、N、I、T、O、ES

The response indicates success:

答复表明成功:

      200 2002 OK
      R: L/hu,L/oc(N),D/[0-9](N)
      D:
      S: L/vmwi(+)
      X: 0123456789B1
      N: [128.96.41.12]
      I: 32F345E2
      T: G/ft
      O: L/hd,D/9,D/1,D/2
      ES: L/hd
        
      200 2002 OK
      R: L/hu,L/oc(N),D/[0-9](N)
      D:
      S: L/vmwi(+)
      X: 0123456789B1
      N: [128.96.41.12]
      I: 32F345E2
      T: G/ft
      O: L/hd,D/9,D/1,D/2
      ES: L/hd
        

The list of requested events contains three events. Where no package name is specified, the default package is assumed. The same goes for actions, so the default action - Notify - must therefore be assumed for the "L/hu" event. The omission of a value for the "digit map" means the endpoint currently does not have a digit map. There are currently no active time-out signals, however the OO signal "vmwi" is currently on and is consequently included - in this case it was parameterized, however the parameter could have been excluded. The current "notified entity" refers to an IP-address and only a single connection exists for the endpoint. The current value of DetectEvents is "G/ft", and the list of ObservedEvents contains the four events specified. Finally, the event-states audited reveals that the phone was off-hook at the time the transaction was processed.

请求的事件列表包含三个事件。如果未指定包名称,则假定为默认包。操作也是如此,因此必须为“L/hu”事件假定默认操作-Notify。省略“数字映射”的值意味着端点当前没有数字映射。目前没有激活的超时信号,但是OO信号“vmwi”当前处于打开状态,因此被包括在内-在这种情况下,它被参数化,但是参数可能被排除。当前“通知实体”指的是一个IP地址,该端点只存在一个连接。DetectedEvents的当前值为“G/ft”,并且ObservedEvents列表包含指定的四个事件。最后,事件状态显示,在处理事务时,手机已脱离连接。

F.9 AuditConnection
F.9审计连接

The first example shows an AuditConnection command where we audit the CallId, NotifiedEntity, LocalConnectionOptions, Connection Mode, LocalConnectionDescriptor, and the Connection Parameters:

第一个示例显示了一个AuditConnection命令,我们在其中审核CallId、NotifiedEntity、LocalConnectionOptions、连接模式、LocalConnectionDescriptor和连接参数:

AUCX 2003 aaln/1@rgw-2567.whatever.net MGCP 1.0 I: 32F345E2 F: C,N,L,M,LC,P

2003年澳大利亚黄金交易所/1@rgw-2567.net MGCP 1.0 I:32F345E2 F:C,N,L,M,LC,P

The response indicates success and includes information for the RequestedInfo:

响应表示成功,并包含请求信息的信息:

      200 2003 OK
      C: A3C47F21456789F0
      N: ca@ca1.whatever.net
      L: p:10, a:PCMU
      M: sendrecv
      P: PS=395, OS=22850, PR=615, OR=30937, PL=7, JI=26, LA=47
        
      200 2003 OK
      C: A3C47F21456789F0
      N: ca@ca1.whatever.net
      L: p:10, a:PCMU
      M: sendrecv
      P: PS=395, OS=22850, PR=615, OR=30937, PL=7, JI=26, LA=47
        

v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 1296 RTP/AVP 0

v=0 o=-4723891 7428910在IP4 128.96.63.25中s=-c=在IP4 128.96.63.25中t=0 0 m=音频1296 RTP/AVP 0

In the second example, we request to audit RemoteConnectionDescriptor and LocalConnectionDescriptor:

在第二个示例中,我们请求审核RemoteConnectionDescriptor和LocalConnectionDescriptor:

AUCX 1203 aaln/2@rgw-2567.whatever.net MGCP 1.0 I: FDE234C8 F: RC,LC

AUCX 1203 aaln/2@rgw-2567.net MGCP 1.0 I:FDE234C8 F:RC,LC

The response indicates success, and includes information for the RequestedInfo. In this case, no RemoteConnectionDescriptor exists, hence only the protocol version field is included for the RemoteConnectionDescriptor:

响应表示成功,并包含请求信息的信息。在这种情况下,不存在RemoteConnectionDescriptor,因此RemoteConnectionDescriptor只包含协议版本字段:

200 1203 OK

2001203好

v=0 o=- 4723891 7428910 IN IP4 128.96.63.25 s=- c=IN IP4 128.96.63.25 t=0 0 m=audio 1296 RTP/AVP 0

v=0 o=-4723891 7428910在IP4 128.96.63.25中s=-c=在IP4 128.96.63.25中t=0 0 m=音频1296 RTP/AVP 0

v=0

v=0

F.10 RestartInProgress
F.10重新启动进度

The first example illustrates a RestartInProgress message sent by an gateway to inform the Call Agent that the specified endpoint will be taken out-of-service in 300 seconds:

第一个示例说明了网关发送的RestartInProgress消息,通知呼叫代理指定的端点将在300秒内停止服务:

RSIP 1200 aaln/1@rgw-2567.whatever.net MGCP 1.0 RM: graceful RD: 300

RSIP 1200 aaln/1@rgw-2567.net MGCP 1.0 RM:MANAGETE RD:300

The Call Agent's response indicates that the transaction was successful:

呼叫代理的响应表明事务已成功:

200 1200 OK

200 1200行

In the second example, the RestartInProgress message sent by the gateway informs the Call Agent, that all of the gateway's endpoints are being placed in-service in 0 seconds, i.e., they are currently in service. The restart delay could have been omitted as well:

在第二个示例中,网关发送的RestartInProgress消息通知呼叫代理,网关的所有端点都在0秒内投入使用,即它们当前正在使用。重启延迟也可以省略:

RSIP 1204 *@rgw-2567.whatever.net MGCP 1.0 RM: restart RD: 0

RSIP 1204*@rgw-2567.net MGCP 1.0 RM:重新启动RD:0

The Call Agent's response indicates success, and furthermore provides the endpoints in question with a new "notified entity":

呼叫代理的响应表示成功,并进一步为相关端点提供新的“通知实体”:

200 1204 OK N: CA-1@whatever.net

2001204正常N:CA-1@whatever.net

Alternatively, the command could have failed with a new "notified entity" as in:

或者,该命令可能因新的“通知实体”而失败,如中所示:

521 1204 OK N: CA-1@whatever.net

5211204正常N:CA-1@whatever.net

In that case, the command would then have to be retried in order to satisfy the "restart procedure", this time going to Call Agent "CA-1@whatever.net".

在这种情况下,必须重试该命令才能满足“重启过程”,这次将调用代理“CA”-1@whatever.net".

Appendix G: Example Call Flows

附录G:调用流示例

The message flow tables in this section use the following abbreviations:

本节中的消息流表使用以下缩写:

* rgw = Residential Gateway

* rgw=住宅网关

* ca = Call Agent

* ca=呼叫代理

* n+ = step 'n' is repeated one or more times

* n+=步骤“n”重复一次或多次

Note that any use of upper and lower case within the text of the messages is to aid readability and is not in any way a requirement. The only requirement involving case is to be case insensitive at all times.

请注意,在消息文本中使用大写和小写是为了帮助可读性,而不是任何形式的要求。涉及大小写的唯一要求是始终不区分大小写。

G.1 Restart
G.1重新启动
G.1.1 Residential Gateway Restart
G.1.1 住宅网关重启

The following table shows a message sequence that might occur when a call agent (ca) is contacted by two independent residential gateways (rgw1 and rgw2) which have restarted.

下表显示了两个已重新启动的独立住宅网关(rgw1和rgw2)联系呼叫代理(ca)时可能出现的消息序列。

Table F.1: Residential Gateway Restart

表F.1:住宅网关重启

 ---------------------------------------------------------------------
|step#|    usr1    |    rgw1    |     ca     |    rgw2    |    usr2   |
|=====|============|============|============|============|===========|
|  1  |            |    rsip -> |            |            |           |
|     |            |            | <- ack     |            |           |
|-----|------------|------------|------------|------------|-----------|
|  2  |            |            | <- auep    |            |           |
|     |            |     ack -> |            |            |           |
|-----|------------|------------|------------|------------|-----------|
|  3+ |            |            | <- rqnt    |            |           |
|     |            |     ack -> |            |            |           |
|-----|------------|------------|------------|------------|-----------|
|  4  |            |            |            | <- rsip    |           |
|     |            |            |     ack -> |            |           |
|-----|------------|------------|------------|------------|-----------|
|  5  |            |            |    auep -> |            |           |
|     |            |            |            | <- ack     |           |
|-----|------------|------------|------------|------------|-----------|
|  6+ |            |            |    rqnt -> |            |           |
|     |            |            |            | <- ack     |           |
 ---------------------------------------------------------------------
        
 ---------------------------------------------------------------------
|step#|    usr1    |    rgw1    |     ca     |    rgw2    |    usr2   |
|=====|============|============|============|============|===========|
|  1  |            |    rsip -> |            |            |           |
|     |            |            | <- ack     |            |           |
|-----|------------|------------|------------|------------|-----------|
|  2  |            |            | <- auep    |            |           |
|     |            |     ack -> |            |            |           |
|-----|------------|------------|------------|------------|-----------|
|  3+ |            |            | <- rqnt    |            |           |
|     |            |     ack -> |            |            |           |
|-----|------------|------------|------------|------------|-----------|
|  4  |            |            |            | <- rsip    |           |
|     |            |            |     ack -> |            |           |
|-----|------------|------------|------------|------------|-----------|
|  5  |            |            |    auep -> |            |           |
|     |            |            |            | <- ack     |           |
|-----|------------|------------|------------|------------|-----------|
|  6+ |            |            |    rqnt -> |            |           |
|     |            |            |            | <- ack     |           |
 ---------------------------------------------------------------------
        

Step 1 - RestartInProgress (rsip) from rgw1 to ca

步骤1-从rgw1到ca重新启动进程(rsip)

rgw1 uses DNS to determine the domain name of ca and send to the default port of 2727. The command consists of the following:

rgw1使用DNS确定ca的域名并发送到默认端口2727。该命令包括以下内容:

rsip 1 *@rgw1.whatever.net mgcp 1.0 rm: restart

rsip 1*@rgw1.net mgcp 1.0 rm:重新启动

The "*" is used to inform ca that all endpoints of rgw1 are being restarted, and "restart" is specified as the restart method. The Call Agent "ca" acknowledges the command with an acknowledgement message containing the transaction-id (in this case 1) for the command. It sends the acknowledgement to rgw1 using the same port specified as the source port for the rsip. If none was indicated, it uses the default port of 2727.

“*”用于通知ca正在重新启动rgw1的所有端点,并将“重新启动”指定为重新启动方法。呼叫代理“ca”使用包含该命令的事务id(在本例中为1)的确认消息确认该命令。它使用指定为rsip源端口的同一端口向rgw1发送确认。如果未指示任何端口,则使用默认端口2727。

200 1 ok

200 1好的

A response code is mandatory. In this case, "200", indicates "the requested transaction was executed normally". The response string is optional. In this case, "ok" is included as an additional description.

响应代码是必需的。在这种情况下,“200”表示“请求的事务正常执行”。响应字符串是可选的。在这种情况下,“ok”作为附加说明包括在内。

Step 2 - AuditEndpoint (auep) from ca to rgw1

步骤2-从ca到rgw1的审核端点(auep)

The command consists of the following:

该命令包括以下内容:

auep 153 *@rgw1.whatever.net mgcp 1.0

auep 153*@rgw1.whatever.net mgcp 1.0

The "*" is used to request audit information from rgw1 of all its endpoints. rgw1 acknowledges the command with an acknowledgement message containing the transaction-id (in this case 153) of the command, and it includes a list of its endpoints. In this example, rgw1 has two endpoints, aaln/1 and aaln/2.

“*”用于从其所有端点的rgw1请求审核信息。rgw1使用包含该命令的事务id(在本例中为153)的确认消息确认该命令,并包括其端点的列表。在本例中,rgw1有两个端点:aaln/1和aaln/2。

      200 153 ok
      Z: aaln/1@rgw1.whatever.net
      Z: aaln/2@rgw1.whatever.net
        
      200 153 ok
      Z: aaln/1@rgw1.whatever.net
      Z: aaln/2@rgw1.whatever.net
        

Once it has the list of endpoint ids, ca may send individual AuditEndpoint commands in which the "*" is replaced by the id of the given endpoint. As its response, rgw1 would replace the endpoint id list returned in the example with the info requested for the endpoint. This optional message exchange is not shown in this example.

一旦拥有端点id列表,ca可以发送单个AuditEndpoint命令,其中“*”被给定端点的id替换。作为响应,rgw1将用端点请求的信息替换示例中返回的端点id列表。此示例中未显示此可选消息交换。

Step 3 - NotificationRequest (rqnt) from ca to each endpoint of rgw1

步骤3-从ca到rgw1每个端点的通知请求(rqnt)

In this case, ca sends two rqnts, one for aaln/1:

在这种情况下,ca发送两个RQNT,一个用于aaln/1:

      rqnt 154 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a0
        
      rqnt 154 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a0
        

and a second for aaln/2:

第二个是aaln/2:

      rqnt 155 aaln/2@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a1
        
      rqnt 155 aaln/2@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a1
        

Note that in the requested events parameter line, the event is fully specified as "l/hd", i.e., with the package name, in order to avoid any potential ambiguity. This is the recommended behavior. For the sake of clarity, the action, which in this case is to Notify, is explicitly specified by including the "(n)". If no action is specified, Notify is assumed as the default regardless of the event. If any other action is desired, it must be stated explicitly.

请注意,在请求的事件参数行中,事件完全指定为“l/hd”,即使用包名,以避免任何潜在的歧义。这是推荐的行为。为清楚起见,在本例中为通知的操作通过包含“(n)”明确指定。如果未指定任何操作,则假定Notify为默认值,而与事件无关。如果需要任何其他行动,必须明确说明。

The expected response from rgw1 to these requests is an acknowledgement from aaln/1 as follows:

rgw1对这些请求的预期响应是aaln/1的确认,如下所示:

200 154 ok

200 154好的

and from aaln/2:

从aaln/2:

200 155 ok

200 155好的

Step 4 RestartInProgress (rsip) from rgw2 to ca

步骤4从rgw2到ca重新启动进程(rsip)

rsip 0 *@rgw2.whatever.net mgcp 1.0 rm: restart

rsip 0*@rgw2.net mgcp 1.0 rm:重新启动

followed by the acknowledgement from ca:

随后是ca的确认:

200 0 ok

200好

Step 5 - AuditEndpoint (auep) from ca to rgw2

步骤5-从ca到rgw2的审核端点(auep)

auep 156 *@rgw2.whatever.net mgcp 1.0

auep 156*@rgw2.whatever.net mgcp 1.0

followed by an acknowledgement from rgw2:

随后是rgw2的确认:

      200 156 ok
      z: aaln/1@rgw2.whatever.net
      z: aaln/2@rgw2.whatever.net
        
      200 156 ok
      z: aaln/1@rgw2.whatever.net
      z: aaln/2@rgw2.whatever.net
        

Step 6 - NotificationRequest (rqnt) from ca to each endpoint of rgw2

步骤6-从ca到rgw2每个端点的通知请求(rqnt)

      rqnt 157 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a2
        
      rqnt 157 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a2
        

followed by:

然后:

      rqnt 158 aaln/2@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a3
        
      rqnt 158 aaln/2@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 3456789a3
        

with rgw2 acknowledging for aaln/1:

对于aaln/1,rgw2已确认:

200 157 ok

200 157好的

and for aaln/2:

对于aaln/2:

200 158 ok

200 158好的

G.1.2 Call Agent Restart
G.1.2 呼叫代理重新启动

The following table shows the message sequence which occurs when a call agent (ca) restarts. How it determines the address information of the gateways, in this case rgw1 and rgw2, is not covered in this document. For interoperability, it is RECOMMENDED to provide the ability to configure the call agent to send AUEP (*) to specific addresses and ports.

下表显示了呼叫代理(ca)重新启动时发生的消息序列。如何确定网关的地址信息(在本例中为rgw1和rgw2)不在本文档中介绍。为了实现互操作性,建议提供配置呼叫代理向特定地址和端口发送AUEP(*)的功能。

Table F.2: Residential Gateway Restart

表F.2:住宅网关重启

 ---------------------------------------------------------------------
| # |     usr1    |    rgw1    |     ca     |    rgw2    |     usr2   |
|===|=============|============|============|============|============|
| 1 |             |            | <- auep    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 2+|             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 3 |             |            |    auep -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 4+|             |            |    rqnt -> |            |            |
|   |             |            |            | <- ack     |            |
 ---------------------------------------------------------------------
        
 ---------------------------------------------------------------------
| # |     usr1    |    rgw1    |     ca     |    rgw2    |     usr2   |
|===|=============|============|============|============|============|
| 1 |             |            | <- auep    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 2+|             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 3 |             |            |    auep -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 4+|             |            |    rqnt -> |            |            |
|   |             |            |            | <- ack     |            |
 ---------------------------------------------------------------------
        

Step 1 - AuditEndpoint (auep) from ca to rgw1

步骤1-从ca到rgw1的审核端点(auep)

The command consists of the following:

该命令包括以下内容:

auep 0 *@rgw1.whatever.net mgcp 1.0

auep 0*@rgw1.whatever.net mgcp 1.0

The "*" is used to request audit information from rgw1 of all its endpoints. rgw1 acknowledges the command with an acknowledgement message containing the transaction id (in this case 0) of the command, and it includes a list of its endpoints. In this example, rgw1 has two endpoints, aaln/1 and aaln/2.

“*”用于从其所有端点的rgw1请求审核信息。rgw1使用包含命令事务id(在本例中为0)的确认消息确认命令,并包括其端点列表。在本例中,rgw1有两个端点:aaln/1和aaln/2。

      200 0 ok
      z: aaln/1@rgw1.whatever.net
      z: aaln/2@rgw1.whatever.net
        
      200 0 ok
      z: aaln/1@rgw1.whatever.net
      z: aaln/2@rgw1.whatever.net
        

Once it has the list of endpoint ids, ca may send individual AuditEndpoint commands in which the "*" is replaced by the id of the given endpoint. As its response, rgw1 would replace the endpoint id list returned in the example with the info requested for the endpoint. This optional message exchange is not shown in this example.

一旦拥有端点id列表,ca可以发送单个AuditEndpoint命令,其中“*”被给定端点的id替换。作为响应,rgw1将用端点请求的信息替换示例中返回的端点id列表。此示例中未显示此可选消息交换。

Step 2 - NotificationRequest (rqnt) off-hook from ca to rgw1

步骤2-从ca到rgw1的通知请求(rqnt)挂机

In this case, ca sends two rqnts, one for aaln/1:

在这种情况下,ca发送两个RQNT,一个用于aaln/1:

      rqnt 1 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567890
        
      rqnt 1 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567890
        

and a second for aaln/2:

第二个是aaln/2:

      rqnt 2 aaln/2@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567891
        
      rqnt 2 aaln/2@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567891
        

The expected response from rgw1 to these requests is an acknowledgement from aaln/1 as follows:

rgw1对这些请求的预期响应是aaln/1的确认,如下所示:

200 1 ok

200 1好的

and from aaln/2:

从aaln/2:

200 2 ok

200 2好的

Step 3 - AuditEndpoint (auep) from ca to rgw2

步骤3-从ca到rgw2的审核端点(auep)

auep 3 *@rgw2.whatever.net mgcp 1.0

auep 3*@rgw2.whatever.net mgcp 1.0

followed by an acknowledgement from rgw2:

随后是rgw2的确认:

      200 3 ok
      z: aaln/1@rgw2.whatever.net
      z: aaln/2@rgw2.whatever.net
        
      200 3 ok
      z: aaln/1@rgw2.whatever.net
      z: aaln/2@rgw2.whatever.net
        

Step 4 - NotificationRequest (rqnt) from ca to each endpoint of rgw2

步骤4-从ca到rgw2每个端点的通知请求(rqnt)

      rqnt 4 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567892
        
      rqnt 4 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567892
        

followed by:

然后:

      rqnt 5 aaln/2@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567893
        
      rqnt 5 aaln/2@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 234567893
        

with rgw2 acknowledging for aaln/1:

对于aaln/1,rgw2已确认:

200 4 ok

2004好的

and for aaln/2:

对于aaln/2:

200 5 ok G.2 Connection Creation

200 5正常G.2连接创建

G.2.1 Residential Gateway to Residential Gateway
G.2.1 住宅网关到住宅网关

The following table shows the message sequence which occurs when a user (usr1) makes a call through a residential gateway (rgw1) to a user served by another residential gateway (rgw2). This example illustrates the communication between the residential gateways and the call agent (ca) only. The local name of the endpoints in this example is aaln/1 for both gateways, and references within the description of the steps to rgw1 and rgw2 can be assumed to refer to aaln/1 of rgw1 and aaln/1 of rgw2. Note that this is only an example and is not the only legal call scenario.

下表显示了当用户(usr1)通过住宅网关(rgw1)呼叫由另一住宅网关(rgw2)服务的用户时发生的消息序列。此示例仅说明住宅网关和呼叫代理(ca)之间的通信。对于这两个网关,本例中端点的本地名称都是aaln/1,并且可以假设步骤描述中对rgw1和rgw2的引用是指rgw1的aaln/1和rgw2的aaln/1。请注意,这只是一个示例,并不是唯一的合法通话场景。

Table F.3: Residential Gateway Connection Creation

表F.3:住宅网关连接创建

 ---------------------------------------------------------------------
| # |     usr1    |    rgw1    |     ca     |    rgw2    |     usr2   |
|===|=============|============|============|============|============|
| 1 |  offhook -> |    ntfy -> |            |            |            |
|   |             |            | <- ack     |            |            |
|---|-------------|------------|------------|------------|------------|
| 2 | <- dialtone |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 3 |   digits -> |    ntfy -> |            |            |            |
|   |             |            | <- ack     |            |            |
|---|-------------|------------|------------|------------|------------|
| 4 |             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 5 | <- recvonly |            | <- crcx    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 6 |             |            |    crcx -> |            | sendrcv -> |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 7 | <- recvonly |            | <- mdcx    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 8 | <- ringback |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 9 |             |            |    rqnt -> |            | ringing -> |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
|10 |             |            |            | <- ntfy    | <- offhook |
|   |             |            |     ack -> |            |            |
|---|-------------|------------|------------|------------|------------|
|11 |             |            |    rqnt -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
|12 |             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
|13 | <- sendrcv  |            | <- mdcx    |            |            |
|   |             |     ack -> |            |            |            |
 ---------------------------------------------------------------------
        
 ---------------------------------------------------------------------
| # |     usr1    |    rgw1    |     ca     |    rgw2    |     usr2   |
|===|=============|============|============|============|============|
| 1 |  offhook -> |    ntfy -> |            |            |            |
|   |             |            | <- ack     |            |            |
|---|-------------|------------|------------|------------|------------|
| 2 | <- dialtone |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 3 |   digits -> |    ntfy -> |            |            |            |
|   |             |            | <- ack     |            |            |
|---|-------------|------------|------------|------------|------------|
| 4 |             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 5 | <- recvonly |            | <- crcx    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 6 |             |            |    crcx -> |            | sendrcv -> |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 7 | <- recvonly |            | <- mdcx    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 8 | <- ringback |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 9 |             |            |    rqnt -> |            | ringing -> |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
|10 |             |            |            | <- ntfy    | <- offhook |
|   |             |            |     ack -> |            |            |
|---|-------------|------------|------------|------------|------------|
|11 |             |            |    rqnt -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
|12 |             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
|13 | <- sendrcv  |            | <- mdcx    |            |            |
|   |             |     ack -> |            |            |            |
 ---------------------------------------------------------------------
        

Step 1 - Notify (ntfy) offhook from rgw1 to ca

步骤1-从rgw1到ca的通知(ntfy)摘机

This ntfy is the result of usr1 going offhook and assumes ca had previously sent an rqnt with RequestId "445678944" to rgw1 requesting notification in the event of an offhook:

此ntfy是usr1脱机的结果,并假设ca先前已向rgw1发送了请求ID为“445678944”的rqnt,请求在脱机时发出通知:

      ntfy 12 aaln/1@rgw1.whatever.net mgcp 1.0
      o: l/hd
      x: 445678944
        
      ntfy 12 aaln/1@rgw1.whatever.net mgcp 1.0
      o: l/hd
      x: 445678944
        

Acknowledgement from ca:

ca确认:

200 12 ok

200 12好的

Step 2 - Request Notification (rqnt) for digits from ca to rgw1

步骤2-从ca到rgw1的数字请求通知(rqnt)

Request rgw1 to notify if on-hook and collect digits according to the digit map, and to provide dialtone:

请求rgw1通知是否挂机,并根据数字地图收集数字,并提供拨号音:

      rqnt 1057 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n), d/[0-9#*T](d)
      s: l/dl
      x: 445678945
      d: 5xxx
        
      rqnt 1057 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n), d/[0-9#*T](d)
      s: l/dl
      x: 445678945
      d: 5xxx
        

Acknowledgement from rgw1:

rgw1的确认函:

200 1057 ok

2001057好

Step 3 - Notify (ntfy) digits from rgw1 to ca

步骤3-通知(ntfy)从rgw1到ca的数字

      ntfy 13 aaln/1@rgw1.whatever.net mgcp 1.0
      o: d/5, d/0, d/0, d/1
      x: 445678945
        
      ntfy 13 aaln/1@rgw1.whatever.net mgcp 1.0
      o: d/5, d/0, d/0, d/1
      x: 445678945
        

Acknowledgement from ca:

ca确认:

200 13 ok

200 13好的

Step 4 - Request Notification (rqnt) from ca to rgw1

步骤4-从ca到rgw1的请求通知(rqnt)

Request rgw1 to notify in the event of an on-hook transition:

请求rgw1在发生挂机转换时通知:

      rqnt 1058 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n)
      x: 445678946
        
      rqnt 1058 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n)
      x: 445678946
        

Acknowledgement from rgw1:

rgw1的确认函:

200 1058 ok

2001058好

Step 5 - Create Connection (crcx) from ca to rgw1

步骤5-创建从ca到rgw1的连接(crcx)

Request a new connection on rgw1 with the specified local connection options, including 20 msec as the packetization period, G.711 mu-law as the codec, and receive only as the mode:

使用指定的本地连接选项在rgw1上请求新连接,包括20毫秒作为打包周期,G.711 mu law作为编解码器,仅作为模式接收:

      crcx 1059 aaln/1@rgw1.whatever.net mgcp 1.0
      c: 9876543210abcdef
      l: p:20, a:PCMU
      m: recvonly
        
      crcx 1059 aaln/1@rgw1.whatever.net mgcp 1.0
      c: 9876543210abcdef
      l: p:20, a:PCMU
      m: recvonly
        

Acknowledgement from rgw1 that a new connection, "456789fedcba5", has been created, followed by a blank line and then the SDP parameters:

rgw1确认已创建新连接“456789fedcba5”,随后是一个空行,然后是SDP参数:

200 1059 ok i: 456789fedcba5

200 1059正常i:456789fedcba5

v=0 o=- 23456789 98765432 IN IP4 192.168.5.7 s=- c=IN IP4 192.168.5.7 t=0 0 m=audio 6058 RTP/AVP 0

v=0 o=-23456789 98765432在IP4 192.168.5.7中s=-c=在IP4 192.168.5.7中t=0 0 m=音频6058 RTP/AVP 0

Step 6 - Create Connection (crcx) from ca to rgw2

步骤6-创建从ca到rgw2的连接(crcx)

Request a new connection on rgw2. The request includes the session description returned by rgw1 such that a two way connection can be initiated:

在rgw2上请求新连接。请求包括rgw1返回的会话描述,以便可以启动双向连接:

      crcx 2052 aaln/1@rgw2.whatever.net mgcp 1.0
      c: 9876543210abcdef
      l: p:20, a:PCMU
      m: sendrecv
        
      crcx 2052 aaln/1@rgw2.whatever.net mgcp 1.0
      c: 9876543210abcdef
      l: p:20, a:PCMU
      m: sendrecv
        

v=0 o=- 23456789 98765432 IN IP4 192.168.5.7 s=- c=IN IP4 192.168.5.7 t=0 0 m=audio 6058 RTP/AVP 0

v=0 o=-23456789 98765432在IP4 192.168.5.7中s=-c=在IP4 192.168.5.7中t=0 0 m=音频6058 RTP/AVP 0

Acknowledgement from rgw2 that a new connection, "67890af54c9", has been created; followed by a blank line and then the SDP parameters:

rgw2确认已创建新连接“67890af54c9”;后跟一个空行,然后是SDP参数:

200 2052 ok i: 67890af54c9

200 2052正常i:67890af54c9

v=0 o=- 23456889 98865432 IN IP4 192.168.5.8 s=- c=IN IP4 192.168.5.8 t=0 0 m=audio 6166 RTP/AVP 0

v=0 o=-23456889 98865432在IP4 192.168.5.8中s=-c=在IP4 192.168.5.8中t=0 0 m=音频6166 RTP/AVP 0

Step 7 - Modify Connection (mdcx) from ca to rgw1

步骤7-修改从ca到rgw1的连接(mdcx)

Request rgw1 to modify the existing connection, "456789fedcba5", to use the session description returned by rgw2 establishing a half duplex connection which, though not used in this example, could be used to provide usr1 with in band ringback tone, announcements, etc:

请求rgw1修改现有连接“456789fedcba5”,以使用rgw2返回的会话描述来建立半双工连接,该半双工连接虽然在本例中未使用,但可用于向usr1提供带内回铃音、公告等:

      mdcx 1060 aaln/1@rgw1.whatever.net mgcp 1.0
      c: 9876543210abcdef
      i: 456789fedcba5
      l: p:20, a:PCMU
      M: recvonly
        
      mdcx 1060 aaln/1@rgw1.whatever.net mgcp 1.0
      c: 9876543210abcdef
      i: 456789fedcba5
      l: p:20, a:PCMU
      M: recvonly
        

v=0 o=- 23456889 98865432 IN IP4 192.168.5.8 s=- c=IN IP4 192.168.5.8 t=0 0 m=audio 6166 RTP/AVP 0

v=0 o=-23456889 98865432在IP4 192.168.5.8中s=-c=在IP4 192.168.5.8中t=0 0 m=音频6166 RTP/AVP 0

Acknowledgement from rgw1:

rgw1的确认函:

200 1060 ok

2001060好

Step 8 - Request Notification (rqnt) from ca for rgw1 to provide ringback

步骤8-请求ca通知(rqnt)rgw1提供回铃

Request rgw1 to notify in the event of an on-hook transition, and also to provide ringback tone:

请求rgw1在发生挂机转换时发出通知,并提供回铃音:

      rqnt 1061 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n)
      s: g/rt
      x: 445678947
        
      rqnt 1061 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n)
      s: g/rt
      x: 445678947
        

Acknowledgement from rgw1:

rgw1的确认函:

200 1061 ok

2001061行

Step 9 - Request Notification (rqnt) from ca to rgw2 to provide ringing

步骤9-从ca到rgw2的请求通知(rqnt)以提供振铃

Request rgw2 to continue to look for offhook and provide ringing:

请求rgw2继续查找摘机并提供铃声:

      rqnt 2053 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      s: l/rg
      x: 445678948
        
      rqnt 2053 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      s: l/rg
      x: 445678948
        

Acknowledgement from rgw2:

rgw2的确认:

200 2053 ok

2002053好的

Step 10 - Notify (ntfy) offhook from rgw2 to ca

步骤10-从rgw2到ca的通知(ntfy)摘机

      ntfy 27 aaln/1@rgw2.whatever.net mgcp 1.0
      o: l/hd
      x: 445678948
        
      ntfy 27 aaln/1@rgw2.whatever.net mgcp 1.0
      o: l/hd
      x: 445678948
        

Acknowledgement from ca:

ca确认:

200 27 ok

200 27好的

Step 11 - Request Notification (rqnt) of on-hook from ca to rgw2

步骤11-从ca到rgw2的挂机请求通知(rqnt)

      rqnt 2054 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hu(n)
      x: 445678949
        
      rqnt 2054 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hu(n)
      x: 445678949
        

Acknowledgement from rgw2:

rgw2的确认:

200 2054 ok

2002054好

Step 12 - Request Notification (rqnt) of on-hook from ca to rgw1

步骤12-从ca到rgw1的挂机请求通知(rqnt)

      rqnt 1062 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n)
      x: 445678950
        
      rqnt 1062 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hu(n)
      x: 445678950
        

Acknowledgement from rgw1:

rgw1的确认函:

200 1062 ok

2001062行

Step 13 - Modify Connection (mdcx) from ca to rgw1

步骤13-修改从ca到rgw1的连接(mdcx)

Request rgw1 to modify the existing connection, "456789fedcba5", to sendrecv such that a full duplex connection is initiated:

请求rgw1修改现有连接“456789fedcba5”以发送RECV,从而启动全双工连接:

mdcx 1063 aaln/1@rgw1.whatever.net mgcp 1.0 c: 9876543210abcdef i: 456789fedcba5 m: sendrecv

mdcx 1063 aaln/1@rgw1.whatever.netmgcp 1.0 c:9876543210abcdef i:456789fedcba5 m:sendrecv

Acknowledgement from rgw1:

rgw1的确认函:

200 1063 ok

2001063 ok

G.3 Connection Deletion
G.3连接删除
G.3.1 Residential Gateway to Residential Gateway
G.3.1 住宅网关到住宅网关

The following table shows the message sequence which occurs when a user (usr2) initiates the deletion of an existing connection on a residential gateway (rgw2) with a user served by another residential gateway (rgw1). This example illustrates the communication between the residential gateways and the call agent (ca) only. The local name of the endpoints in this example is aaln/1 for both gateways, and references within the description of the steps to rgw1 and rgw2 can be assumed to refer to aaln/1 of rgw1 and aaln/1 of rgw2.

下表显示了当用户(usr2)开始删除住宅网关(rgw2)上与另一住宅网关(rgw1)服务的用户的现有连接时发生的消息序列。此示例仅说明住宅网关和呼叫代理(ca)之间的通信。对于这两个网关,本例中端点的本地名称都是aaln/1,并且可以假设步骤描述中对rgw1和rgw2的引用是指rgw1的aaln/1和rgw2的aaln/1。

Table F.4: Residential Gateway Connection Deletion

表F.4:住宅网关连接删除

 ---------------------------------------------------------------------
| # |     usr1    |    rgw1    |     ca     |    rgw2    |     usr2   |
|===|=============|============|============|============|============|
| 1 |             |            |            | <- ntfy    | <- on-hook |
|   |             |            |     ack -> |            |            |
|---|-------------|------------|------------|------------|------------|
| 2 |             |            |    dlcx -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 3 |             |            | <- dlcx    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 4 |             |            |    rqnt -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 5 |  on-hook -> |    ntfy -> |            |            |            |
|   |             |            | <- ack     |            |            |
|---|-------------|------------|------------|------------|------------|
| 6 |             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
 ---------------------------------------------------------------------
        
 ---------------------------------------------------------------------
| # |     usr1    |    rgw1    |     ca     |    rgw2    |     usr2   |
|===|=============|============|============|============|============|
| 1 |             |            |            | <- ntfy    | <- on-hook |
|   |             |            |     ack -> |            |            |
|---|-------------|------------|------------|------------|------------|
| 2 |             |            |    dlcx -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 3 |             |            | <- dlcx    |            |            |
|   |             |     ack -> |            |            |            |
|---|-------------|------------|------------|------------|------------|
| 4 |             |            |    rqnt -> |            |            |
|   |             |            |            | <- ack     |            |
|---|-------------|------------|------------|------------|------------|
| 5 |  on-hook -> |    ntfy -> |            |            |            |
|   |             |            | <- ack     |            |            |
|---|-------------|------------|------------|------------|------------|
| 6 |             |            | <- rqnt    |            |            |
|   |             |     ack -> |            |            |            |
 ---------------------------------------------------------------------
        

Step 1 - Notify (ntfy) offhook from rgw1 to ca

步骤1-从rgw1到ca的通知(ntfy)摘机

This ntfy is the result of usr2 going on-hook and assumes that ca had previously sent an rqnt to rgw2 requesting notification in the event of an on-hook (see end of Connection Creation sequence):

此ntfy是usr2挂接的结果,并假设ca先前已向rgw2发送rqnt,请求在挂接事件中发出通知(请参阅连接创建序列结束):

      ntfy 28 aaln/1@rgw2.whatever.net mgcp 1.0
      o: l/hu
      x: 445678949
        
      ntfy 28 aaln/1@rgw2.whatever.net mgcp 1.0
      o: l/hu
      x: 445678949
        

Acknowledgement from ca:

ca确认:

200 28 ok

200 28好的

Step 2 - Delete Connection (dlcx) from ca to rgw2

步骤2-删除从ca到rgw2的连接(dlcx)

Requests rgw2 to delete the connection "67890af54c9":

请求rgw2删除连接“67890af54c9”:

dlcx 2055 aaln/1@rgw1.whatever.net mgcp 1.0 c: 9876543210abcdef i: 67890af54c9

dlcx 2055 aaln/1@rgw1.whatever.netmgcp 1.0 c:9876543210abcdef i:67890af54c9

Acknowledgement from rgw2. Note the response code of "250" meaning "the connection was deleted":

来自rgw2的确认。注意响应代码“250”表示“连接已删除”:

250 2055 ok

250 2055行

Step 3 - Delete Connection (dlcx) from ca to rgw1

步骤3-删除从ca到rgw1的连接(dlcx)

Requests rgw1 to delete the connection "456789fedcba5":

请求rgw1删除连接“456789fedcba5”:

dlcx 1064 aaln/1@rgw1.whatever.net mgcp 1.0 c: 9876543210abcdef i: 456789fedcba5

dlcx 1064 aaln/1@rgw1.whatever.netmgcp 1.0 c:9876543210abcdef i:456789fedcba5

Acknowledgement from rgw1:

rgw1的确认函:

250 1064 ok

250 1064 ok

Step 4 - NotificationRequest (rqnt) from ca to rgw2

步骤4-从ca到rgw2的通知请求(rqnt)

Requests rgw2 to notify ca in the event of an offhook transition:

请求rgw2在脱机转换时通知ca:

      rqnt 2056 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 445678951
        
      rqnt 2056 aaln/1@rgw2.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 445678951
        

Acknowledgement from rgw2:

rgw2的确认:

200 2056 ok

2002056好

Step 5 - Notify (ntfy) on-hook from rgw1 to ca

步骤5-从rgw1到ca的挂钩上的通知(ntfy)

Notify ca that usr1 at rgw1 went back on-hook:

通知ca rgw1处的usr1重新上钩:

      ntfy 15 aaln/1@rgw1.whatever.net mgcp 1.0
      o: l/hu
      x: 445678950
        
      ntfy 15 aaln/1@rgw1.whatever.net mgcp 1.0
      o: l/hu
      x: 445678950
        

Acknowledgement from ca:

ca确认:

200 15 ok

200 15行

Step 6 - NotificationRequest (rqnt) offhook from ca to rgw1

步骤6-从ca到rgw1的通知请求(rqnt)摘机

Requests rgw1 to notify ca in the event of an offhook transition:

请求rgw1在离线转换时通知ca:

      rqnt 1065 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 445678952
        
      rqnt 1065 aaln/1@rgw1.whatever.net mgcp 1.0
      r: l/hd(n)
      x: 445678952
        

Acknowledgement from rgw1:

rgw1的确认函:

200 1065 ok

2001065行

Authors' Addresses

作者地址

Flemming Andreasen Cisco Systems 499 Thornall Street, 8th Floor Edison, NJ 08837

弗莱明·安德里森思科系统公司,地址:新泽西州爱迪生市索纳尔街499号8楼,邮编:08837

   EMail: fandreas@cisco.com
        
   EMail: fandreas@cisco.com
        

Bill Foster Cisco Systems 771 Alder Drive Milpitas, CA 95035

比尔·福斯特思科系统公司加利福尼亚州米尔皮塔斯奥尔德大道771号,邮编95035

   EMail: bfoster@cisco.com
        
   EMail: bfoster@cisco.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2003). All Rights Reserved.

版权所有(C)互联网协会(2003年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。