draft-ietf-megaco-protocol-04.txt   draft-ietf-megaco-protocol-05.txt 
Internet Engineering Task Force Fernando Cuervo Internet Engineering Task Force Fernando Cuervo
INTERNET DRAFT Nortel Networks INTERNET DRAFT Nortel Networks
September 21, 1999 Bryan Hill January 27, 2000 Bryan Hill
Expires March 21, 2000 Gotham Networks Expires July 27, 2000 Gotham Networks
<draft-ietf-megaco-protocol-04.txt> Nancy Greene <draft-ietf-megaco-protocol-05.txt> Nancy Greene
Nortel Networks Nortel Networks
Christian Huitema Christian Huitema
Telcordia Technologies Telcordia Technologies
Abdallah Rayhan Abdallah Rayhan
Nortel Networks Nortel Networks
Brian Rosen Brian Rosen
FORE Systems Marconi
John Segers John Segers
Lucent Technologies Lucent Technologies
Megaco Protocol Megaco Protocol
Status of this document Status of this document
This document is an Internet-Draft and is in full conformance with all This document is an Internet-Draft and is in full conformance with all
provisions of Section 10 of RFC2026. provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Task Internet-Drafts are working documents of the Internet Engineering Task
Force (IETF), its areas, and its working groups. Note that other groups Force (IETF), its areas, and its working groups. Note that other groups
may also distribute working documents as Internet-Drafts. may also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is nappropriate to use Internet-Drafts as reference material time. It is inappropriate to use Internet- Drafts as reference material
or to cite them other than as "work in progress." or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This document will expire in March 2000. This document will expire in July 2000.
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
Table of Contents 1. SCOPE ..................................................... 7
2. REFERENCES ................................................ 7
2.1. Normative references ................................. 7
2.2. Informative references ............................... 8
3. DEFINITIONS ............................................... 9
4. ABBREVIATIONS ............................................. 10
5. CONVENTIONS ............................................... 10
6. CONNECTION MODEL .......................................... 10
6.1. Contexts ............................................. 14
6.1.1. Context Attributes and Descriptors .............. 15
6.1.2. Creating, Deleting and Modifying Contexts ....... 15
6.2. Terminations ......................................... 15
6.2.1. Termination Dynamics ............................ 16
6.2.2. TerminationIDs .................................. 16
6.2.3. Packages ........................................ 17
6.2.4. Termination Properties and Descriptors .......... 17
6.2.5. Root Termination ................................ 19
7. COMMANDS .................................................. 20
7.1. Descriptors .......................................... 21
7.1.1. Specifying Parameters ........................... 21
7.1.2. Modem Descriptor ................................ 22
7.1.3. Multiplex Descriptor ............................ 22
7.1.4. Media Descriptor ................................ 22
7.1.5. Termination State Descriptor .................... 23
7.1.6. Stream Descriptor ............................... 24
7.1.7. LocalControl Descriptor ......................... 24
7.1.8. Local and Remote Descriptors .................... 25
7.1.9. Events Descriptor ............................... 28
7.1.10. EventBuffer Descriptor ......................... 29
7.1.11. Signals Descriptor ............................. 29
7.1.12. Audit Descriptor ............................... 31
7.1.13. ServiceChange Descriptor ....................... 32
7.1.14. DigitMap Descriptor ............................ 32
7.1.15. Statistics Descriptor .......................... 34
7.1.16. Packages Descriptor ............................ 35
7.1.17. ObservedEvents Descriptor ...................... 35
7.1.18. Topology Descriptor ............................ 35
7.2. Command Application Programming Interface ............ 38
7.2.1. Add ............................................. 38
7.2.2. Modify .......................................... 40
7.2.3. Subtract ........................................ 41
7.2.4. Move ............................................ 42
7.2.5. AuditValue ...................................... 43
7.2.6. AuditCapabilities ............................... 44
7.2.7. Notify .......................................... 45
7.2.8. ServiceChange ................................... 45
7.2.9. Manipulating and Auditing Context Attributes .... 49
7.2.10. Generic Command Syntax ......................... 50
1. SCOPE ..................................................... 6 Internet draft MEGACO Protocol January 27, 2000
2. REFERENCES ................................................ 6
2.1. Normative References ................................. 6
2.2. Informative References ............................... 7
3. DEFINITIONS ............................................... 7
4. ABBREVIATIONS ............................................. 9
5. CONVENTIONS ............................................... 9
6. CONNECTION MODEL .......................................... 9
6.1. Contexts ............................................. 12
6.1.1. Context Properties and Descriptors .............. 13
6.1.2. Creating, Deleting and Modifying Contexts ....... 13
6.2. Terminations ......................................... 13
6.2.1. Termination Dynamics ............................ 14
6.2.2. TerminationIDs .................................. 14
6.2.3. Packages ........................................ 14
6.2.4. Termination Properties and Descriptors .......... 15
6.2.5. Root Termination ................................ 16
7. COMMANDS .................................................. 17
7.1. Descriptors .......................................... 18
7.1.1. Wildcarding Parameter Values in Commands ........ 18
7.1.2. Specifying Parameters ........................... 19
7.1.3. Modem Descriptor ................................ 19
7.1.4. Multiplex Descriptor ............................ 19
7.1.5. Media Descriptor ................................ 20
7.1.6. Termination State Descriptor .................... 20
7.1.7. Stream Descriptor ............................... 20
7.1.8. LocalControl Descriptor ......................... 21
7.1.9. Local and Remote Descriptors .................... 21
7.1.10. Events Descriptor .............................. 22
7.1.11. Signals Descriptor ............................. 23
7.1.12. RequestedInfo Descriptor ....................... 23
7.1.13. ServiceChange Descriptor ....................... 24
7.1.14. DigitMap Descriptor ............................ 24
7.1.15. Statistics Descriptor .......................... 25
7.1.16. Topology Descriptor ............................ 26
7.2. Command Application Programming Interface ............ 28
7.2.1. Add ............................................. 29
7.2.2. Modify .......................................... 30
7.2.3. Subtract ........................................ 30
7.2.4. Move ............................................ 31
7.2.5. AuditValue ...................................... 32
7.2.6. AuditCapabilities ............................... 33
7.2.7. Notify .......................................... 34
7.2.8. ServiceChange ................................... 34
7.2.9. Generic Command Syntax .......................... 36
7.3. Command Error Codes .................................. 37
Internet draft MEGACO Protocol September 21, 1999 7.3. Command Error Codes .................................. 50
8. TRANSACTIONS .............................................. 52
8.1. Common Parameters .................................... 53
8.1.1. Transaction Identifiers ......................... 53
8.1.2. Context Identifiers ............................. 53
8.2. Transaction Application Programming Interface ........ 54
8.2.1. TransactionRequest .............................. 54
8.2.2. TransactionReply ................................ 54
8.2.3. TransactionPending .............................. 56
8.3. Messages ............................................. 56
9. TRANSPORT ................................................. 56
9.1. Ordering of Commands ................................. 57
9.2. Protection against Restart Avalanche ................. 58
10. SECURITY CONSIDERATIONS .................................. 59
10.1. Protection of Protocol Connections .................. 59
10.2. Interim AH scheme ................................... 60
10.3. Protection of Media Connections ..................... 61
11. MG-MGC CONTROL INTERFACE ................................. 61
11.1. Multiple Virtual MGs ................................ 62
11.2. Cold Start .......................................... 62
11.3. Negotiation of Protocol Version ..................... 63
11.4. Failure of an MG .................................... 63
11.5. Failure of an MGC ................................... 64
12. PACKAGE DEFINITION ....................................... 65
12.1. Guidelines for defining packages .................... 65
12.1.1. Package ........................................ 65
12.1.2. Properties ..................................... 66
12.1.3. Events ......................................... 66
12.1.4. Signals ........................................ 67
12.1.5. Statistics ..................................... 67
12.1.6. Procedures ..................................... 67
12.2. Guidelines to defining Properties, Statistics ....... 68
12.3. Lists ............................................... 68
12.4. Identifiers ......................................... 68
12.5. Package Registration ................................ 68
13. IANA CONSIDERATIONS ...................................... 68
13.1. Packages ............................................ 68
13.2. Error Codes ......................................... 69
13.3. ServiceChange Reasons ............................... 70
14. CONTACT INFORMATION ...................................... 70
ANNEX A BINARY ENCODING OF THE PROTOCOL (NORMATIVE) ........... 71
A.1. Coding of wildcards .................................. 71
A.2. ASN.1 syntax specification ........................... 73
A.3. Digit maps and path names ............................ 88
ANNEX B TEXT ENCODING OF THE PROTOCOL (NORMATIVE) ............. 89
B.1. Coding of wildcards .................................. 89
B.2. ABNF specification ................................... 89
ANNEX C TAGS FOR MEDIA STREAM PROPERTIES (NORMATIVE) ..........100
8. TRANSACTIONS .............................................. 38 Internet draft MEGACO Protocol January 27, 2000
8.1. Common Parameters .................................... 39
8.1.1. Transaction Identifiers ......................... 39
8.1.2. Context Identifiers ............................. 39
8.2. Transaction Application Programming Interface ........ 39
8.2.1. TransactionRequest .............................. 40
8.2.2. TransactionReply ................................ 40
8.2.3. TransactionPending .............................. 41
8.3. Messages ............................................. 41
9. TRANSPORT ................................................. 42
10. SECURITY CONSIDERATIONS .................................. 42
10.1. Protection of Protocol Connections .................. 42
10.2. Interim AH-within-MEGACO/H.248 scheme ............... 43
10.3. Protection of Media Connections ..................... 44
11. MG-MGC CONTROL INTERFACE ................................. 44
11.1. Multiple Virtual MGs ................................ 45
11.2. Cold Start .......................................... 45
11.3. Failure of an MG .................................... 46
11.4. Failure of an MGC ................................... 46
12. PACKAGE DEFINITION ....................................... 47
12.1. Guidelines for defining packages .................... 47
12.2. Example Package ..................................... 48
12.3. Package Registration ................................ 52
13. IANA CONSIDERATIONS ...................................... 52
13.1. Packages ............................................ 52
13.2. Error Codes ......................................... 53
14. CONTACT INFORMATION ...................................... 53
ANNEX A - ASN.1 DESCRIPTION OF THE PROTOCOL (NORMATIVE) ....... 54
A.1. Specification language .............................. 54
A.2. Syntax specification ................................ 54
ANNEX B - TEXT ENCODING OF THE PROTOCOL (NORMATIVE) ........... 55
B.1. Translation Mechanism ............................... 55
B.2. ABNF specification .................................. 55
ANNEX C - BINARY ENCODING OF THE PROTOCOL ..................... 65
C.1. Translation mechanism ............................... 65
ANNEX D - TAGS FOR MEDIA STREAM PROPERTIES .................... 66
D.1. General Media Attributes ............................ 66
D.2. Multiplex properties ................................ 66
D.3. Properties for BearerDescriptor ..................... 67
D.4. For DS0 ............................................. 67
D.5. For ATM VC .......................................... 67
D.6. Frame Relay ......................................... 67
D.7. RTP Stream .......................................... 67
Annex E - TRANSPORT USING UDP AND APPLICATION LAYER FRAMING ... 68
E.1. Providing At-Most-Once functionality ................ 68
E.2. Transaction identifiers and three-way handshake ..... 69
E.3. Computing retransmission timers ..................... 69
E.4. Provisional responses Executing some transactions ... 70
Internet draft MEGACO Protocol September 21, 1999 C.1. General Media Attributes .............................101
C.2. Mux Properties .......................................101
C.3. General bearer properties ............................101
C.4. General ATM properties ...............................101
C.5. Frame Relay ..........................................102
C.6. IP ...................................................103
C.7. ATM AAL2 .............................................103
C.8. ATM AAL1 .............................................103
C.9. Bearer Capabilities ..................................104
C.10. AAL5 Properties .....................................104
C.11. SDP Equivalents .....................................105
C.12. H.245 ...............................................105
ANNEX D TRANSPORT OVER IP (NORMATIVE) .........................105
D.1. Transport over IP/UDP using Application Level ........105
D.1.1. Providing At-Most-Once Functionality ............105
D.1.2. Transaction identifiers and three-way handshake 106
D.1.3. Computing retransmission timers .................108
D.1.4. Provisional responses ...........................109
D.1.5. Repeating Requests, Responses and ...............109
D.2. Using TCP ............................................110
D.2.1. Providing the At-Most-Once functionality ........111
D.2.2. Transaction identifiers and three way handshake 111
D.2.3. Computing retransmission timers .................111
D.2.4. Provisional responses ...........................111
D.2.5. Ordering of commands ............................112
ANNEX E BASIC PACKAGES ........................................112
E.1. Generic ..............................................112
E.1.1. Properties ......................................112
E.1.2. Events ..........................................112
E.2.2. Events ..........................................116
E.2.3. Signals .........................................116
E.2.4. Statistics ......................................116
E.2.5. Procedures ......................................116
E.3. Tone Generator Package ...............................116
E.3.1. Properties ......................................116
E.3.2. Events ..........................................116
E.3.3. Signals .........................................116
E.3.4. Statistics ......................................117
E.3.5. Procedures ......................................117
E.4. Tone Detection Package ...............................117
E.4.1. Properties ......................................117
E.4.2. Events ..........................................117
E.4.3. Signals .........................................119
E.4.4. Statistics ......................................119
E.4.5. Procedures ......................................119
E.5. Basic DTMF Generator Package .........................119
E.5.1. Properties ......................................119
E.5.2. Events ..........................................119
E.5. Ordering of commands ................................ 73 Internet draft MEGACO Protocol January 27, 2000
E.6. Fighting the restart avalanche ...................... 74
ANNEX F - TRANSPORT USING TCP ................................. 75
F.1. Providing the At-Most-Once functionality ............ 75
F.2. Transaction identifiers and three way handshake ..... 76
F.3. Computing retransmission timers ..................... 76
F.4. Provisional responses ............................... 76
F.5. Ordering of commands ................................ 76
F.6. Fighting the restart avalanche ...................... 77
ANNEX G EXAMPLE CALL FLOWS .................................... 77
G.1. Residential Gateway to Residential Gateway Call ..... 77
G.1.1. Programming Residential GW Analog Line ......... 77
G.2. Multimedia Gateway Examples ......................... 88
G.2.1. H.320 Gateway .................................. 88
G.2.2. Multipoint Context Example ..................... 96
G.2.3. Single Media Call The single media the call .... 97
G.2.4. H.323 and FAS Signaling in MG ..................101
G.2.5. Simple text telephone call .....................103
G.2.5.1. Basic operation ...........................106
G.2.5.2. Voice channels in the simple text only ....106
G.2.5.3. Operation with the alternating text and ...106
Internet draft MEGACO Protocol September 21, 1999 E.5.3. Signals .........................................120
E.5.4. Statistics ......................................120
E.5.5. Procedures ......................................120
E.6. DTMF detection Package ...............................121
E.6.1. Properties ......................................121
E.6.2. Events ..........................................121
E.6.3. Signals .........................................121
E.6.4. Statistics ......................................121
E.6.5. Procedures ......................................121
E.7. Call Progress Tones Generator Package ................122
E.7.1. Properties ......................................122
E.7.2. Events ..........................................122
E.7.3. Signals .........................................122
E.7.4. Statistics ......................................122
E.7.5. Procedures ......................................123
E.8. Call Progress Tones Detection Package ................123
E.8.1. Properties ......................................123
E.8.2. Events ..........................................123
E.8.3. Signals .........................................123
E.8.4. Statistics ......................................123
E.8.5. Procedures ......................................123
E.9. Analog Line Supervision Package ......................124
E.9.1. Properties ......................................124
E.9.2. Events ..........................................124
E.9.3. Signals .........................................124
E.9.4. Statistics ......................................125
E.9.5. Procedures ......................................125
E.10. Basic Continuity Package ............................125
E.10.1. Properties .....................................125
E.10.2. Events .........................................125
E.10.3. Signals ........................................126
E.10.4. Statistics .....................................126
E.10.5. Procedures .....................................126
E.11. Network Package .....................................126
E.11.1. Properties .....................................127
E.11.2. Events .........................................127
E.11.3. Signals ........................................128
E.11.4. Statistics .....................................128
E.11.5. Procedures .....................................128
E.12. RTP Package .........................................128
E.12.1. Properties .....................................128
E.12.2. Events .........................................129
E.12.3. Signals ........................................129
E.12.4. Statistics .....................................129
E.12.5. Procedures .....................................130
E.13. DS0 Package .........................................130
E.13.1. Properties .....................................130
E.13.2. Events .........................................131
TABLE OF FIGURES Internet draft MEGACO Protocol January 27, 2000
Figure 1 Example of MEGACO Connection Model ..................... 10 E.13.3. Signals ........................................131
Figure 2 Example Call Waiting Scenario / Alerting Applied to T1 . 11 E.13.4. Statistics .....................................131
Figure 3 Example Call Waiting Scenario / Answer by T1 ........... 12 E.13.5. Procedures .....................................131
Figure 4 Example topologies ..................................... 27 APPENDIX A EXAMPLE CALL FLOWS (INFORMATIVE) ..............131
Figure 5 Transactions, Actions and Commands ..................... 38 A.1. Residential Gateway to Residential Gateway Call ......131
Figure 6 H.320 Gateway Context .................................. 89 A.1.1. Programming Residential GW Analog Line ..........131
Figure 7 Multimedia Context Example ............................. 97 A.1.2. Collecting Digits and Initiating Termination.....132
Figure 8 Single Media Call Example .............................. 98
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
1. SCOPE 1. SCOPE
MEGACO defines the protocols used between elements of a physically MEGACO defines the protocols used between elements of a physically
decomposed multimedia Gateway consisting of a Media Gateway and a Media decomposed multimedia Gateway consisting of a Media Gateway and a Media
Gateway Controller. There are no functional differences from a system Gateway Controller. There are no functional differences from a system
view between a decomposed gateway, with distributed sub- components view between a decomposed gateway, with distributed sub- components
potentially on more than one physical device, and a monolithic gateway. potentially on more than one physical device, and a monolithic gateway.
This document does not define how gateways, multipoint control units or This document does not define how gateways, multipoint control units or
integrated voice response units (IVRs) work. Instead it creates a gen- integrated voice response units (IVRs) work. Instead it creates a gen-
eral framework that is suitable for these applications. eral framework that is suitable for these applications.
Packet network interfaces may include IP, ATM or possibly others. The Packet network interfaces may include IP, ATM or possibly others. The
interfaces will support a variety of SCN signaling systems, including interfaces will support a variety of SCN signalling systems, including
tone signaling, ISDN, ISUP, QSIG, and GSM. National variants of these tone signalling, ISDN, ISUP, QSIG, and GSM. National variants of these
signaling systems will be supported where applicable. signalling systems will be supported where applicable.
The protocol definition in this document is common text with ITU Recom- The protocol definition in this document is common text with ITU Recom-
mendation H.248. mendation H.248.
2. REFERENCES 2. REFERENCES
2.1. Normative References 2.1. Normative references
ITU-T Recommendation H.225.0 (1998): "Call Signaling Protocols and Media ITU-T Recommendation H.225.0 (1998): "Call Signalling Protocols and
Stream Packetization for Packet Based Multimedia Communications Sys- Media Stream Packetization for Packet Based Multimedia Communications
tems". Systems".
ITU-T Recommendation H.235 (02/98): "Security and encryption for H-
Series (H.323 and other H.245-based) multimedia terminals".
ITU-T Recommendation H.245 (1998): "Control Protocol for Multimedia Com- ITU-T Recommendation H.245 (1998): "Control Protocol for Multimedia Com-
munication" munication".
ITU-T Recommendation H.323 (1998): "Packet Based Multimedia Communica- ITU-T Recommendation H.323 (1998): "Packet Based Multimedia Communica-
tion Systems" tion Systems".
ITU-T Draft Recommendation H.246 (1998), "Interworking of H-series mul- ITU-T Recommendation I.363.1 (08/96), "B-ISDN ATM Adaptation Layer
specification: Type 1 AAL".
ITU-T Recommendation I.366.1 (06/98), "Segmentation and Reassembly
Internet draft MEGACO Protocol January 27, 2000
Service Specific Convergence Sublayer for the AAL type 2".
ITU-T Recommendation I.366.2 (02/99), "AAL type 2 service specific con-
vergence sublayer for trunking".
ITU-T Recommendation Q.931 (05/98): "Digital Subscriber Signalling Sys-
tem No. 1 (DSS 1) - ISDN User-Network Interface Layer 3 Specification
for Basic Call Control"
ITU-T Recommendation X.680 (1997): "Information technology-Abstract Syn-
tax Notation One (ASN.1): Specification of basic notation".
ITU-T draft Recommendation H.246 (1998), "Interworking of H-series mul-
timedia terminals with H-series multimedia terminals and voice/voiceband timedia terminals with H-series multimedia terminals and voice/voiceband
terminals on GSTN and ISDN" terminals on GSTN and ISDN".
RFC 1006, "ISO Transport Service on top of the TCP, Version 3", Marshall RFC 1006, "ISO Transport Service on top of the TCP, Version 3", Marshall
T. Rose, Dwight E. Cass, May 1987. T. Rose, Dwight E. Cass, May 1987.
RFC 2119, "Key words for use in RFCs to Indicate Requirement Levels", RFC 2119, "Key words for use in RFCs to Indicate Requirement Levels",
Scott Bradner, March 1997. Scott Bradner, March 1997. RFC 2234, "Augmented BNF for Syntax Specifi-
cations: ABNF", D. Crocker, P. Overell, November 1997.
RFC 2145, "Use and Interpretation of HTTP Version Numbers", J. C. Mogul,
R. Fielding, J. Gettys, H. Frystyk, May 1997.
RFC 2327, "SDP: Session Description Protocol", M. Handley, V. Jacobson, RFC 2327, "SDP: Session Description Protocol", M. Handley, V. Jacobson,
April 1998. April 1998.
Internet draft MEGACO Protocol September 21, 1999
RFC 2402, "IP Authentication Header", S. Kent, R. Atkinson, November RFC 2402, "IP Authentication Header", S. Kent, R. Atkinson, November
1998. 1998.
RFC 2406, "IP Encapsulating Security Payload (ESP)", S. Kent, R. Atkin- RFC 2406, "IP Encapsulating Security Payload (ESP)", S. Kent, R. Atkin-
son, November 1998. son, November 1998.
2.2. Informative References 2.2. Informative references
ITU-T Recommendation Q.931 (1993): "Digital Subscriber Signalling System ITU-T Recommendation E.180/Q.35 (1998): "Technical characteristics of
No. 1 (DSS 1) - ISDN User-Network Interface Layer 3 Specification for tones for the telephone service"
Basic Call Control"
ITU-T Recommendation Q.724 (1988): "Signalling procedures"
RFC 768, "User Datagram Protocol", J.Postel, August 1980.
RFC 793, "TRANSMISSION CONTROL PROTOCOL", J.Postel, September 1981.
RFC 1889, "RTP: A Transport Protocol for Real-Time Applications", H. RFC 1889, "RTP: A Transport Protocol for Real-Time Applications", H.
Schulzrinne, S. Casner, R. Frederick, V. Jacobson, January 1996. Schulzrinne, S. Casner, R. Frederick, V. Jacobson, January 1996.
RFC 1890, "RTP Profile for Audio and Video Conferences with Minimal Con- RFC 1890, "RTP Profile for Audio and Video Conferences with Minimal Con-
trol", H. Schulzrinne, January 1996. trol", H. Schulzrinne, January 1996.
RFC 2234, " Augmented BNF for Syntax Specifications: ABNF", D. Crocker, Internet draft MEGACO Protocol January 27, 2000
P. Overell, November 1997.
RFC 2401, "Security Architecture for the Internet Protocol", S. Kent, R. RFC 2401, "Security Architecture for the Internet Protocol", S. Kent, R.
Atkinson, November 1998. Atkinson, November 1998.
RFC 2543, " SIP: Session Initiation Protocol", M. Handley, H. RFC 2543, " SIP: Session Initiation Protocol", M. Handley, H.
Schulzrinne, E. Schooler, J. Rosenberg, March 1999. Schulzrinne, E. Schooler, J. Rosenberg, March 1999.
RFC 2460, "Internet Protocol, Version 6 (IPv6) Specification", S. Deer-
ing, R. Hinden, December 1998.
3. DEFINITIONS 3. DEFINITIONS
Access Gateway: A type of gateway that provides a User to Network Inter- Access Gateway: A type of gateway that provides a User to Network Inter-
face (UNI) such as ISDN. face (UNI) such as ISDN.
Back-haul: The transport of signaling information from a media termina-
tion gateway containing a signaling gateway function to a call process-
ing entity. For example, a layer 3 protocol such as Q.931 might be tran-
sported between MG and MGC such that the MGC terminates layer 3,
although the MG terminates layers 1 and 2. The signalling gateway func-
tion terminates layers 1 and 2 and replaces them with an appropriate
equivalent on the packet network.
Descriptor: A syntactic element of the protocol that groups related pro- Descriptor: A syntactic element of the protocol that groups related pro-
perties. For instance, the properties of a media flow on the MG can be perties. For instance, the properties of a media flow on the MG can be
set by the MGC by including the appropriate descriptor in a command. set by the MGC by including the appropriate descriptor in a command.
Gatekeeper (GK): A functional entity serving a gateway, providing ser-
vices such as authentication, authorization, alias resolution and call
routing.
Internet draft MEGACO Protocol September 21, 1999
H.323 Signaling: This function in the decomposed gateway supports normal
H.323 signaling, such as H.225.0, H.245, or H.450.x as described in
H.323.
Media Gateway (MG): The media gateway converts media provided in one Media Gateway (MG): The media gateway converts media provided in one
type of network to the format required in another type of network. For type of network to the format required in another type of network. For
example, a MG could terminate bearer channels from a switched circuit example, a MG could terminate bearer channels from a switched circuit
network (i.e., DS0s) and media streams from a packet network (e.g., RTP network (i.e., DS0s) and media streams from a packet network (e.g., RTP
streams in an IP network). This gateway may be capable of processing streams in an IP network). This gateway may be capable of processing
audio, video and T.120 alone or in any combination, and will be capable audio, video and T.120 alone or in any combination, and will be capable
of full duplex media translations. The MG may also play audio/video of full duplex media translations. The MG may also play audio/video mes-
messages and perform other IVR functions, or may perform media con- sages and performs other IVR functions, or may perform media conferenc-
ferencing. ing.
Media Gateway Controller (MGC): Controls the parts of the call state Media Gateway Controller (MGC): Controls the parts of the call state
that pertain to connection control for media channels in a MG. that pertain to connection control for media channels in a MG.
Multipoint Control Unit (MCU): An entity that controls the setup and Multipoint Control Unit (MCU): An entity that controls the setup and
coordination of a multi- user conference that typically includes pro- coordination of a multi- user conference that typically includes pro-
cessing of audio, video and data. cessing of audio, video and data.
Network Access Server: A gateway function in a MG that converts modem Residential Gateway: A gateway that interworks an analogue line to a
signals from an SCN network and provides data access to the Internet. packet network. A residential gateway typically contains one or two
analogue lines and is located at the customer premises.
Residential Gateway: A gateway that interworks an analog line to a
packet network. A residential gateway typically contains one or two ana-
log lines and is located at the customer premises.
SCN FAS Signaling Gateway: This function contains the SCN Signaling SCN FAS Signalling Gateway: This function contains the SCN Signalling
Interface that terminates SS7, ISDN and other signaling links where the Interface that terminates SS7, ISDN or other signalling links where the
call control channel and bearer channels are collocated in the same phy- call control channel and bearer channels are collocated in the same phy-
sical span. sical span.
SCN NFAS Signaling Gateway: This function contains the SCN Signaling SCN NFAS Signalling Gateway: This function contains the SCN Signalling
Interface that terminates SS7 and other signaling links where the call Interface that terminates SS7 or other signalling links where the call
control channels are separated from bearer channels. control channels are separated from bearer channels.
Internet draft MEGACO Protocol January 27, 2000
Stream: Bidirectional media or control flow received/sent by a media Stream: Bidirectional media or control flow received/sent by a media
gateway as part of a call or conference. gateway as part of a call or conference.
Trunk: A communication channel between two switching systems such as a Trunk: A communication channel between two switching systems such as a
DS0 on a T1 or E1 line. DS0 on a T1 or E1 line.
Trunking Gateway: A gateway between SCN network and packet network that Trunking Gateway: A gateway between SCN network and packet network that
typically terminates a large number of digital circuits. typically terminates a large number of digital circuits.
Internet draft MEGACO Protocol September 21, 1999
4. ABBREVIATIONS 4. ABBREVIATIONS
This recommendation defines the following terms. This recommendation defines the following terms.
ATM Asynchronous Transfer Mode ATM Asynchronous Transfer Mode
BRI Basic Rate Interface BRI Basic Rate Interface
CAS Channel Associated Signaling CAS Channel Associated Signalling
DTMF Dual Tone Multi Frequency DTMF Dual Tone Multi-Frequency
FAS Facility Associated Signaling FAS Facility Associated Signalling
GK GateKeeper
GW GateWay GW GateWay
IP Internet Protocol IP Internet Protocol
ISUP ISDN User Part ISUP ISDN User Part
MG Media Gateway MG Media Gateway
MGC Media Gateway Controller MGC Media Gateway Controller
NAS Network Access Server NFAS Non-Facility Associated Signalling
NFAS Non Facility Associated Signaling
PRI Primary Rate Interface PRI Primary Rate Interface
PSTN Public Switched Telephone Network PSTN Public Switched Telephone Network
QoS Quality of Service QoS Quality of Service
RTCP Real-time Transport Control Protocol
RTP Real-time Transport Protocol RTP Real-time Transport Protocol
SCN Switched Circuit Network SCN Switched Circuit Network
SG Signaling Gateway SG Signalling Gateway
SS7 Signalling System No7 SS7 Signalling System No. 7
5. CONVENTIONS 5. CONVENTIONS
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC2119. document are to be interpreted as described in RFC2119.
6. CONNECTION MODEL 6. CONNECTION MODEL
The connection model for the protocol describes the logical entities, or The connection model for the protocol describes the logical entities, or
objects, within the Media Gateway that can be controlled by the Media objects, within the Media Gateway that can be controlled by the Media
Gateway Controller. The main abstractions used in the connection model Gateway Controller. The main abstractions used in the connection model
are Terminations and Contexts. are Terminations and Contexts.
A Termination sources and/or sinks one or more media streams. In a mul- A Termination sources and/or sinks one or more streams. In a multimedia
timedia conference, a Termination can be multimedia and sources or sinks conference, a Termination can be multimedia and sources or sinks multi-
multiple media streams. The media stream parameters, as well as modem, ple media streams. The media stream parameters, as well as modem, and
and bearer parameters are encapsulated within the Termination. bearer parameters are encapsulated within the Termination.
Internet draft MEGACO Protocol January 27, 2000
A Context is an association between a collection of Terminations. There A Context is an association between a collection of Terminations. There
is a special type of Context, the null Context, which contains all Ter- is a special type of Context, the null Context, which contains all Ter-
minations that are not associated to any other Termination. For minations that are not associated to any other Termination. For
instance, in a decomposed access gateway, all idle lines are represented instance, in a decomposed access gateway, all idle lines are represented
by Terminations in the null Context. by Terminations in the null Context.
Internet draft MEGACO Protocol September 21, 1999
Following is a graphical depiction of these concepts. The diagram of Following is a graphical depiction of these concepts. The diagram of
Figure 1 gives several examples and is not meant to be an all-inclusive Figure 1 gives several examples and is not meant to be an all-inclusive
illustration. The asterisk box in each of the Contexts represents the illustration. The asterisk box in each of the Contexts represents the
logical association of Terminations implied by the Context. logical association of Terminations implied by the Context.
Internet draft MEGACO Protocol January 27, 2000
+------------------------------------------------------+ +------------------------------------------------------+
|Media Gateway | |Media Gateway |
| +-------------------------------------------------+ | | +-------------------------------------------------+ |
| |Context +-------------+ | | | |Context +-------------+ | |
| | | Termination | | | | | | Termination | | |
| | |-------------| | | | | |-------------| | |
| | +-------------+ +->| SCN Bearer |<---+-> | | +-------------+ +->| SCN Bearer |<---+->
| | | Termination | +-----+ | | Channel | | | | | | Termination | +-----+ | | Channel | | |
| | |-------------| | |---+ +-------------+ | | | | |-------------| | |---+ +-------------+ | |
<-+--->| RTP Stream |---| * | | | <-+--->| RTP Stream |---| * | | |
skipping to change at page 11, line 5 skipping to change at page 12, line 50
| | | Termination | +-----+ | Termination | | | | | | Termination | +-----+ | Termination | | |
| | |-------------| | | |-------------| | | | | |-------------| | | |-------------| | |
<-+--->| SCN Bearer |---| * |------| SCN Bearer |<---+-> <-+--->| SCN Bearer |---| * |------| SCN Bearer |<---+->
| | | Channel | | | | Channel | | | | | | Channel | | | | Channel | | |
| | +-------------+ +-----+ +-------------+ | | | | +-------------+ +-----+ +-------------+ | |
| +-------------------------------------------------+ | | +-------------------------------------------------+ |
| ___________________________________________________ | | ___________________________________________________ |
+------------------------------------------------------+ +------------------------------------------------------+
Figure 1: Example of MEGACO Connection Model Figure 1: Example of MEGACO Connection Model
Internet draft MEGACO Protocol September 21, 1999
The example below shows an example of one way to accomplish a call- The example below shows an example of one way to accomplish a call-
waiting scenario in a decomposed access gateway, illustrating the relo- waiting scenario in a decomposed access gateway, illustrating the relo-
cation of a Termination between Contexts. Terminations T1 and T2 belong cation of a Termination between Contexts. Terminations T1 and T2 belong
to Context C1 in a two-way audio call. A second audio call is waiting to Context C1 in a two-way audio call. A second audio call is waiting
Internet draft MEGACO Protocol January 27, 2000
for T1 from Termination T3. T3 is alone in Context C2. T1 accepts the for T1 from Termination T3. T3 is alone in Context C2. T1 accepts the
call from T3, placing T2 on hold. This action results in T1 moving into call from T3, placing T2 on hold. This action results in T1 moving into
Context C2, as shown below. Context C2, as shown below.
+------------------------------------------------------+ +------------------------------------------------------+
|Media Gateway | |Media Gateway |
| +-------------------------------------------------+ | | +-------------------------------------------------+ |
| |Context C1 | | | |Context C1 | |
| | +-------------+ +-------------+ | | | | +-------------+ +-------------+ | |
| | | Term. T2 | +-----+ | Term. T1 | | | | | | Term. T2 | +-----+ | Term. T1 | | |
skipping to change at page 12, line 5 skipping to change at page 14, line 5
| | +-------------+ | | | | +-------------+ | |
| | +-----+ | Term. T3 | | | | | +-----+ | Term. T3 | | |
| | | | |-------------| | | | | | | |-------------| | |
| | | * |------| SCN Bearer |<---+-> | | | * |------| SCN Bearer |<---+->
| | | | | Channel | | | | | | | | Channel | | |
| | +-----+ +-------------+ | | | | +-----+ +-------------+ | |
| +-------------------------------------------------+ | | +-------------------------------------------------+ |
+------------------------------------------------------+ +------------------------------------------------------+
Figure 2 Example Call Waiting Scenario / Alerting Applied to T1 Figure 2 Example Call Waiting Scenario / Alerting Applied to T1
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
+------------------------------------------------------+ +------------------------------------------------------+
|Media Gateway | |Media Gateway |
| +-------------------------------------------------+ | | +-------------------------------------------------+ |
| |Context C1 | | | |Context C1 | |
| | +-------------+ | | | | +-------------+ | |
| | | Term. T2 | +-----+ | | | | | Term. T2 | +-----+ | |
| | |-------------| | | | | | | |-------------| | | | |
<-+--->| RTP Stream |---| * | | | <-+--->| RTP Stream |---| * | | |
| | | | | | | | | | | | | | | |
skipping to change at page 12, line 47 skipping to change at page 14, line 47
There is a special Context called the null Context. It contains Termina- There is a special Context called the null Context. It contains Termina-
tions that are not associated to any other Termination. Terminations in tions that are not associated to any other Termination. Terminations in
the null Context can have their parameters examined or modified, and may the null Context can have their parameters examined or modified, and may
have events detected on them. have events detected on them.
In general, an Add command is used to add Terminations to Contexts. If In general, an Add command is used to add Terminations to Contexts. If
the MGC does not specify an existing Context to which the Termination is the MGC does not specify an existing Context to which the Termination is
to be added, the MG creates a new Context. A Termination may be removed to be added, the MG creates a new Context. A Termination may be removed
from a Context with a Subtract command, and a Termination may be moved from a Context with a Subtract command, and a Termination may be moved
from one Context to another with a Move command. A Termination exists in from one Context to another with a Move command. A Termination SHALL
only one Context at a time. exist in only one Context at a time.
The maximum number of Terminations in a Context is a MG property. Media The maximum number of Terminations in a Context is a MG property. Media
gateways that offer only point-to-point connectivity might allow at most gateways that offer only point-to-point connectivity might allow at most
two Terminations per Context. Media gateways that support multipoint two Terminations per Context. Media gateways that support multipoint
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
conferences might allow three or more terminations per Context. conferences might allow three or more terminations per Context.
6.1.1. Context Properties and Descriptors 6.1.1. Context Attributes and Descriptors
The properties of Contexts include The attributes of Contexts are:
* ContextID, a 32 bit integer chosen by the MG. It may be specified ContextID, a 32 bit unsigned integer chosen by the MG. The topology
as ALL "*" or NULL "-" in some circumstances. (who hears/sees whom). The topology of a Context describes the flow of
media between the Terminations within a Context. In contrast, the mode
of a Termination (send/receive/...) describes the flow of the media at
the ingress/egress of the media gateway.
* the topology (who hears/sees whom). The priority is used for a context in order to provide the MG with
information about a certain precedence handling for a context. The MGC
can also use the priority to control autonomously the traffic precedence
in the MG in a smooth way in certain situations (e.g. restart), when a
lot of contexts must be handled simultaneously.
The topology of a Context describes the flow of media between the * An indicator for an emergency call is also provided to allow a
Terminations within a Context. In contrast, the mode of a Termina- preference handling in the MG.
tion (send/receive/...) describes the flow of the media at the
ingress/egress of the media gateway.
6.1.2. Creating, Deleting and Modifying Contexts 6.1.2. Creating, Deleting and Modifying Contexts
The protocol can be used to (implicitly) create Contexts and modify the The protocol can be used to (implicitly) create Contexts and modify the
parameter values of existing Contexts. The protocol has commands to add parameter values of existing Contexts. The protocol has commands to add
Terminations to Contexts subtract them from Contexts, and to move Termi- Terminations to Contexts, subtract them from Contexts, and to move Ter-
nations between Contexts. Contexts are deleted implicitly when the last minations between Contexts. Contexts are deleted implicitly when the
remaining Termination is subtracted from it. last remaining Termination is subtracted or moved out.
6.2. Terminations 6.2. Terminations
A Termination is a logical entity on a MG that sources and/or sinks A Termination is a logical entity on a MG that sources and/or sinks
media and/or control streams. A Termination is described by a number of media and/or control streams. A Termination is described by a number of
characterizing Properties, which are grouped in a set of Descriptors characterizing Properties, which are grouped in a set of Descriptors
that are included in commands. Terminations have unique identities (Ter- that are included in commands. Terminations have unique identities (Ter-
minationIDs), assigned by the MG at the time of their creation. minationIDs), assigned by the MG at the time of their creation.
Terminations representing physical entities have a semi-permanent Terminations representing physical entities have a semi-permanent
existence. For example, a Termination representing a TDM channel might existence. For example, a Termination representing a TDM channel might
exist for as long as it is provisioned in the gateway. Terminations exist for as long as it is provisioned in the gateway. Terminations
representing ephemeral information flows, such as RTP flows, would usu- representing ephemeral information flows, such as RTP flows, would usu-
ally exist only for the duration of their use. ally exist only for the duration of their use.
Ephemeral Terminations are created by means of an Add command. They are Ephemeral Terminations are created by means of an Add command. They are
destroyed by means of a Subtract command. In contrast, when a physical destroyed by means of a Subtract command. In contrast, when a physical
Termination is Add'ed to or Subtract'ed from a Context, it is taken from Termination is Added to or Subtracted from a Context, it is taken from
or to the null Context, respectively. or to the null Context, respectively.
Internet draft MEGACO Protocol January 27, 2000
Terminations may have signals applied to them. Signals are MG generated Terminations may have signals applied to them. Signals are MG generated
media streams such as tones and announcements as well as line signals media streams such as tones and announcements as well as line signals
such as hookswitch. Terminations may be programmed to detect Events, such as hookswitch. Terminations may be programmed to detect Events,
the occurrence of which can trigger notification messages to the MGC, or the occurrence of which can trigger notification messages to the MGC, or
action by the MG. Statistics may be accumulated on a Termination. action by the MG. Statistics may be accumulated on a Termination.
Internet draft MEGACO Protocol September 21, 1999
Statistics are reported to the MGC upon request (by means of the Audit- Statistics are reported to the MGC upon request (by means of the Audit-
Value command, see Section 7.2.5) and when the Termination is taken out Value command, see section 7.2.5) and when the Termination is taken out
of the call it is in. of the call it is in.
Multimedia gateways may process multiplexed media streams. For example, Multimedia gateways may process multiplexed media streams. For example,
Recommendation H.221 describes a frame structure for multiple media Recommendation H.221 describes a frame structure for multiple media
streams multiplexed on a number of digital 64 kbit/s channels. Such a streams multiplexed on a number of digital 64 kbit/s channels. Such a
case is handled in the connection model in the following way. For every case is handled in the connection model in the following way. For every
bearer channel that carries part of the multiplexed streams, there is a bearer channel that carries part of the multiplexed streams, there is a
Termination. The Terminations that source/sink the digital channels are Termination. The Terminations that source/sink the digital channels are
connected to separate Termination called the multiplexing Termination. connected to a separate Termination called the multiplexing Termination.
This Termination describes the multiplex used (e.g. how the H.221 frames This Termination describes the multiplex used (e.g. how the H.221 frames
are carried over the digital channels used). The MuxDescriptor is used are carried over the digital channels used). The MuxDescriptor is used
to this end. If multiple media are carried, this Termination contains to this end. If multiple media are carried, this Termination contains
multiple MediaDescriptors. The media streams can be associated with multiple StreamDescriptors. The media streams can be associated with
streams sourced/sunk by other Terminations in the Context. streams sourced/sunk by other Terminations in the Context.
Terminations may be created which represent multiplexed bearers, such as
an ATM AAL2. When a new multiplexed bearer is to be created, an ephem-
eral termination is created in a context established for this purpose.
When the termination is subtracted, the multiplexed bearer is destroyed.
6.2.1. Termination Dynamics 6.2.1. Termination Dynamics
The protocol can be used to create new Terminations and to modify pro- The protocol can be used to create new Terminations and to modify pro-
perty values of existing Terminations. These modifications include the perty values of existing Terminations. These modifications include the
possibility of adding or removing events and/or signals. The Termina- possibility of adding or removing events and/or signals. The Termina-
tion properties, and events and signals are described in the ensuing tion properties, and events and signals are described in the ensuing
sections. sections. An MGC can only release/modify terminations and the resources
that the termination represents which it has previously seized via,
e.g., the Add command.
6.2.2. TerminationIDs 6.2.2. TerminationIDs
Terminations are referenced by a TerminationID, which is an arbitrary Terminations are referenced by a TerminationID, which is an arbitrary
schema chosen by the MG. schema chosen by the MG.
TerminationIDs of physical Terminations are provisioned in the Media TerminationIDs of physical Terminations are provisioned in the Media
Gateway. Gateway. The TerminationIDs may be chosen to have structure. For
instance, a TerminationID may consist of trunk group and a trunk within
the group.
In a text encoding of the protocol, while TerminationIDs are arbitrary, A wildcarding mechanism using two types of wildcards can be used with
by judicious choice of names, the wildcard character, "*" may be made
more useful. When the wildcard character is encountered, it will Internet draft MEGACO Protocol January 27, 2000
"match" all TerminationIDs having the same previous and following char-
acters (if appropriate). For example, if there were TerminationIDs of TerminationIDs. The two wildcards are ALL and CHOOSE. The former is
R13/3/1, R13/3/2 and R13/3/3, the TerminationID R13/3/* would match all used to address multiple Terminations at once, while the latter is used
of them. There are some circumstances where ALL Terminations must be to indicate to a media gateway that it must select a Termination satis-
referred to. The TerminationID "*" suffices, and is referred to as fying the partially specified TerminationID. This allows, for instance,
"ALL". When a TerminationID is required, but the Termination does not that a MGC instructs a MG to choose a circuit within a trunk group.
yet exist, the "CHOOSE" TerminationID "$" may be used.
When ALL is used in the TerminationID of a command, the effect is ident-
ical to repeating the command with each of the matching TerminationIDs.
Since each of these commands may generate a response, the size of the
entire response may be large. If individual responses are not required,
a wildcard response may be requested. In such a case, a single response
is generated, which contains the UNION of all of the individual
responses which otherwise would have been generated. Wildcard response
may be particularly useful in the Audit commands.
The encoding of the wildcarding mechanism is detailed in Annexes A and
B.
6.2.3. Packages 6.2.3. Packages
Different types of gateways may implement Terminations that have widely Different types of gateways may implement Terminations that have widely
differing characteristics. Variations in Terminations are accommodated differing characteristics. Variations in Terminations are accommodated
Internet draft MEGACO Protocol September 21, 1999
in the protocol by allowing Terminations to have optional Properties, in the protocol by allowing Terminations to have optional Properties,
Events, Signals and Statistics implemented by MGs. Events, Signals and Statistics implemented by MGs.
In order to achieve MG/MGC interoperability, such options are grouped In order to achieve MG/MGC interoperability, such options are grouped
into Packages, and a Termination realizes a set of such Packages. More into Packages, and a Termination realizes a set of such Packages. More
information on definition of packages can be found in Section 12. An information on definition of packages can be found in section 12. An
MGC can audit a Termination to determine which Packages it realizes. MGC can audit a Termination to determine which Packages it realizes.
Properties, Events, Signals and Statistics defined in Packages, as well
as parameters to them, are referenced by identifiers (Ids). Identifiers
are scoped. For each package, PropertyIds, EventIds, SignalIds, Statis-
ticsIds and ParameterIds have unique name spaces and the same identifier
may be used in each of them. Two PropertyIds in different packages may
also have the same identifier, etc.
6.2.4. Termination Properties and Descriptors 6.2.4. Termination Properties and Descriptors
Terminations have properties. The properties have unique PropertyIDs. Terminations have properties. The properties have unique PropertyIDs.
Most properties have default values. When a Termination is created, Most properties have default values. When a Termination is created,
properties get their default values, unless the controller specifically properties get their default values, unless the controller specifically
sets a different value. The default value of a property of a physical sets a different value. The default value of a property of a physical
Termination can be changed by setting it to a different value when the Termination can be changed by setting it to a different value when the
Termination is in the null Context. Every time such a Termination Termination is in the null Context. Every time such a Termination
returns to the null Context, the values of its properties are reset to returns to the null Context, the values of its properties are reset to
this default value. this default value.
Internet draft MEGACO Protocol January 27, 2000
There are a number of common properties for Terminations and properties There are a number of common properties for Terminations and properties
specific to media streams. The common properties are also called the specific to media streams. The common properties are also called the
termination state properties. For each media stream, there are local termination state properties. For each media stream, there are local
properties and properties of the received and transmitted flows. properties and properties of the received and transmitted flows.
Properties not included in the base protocol are defined in Packages. Properties not included in the base protocol are defined in Packages.
These properties are referred to by a name consisting of the PackageName These properties are referred to by a name consisting of the PackageName
and a PropertyID. Most properties have default values described in the and a PropertyId. Most properties have default values described in the
Package description. Actual or allowed values of properties can be set Package description. Properties may be read-only or read/write. The pos-
and inspected by MGCs. Related properties are grouped into descriptors sible values of a property may be audited, as can their current values.
for convenience. For properties that are read/write, the MGC can set their values. A
property may be declared as "Global" which has a single value shared by
When a Termination is Added to a Context, its property values can be set all terminations realizing the package. Related properties are grouped
by including the appropriate descriptors as parameters to the Add com- into descriptors for convenience.
mand. Properties not mentioned in the command retain their prior
values. Similarly, a property of a Termination in a Context may have
its value changed by the Modify command. Properties not mentioned in
the Modify command retain their prior values.
When a Termination is Subtracted from a Context, properties are reset to
the values they had just prior to the most recent Add command.
The following table lists all of the possible Descriptors and their use.
Not all descriptors are legal as input or output parameters to every
command. Descriptors
Internet draft MEGACO Protocol September 21, 1999 When a Termination is Added to a Context, the value of its read/write
properties can be set by including the appropriate descriptors as param-
eters to the Add command. Properties not mentioned in the command
retain their prior values. Similarly, a property of a Termination in a
Context may have its value changed by the Modify command. Properties
not mentioned in the Modify command retain their prior values. Proper-
ties may also have their values changed when a Termination is moved from
one Context to another as a result of a Move command. In some cases,
descriptors are returned as output from a command. The following table
lists all of the possible Descriptors and their use. Not all descrip-
tors are legal as input or output parameters to every command. Descrip-
tors
______________________________________________________________________________
|Descriptor Name| Description | |Descriptor Name| Description |
|_______________|____________________________________________________________| |__________________|____________________________________________________|
|Modem | Identifies modem type and properties when applicable | |Modem |Identifies modem type and properties when |
|_______________|____________________________________________________________| | |applicable |
|__________________|____________________________________________________|
|Mux | Describes multiplex type for multimedia terminations | |Mux | Describes multiplex type for multimedia terminations |
| | (e.g. H.221, H.223, H.225.0) and Terminations forming | | |(e.g. H.221, H.223, H.225.0) and Terminations |
| | input mux | | |forming the input mux. |
|_______________|____________________________________________________________| |__________________|____________________________________________________|
|Media | A list of media stream specifications (see below) | |Media |A list of media stream specifications (see 7.1.4) |
|_______________|____________________________________________________________| |__________________|____________________________________________________|
|Events | Describes events to be listened for by the MG and what to | |TerminationState |Properties of a Termination (which can be defined in|
| | do when an event is detected | | |Packages) that are not stream specific. |
|_______________|____________________________________________________________| |__________________|____________________________________________________|
|Signals | Describes signals and/or actions to be applied (e.g. | |Stream |A list of remote/local/localControl descriptors for |
| | ringback) | | |a single stream | |__________________|____________________________________________________|
|_______________|____________________________________________________________| |Local |Contains properties that specify the media flows |
|Requested Info | In Audit, identifies which information is desired | |_______________|____________________________________________________________| | |that MG receives from the remote entity. |
|Packages | In Audit, returns a list of Packages realized by | |__________________|____________________________________________________|
| | Termination | | | |
|_______________|____________________________________________________________|
|DigitMap | Instructions for handling DTMF tones at the MG | |_______________|____________________________________________________________|
|ServiceChange | In ServiceChange, what, why, etc. |
|_______________|____________________________________________________________|
|ObservedEvents | In Notify, report of events observed | |_______________|____________________________________________________________|
|Statistics | In Subtract and Audit, Report of Statistics kept on a |
| | Termination |
|_______________|____________________________________________________________|
|Extension | Allows inclusion of vendor-specific extensions |
|_______________|____________________________________________________________|
Within the Media descriptor, there is the Termination State descriptor
and one or more Stream Descriptors. A stream is identified by a
streamID. The streamID is used to link the streams in a Context that
belong together. Within the Stream Descriptor, there are up to three
subsidiary descriptors, LocalControl, Local and Remote. The relationship
between these descriptors is thus:
Media Descriptor
TerminalStateDescriptor
Stream Descriptor
LocalControl Descriptor
Local Descriptor
Remote Descriptor Internet draft MEGACO Protocol January 27, 2000
As a convenience for the audio-only case, a LocalControl, Local or |Remote |Contains properties that specify the media flows |
Remote descriptor may be included in the Media Descriptor without an | |that the MG sends to the remote entity. | |__________________|____________________________________________________|
enclosing Stream descriptor. In this case, the StreamID is assumed to |LocalControl |Contains properties (which can be defined in |
be 1, designating an audio stream. | |packages) that are of interest between the MG and |
| |the MGC | |__________________|____________________________________________________|
|Events |Describes events to be detected by the MG and what |
| |to do when an event is detected | |__________________|____________________________________________________|
|EventBuffer |Describes events to be detected by the MG when Event|
| |Buffering is active | |__________________|____________________________________________________|
|Signals |Describes signals and/or actions to be applied (e.g.|
| |Busy Tone) to the Terminations | |__________________|____________________________________________________|
|Audit |In Audit commands, identifies which information is |
| |desired |
|__________________|____________________________________________________|
|Packages |In AuditValue, returns a list of Packages realized |
| |by a Termination | |__________________|____________________________________________________|
|DigitMap |Instructions for handling DTMF tones at the MG |
|__________________|____________________________________________________|
|ServiceChange |In ServiceChange, what, why service change occurred,|
| |etc. |
|__________________|____________________________________________________|
|ObservedEvents |In Notify or AuditValue, report of events observed |
|__________________|____________________________________________________|
|Statistics |In Subtract and Audit, Report of Statistics kept on |
| |a Termination. | |__________________|____________________________________________________|
6.2.5. Root Termination 6.2.5. Root Termination
Occasionally, a command must refer to the entire gateway, rather than a Occasionally, a command must refer to the entire gateway, rather than a
termination within it. A special TerminationID, "ROOT" is reserved for termination within it. A special TerminationID, "Root" is reserved for
this purpose. A package (MG) defines the properties of Root. Root thus this purpose. Packages may be defined on Root. Root thus may have pro-
perties and events (signals are not appropriate for root). Accord-
Internet draft MEGACO Protocol September 21, 1999 ingly, the root TerminationID may appear in:
may have properties and events (signals and statistics are not appropri-
ate for root). Accordingly, the root terminationID may appear in:
* a Modify command - to change a property or set an event * a Modify command - to change a property or set an event
* a Notify command - to report an event * a Notify command - to report an event
* an AuditValue return - to examine the values of properties * an AuditValue return - to examine the values of properties imple-
mented on root
* an AuditCapability - to determine what properties of root are * an AuditCapability - to determine what properties of root are
implemented implemented
* a ServiceChange - to declare the gateway in or out of service * a ServiceChange - to declare the gateway in or out of service Any
other use of the root TerminationID is an error.
Any other use of the root terminationID is an error. Internet draft MEGACO Protocol January 27, 2000
7. COMMANDS 7. COMMANDS
The protocol provides Commands for manipulating the logical entities of The protocol provides commands for manipulating the logical entities of
the protocol connection model, Contexts and Terminations. Commands pro- the protocol connection model, Contexts and Terminations. Commands pro-
vide control at the finest level of granularity supported by the proto- vide control at the finest level of granularity supported by the proto-
col. For example, Commands exist to add Terminations to a Context, col. For example, Commands exist to add Terminations to a Context,
modify Terminations, subtract Terminations from a Context, and audit modify Terminations, subtract Terminations from a Context, and audit
properties of Contexts or Terminations. Commands provide for complete properties of Contexts or Terminations. Commands provide for complete
control of the properties of Contexts and Terminations. This includes control of the properties of Contexts and Terminations. This includes
things such as specifying which events a Termination is to report, which specifying which events a Termination is to report, which
signals/actions are to be applied to a Termination and specifying the signals/actions are to be applied to a Termination and specifying the
topology of a Context (who hears/sees whom). topology of a Context (who hears/sees whom).
Most Commands are for the specific use of the Media Gateway Controller Most commands are for the specific use of the Media Gateway Controller
as command initiator in controlling Media Gateways as command as command initiator in controlling Media Gateways as command
responders. However, there are several Commands for the Media Gateway responders. The exceptions are the Notify and ServiceChange commands:
to use as command initiator in reporting events that have occurred to Notify is sent from Media Gateway to Media Gateway Controller, and Ser-
the controller as command responder. viceChange may be sent by either entity. Below is an overview of the
commands; they are explained in more detail in section 7.2.
The protocol has commands. The commands are sent to the MG by the MGC,
except Notify. Notify is sent to the MGC by the MG. ServiceChange may
be sent by either entity to the other.
1. Add. The Add command adds a termination to a context. The Add com- 1. Add. The Add command adds a termination to a context. The Add com-
mand on the first Termination in a Context is used to create a Con- mand on the first Termination in a Context is used to create a Con-
text. text.
2. Modify. The Modify command modifies the properties, events and sig- 2. Modify. The Modify command modifies the properties, events and sig-
nals of a termination. nals of a termination.
3. Subtract. The Subtract command disconnects a Termination from its 3. Subtract. The Subtract command disconnects a Termination from its
Context and returns statistics on the Termination's participation Context and returns statistics on the Termination's participation
Internet draft MEGACO Protocol September 21, 1999
in the Context. The Subtract command on the last Termination in a in the Context. The Subtract command on the last Termination in a
Context deletes the Context. Context deletes the Context.
4. Move. The Move command atomically moves a Termination to another 4. Move. The Move command atomically moves a Termination to another
context. context.
5. AuditValue. The Audit command returns the current state of proper- 5. AuditValue. The AuditValue command returns the current state of
ties, events and signals of Terminations. properties, events, signals and statistics of Terminations.
6. AuditCapabilities. The AuditCapabilities command returns all the 6. AuditCapabilities. The AuditCapabilities command returns all the
possible values for Termination properties, events and signals possible values for Termination properties, events and signals
allowed by the Media Gateway allowed by the Media Gateway.
7. Notify. The Notify command allows the Media Gateway to inform the 7. Notify. The Notify command allows the Media Gateway to inform the
Media Gateway Controller of the occurrence of events in the Media Media Gateway Controller of the occurrence of events in the Media
Gateway. Gateway.
8. ServiceChange. The ServiceChange Command allows the Media Gateway 8. ServiceChange. The ServiceChange Command allows the Media Gateway
to notify the Media Gateway Controller that a Termination or group to notify the Media Gateway Controller that a Termination or group
Internet draft MEGACO Protocol January 27, 2000
of Terminations is about to be taken out of service or has just of Terminations is about to be taken out of service or has just
been returned to service. ServiceChange is also used by the MG to been returned to service. ServiceChange is also used by the MG to
announce its availability to an MGC (registration), and to notify announce its availability to an MGC (registration), and to notify
the MGC of impending or completed restart of the MG. The MGC may the MGC of impending or completed restart of the MG. The MGC may
announce a handover to the MG by sending it a ServiceChange com- announce a handover to the MG by sending it a ServiceChange com-
mand. mand. The MGC may also use ServiceChange to instruct the MG to
take a Termination or group of Terminations in or out of service.
These commands are detailed in Sections 7.2.1 through 7.2.8 These commands are detailed in sections 7.2.1 through 7.2.8
7.1. Descriptors 7.1. Descriptors
The parameters to a command are termed Descriptors. A Descriptor con- The parameters to a command are termed Descriptors. A Descriptor con-
sists of a name and a list of items. Some items may have values. Many sists of a name and a list of items. Some items may have values. Many
Commands share common Descriptors. This subsection enumerates these Commands share common Descriptors. This subsection enumerates these
Descriptors. Parameters and parameter usage specific to a given Command Descriptors. Descriptors may be returned as output from a command.
type are described in the subsection that describes the Command. Parameters and parameter usage specific to a given Command type are
described in the subsection that describes the Command.
7.1.1. Wildcarding Parameter Values in Commands
Some parameter values may be wildcarded in commands. Two wildcard con-
structs are provided: "all" and "choose". The "all" construct allows a
Command to specify all possible values of a name component. For exam-
ple, all Terminations can be subtracted from a Context by means of this
construct. The "choose" construct allows a command initiator to specify
that it would like the command responder to select and return a possible
value for a parameter. This mechanism, for example, allows the MGC to
have the MG select a DS0 within a DS1.
Internet draft MEGACO Protocol September 21, 1999
7.1.2. Specifying Parameters 7.1.1. Specifying Parameters
Command parameters are structured into a number of descriptors. In gen- Command parameters are structured into a number of descriptors. In gen-
eral, descriptors are of the form DescriptorName=<someID>{parm=value, eral, the text format of descriptors is
parm=value....} DescriptorName=<someID>{parm=value, parm=value....}
Properties may be fully specified, overspecified or under-specified: Parameters may be fully specified, over-specified or under-specified:
1. Fully specified parameters have a single, unambiguous value that 1. Fully specified parameters have a single, unambiguous value that
the command initiator is instructing the command responder to use the command initiator is instructing the command responder to use
for the specified parameter. for the specified parameter.
2. Under-specified parameters, using the "choose" value, allow the 2. Under-specified parameters, using the CHOOSE value, allow the com-
command responder to choose any value it can support. mand responder to choose any value it can support.
3. Over-specified parameters have a list of potential values. The 3. Over-specified parameters have a list of potential values. The
list order specifies the command initiator's order of preference of list order specifies the command initiator's order of preference of
selection. The command responder chooses one value from the selection. The command responder chooses one value from the
offered list and returns that value to the command initiator. offered list and returns that value to the command initiator.
Unspecified, mandatory parameters (i.e.-mandatory parameters not speci- Unspecified mandatory parameters (i.e. mandatory parameters not speci-
fied in any descriptor) result in the command responder retaining the fied in a descriptor) result in the command responder retaining the pre-
previous value for that property. vious value for that parameter. Unspecified optional parameters result
in the command responder using the default value of the parameter. When-
ever a parameter is underspecified or overspecified, the descriptor con-
taining the value chosen by the responder is included as output from the
command.
7.1.3. Modem Descriptor Each command specifies the TerminationId the command operates on. This
The Modem descriptor specifies the modem type and parameters, if any. Internet draft MEGACO Protocol January 27, 2000
By default, no modem descriptor is present in a Termination. TerminationId may be "wildcarded". When the TerminationId of a command
is wildcarded, the effect shall be as if the command was repeated with
each of the TerminationIds matched.
7.1.4. Multiplex Descriptor 7.1.2. Modem Descriptor
The Modem descriptor specifies the modem type and parameters, if any,
required for use in e.g. H.324 and text conversation. The descriptor
includes the following modem types: V.18, V.22, V.22bis, V.32, V.32bis,
V.34, V.90, V.91, Synchronous ISDN, and allows for extensions. By
default, no modem descriptor is present in a Termination.
7.1.3. Multiplex Descriptor
In multimedia calls, a number of media streams are carried on a (possi- In multimedia calls, a number of media streams are carried on a (possi-
bly different) number of bearers. The multiplex descriptor associates bly different) number of bearers. The multiplex descriptor associates
the media and the bearers. The descriptor includes the multiplex type: the media and the bearers. The descriptor includes the multiplex type:
* H.221 * H.221
* H.223, * H.223,
* H.226, * H.226,
* H.225.0, * V.76,
* V.75.
* Possible Extensions (e.g. X-SpecialMux)
Internet draft MEGACO Protocol September 21, 1999 * Possible Extensions
and a set of TerminationIDs representing the multiplexed inputs, in and a set of TerminationIDs representing the multiplexed inputs, in
order. For example: order. For example:
Mux {H.225, MyT3/1/2, MyT3/2/13, MyT3/3/6, MyT3/21/22} Mux = H.221{ MyT3/1/2, MyT3/2/13, MyT3/3/6, MyT3/21/22}
7.1.5. Media Descriptor 7.1.4. Media Descriptor
The Media Descriptor specifies the parameters for all the media streams. The Media Descriptor specifies the parameters for all the media streams.
These parameters are structured into two descriptors, a Termination These parameters are structured into two descriptors, a Termination
State Descriptor, which specifies the properties of a termination that State Descriptor, which specifies the properties of a termination that
are not stream dependent, and one or more Stream Descriptors each of are not stream dependent, and one or more Stream Descriptors each of
which describes a single media stream. which describes a single media stream.
7.1.6. Termination State Descriptor A stream is identified by a StreamID. The StreamID is used to link the
streams in a Context that belong together. Multiple streams exiting a
termination shall be synchronized with each other. Within the Stream
Descriptor, there are up to three subsidiary descriptors, LocalControl,
Local, and Remote. The relationship between these descriptors is thus:
The Termination State Descriptor contains the TerminationBuffered param- Internet draft MEGACO Protocol January 27, 2000
eter, the serviceStates parameter and properties of a termination
(defined in Packages) that are not stream specific.
The TerminationBuffered parameter describes actions taken by the MG when Media Descriptor
events are not immediately notified to the controller. TerminationStateDescriptor
Stream Descriptor
LocalControl Descriptor
Local Descriptor
Remote Descriptor
1. BufferedEventProcessingMode - specifies whether buffered events StreamIDs are numbered from 1 upward. As a convenience a LocalControl,
should be processed or discarded. Local, or Remote descriptor may be included in the Media Descriptor
without an enclosing Stream descriptor. In this case, the StreamID is
assumed to be 1.
2. BufferedEventNotificationMode - specifies whether the Media Gateway 7.1.5. Termination State Descriptor
is expected to detect the requested event and notify the controller
once (step by step) or repeatedly.
The serviceStates parameter describes the overall state of the termina- The Termination State Descriptor contains the ServiceStates property,
tion (not stream-specific). A Termination can be in one of the following the EventBuffer flag and properties of a termination (defined in Pack-
states: "test", "out of service", or "in service". "in service" is the ages) that are not stream specific.
default state.
7.1.7. Stream Descriptor The ServiceStates property describes the overall state of the termina-
tion (not stream-specific). A Termination can be in one of the follow-
ing states: "test", "out of service", or "in service". The "test" state
indicates that the termination is not used for normal traffic, but for
testing. A Termination with state "test" cannot be seized for traffic.
The state "out of service" indicates a fault in the termination and can-
not be used for traffic. The state "in service" indicates that a termi-
nation can be used or is being used for normal traffic. "in service" is
the default state.
Values assigned to Properties may be simple values
(integer/string/enumeration) or may be underspecified, where more than
one value is supplied and the MG may make a choice:
* Alternative Values - multiple values in a list, one of which must
be selected
* Ranges - minimum and maximum values, any value between min and max
must be selected, boundary values included
* Greater Than/Less Than - value must be greater/less than specified
value
* CHOOSE Wildcard - the MG chooses from the allowed values for the
property The EventBuffer flag specifies whether events are buffered
following detection of an event in the Events Descriptor, or pro-
cessed immediately. See section 7.1.9 for details.
Internet draft MEGACO Protocol January 27, 2000
7.1.6. Stream Descriptor
A Stream descriptor specifies the parameters of a single bi-directional A Stream descriptor specifies the parameters of a single bi-directional
media stream. These parameters are structured into three descriptors, stream. These parameters are structured into three descriptors: one
one that contains termination properties specific to a stream, and one that contains termination properties specific to a stream and one each
each for local and remote flows. Stream Descriptor for local and remote flows. The Stream Descriptor includes a StreamID
which identifies the stream. Streams are created by specifiying a new
StreamID on one of the terminations in a Context. Streams are deleted by
setting the Mode property in LocalControl to "delete" on one of the ter-
minations in a Context.
Internet draft MEGACO Protocol September 21, 1999 If a termination is moved from one context to another, the following
applies:
______________________________________________________________________________ * if a streamID of an active stream in the moved termination matches
| Parameter | Description | a streamID in the context it was moved to, the associated stream
|_______________________|______________________________________________________| remains active on that termination;
| StreamID | Identifies the context stream to be associated |
| | with this termination media flow (e.g., 1, 2, |
| | 3, ... ) |
|_______________________|______________________________________________________|
|LocalControl Descriptor| Contains properties that are of interest between the |
| | MG and the MGC |
|_______________________|______________________________________________________|
| Local Descriptor | Contains properties that specify the Local side of a |
| | media flow, and are of interest between two MGs |
|_______________________|______________________________________________________|
| Remote Descriptor | Contains properties that specify the Remote side of |
| | a media flow, and are of interest between two MGs |
|_______________________|______________________________________________________|
7.1.8. LocalControl Descriptor * if a streamID of an active stream in the moved termination does not
match any streamID in the context it was moved to, the stream SHALL
be set to inactive;
The LocalControl Descriptor contains the Mode parameter and properties * if a stream is inactive on the moved termination, it SHALL remain
of a termination (defined in Packages) that are stream specific, and are inactive in the new context until its mode is changed explicitly;
of interest between the MG and the MGC.
The allowed values for the mode parameter are "send only" (sendonly), * the modes of streams on terminations already present in the new
"receive only" (recvonly), "send/receive" (sendrecv), "inactive" (inac- context are unaffected by the fact that a termination is moved into
tive), "loop back" (looback) and "delete" (delete). "Send" and the context.
"Receive" are with respect to the stream within a termination, so that,
for example, a stream set to mode=sendonly can talk but it cannot
listen.
Mode set to delete is used to remove a stream from a termination. 7.1.7. LocalControl Descriptor
7.1.9. Local and Remote Descriptors The LocalControl Descriptor contains the Mode property, the Reserve pro-
perty and properties of a termination (defined in Packages) that are
stream specific, and are of interest between the MG and the MGC. Values
of properties may be underspecified as in section 7.1.5
The Local and Remote Descriptors contain the parameters describing the The allowed values for the mode property are send-only, receive-only,
flows sent to and received from the MG, and are of interest between two send/receive, inactive, loop-back and delete. "Send" and "receive" are
MGs. They are encoded as SDP strings as specified in RFC2327, or tag- with respect to the exterior of the context, so that, for example, a
value pairs as specified in Annex D. Local is the capability of the stream set to mode=sendonly does not pass received media into the con-
local MG and is typically sent from MG to MGC, and subsequently used as text. Signals and Events are not affected by mode. Mode set to delete
part of a capability negotiation between two MGCs. Remote is the param- is used to remove a stream from a termination.
eters describing the flows the remote MG will send/receive, is typically
sent from MCG to MG, and is the result of the capability negotiation.
Between two MGs A and B, MG A receives a negotiated version of MG B's
Local Descriptor as its Remote Descriptor, and MG B receives a nego-
tiated version of MG A's Local Descriptor as its Remote Descriptor.
Internet draft MEGACO Protocol September 21, 1999 The boolean-valued Reserve property of a Termination indicates what the
MG is expected to do when it receives a local and/or remote descriptor.
7.1.10. Events Descriptor If the value of Reserve is True, the MG SHALL reserve resources for all
alternatives specified in the local and/or remote descriptors it
Internet draft MEGACO Protocol January 27, 2000
currently has resources available for. It SHALL respond with the alter-
natives it reserves resources for. If it cannot not support any of the
alternatives, it SHALL respond with a reply to the MGC that contains
empty local and/or remote descriptors.
If the value of Reserve is False, the MG SHALL choose one of the alter-
natives specified in the local descriptor (if present) and one of the
alternatives specified in the remote descriptor (if present). If the MG
has not yet reserved resources to support the selected alternative, it
SHALL reserve the resources. If, on the other hand, it already reserved
resources for the Termination addressed (because of a prior exchange
with Reserve equal to True), it SHALL release any excess resources it
reserved previously. Finally, the MG shall send a reply to the MGC con-
taining the alternatives for the local and/or remote descriptor that it
selected. If the MG does not have sufficient resources to support any
of the alternatives specified, is SHALL respond with error 510 (insuffi-
cient resources).
The default value of Reserve is False.
A new setting of the LocalControl Descriptor completely replaces the
previous setting of that descriptor in the MG. Thus to retain informa-
tion from the previous setting the MGC must include that information in
the new setting. If the MGC wishes to delete some information from the
existing descriptor, it merely resends the descriptor (in a Modify com-
mand) with the unwanted information stripped out
7.1.8. Local and Remote Descriptors
The MGC uses Local and Remote descriptors to reserve and commit MG
resources for media decoding and encoding for the given Stream(s) and
Termination to which they apply. The MG includes these descriptors in
its response to indicate what it is actually prepared to support. The
MG SHALL include additional properties and their values in its response
if these properties are mandatory yet not present in the requests made
by the MGC (e.g., by specifying detailed video encoding parameters where
the MGC only specified the payload type).
Local refers to the media received by the MG and Remote refers to the
media sent by the MG.
When text encoding the protocol, the descriptors consist of session
descriptions as defined in SDP (RFC2327), except that the "s=", "t=" and
"o=" lines are optional. When multiple session descriptions are provided
in one descriptor, the "v=" lines are required as delimiters; otherwise
they are optional. Implementations shall accept session descriptions
that are fully conformant to RFC2327. When binary encoding the protocol
the descriptor consists of groups of properties (tag-value pairs) as
Internet draft MEGACO Protocol January 27, 2000
specified in Annex C. Each such group may contain the parameters of a
session description.
Below, the semantics of the local and remote descriptors are specified
in detail. The specification consists of two parts. The first part
specifies the interpretation of the contents of the descriptor. The
second part specifies the actions the MG must take upon receiving the
local and remote descriptors. The actions to taken by the MG depend on
the value of the Reserve property of the LocalControl descriptor.
Either the local or the remote descriptor or both may be
* unspecified (i.e., absent),
* empty,
* underspecified through use of CHOOSE in a property value,
* fully specified, or
* overspecified through presentation of multiple groups of proper-
ties.
Where the descriptors have been passed from the MGC to the MG, they are
interpreted according to the rules given in section 7.1.1, with the fol-
lowing additional comments for clarification:
a) An unspecified Local or Remote descriptor is considered to be a
missing mandatory parameter. It requires the MG to use whatever
was last specified for that descriptor. It is possible that there
was no previously-specified value, in which case the descriptor
concerned is ignored in further processing of the command.
b) An empty Local (Remote) descriptor in a message from the MGC signi-
fies a request to release any resources reserved for the media flow
received (sent).
c) If multiple groups of properties are present in a Local or Remote
descriptor, the order of preference is descending.
d) Underspecified or overspecified properties within a group of pro-
perties sent by the MGC are requests for the MG to choose a value
which it can support for each of those properties. In case of an
overspecified property, the list of values is in descending order
of preference.
Subject to the above rules, subsequent action depends on the value of
the "Reserve" parameter in LocalControl.
Internet draft MEGACO Protocol January 27, 2000
If Reserve is true, the MG reserves the resources required to support
any of the alternatives that it can currently support.
NOTE - If a Local or Remote descriptor contains multiple groups of pro-
perties, the MG is requested to reserve resources so that it can decode
or encode one media stream according to any of the alternatives. For
instance, if the Local descriptor contains two groups of properties, one
specifying packetized G.711 A-law audio and the other G.723.1 audio, the
MG reserves resources so that it can decode one audio stream encoded in
G.711 A-law format or G.723.1 format. The MG should not reserve
resources to decode two audio streams, one encoded in G.711 A-law and
one in G.723.1.
* If the MG has insufficient resources to support all alternatives
requested by the MGC and the MGC requested resources in both Local
and Remote, the MGC should reserve resources to support at least
one alternative each within Local and Remote.
* If the MG has insufficient resources to support at least one alter-
native within a Local (Remote) descriptor received from the MGC,
it shall return an empty Local (Remote) in response.
* In its response to the MGC, the MG SHALL include local and remote
descriptors for all groups of properties it reserved resources for.
If the MG is incapable of supporting at least one of the alterna-
tives within the Local (Remote) descriptor received from the MGC,
it SHALL return an empty Local (Remote) descriptor.
* If the Mode property of the TerminationState descriptor is RecvOnly
or SendRecv, the MG must be prepared to receive media encoded
according to any of the alternatives included in its response to
the MGC.
If Reserve is False then the MG SHOULD apply the following rules to
resolve Local and Remote to a single alternative each:
* If symmetric coding is not possible, the MG chooses the first
alternative in Local for which it is able to support at least one
alternative in Remote.
* If the MG is unable to support at least one Local and one Remote
alternative, it returns Error 510 (Insufficient Resources).
* The MG returns its selected alternative in Local and Remote.
A new setting of a Local or Remote Descriptor completely replaces the
previous setting of that descriptor in the MG. Thus to retain informa-
tion from the previous setting the MGC must include that information in
Internet draft MEGACO Protocol January 27, 2000
the new setting. If the MGC wishes to delete some information from the
existing descriptor, it merely resends the descriptor (in a Modify com-
mand) with the unwanted information stripped out.
7.1.9. Events Descriptor
The EventsDescriptor parameter contains a RequestIdentifier and a list The EventsDescriptor parameter contains a RequestIdentifier and a list
of events that the Media Gateway is requested to detect and report. The of events that the Media Gateway is requested to detect and report. The
RequestIdentifier is used to correlate the request with the notifica- RequestIdentifier is used to correlate the request with the notifica-
tions that it may trigger. Requested events include, for example, fax tions that it may trigger. Requested events include, for example, fax
tones, continuity tones, and on-hook and off-hook transitions. tones, continuity tones, and on-hook and off-hook transitions.
Each event in the descriptor contains the Event name, an optional Each event in the descriptor contains the Event name, an optional
Action, and optional parameters. The Event name consists of a Package streamID, an optional KeepActive flag, and optional parameters. The
Name (where the event is defined) and an EventID. Events can have Event name consists of a Package Name (where the event is defined) and
parameters. This allows a single event description to have some varia- an EventID. The ALL wildcard may be used for the EventID, indicating
tion in meaning without creating large numbers of individual events. that all events from the specified package have to be detected. The
Parameters are defined in the package and are named. The Action parame- default streamIDis 0, indicating that the event to be detected is not
ter specifies one of several possible actions to take upon the related to a particular media stream. Events can have parameters. This
occurrence of the event: allows a single event description to have some variation in meaning
without creating large numbers of individual events. Further event
parameters are defined in the package.
Event Actions The MG shall send a Notify command to the MGC when it detects an event
______________________________________________________________________________ in the Events Descriptor. If the EventBuffer flag is "on", following
|NotifyAction | A Notify message is sent by the MG when the Event is | detection of such an event, normal handling of events is suspended, and
| | detected | any event found in the EventBuffer Descriptor which is subsequently
|____________________|_________________________________________________________| detected is added to the end of a FIFO queue, along with the time that
|AccumulateByValue | The Event is added to the Event Buffer | it was detected. A command containing an Events Descriptor which is
|____________________|_________________________________________________________| received when the EventBuffer flag is on causes the following sequence
|AccumulateByDigitMap| The Event is processed by the specified Digit Map | to be executed:
|____________________|_________________________________________________________|
When Accumulate by Digit Map is specified in an Action, a Digit Map or 1. The first event in the FIFO queue is examined. If it is in the
the name of a pre- stored DigitMap is specified with the Action parame- Events listed in the new events descriptor, the MG shall send a
ter. For example: Notify command to the MGC and remove the event from the FIFO queue.
The time stamp of the Notify shall be the time the event was actu-
ally detected.
Event=1139 { Line/DTMF {ACTION=AccumulateByDigitMap{GenMap} } } 2. If the event is not in the new Events Descriptor, it shall be dis-
carded.
An Action can also include an Embedded Signals descriptor or an Embedded 3. If the queue is empty, the sequence shall be stopped, and normal
Events Descriptor which, if present, is used as a replacement for the event processing shall be resumed. If there are any events remain-
current Signals/Events descriptor. It is possible, for example, to ing in the queue, the sequence repeats.
If the EventBuffer flag is off when the new Events Descriptor is
received, the queue is flushed, and no events are added to it. The
default state of EventBuffer is off.
Internet draft MEGACO Protocol January 27, 2000
Normally, detection of an event shall cause any active signals to stop.
When KeepActive is specified in the event, the MG shall not interrupt
any signals active on the Termination on which the event is detected.
An event can include an Embedded Signals descriptor and/or an Embedded
Events Descriptor which, if present, replaces the current Signals/Events
descriptor when the event is detected. It is possible, for example, to
specify that the dial-tone Signal be generated when an off-hook Event is specify that the dial-tone Signal be generated when an off-hook Event is
detected, or that the dial-tone Signal be stopped when a digit is detected, or that the dial-tone Signal be stopped when a digit is
detected. If no embedded Signals descriptor is specified, the produc- detected. A media gateway controller shall not send EventsDescriptors
tion of Signals continues as specified in the command. with an event both marked KeepActive and containing an embedded Sig-
nalsDescriptor.
Only one level of embedding is permitted. An embedded Signals Descrip- Only one level of embedding is permitted. An embedded EventsDescriptor
tor SHALL NOT contain another embedded Signals Descriptor. Similarly, SHALL NOT contain another embedded EventsDescriptor.
An embedded Events Descriptor SHALL NOT contain another embedded Events
Descriptor.
Internet draft MEGACO Protocol September 21, 1999 An Events Descriptor received by a media gateway replaces any previous
Events Descriptor. Event notification in process shall complete, and
events detected after the command containing the new EventsDescriptor
executes, shall be processed according to the new EventsDescriptor.
7.1.10. EventBuffer Descriptor
The EventBuffer Descriptor contains a list of events, with their parame-
ters if any, that the MG is requested to detect and buffer when no
Events Descriptor is active (See 7.1.9).
7.1.11. Signals Descriptor 7.1.11. Signals Descriptor
A SignalsDescriptor is a parameter that contains the set of signals that A SignalsDescriptor is a parameter that contains the set of signals that
the Media Gateway is asked to apply to a Termination. Signals are named the Media Gateway is asked to apply to a Termination. A SignalsDescrip-
with a Package name (where the signal is defined) and a SignalID. tor contains a number of signals and/or sequential signal lists. A Sig-
nalsDescriptor may contain zero signals and sequential signal lists.
Support of sequential signal lists is optional.
Signals are defined in packages. Signals shall be named with a Package
name (in which the signal is defined) and a SignalID. No wildcard shall
be used in the SignalID. Signals that occur in a SignalsDescriptor have
an optional StreamID parameter (default is 0, to indicate that the sig-
nal is not related to a particular media stream), an optional signal
type (see below), an optional duration and possibly parameters defined
in the package that defines the signal. This allows a single signal to
have some variation in meaning, obviating the need to create large
numbers of individual signals. Finally, there is an optional parameter
"notifyCompletion" that allows a MGC to request being notified of com-
pletion of the signal. The value of this parameter is a RequestIdentif-
ier, allowing the MGC to correlate the Notify with the corresponding
signal.
Internet draft MEGACO Protocol January 27, 2000
The duration is an integer value that is expressed in hundredths of a
second.
There are three types of signals: There are three types of signals:
* on/off - the signal lasts until it is turned off, * on/off - the signal lasts until it is turned off,
* timeout - the signal lasts until it is turned off or a specific * timeout - the signal lasts until it is turned off or a specific
period of time elapses, period of time elapses,
* brief - the signal duration is so short that it will stop on its * brief - the signal duration is so short that it will stop on its
own unless a new signal is applied that causes it to stop; no own unless a new signal is applied that causes it to stop; no
timeout value is needed. timeout value is needed.
Signals can have parameters. This allows a single signal description to If the signal type is specified in a SignalsDescriptor, it overrides the
have some variation in meaning without creating large numbers of indivi- default signal type (see Section 12.1.4). If duration is specified for
dual signals. A common use for this capability is to produce signals an on/off signal, it SHALL be ignored.
such as dialtone that have national variants.
Signal{ Line/Dialtone{US} } A sequential signal list consists of a signal list identifier, a
sequence of signals to be played sequentially, and a signal type. Only
the trailing element of the sequence of signals in a sequential signal
list may be an on/off signal. If the trailing element of the sequence
is an on/off signal, the signal type of the sequential signal list shall
be on/off as well. If the sequence of signals in a sequential signal
list contains signals of type timeout and the trailing element is not of
type on/off, the type of the sequential signal list SHALL be set to
timeout. The duration of a sequential signal list with type timeout is
the sum of the durations of the signals it contains. If the sequence of
signals in a sequential signal list contains only signals of type brief,
the type of the sequential signal list SHALL be set to brief. A signal
list is treated as a single signal of the specified type when played
out.
A new SignalDescriptor replaces any existing SignalDescriptor. Any sig- Multiple signals and sequential signal lists in the same SignalsDescrip-
nals applied to the Termination not in the replacement descriptor are tor shall be played simultaneously.
stopped, and new signals are applied.
7.1.12. RequestedInfo Descriptor Signals are defined as proceeding from the termination towards the exte-
rior of the Context unless otherwise specified in a package. When the
same Signal is applied to multiple Terminations within one Transaction,
the MG should consider using the same resource to generate these Sig-
nals.
Audit commands (AuditValue and AuditCapabilities) may specify what Production of a Signal on a Termination is stopped by application of a
information is to be audited. The RequestedInfo Descriptor contains the new SignalsDescriptor, or detection of an Event on the Termination (see
list of descriptors to be returned from the Audit command. Possible section 7.1.9).
items in the RequestedInfo Descriptor are:
____________________ A new SignalsDescriptor replaces any existing SignalsDescriptor. Any
| TerminationState | signals applied to the Termination not in the replacement descriptor
|___________________|
Internet draft MEGACO Protocol January 27, 2000
shall be stopped, and new signals are applied. Signals present in both
the existing and replacement descriptor, with the same parameters in
both, shall be continued. If the replacement descriptor contains a
sequential signal list with the same identifier as the existing descrip-
tor, then
* the signal type and sequence of signals in the sequential signal
list in the replacement descriptor shall be ignored, and
* the playing of the signals in the sequential signal list in the
existing descriptor shall not be interrupted.
If the MGC requested notification of completion for a signal, a Notify
command SHALL be sent by the MG upon completion of that signal. A
Notify triggered by completion of a signal SHALL NOT affect the state of
the eventbuffer or any active events descriptor.
7.1.12. Audit Descriptor
Specifies what information is to be audited. The Audit Descriptor
specifies the list of descriptors to be returned. Audit may be used in
any command to force the return of a descriptor even if the descriptor
in the command was not present, or had no underspecified parameters.
Possible items in the Audit Descriptor are:
________________
| Modem | | Modem |
|___________________| |_______________|
| Mux | | Mux |
|___________________| |_______________|
| Stream |
|___________________|
| Events | | Events |
|___________________| |_______________|
| Media |
|_______________|
| Signals | | Signals |
|___________________| |_______________|
Internet draft MEGACO Protocol September 21, 1999
| ObservedEvents | | ObservedEvents |
|___________________________| |_______________|
| DigitMap | | DigitMap |
|___________________________| |_______________|
| Statistics | | Statistics |
|___________________________| |_______________|
| Extension (e.g. X-Special)| | Packages |
|___________________________| |_______________|
| EventBuffer |
|_______________|
Internet draft MEGACO Protocol January 27, 2000
Audit may be empty, in which case, no descriptors are returned. This is
useful in Subtract, to inhibit return of statistics, especially when
using wildcard.
7.1.13. ServiceChange Descriptor 7.1.13. ServiceChange Descriptor
The ServiceChangeDescriptor contains the following parameters: The ServiceChangeDescriptor contains the following parameters:
* ServiceChangeMethod * ServiceChangeMethod
* ServiceChangeReason * ServiceChangeReason
* Port * ServiceChangeAddress
* Delay * ServiceChangeDelay
* Profile
* Version * Version
* MGCIdToTry * MGCIdToTry
* TimeStamp
See section 7.2.8
7.1.14. DigitMap Descriptor 7.1.14. DigitMap Descriptor
A DigitMap is a dialing plan resident in the Media Gateway used for A DigitMap is a dialing plan resident in the Media Gateway used for
detecting and reporting digit events received on a Termination. The detecting and reporting digit events received on a Termination. The
DigitMap Descriptor contains a DigitMap name and the DigitMap to be DigitMap Descriptor contains a DigitMap name and the DigitMap to be
assigned. A digit map may be preloaded into the MG by management action assigned. A digit map may be preloaded into the MG by management action
and referenced by name in an EventDescriptor, may be defined dynamically and referenced by name in an EventsDescriptor, may be defined dynami-
and subsequently referenced by name, or the actual digitmap itself may cally and subsequently referenced by name, or the actual digitmap itself
be specified in the EventDescriptor. may be specified in the EventsDescriptor.
DigitMaps defined in a DigitMapDescriptor can occur in any of the stan- DigitMaps defined in a DigitMapDescriptor can occur in any of the stan-
dard Termination manipulation Commands of the protocol. A DigitMap, dard Termination manipulation Commands of the protocol. A DigitMap,
once defined, can be used on all Terminations specified by the (possibly once defined, can be used on all Terminations specified by the (possibly
wildcarded) TerminationID in such a command. When a DigitMap is defined wildcarded) TerminationID in such a command. When a DigitMap is defined
dynamically in a DigitMap Descriptor: dynamically in a DigitMap Descriptor:
* A new DigitMap is created by specifying a name that is not yet * A new DigitMap is created by specifying a name that is not yet
defined. The value shall be present. defined. The value shall be present.
* A DigitMap value is updated by supplying a new value for a name * A DigitMap value is updated by supplying a new value for a name
that is already defined. that is already defined. Terminations presently using the digitmap
shall continue to use the old definition; subsequent
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
EventsDescriptors specifying the name, including any EventsDescrip-
tor in the command containing the DigitMap descriptor, shall use
the new one.
* A DigitMap is deleted by supplying an empty value for a name that * A DigitMap is deleted by supplying an empty value for a name that
is already defined. is already defined. Terminations presently using the digitmap shall
continue to use the old definition.
The collection of digits according to a DigitMap may be protected by The collection of digits according to a DigitMap may be protected by
three timers, viz. a start timer, short timer, and long timer. three timers, viz. a start timer (T), short timer (S), and long timer
(L).
1. The start timer is used prior to any digits having been dialed. 1. The start timer (T) is used prior to any digits having been dialed.
2. If the Media Gateway can determine that at least one more digit is 2. If the Media Gateway can determine that at least one more digit is
needed for a digit string to match any of the allowed patterns in needed for a digit string to match any of the allowed patterns in
the digit map, then the interdigit timer value should be set to a the digit map, then the interdigit timer value should be set to a
long duration (e.g.-16 seconds). long (L) duration (e.g.-16 seconds).
3. If the DigitMap specifies that a variable number of additional 3. If the DigitMap specifies that a variable number of additional
digits may be needed then the short timer is used. digits may be needed then the short timer (S) is used.
The timers are configurable parameters to a DigitMap. The timers are configurable parameters to a DigitMap. The Start timer
is started at the beginning of every digit map use, but can be overrid-
den.
The formal syntax of the digit map is described by the DigitMap rule in The formal syntax of the digit map is described by the DigitMap rule in
the formal syntax description of the protocol (See Annex A and Annex B). the formal syntax description of the protocol (see Annex A and Annex B).
A DigitMap, according to this syntax, is defined either by a string or A DigitMap, according to this syntax, is defined either by a string or
by a list of strings. Each string in the list is an alternative number- by a list of strings. Each string in the list is an alternative number-
ing scheme, specified either as a set of digits or timers, or as regular ing scheme, specified either as a set of digits or timers, or as regular
expression. A MG that detects digits, letters or timers while a DigitMap expression of digits and timers. Within a string, the digits "0" through
is active SHALL: "9" and letters "A" through a maximum value depending on the signalling
system concerned, but never exceeding "K", correspond to specified
events within a package which has been designated in the Events Descrip-
tor on the termination to which the digit map is being applied. (The
mapping between events and digit map symbols is defined in the documen-
tation for packages associated with channel-associated signalling sys-
tems such as DTMF, MF, or R2. Digits "0" through "9" MUST be mapped to
the corresponding digit events within the signalling system concerned.
Letters should be allocated in logical fashion, facilitating the use of
range notation for alternative events.) The letter "x" is used as a
wildcard, designating any event corresponding to symbols in the range
"0"-"9". The string may also contain explicit ranges and, more gen-
erally, explicit sets of symbols, designating alternative events any one
of which satisfies that position of the digit map.
In addition to these event symbols, the string may contain "S" and "L"
Internet draft MEGACO Protocol January 27, 2000
duration modifiers. An "L" designates a long event: placed in front of
the symbol(s) designating the event(s) which satisfy a given digit posi-
tion, it indicates that that position is satisfied only if the duration
of the event exceeds the long-duration threshold. The value of this
threshold is assumed to be provisioned in the MG. A MG that detects
digits, letters or timers while a DigitMap is active SHALL:
1. Add the event parameter to the end of an internal state variable 1. Add the event parameter to the end of an internal state variable
called the "current dial string" referred to as the "current dial string".
2. Apply the current dial string to the DigitMap, attempting a match 2. Apply the current dial string to the DigitMap, attempting a match
to each regular expression in the DigitMap in lexical order to each regular expression in the DigitMap in lexical order.
3. If the result is under-qualified (partially matches at least one 3. If the result is under-qualified (partially matches at least one
entry in the DigitMap), do nothing further. entry in the DigitMap), do nothing further.
4. If the result matches, or is over-qualified (i.e. no further digits 4. If the result matches, or is over-qualified (i.e. no further digits
could possibly produce a match), send the current dial string to could possibly produce a match), send the current dial string to
the MGC. the MGC in the digit string parameter of the completion event in
the DTMF package (see section E.4.2).
Note that unexpected timers, for example, can cause over-qualified Note that unexpected timer expiries, for example, can cause over-
matches. qualified matches. The MG shall clear the current dial string when
starting a new dial plan specified in an events descriptor or embedded
events descriptor.
As an example, consider the following dial plan:
_______________________________________________________
| 0 | Local operator |
| 00 | Long distance operator |
| xxxx | Local extension number |
| 8xxxxxxx | Local number |
| #xxxxxxx | Off-site extension |
| *xx | Star services |
| 91xxxxxxxxxx | Long distance number |
| 9011 + up to 15 digits | International number |
|__________________________|___________________________|
following digit map:
(0S| 00S|[1-7]xLxx|8Lxxxxxxx|#xxxxxxx|*xx|9L1xxxxxxxxxx|9L011x.S)
7.1.15. Statistics Descriptor 7.1.15. Statistics Descriptor
The Statistics parameter provides information describing the status and The Statistics parameter provides information describing the status and
usage of a Termination during its existence within a specific Context. usage of a Termination during its existence within a specific Context.
Internet draft MEGACO Protocol January 27, 2000
There is a set of standard statistics kept for each termination where There is a set of standard statistics kept for each termination where
appropriate (number of octets sent and received for example). The appropriate (number of octets sent and received for example). The par-
ticular statistical properties that are reported for a given Termination
are determined by the Packages realized by the Termination. By default,
statistics are reported when the Termination is Subtracted from the Con-
text. This behavior can be overridden by including an empty Audit-
Descriptor in the Subtract command. Statistics may also be returned
from the AuditValue command, or any Add/Move/Modify command using the
Audit descriptor.
Internet draft MEGACO Protocol September 21, 1999 Statistics are cumulative; reporting Statistics does not reset them.
Statistics are reset when a Termination is Subtracted from a Context.
particular statistical properties that are reported for a given Termina- 7.1.16. Packages Descriptor
tion are determined by the Packages realized by the Termination.
Statistics are reported when the Termination is Subtracted from the Con-
text. Statistics may also be returned from the AuditValue command.
7.1.16. Topology Descriptor Used only with the AuditValue command, the PackageDescriptor returns a
list of Packages realized by the Termination.
7.1.17. ObservedEvents Descriptor
ObservedEvents is supplied with the Notify command to inform the MGC of
which event(s) were detected. Used with the AuditValue command, the
ObservedEventsDescriptor returns events in the event buffer which have
not been Notified. ObservedEvents contains the RequestIdentifier of the
EventsDescriptor that triggered the notification, the event(s) detected
and the detection time(s). If a Notify is sent as a result of a signal
completion, the ObservedEventsDescriptor contains the name of the signal
that completed and the time at which it completed. Detection times are
reported with a precision of hundredths of a second. Time is expressed
in UTC.
7.1.18. Topology Descriptor
A topology descriptor is used specify flow directions between termina- A topology descriptor is used specify flow directions between termina-
tions in a conference. Contrary to the descriptors in previous sections, tions in a Context. Contrary to the descriptors in previous sections,
the topology descriptor applies to a Context instead of a Termination. the topology descriptor applies to a Context instead of a Termination.
The default topology of a Context is that is that each termination's The default topology of a Context is that each termination's transmis-
transmission is received by all other terminations. The Topology sion is received by all other terminations. The Topology Descriptor is
Descriptor optional to implement. optional to implement.
A topology descriptor consists of a sequence of triples of the form The Topology Descriptor occurs before the commands in an action. It is
(T1, T2, association). T1 and T2 specify Terminations within the Con- possible to have an action containing only a Topology Descriptor, pro-
text, possibly using the ALL wildcard. The association specifies how vided that the context to which the action applies already exists.
media flows between these to Terminations as follows.
A topology descriptor consists of a sequence of triples of the form (T1,
T2, association). T1 and T2 specify Terminations within the Context,
possibly using the ALL or CHOOSE wildcard. The association specifies
how media flows between these two Terminations as follows.
Internet draft MEGACO Protocol January 27, 2000
* (T1, T2, isolate) means that the Terminations matching T2 do not * (T1, T2, isolate) means that the Terminations matching T2 do not
receive media from the Terminations matching T1, nor vice versa. receive media from the Terminations matching T1, nor vice versa.
* (T1, T2, oneway) means that the Terminations that match T2 receive * (T1, T2, oneway) means that the Terminations that match T2 receive
media from the Terminations matching T1, but not vice versa. In media from the Terminations matching T1, but not vice versa. In
this case it is not allowed to use wildcards such that there are this case use of the ALL wildcard such that there are Terminations
Terminations that match both T1 and T2. that match both T1 and T2 is not allowed.
* (T1, T2, bothway) means that the Terminations matching T2 receive * (T1, T2, bothway) means that the Terminations matching T2 receive
media from the Terminations matching T1, and vice versa. In this media from the Terminations matching T1, and vice versa. In this
case it is allowed to use wildcards such that there are Termina- case it is allowed to use wildcards such that there are Termina-
tions that match both T1 and T2. However, if there is a Termina- tions that match both T1 and T2. However, if there is a Termina-
tion that matches both, no loopback is introduced; loopbacks are tion that matches both, no loopback is introduced; loopbacks are
created by setting the TerminationMode. created by setting the TerminationMode.
The Figure below and the Table following it show some examples of the CHOOSE wildcards may be used in T1 and T2 as well, under the following
effect of including topology descriptors in commands. restrictions:
Internet draft MEGACO Protocol September 21, 1999 * the action (see section 8) of which the topology descriptor is part
contains an Add command in which a CHOOSE wildcard is used;
* if a CHOOSE wildcard occurs in T1 or T2, then a partial name SHALL
NOT be specified.
The CHOOSE wildcard in a topology descriptor matches the TerminationID
that the MG assigns in the first Add command that uses a CHOOSE wildcard
in the same action. An existing Termination that matches T1 or T2 in
the Context to which a Termination is added, is connected to the newly
added Termination as specified by the topology descriptor. The default
association when a termination is not mentioned in the Topology descrip-
tor is bothway (if T3 is added to a context with T1 and T2 with topology
(T3,T1,oneway) it will be connected bothway to T2).
The figure below and the table following it show some examples of the
effect of including topology descriptors in actions.
Internet draft MEGACO Protocol January 27, 2000
Context 1 Context 2 Context 3 Context 1 Context 2 Context 3
+------------------+ +------------------+ +------------------+ +------------------+ +------------------+ +------------------+
| +----+ | | +----+ | | +----+ | | +----+ | | +----+ | | +----+ |
| | T2 | | | | T2 | | | | T2 | | | | T2 | | | | T2 | | | | T2 | |
| +----+ | | +----+ | | +----+ | | +----+ | | +----+ | | +----+ |
| ^ ^ | | ^ | | ^ | | ^ ^ | | ^ | | ^ |
| | | | | | | | | | | | | | | | | | | |
| +--+ +--+ | | +---+ | | +--+ | | +--+ +--+ | | +---+ | | +--+ |
| | | | | | | | | | | | | | | | | | | |
skipping to change at page 28, line 5 skipping to change at page 38, line 5
| | | | | | | | | | | | | | | | | | | |
| v | | v | | v v | | v | | v | | v v |
| +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | +----+ +----+ |
| | T1 |<-->| T3 | | | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | | | T1 |<-->| T3 | |
| +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | | +----+ +----+ |
+------------------+ +------------------+ +------------------+ +------------------+ +------------------+ +------------------+
1. T2, T3 oneway 2. T2, T3 bothway 3. T1, T2 bothway 1. T2, T3 oneway 2. T2, T3 bothway 3. T1, T2 bothway
Figure 4: Example topologies Figure 4: Example topologies
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
__________________________________________________________________________ _______________________________________________________________________
|Topology| Description | |Topology| Description |
|________|_________________________________________________________________| |_________|____________________________________________________________|
|1 | No topology descriptors. | |1 |No topology descriptors. When no topology descriptors are |
| | | | |included, all terminations have a both way connection to all|
| | When no topology descriptors included, all terminations have a | | |other terminations. | |_________|____________________________________________________________|
| | both way connection to all other terminations. | |2 |T1, T2, Isolated. Removes the connection between T1 and T2.|
|________|_________________________________________________________________| | |T3 has a both way connection with both T1 and T2. |
|2 | T1, T2, Isolated. | |_________|____________________________________________________________|
| | | |3 |T3, T2, oneway. A oneway connection from T3 to T2 (i.e. T2 |
| | Removes the connection between T1 and T2. | | |receives media flow from T3). A bothway connection between |
| | T3 has a both way connection with both T1 and T2. T1 and T2 | | |T1 and T3. |
| | have bothway connection to T3. | |_________|____________________________________________________________|
|________|_________________________________________________________________| |4 |T2, T3, oneway. A oneway connection between T2 to T3. |
|3 | T3, T2, oneway. | | |T1 and T3 remain bothway connected |
| | | |_________|____________________________________________________________|
| | A oneway connection from T3 to T2 (i.e. T2 receives media flow | |5 |T2, T3 bothway. T2 is bothway connected to T3. |
| | from T3). A bothway connection between T1 and T3. | | |This results in the same as 2. |
|________|_________________________________________________________________| |_________|____________________________________________________________|
|4 | T2, T3, oneway. | |6 |T1, T2 bothway. (T2, T3 bothway and T1,T3 bothway may be |
| | | | |implied or explicit). terminations have a bothway |
| | A oneway connection between T2 to T3. T1 and T3 remain | |_________|____________________________________________________________|
| | bothway connected |
|________|_________________________________________________________________|
|5 | T2, T3 bothway. |
| | |
| | T2 is bothway connected to T3. This results in the same as 2. |
|________|_________________________________________________________________|
|6 | T1, T2 bothway. |
| | |
| | All terminations are considered connected to each other. |
| | This is the same as 1. |
|________|_________________________________________________________________|
A topology change is performed by including a topology descriptor in an
Add or Modify command. Allowing a topology descriptor in an Add command
facilitates addition of a Termination to a Context and setting the
topology in one atomic action.
When the topology is included in the "Add" command, then either "Ter- A oneway connection must implemented in such a way that the other Termi-
minationA" or "TerminationB" shall be of value "*" to indicate the ter- nations in the Context are not aware of the change in topology.
mination being added to the context.
7.2. Command Application Programming Interface 7.2. Command Application Programming Interface
Following is an Application Programming Interface (API) describing the Following is an Application Programming Interface (API) describing the
Commands of the protocol. This API is shown to illustrate the Commands Commands of the protocol. This API is shown to illustrate the Commands
and their parameters and is not intended to specify implementation and their parameters and is not intended to specify implementation (e.g.
(e.g.-via use of blocking function calls). It will describe the input via use of blocking function calls). It describes the input parameters
parameters in parentheses after the command name and the return values in parentheses after the command name and the return values in front of
in front of the Command. This is only for descriptive purposes; the the Command. This is only for descriptive purposes; the actual Command
syntax and encoding are specified in later subsections. All parameters
Internet draft MEGACO Protocol September 21, 1999 enclosed by square brackets ([. . . ]) are considered optional.
actual Command syntax and encoding are specified in later subsections.
All parameters enclosed by square brackets ([. . . ]) are considered
optional.
7.2.1. Add 7.2.1. Add
The Add Command adds a Termination to a Context. The Add Command adds a Termination to a Context.
[TerminationID] TerminationID
[,MediaDescriptor] [,MediaDescriptor]
[,ModemDescriptor] [,ModemDescriptor]
[,MuxDescriptor] [,MuxDescriptor]
Internet draft MEGACO Protocol January 27, 2000
[,EventsDescriptor] [,EventsDescriptor]
[,SignalsDescriptor] [,SignalsDescriptor]
[,DigitMapDescriptor] [,DigitMapDescriptor]
[,ObservedEventsDescriptor] [,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor] [,StatisticsDescriptor]
[,PackagesDescriptor] [,PackagesDescriptor]
Add( TerminationID Add( TerminationID
[, MediaDescriptor] [, MediaDescriptor]
[, ModemDescriptor] [, ModemDescriptor]
[, MuxDescriptor] [, MuxDescriptor]
[, EventsDescriptor] [, EventsDescriptor]
[, SignalsDescriptor] [, SignalsDescriptor]
[, DigitMapDescriptor] [, DigitMapDescriptor]
[, AuditDescriptor] [, AuditDescriptor]
) )
The TerminationID specifies the termination to be added to the Context. The TerminationID specifies the termination to be added to the Context.
For an existing Termination, the TerminationID would be specific. For a The Termination is either created, or taken from the null Context. For
Termination which does not yet exist, the TerminationID is specified as an existing Termination, the TerminationID would be specific. For a
Choose ("$") in the command. The new TerminationID will be returned. Termination that does not yet exist, the TerminationID is specified as
Wildcards may be used in an Add, but such usage would be unusual. If CHOOSE in the command. The new TerminationID will be returned. Wild-
the wildcard matches more than one TerminationID, all possible matches cards may be used in an Add, but such usage would be unusual. If the
are attempted, with results reported for each one. The order of wildcard matches more than one TerminationID, all possible matches are
attempts when multiple TerminationIDs match is not specified. attempted, with results reported for each one. The order of attempts
when multiple TerminationIDs match is not specified.
The optional MediaDescriptor describes all media streams. The optional MediaDescriptor describes all media streams.
The optional ModemDescriptor and MuxDescriptor specify a modem and mul- The optional ModemDescriptor and MuxDescriptor specify a modem and mul-
tiplexer if applicable. For convenience, if a Multiplex Descriptor is tiplexer if applicable. For convenience, if a Multiplex Descriptor is
present in an Add command and lists any Terminations that are not present in an Add command and lists any Terminations that are not
currently in the Context, such Terminations are added to the context as currently in the Context, such Terminations are added to the context as
if individual Add commands listing the Terminations were invoked. if individual Add commands listing the Terminations were invoked. If an
error occurs on such an implied Add, error 471 - Implied Add for Multi-
plex failure shall be returned and further processing of the command
shall cease.
The EventsDescriptor parameter is optional. If present, it provides the The EventsDescriptor parameter is optional. If present, it provides the
list of events that should be detected on the Termination. list of events that should be detected on the Termination.
Internet draft MEGACO Protocol September 21, 1999
The SignalsDescriptor parameter is optional. If present, it provides The SignalsDescriptor parameter is optional. If present, it provides
the list of signals that should be applied to the Termination. the list of signals that should be applied to the Termination.
The DigitMapDescriptor parameter is optional. If present, defines a The DigitMapDescriptor parameter is optional. If present, defines a
DigitMap definition that may be used in an EventsDescriptor. DigitMap definition that may be used in an EventsDescriptor.
Internet draft MEGACO Protocol January 27, 2000
The AuditDescriptor is optional. If present, the command will return The AuditDescriptor is optional. If present, the command will return
descriptors as specified in the AuditDescriptor. descriptors as specified in the AuditDescriptor.
All descriptors that can be modified could be returned by MG if a param-
eter was underspecified or overspecified. ObservedEvents, Statistics,
and Packages, and the EventBuffer Descriptors are returned only if
requested in the AuditDescriptor. Add SHALL NOT be used on a Termina-
tion with a serviceState of "OutofService".
7.2.2. Modify 7.2.2. Modify
The Modify Command modifies the properties of a Termination. The Modify Command modifies the properties of a Termination.
[TerminationID] TerminationID
[,MediaDescriptor] [,MediaDescriptor]
[,ModemDescriptor] [,ModemDescriptor]
[,MuxDescriptor] [,MuxDescriptor]
[,EventsDescriptor] [,EventsDescriptor]
[,SignalsDescriptor] [,SignalsDescriptor]
[,DigitMapDescriptor] [,DigitMapDescriptor]
[,ObservedEventsDescriptor] [,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor] [,StatisticsDescriptor]
[,PackagesDescriptor] [,PackagesDescriptor]
Modify( TerminationID Modify( TerminationID
[, MediaDescriptor] [, MediaDescriptor]
[, ModemDescriptor] [, ModemDescriptor]
[, MuxDescriptor] [, MuxDescriptor]
[, EventsDescriptor] [, EventsDescriptor]
[, SignalsDescriptor] [, SignalsDescriptor]
[, DigitMapDescriptor] [, DigitMapDescriptor]
[, AuditDescriptor] [, AuditDescriptor]
) )
The TerminationID may be specific if a single Termination in the Context The TerminationID may be specific if a single Termination in the Context
is to be modified. Use of wildcards in the TerminationID may be is to be modified. Use of wildcards in the TerminationID may be
appropriate for some operations. If the wildcard matches more than one appropriate for some operations. If the wildcard matches more than one
TerminationID, all possible matches are attempted, with results reported TerminationID, all possible matches are attempted, with results reported
for each one. The order of attempts when multiple TerminationIDs match for each one. The order of attempts when multiple TerminationIDs match
is not specified. The "choose" option is an error, as modify may only be is not specified. The CHOOSE option is an error, as the Modify command
used on existing Terminations. may only be used on existing Terminations.
The remaining parameters to Modify are the same as those to Add. The The remaining parameters to Modify are the same as those to Add. Possi-
Media Descriptor is optional for Modify. ble return values are the same as those to Add. Modify SHALL NOT be
used on a Termination with a serviceState of "OutofService".
Internet draft MEGACO Protocol January 27, 2000
7.2.3. Subtract 7.2.3. Subtract
The Subtract Command disconnects a Termination from its Context and The Subtract Command disconnects a Termination from its Context and
Internet draft MEGACO Protocol September 21, 1999
returns statistics on the Termination's participation in the Context. returns statistics on the Termination's participation in the Context.
[TerminationID] TerminationID
[,MediaDescriptor] [,MediaDescriptor]
[,ModemDescriptor] [,ModemDescriptor]
[,MuxDescriptor] [,MuxDescriptor]
[,EventsDescriptor] [,EventsDescriptor]
[,SignalsDescriptor] [,SignalsDescriptor]
[,DigitMapDescriptor] [,DigitMapDescriptor]
[,ObservedEventsDescriptor] [,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor] [,StatisticsDescriptor]
[,PackagesDescriptor] [,PackagesDescriptor]
Subtract(TerminationID Subtract(TerminationID
[, AuditDescriptor] [, AuditDescriptor]
) )
TerminationID in the input parameters represents the Termination that is TerminationID in the input parameters represents the Termination that is
being subtracted. The TerminationID may be specific or may be a wild- being subtracted. The TerminationID may be specific or may be a wild-
card value indicating that all (or a set of related) Terminations in the card value indicating that all (or a set of related) Terminations in the
Context of the Subtract Command are to be subtracted. If the wildcard Context of the Subtract Command are to be subtracted. If the wildcard
matches more than one TerminationID, all possible matches are attempted, matches more than one TerminationID, all possible matches are attempted,
with results reported for each one. The order of attempts when multiple with results reported for each one. The order of attempts when multiple
TerminationIDs match is not specified. The "choose" option is an error, TerminationIDs match is not specified. The CHOOSE option is an error, as
as subtract may only be used on existing Terminations. the Subtract command may only be used on existing Terminations. ALL may
be used as the ContextID as well as the TerminationId in a Subtract,
which would have the effect of deleting all contexts, deleting all
ephemeral terminations, and returning all physical terminations to Null
context.
The Statistics parameter is returned to report information collected on By default, the Statistics parameter is returned to report information
the Termination or Terminations specified in the Command. The informa- collected on the Termination or Terminations specified in the Command.
tion reported applies to the Termination's or Terminations' existence in The information reported applies to the Termination's or
the Context from which it or they are being subtracted. Terminations'Termination's or Terminations' existence in the Context
from which it or they are being subtracted.
The AuditDescriptor is optional. If present, the command will return The AuditDescriptor is optional. If present, the command will return
descriptors as specified in the AuditDescriptor. descriptors as specified in the AuditDescriptor. Possible return
values are the same as those to Add.
When a provisioned Termination is Subtracted from a context, its pro-
perty values shall revert to:
Internet draft MEGACO Protocol January 27, 2000
* The default value, if specified for the property and not overridden
by provisioning or modification within the null context
* The provisioned value, if not overridden by modification in the
null context
* The last value set by a modification while the termination was in
the null context.
7.2.4. Move 7.2.4. Move
The Move Command moves a Termination to another Context from its current The Move Command moves a Termination to another Context from its current
Context in one atomic operation. Context in one atomic operation. The Move command is the only command
that refers to a Termination in a Context different from that to which
the command is applied. The Move command shall not be used to move Ter-
minations to or from the null Context.
[TerminationID] TerminationID
[,MediaDescriptor] [,MediaDescriptor]
[,ModemDescriptor] [,ModemDescriptor]
[,MuxDescriptor] [,MuxDescriptor]
[,EventsDescriptor] [,EventsDescriptor]
[,SignalsDescriptor] [,SignalsDescriptor]
[,DigitMapDescriptor] [,DigitMapDescriptor]
[,ObservedEventsDescriptor] [,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor] [,StatisticsDescriptor]
Internet draft MEGACO Protocol September 21, 1999
[,PackagesDescriptor] [,PackagesDescriptor]
Move( TerminationID Move( TerminationID
[, MediaDescriptor] [, MediaDescriptor]
[, ModemDescriptor] [, ModemDescriptor]
[, MuxDescriptor] [, MuxDescriptor]
[, EventsDescriptor] [, EventsDescriptor]
[, SignalsDescriptor] [, SignalsDescriptor]
[, DigitMapDescriptor] [, DigitMapDescriptor]
[, AuditDescriptor] [, AuditDescriptor]
) )
The TerminationID specifies the Termination to be moved. It may be The TerminationID specifies the Termination to be moved. It may be
wildcarded. If the wildcard matches more than one TerminationID, all wildcarded. If the wildcard matches more than one TerminationID, all
possible matches are attempted, with results reported for each one. The possible matches are attempted, with results reported for each one. The
order of attempts when multiple TerminationIDs match is not specified. order of attempts when multiple TerminationIDs match is not specified.
By convention, the Termination is subtracted from its previous Context. By convention, the Termination is subtracted from its previous Context.
The Context to which the Termination is moved is indicated by the target
ContextId in the Action. If the last remaining Termination is moved out
of a Context, the Context is deleted.
Internet draft MEGACO Protocol January 27, 2000
The remaining descriptors are processed as in the Modify Command. The The remaining descriptors are processed as in the Modify Command. The
AuditDescriptor with the Statistics option, for example, would return AuditDescriptor with the Statistics option, for example, would return
statistics on the Termination just prior to the Move. statistics on the Termination just prior to the Move. Possible descrip-
tors returned from Move are the same as for Add. Move SHALL NOT be used
on a Termination with a serviceState of "OutofService".
7.2.5. AuditValue 7.2.5. AuditValue
The AuditValue Command returns the current values of properties, events, The AuditValue Command returns the current values of properties, events,
signals and statistics associated with Terminations. signals and statistics associated with Terminations.
[TerminationID] TerminationID
[,MediaDescriptor] [,MediaDescriptor]
[,ModemDescriptor] [,ModemDescriptor]
[,MuxDescriptor] [,MuxDescriptor]
[,EventsDescriptor] [,EventsDescriptor]
[,SignalsDescriptor] [,SignalsDescriptor]
[,DigitMapDescriptor] [,DigitMapDescriptor]
[,ObservedEventsDescriptor] [,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor] [,StatisticsDescriptor]
[,PackagesDescriptor] [,PackagesDescriptor]
AuditValue(TerminationID, AuditValue(TerminationID,
AuditDescriptor AuditDescriptor
) )
TerminationID may be specific or wildcarded. If the wildcard matches TerminationID may be specific or wildcarded. If the wildcard matches
more than one TerminationID, all possible matches are attempted, with more than one TerminationID, all possible matches are attempted, with
results reported for each one. The order of attempts when multiple Ter- results reported for each one. The order of attempts when multiple Ter-
minationIDs match is not specified. Use of "choose" is an error. minationIDs match is not specified. If a wildcarded response is
requested, only one command return is generated, with the contents con-
taining the union of the values of all Terminations matching the wild-
card. This convention may reduce the volume of data required to audit a
group of Terminations. Use of CHOOSE is an error.
The appropriate descriptors, with the current values for the The appropriate descriptors, with the current values for the Termina-
tion, are returned from AuditValue. Values appearing in multiple
instances of a descriptor are defined to be alternate values supported,
with each parameter in a descriptor considered independent.
Internet draft MEGACO Protocol September 21, 1999 ObservedEvents returns a list of events in the EventBuffer, Packages-
Descriptor returns a list of packages realized by the Termination.
DigitMapDescriptor returns the name or value of the current DigitMap for
the Termination. DigitMap applied to the root Termination returns all
named DigitMaps in the gateway. Statistics returns the current values
of all statistics being kept on the Termination. Specifying an empty
Termination, are returned from AuditValue. ObservedEvents returns a Internet draft MEGACO Protocol January 27, 2000
list of events in the EventBuffer (BufferedEventDescriptor returns Buf-
ferMode and ProcessingMode). PackagesDescriptor returns a list of pack-
ages realized by the Termination.
AuditValue results depend on the Context, viz. Specific, null, or Audit Descriptor results in only the TerminationID being returned. This
may be useful to get a list of TerminationIDs when used with wildcard.
AuditValue results depend on the Context, viz. specific, null, or
unspecified. The TerminationID may be specific, or wildcarded. unspecified. The TerminationID may be specific, or wildcarded.
The following illustrates other information that can be obtained with The following illustrates other information that can be obtained with
the Audit Command: the Audit Command:
______________________________________________________________________________ ________________________________________________________________________
|ContextID | TerminationID| Information Obtained | |ContextID | TerminationID| Information Obtained |
|Specific | all | List of Terminations in a Context | |Specific | wildcard |Audit of matching Terminations in a Context|
|Specific | wildcard | List of matching Terminations in a Context |
|Specific | specific | Audit of a single Termination in a Context | |Specific | specific | Audit of a single Termination in a Context |
|Null | Root | Audit of Media Gateway state and events | |Null | Root | Audit of Media Gateway state and events |
|Null | all | List of all Terminations in the Media Gateway | |Null | wildcard |Audit of all matching Terminations |
|Null | wildcard | List of all matching Terminations | |Null | specific |Audit of a single Termination outside of |
|Null | specific | Audit of a single Termination in outside of any | | | |any Context |
| | Context | |All | wildcard |Audit of all matching Terminations and the |
|Unspecified| Root | Audit of Media Gateway state and events |
|Unspecified| all | List of all Terminations in the Media Gateway |
| | | and the Context(s) to which they are associated |
|Unspecified| wildcard | List of all matching Terminations and the |
| | | Context to which they are associated | | | | Context to which they are associated |
|___________|_______________|__________________________________________________| |All | Root | List of all ContextIds |
|____________|_____________|___________________________________________|
7.2.6. AuditCapabilities 7.2.6. AuditCapabilities
The AuditCapabilities Command returns the possible values of properties, The AuditCapabilities Command returns the possible values of properties,
events, signals and statistics associated with Terminations. events, signals and statistics associated with Terminations.
[TerminationID] TerminationID
[,MediaDescriptor] [,MediaDescriptor]
[,ModemDescriptor] [,ModemDescriptor]
[,MuxDescriptor] [,MuxDescriptor]
[,EventsDescriptor] [,EventsDescriptor]
[,SignalsDescriptor] [,SignalsDescriptor]
[,DigitMapDescriptor]
[,ObservedEventsDescriptor] [,ObservedEventsDescriptor]
[,EventBufferDescriptor]
[,StatisticsDescriptor] [,StatisticsDescriptor]
[,PackagesDescriptor]
AuditCapabilities(TerminationID, AuditCapabilities(TerminationID,
AuditDescriptor AuditDescriptor)
)
The appropriate descriptors, with the possible values for the Termina- The appropriate descriptors, with the possible values for the Termina-
tion are returned from AuditCapabilities. Descriptors may be repeated tion are returned from AuditCapabilities. Descriptors may be repeated
where there are multiple possible values. values. If a wildcarded
response is requested, only one command return is generated, with the
contents containing the union of the values of all Terminations matching
the wildcard. This convention may reduce the volume of data required to
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
where there are multiple possible values. audit a group of Terminations.
Interpretation of what capabilities are requested for various values of Interpretation of what capabilities are requested for various values of
ContextID and TerminationID is the same as in AuditValue. ContextID and TerminationID is the same as in AuditValue.
The EventsDescriptor returns the list of possible events on the Termina-
tion together with the list of all possible values for the
EventsDescriptor Parameters. The SignalsDescriptor returns the list of
possible signals that could be applied to the Termination together with
the list of all possible values for the Signals Parameters. Statis-
ticsDescriptor returns the names of the statistics being kept on the
termination. ObservedEventsDescriptor returns the names of active
events on the termination. DigitMap and Packages are not legal in
AuditCapability
7.2.7. Notify 7.2.7. Notify
The Notify Command allows the Media Gateway to notify the Media Gateway The Notify Command allows the Media Gateway to notify the Media Gateway
Controller of events occurring within the Media Gateway. Controller of events occurring within the Media Gateway.
Notify(TerminationID, Notify(TerminationID,
ObservedEventsDescriptor) ObservedEventsDescriptor)
The TerminationID parameter specifies the Termination issuing the Notify The TerminationID parameter specifies the Termination issuing the Notify
Command. The TerminationID shall be a fully qualified name. Command. The TerminationID shall be a fully qualified name.
The ObservedEventsDescriptor contains the RequestID and a list of events The ObservedEventsDescriptor contains the RequestID and a list of events
that the Media Gateway detected in the order that they were detected. that the Media Gateway detected in the order that they were detected.
Each event in the list is accompanied by parameters associated with the
event and an indication of the time that the event was detected. Notify
Commands shall occur only as the result of detection of an event speci-
fied by an Events Descriptor which is active on the termination con-
cerned, or as a result of completion of a signal for which the MGC
requested notification of completion.
The RequestID returns the RequestID parameter of the EventsDescriptor The RequestID returns the RequestID parameter of the EventsDescriptor
that triggered the Notify Command. It is used to correlate the notifi- that triggered the Notify Command. It is used to correlate the notifi-
cation with the request that triggered it. The events in the list must cation with the request that triggered it. The events in the list must
have been requested via the RequestedEvents parameter of the triggering have been requested via the triggering EventsDescriptor, embedded events
EventsDescriptor. The list must contain the events that were either descriptor or the triggering SignalsDescriptor.
accumulated (but not notified) or treated according to digit map (but no
match found yet) and well as the final event that triggered the detec- A Notify triggered by completion of a signal, contains the corresponding
tion or provided a final match in the digit map. Each event in the list signal name in the ObservedEventsDescriptor.
is accompanied by properties associated with the event and an indication
of the time that the event was detected. Unsolicited Notify Commands
are not possible.
7.2.8. ServiceChange 7.2.8. ServiceChange
The ServiceChange Command allows the Media Gateway to notify the Media The ServiceChange Command allows the Media Gateway to notify the Media
Internet draft MEGACO Protocol January 27, 2000
Gateway Controller that a Termination or group of Terminations is about Gateway Controller that a Termination or group of Terminations is about
to be taken out of service or has just been returned to service. It to be taken out of service or has just been returned to service. The
also allows a MGC to hand over control of a MG to another MGC. Media Gateway Controller may indicate that Termination(s) shall be taken
out of or returned to service. The Media Gateway may notify the MGC
that the capability of a Termination has changed. It also allows a MGC
to hand over control of a MG to another MGC.
[ServiceChangeDescriptor] [ServiceChangeDescriptor]
ServiceChange(TerminationID, ServiceChange(TerminationID,
ServiceDescriptor ServiceChangeDescriptor
) )
The TerminationID parameter specifies the Termination(s) that are taken The TerminationID parameter specifies the Termination(s) that are taken
out of or returned to service. Wildcarding of Termination names is out of or returned to service. Wildcarding of Termination names is per-
quite useful here, with the exception that the "choose" mechanism shall mitted, with the exception that the CHOOSE mechanism shall not be used.
not be used. Use of the "Root" TerminationID indicates a ServiceChange Use of the "Root" TerminationID indicates a ServiceChange affecting the
entire Media Gateway.
Internet draft MEGACO Protocol September 21, 1999
affecting the entire Media Gateway.
The ServiceDescriptor contains the following parameters: The ServiceChangeDescriptor contains the following parameters as
required:
* ServiceChangeMethod * ServiceChangeMethod
* ServiceChangeReason * ServiceChangeReason
* ServiceChangeDelay * ServiceChangeDelay
* Port * ServiceChangeAddress
* Profile * Profile
* Version
* MGCIdToTry * MGCIdToTry
* TimeStamp
The ServiceChangeMethod parameter specifies the type of ServiceChange The ServiceChangeMethod parameter specifies the type of ServiceChange
that will or has occurred: that will or has occurred:
1. Graceful - indicates that the specified Terminations will be taken 1) Graceful - indicates that the specified Terminations will be taken
out of service after the specified ServiceChangeDelay; established out of service after the specified ServiceChangeDelay; established
connections are not yet affected, but the Media Gateway Controller connections are not yet affected, but the Media Gateway Controller
should refrain from establishing new connections and should attempt should refrain from establishing new connections and should attempt
to gracefully tear down existing connections IP P to gracefully tear down existing connections. The MG should set
termination serviceState to "test" until the expiry of Servi-
ceChangeDelay or the removal of the termination from an active
2. Forced - indicates that the specified Terminations were taken Internet draft MEGACO Protocol January 27, 2000
context (whichever is first), then set it to "out of service".
2) Forced - indicates that the specified Terminations were taken
abruptly out of service and any established connections associated abruptly out of service and any established connections associated
with them were lost with them were lost. The MGC is responsible for cleaning up the
context (if any) with which the failed termination is associated.
At a minimum the termination shall be subtracted from the context.
The termination serviceState should be "out of service".
3. Restart - indicates that service will be restored on the specified 3) Restart - indicates that service will be restored on the specified
Terminations after expiration of the ServiceChangeDelay; the Termi- Terminations after expiration of the ServiceChangeDelay. The ser-
nations are assumed to now not be associated with any Context viceState should be set to "inService" upon expiry of Servi-
ceChangeDelay.
4. Disconnected - always applied with the Root TerminationID, indi- 4) Disconnected - always applied with the Root TerminationID, indi-
cates that the MG lost communication with the MGC, but it was sub- cates that the MG lost communication with the MGC, but it was sub-
sequently restored. Since MG state may have changed, the MGC may sequently restored. Since MG state may have changed, the MGC may
wish to use the Audit command to resynchronize its state with the wish to use the Audit command to resynchronize its state with the
MG's. MG's.
5. Handoff - sent from the MGC to the MG, this reason indicates that 5) Handoff - sent from the MGC to the MG, this reason indicates that
the MGC is going out of service and a new MGC association must be the MGC is going out of service and a new MGC association must be
established. established.
6) Failover - sent from MG to MGC to indicate the primary MG is out of
service and a secondary MG is taking over, and sent from MG to
(new) MGC in response to the MG having received a ServiceChange
with ServiceChangeMethod equal to Handoff.
The ServiceChangeReason parameter specifies the reason why the Servi- The ServiceChangeReason parameter specifies the reason why the Servi-
ceChange has or will occur. It consists of an alphanumeric token (IANA ceChange has or will occur. It consists of an alphanumeric token (IANA
registered) and an explanatory string. registered) and an explanatory string.
The optional Port parameter specifies the port number to be used for The optional ServiceChangeAddress parameter specifies the address (e.g.,
IP port number for IP networks) to be used for subsequent communica-
Internet draft MEGACO Protocol September 21, 1999 tions. It can be specified in the input parameter descriptor or the
returned result descriptor.
subsequent communications. It can be specified in the input parameter
descriptor or the returned result descriptor.
The optional ServiceChangeDelay parameter is expressed in seconds. If The optional ServiceChangeDelay parameter is expressed in seconds. If
the delay is absent or set to zero the delay value should be considered the delay is absent or set to zero, the delay value should be considered
to be null. In the case of a "graceful" ServiceChangeMethod, a null to be null. In the case of a "graceful" ServiceChangeMethod, a null
delay indicates that the Media Gateway Controller should wait for the delay indicates that the Media Gateway Controller should wait for the
natural removal of existing connections and should not establish new natural removal of existing connections and should not establish new
connections. The ServiceChangeDelay is always considered null in the connections. . For "graceful" only, null delay means the MG should set
case of the "forced" method. serviceState to "test" immediately, then wait indefinitely for the ter-
mination to be removed from any active context before setting service-
State to "out of service". For "restart", null means immediate return
to service.
The Profile parameter specifies the Profile (if any) of the protocol Internet draft MEGACO Protocol January 27, 2000
supported. The Profile includes the version of the profile supported.
A ServiceChange Command specifying the "Root" for the TerminationID is a The optional Profile parameter specifies the Profile (if any) of the
registration command by which a Media Gateway announces its existence to protocol supported. The Profile includes the version of the profile
the Media Gateway Controller. The Media Gateway is expected to be pro- supported.
visioned with the name of one primary and some number of alternate Media
Gateway Controllers. The ServiceChangeMethod shall be "forced" for this
usage. Acknowledgement of the ServiceChange Command completes the
registration process. Normally, the MG will specify the transport port
number to be used by the MGC for sending messages in the Port parameter
in the input ServiceChangeDescriptor. The MGC specifies the port number
for the MG to use in the returned result ServiceDescriptor.
The Media Gateway Controller may return a MGCIdToTry parameter that The optional Version parameter contains the protocol version and is used
if protocol version negotiation occurs (see section 11.3).
The optional TimeStamp parameter specifies the actual time as kept by
the sender. It can be used by the responder to determine how its notion
of time differs from that of its correspondent. TimeStamp is sent with a
precision of hundredths of a second, and is expressed in UTC.
A ServiceChange Command specifying the "Root" for the TerminationID and
ServiceChangeMethod equal to Restart is a registration command by which
a Media Gateway announces its existence to the Media Gateway Controller.
The Media Gateway is expected to be provisioned with the name of one
primary and optionally some number of alternate Media Gateway Controll-
ers. Acknowledgement of the ServiceChange Command completes the
registration process. The MG may specify the transport ServiceChangeAd-
dress to be used by the MGC for sending messages in the ServiceChangeAd-
dress parameter in the input ServiceChangeDescriptor. The MGC shall use
this Address, if specified, in its response to the ServiceChange command
and any subsequent commands and responses. The MGC may specify the Ser-
viceChangeAddress for the MG to use in the returned result Servi-
ceDescriptor. The MG shall use this address for any subsequent communi-
cation with the MGC. The TimeStamp parameter shall be sent with a
registration command and its response.
The Media Gateway Controller may return an MGCIdToTry parameter that
describes the Media Gateway Controller that should preferably be con- describes the Media Gateway Controller that should preferably be con-
tacted for further service by the Media Gateway. In this case the Media tacted for further service by the Media Gateway. In this case the Media
Gateway shall reissue the ServiceChange command to the new Media Gateway Gateway shall reissue the ServiceChange command to the new Media Gateway
Controller. The Gateway specified in a MGCIdToTry, if provided, shall Controller. The Gateway specified in an MGCIdToTry, if provided, shall
be contacted before any further alternate MGCs. On a HandOff message be contacted before any further alternate MGCs. On a HandOff message
from MGC to MG, the MGCIdToTry is the new MGC that will take over from from MGC to MG, the MGCIdToTry is the new MGC that will take over from
the current MGC. the current MGC.
7.2.9. Generic Command Syntax Summarizing use of properties in the ServiceChange Descriptor:
* ServiceChangeMethod mandatory in all cases.
* ServiceChangeReason mandatory in all cases.
* ServiceChangeDelay mandatory if ServiceChangeMethod is "Graceful"
or "Restart", otherwise not allowed.
* ServiceChangeAddress mandatory when the terminationID is ROOT, oth-
erwise not allowed.
Internet draft MEGACO Protocol January 27, 2000
* Profile required if terminationID is ROOT, optional otherwise.
* Version as specified in section 11.3.
* MGCIdToTry optional if the message comes from MGC and terminationID
is ROOT, not allowed otherwise.
* TimeStamp mandatory when terminationID is ROOT, optional otherwise.
The return from ServiceChange has the same parameters as the input
except that ServiceChangeMethod and ServiceChangeReason are optional.
If provided they shall be the same as those specified in the command.
The following ServiceChangeReasons are defined. This list may be
extended by an IANA registration as outlined in section 13.3
900 Service Restored
901 MG Cold Boot
902 MG Warm Boot
903 MGC Directed Change
904 Termination malfunctioning
905 Termination taken out of service
906 Loss of lower layer connectivity (e.g. downstream
sync)
907 Transmission Failure
908 MG Impending Failure
909 MGC Impending Failure
910 Media Capability Failure
911 Modem Capability Failure
912 Mux Capability Failure
913 Signal Capability Failure
914 Event Capability Failure
915 State Loss
7.2.9. Manipulating and Auditing Context Attributes
The commands of the protocol as discussed in the preceding sections
apply to terminations. This section specifies how contexts are manipu-
lated and audited.
Commands are grouped into actions (see section 8). An action applies to
one context. In addition to commands, it may contain context manipula-
tion and auditing instructions.
An action request sent to a MG may include a request to audit attributes
of a context. An action may also include a request to change the attri-
butes of a context.
Internet draft MEGACO Protocol January 27, 2000
The context properties that may be included in an action reply are used
to return information to a MGC. This can be information requested by an
audit of context attributes or details of the effect of manipulation of
a context.
If a MG receives an action which contains both a request to audit con-
text attributes and a request to manipulate those attributes, the
response SHALL include the values of the attributes after processing the
manipulation request.
7.2.10. Generic Command Syntax
The protocol can be encoded in a binary format or in a text format. The protocol can be encoded in a binary format or in a text format.
MGCs should support both encoding formats. MGs may support both for- MGCs should support both encoding formats. MGs may support both for-
mats. mats.
The protocol syntax is defined in Annex A. The protocol syntax for the binary format of the protocol is defined in
Annex A. Annex C specifies the encoding of the Local and Remote
descriptors for use with the binary format.
A complete ABNF of the text encoding of the protocol per RFC2234 is A complete ABNF of the text encoding of the protocol per RFC2234 is
given in Annex B. given in Annex B. SDP, as modified herein is used as the encoding of
the Local and Remote Descriptors for use with the text encoding.
The mechanism for binary encoding is specified in Annex C.
Internet draft MEGACO Protocol September 21, 1999
7.3. Command Error Codes 7.3. Command Error Codes
Errors consist of an IANA registered alphanumeric token and an explana- Errors consist of an IANA registered error code and an explanatory
tory string. string. Sending the explanatory string is optional. Implementations
are encouraged to append diagnostic information to the end of the
string.
The identified error codes are: When a MG reports an error to a MGC, it does so in an error descriptor.
An error descriptor consists of an error code and optionally the associ-
ated explanatory string.
Note: we need to renumber the error codes. The identified error codes are:
400 - Bad Request 400 - Bad Request
401 - Protocol Error 401 - Protocol Error
402 - Unauthorized 402 - Unauthorized
403 - Syntax Error in Transaction 403 - Syntax Error in Transaction
404 - Syntax Error in TransactionReply
405 - Syntax Error in TransactionPending
406 - Version Not Supported
410 - Incorrect identifier 410 - Incorrect identifier
411 - The transaction refers to an unknown ContextId 411 - The transaction refers to an unknown ContextId
412 - No ContextIDs available 412 - No ContextIDs available
420 - No such Event or signal in this package
421 - Unknown action or illegal combination of actions 421 - Unknown action or illegal combination of actions
Internet draft MEGACO Protocol January 27, 2000
422 - Syntax Error in Action 422 - Syntax Error in Action
430 - Unknown TerminationID 430 - Unknown TerminationID
431 - No TerminationID matched a wildcard 431 - No TerminationID matched a wildcard
432 - Out of TerminationIDs or No TerminationID available 432 - Out of TerminationIDs or No TerminationID available
433 - TerminationID is already in a Context 433 - TerminationID is already in a Context
440 - Unsupported or unknown Package 440 - Unsupported or unknown Package
441 - Missing RemoteDescriptor 441 - Missing RemoteDescriptor
442 - Syntax Error in Command 442 - Syntax Error in Command
443 - Unsupported or Unknown Command 443 - Unsupported or Unknown Command
444 - Unsupported or Unknown Descriptor 444 - Unsupported or Unknown Descriptor
445 - Descriptor not legal in this command 445 - Unsupported or Unknown Property
446 - Descriptor appears twice in a command 446 - Unsupported or Unknown Parameter
447 - Descriptor not legal in this command
448 - Descriptor appears twice in a command
450 - No such property in this package 450 - No such property in this package
451 - Parameter illegal in this Descriptor 451 - No such event in this package
453 - Parameter or Property appears twice in this Descriptor 452 - No such signal in this package
453 - No such statistic in this package
454 - No such parameter value in this package
455 - Parameter illegal in this Descriptor
456 - Parameter or Property appears twice in this Descriptor
461 - TransactionIDs in Reply do not match Request
462 - Commands in Transaction Reply do not match commands in request
463 - TerminationID of Transaction Reply does not match request
464 - Missing reply in Transaction Reply
465 - TransactionID in Transaction Pending does not match any open request
466 - Illegal Duplicate Transaction Request
467 - Illegal Duplicate Transaction Reply
471 - Implied Add for Multiplex failure
500 - Internal Gateway Error 500 - Internal Gateway Error
501 - Not Implemented 501 - Not Implemented
502 - Not ready. 502 - Not ready.
503 - Service Unavailable 503 - Service Unavailable
504 - Command Received from unauthorized entity
505 - Command Received before Restart Response
510 - Insufficient resources 510 - Insufficient resources
512 - Gateway unequipped to detect requested Event 512 - Media Gateway unequipped to detect requested Event
513 - Gateway unequipped to generate requested Signals 513 - Media Gateway unequipped to generate requested Signals
514 - Gateway cannot send the specified announcement 514 - Media Gateway cannot send the specified announcement
515 - Unsupported Media Type 515 - Unsupported Media Type
517 - Unsupported or invalid mode 517 - Unsupported or invalid mode
518 - Out of space to store digit map 518 - Event buffer full
519 - Gateway does not have a digit map 519 - Out of space to store digit map
520 - Termination is "ServiceChangeing" 520 - Media Gateway does not have a digit map
521 - Termination is "ServiceChangeing"
526 - Insufficient bandwidth 526 - Insufficient bandwidth
529 - Internal hardware failure
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
529 - Internal hardware failure" 530 - Temporary Network failure
531 - Permanent Network failure
581 - Does Not Exist 581 - Does Not Exist
8. TRANSACTIONS 8. TRANSACTIONS
Commands between the Media Gateway Controller and the Media Gateway are Commands between the Media Gateway Controller and the Media Gateway are
grouped into Transactions, each of which is identified by a Transac- grouped into Transactions, each of which is identified by a Transac-
tionID. Transactions consist of one or more Actions. An Action con- tionID. Transactions consist of one or more Actions. An Action con-
sists of a series of Commands that are limited to operating within a sists of a series of Commands that are limited to operating within a
single Context. Consequently each Action typically specifies a Contex- single Context. Consequently each Action typically specifies a Contex-
tID. However, there are two circumstances where a specific ContextID is tID. However, there are two circumstances where a specific ContextID is
skipping to change at page 38, line 52 skipping to change at page 53, line 4
| | Action 3 | | | | Action 3 | |
| | +---------+ +---------+ +---------+ | | | | +---------+ +---------+ +---------+ | |
| | | Command | | Command | | Command | | | | | | Command | | Command | | Command | | |
| | | 1 | | 2 | | 3 | | | | | | 1 | | 2 | | 3 | | |
| | +---------+ +---------+ +---------+ | | | | +---------+ +---------+ +---------+ | |
| +----------------------------------------------------+ | | +----------------------------------------------------+ |
+----------------------------------------------------------+ +----------------------------------------------------------+
Figure 5 Transactions, Actions and Commands Figure 5 Transactions, Actions and Commands
Transactions are presented as TransactionRequests. Corresponding Transactions are presented as TransactionRequests. Corresponding
responses to a TransactionRequest are received in a single reply. There
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
are two types of replies, a TransactionReply, and a TransactionPending. responses to a TransactionRequest are received in a single reply, possi-
bly preceded by a number of TransactionPending messages (see section
8.2.3).
Transactions guarantee ordered Command processing. That is, Commands Transactions guarantee ordered Command processing. That is, Commands
within a Transaction are executed sequentially. At the first failing within a Transaction are executed sequentially. Ordering of Transactions
Command in a Transaction, processing of the remaining Commands in that is NOT guaranteed - transactions may be executed in any order, or simul-
Transaction stops. If a command contains a wildcarded terminationID, taneously.
each of the actual TerminatioIDs matching the wildcard is attempted. A
response within the TransactionReply is included for each matching Ter- At the first failing Command in a Transaction, processing of the remain-
minationID, even if one or more instances generated an error. If any ing Commands in that Transaction stops. If a command contains a wild-
TerminationID matching a wildcard results in an error when executed, any carded TerminationID, the command is attempted with each of the actual
commands following the wildcarded command are not attempted. TerminationIDs matching the wildcard. A response within the Transac-
tionReply is included for each matching TerminationID, even if one or
more instances generated an error. If any TerminationID matching a
wildcard results in an error when executed, any commands following the
wildcarded command are not attempted. Commands may be marked as
"Optional" which can override this behaviour - if a command marked as
Optional results in an error, subsequent commands in the Transaction
will be executed.
A TransactionReply includes the return values for all of the Commands in A TransactionReply includes the return values for all of the Commands in
the corresponding TransactionRequest. The TransactionReply includes the the corresponding TransactionRequest. The TransactionReply includes the
return values for the Commands that were executed successfully, and the return values for the Commands that were executed successfully, and the
Command and error descriptor for any Command that failed. Transaction- Command and error descriptor for any Command that failed. Transaction-
Pending is used to periodically notify the receiver that a Transaction Pending is used to periodically notify the receiver that a Transaction
has not completed yet, but is actively being processed. has not completed yet, but is actively being processed.
Applications SHOULD implement an application level timer per transac-
tion. Expiration of the timer should cause a retransmission of the
request. Receipt of a Reply should cancel the timer. Receipt of Pending
should restart the timer.
8.1. Common Parameters 8.1. Common Parameters
8.1.1. Transaction Identifiers 8.1.1. Transaction Identifiers
Transactions are identified by a TransactionID, which is assigned by Transactions are identified by a TransactionID, which is assigned by
sender and is unique within the scope of the sender. sender and is unique within the scope of the sender.
8.1.2. Context Identifiers 8.1.2. Context Identifiers
Contexts are identified by a ContextID, which is assigned by the Media Contexts are identified by a ContextID, which is assigned by the Media
Gateway and is unique within the scope of the Media Gateway. The Media Gateway and is unique within the scope of the Media Gateway. The Media
Gateway Controller shall use the ContextID supplied by the Media Gateway Gateway Controller shall use the ContextID supplied by the Media Gateway
in all subsequent Transactions relating to that Context. The protocol in all subsequent Transactions relating to that Context. The protocol
makes reference to two distinguished values that may be used by the makes reference to a distinguished value that may be used by the Media
Media Gateway Controller when it has no ContextID to use in a Transac-
tion:
1. The "null" Context, which is used to refer to a Termination that is Internet draft MEGACO Protocol January 27, 2000
currently not associated with a Context.
2. The "unspecified" Context, which is used to request that the Media Gateway Controller when referring to a Termination that is currently not
Gateway create a new Context. associated with a Context, namely the null ContextID.
The CHOOSE wildcard is used to request that the Media Gateway create a
new Context. The MGC shall not use partially specified ContextIDs con-
taining the CHOOSE wildcard. The MGC may use the ALL wildcard to
address all Contexts on the MG.
8.2. Transaction Application Programming Interface 8.2. Transaction Application Programming Interface
Following is an Application Programming Interface (API) describing the Following is an Application Programming Interface (API) describing the
Transactions of the protocol. This API is shown to illustrate the Tran- Transactions of the protocol. This API is shown to illustrate the Tran-
sactions and their parameters and is not intended to specify implementa- sactions and their parameters and is not intended to specify implementa-
tion (e.g.-via use of blocking function calls). It will describe the tion (e.g. via use of blocking function calls). It will describe the
Internet draft MEGACO Protocol September 21, 1999
input parameters and return values expected to be used by the various input parameters and return values expected to be used by the various
Transactions of the protocol from a very high level. Transaction syntax Transactions of the protocol from a very high level. Transaction syntax
and encodings are specified in later subsections. and encodings are specified in later subsections.
8.2.1. TransactionRequest 8.2.1. TransactionRequest
The TransactionRequest is invoked by the sender. There is one Transac- The TransactionRequest is invoked by the sender. There is one Transac-
tion per request invocation. A request contains one or more Actions, tion per request invocation. A request contains one or more Actions,
each of which specifies its target Context and one or more Commands per each of which specifies its target Context and one or more Commands per
Context. Context.
skipping to change at page 40, line 29 skipping to change at page 54, line 43
ContextID {Command ... Command}, ContextID {Command ... Command},
. . . . . .
ContextID {Command ... Command } }) ContextID {Command ... Command } })
The TransactionID parameter must specify a value for later correlation The TransactionID parameter must specify a value for later correlation
with the TransactionReply or TransactionPending response from the with the TransactionReply or TransactionPending response from the
receiver. receiver.
The ContextID parameter must specify a value to pertain to all Commands The ContextID parameter must specify a value to pertain to all Commands
that follow up to either the next specification of a ContextID parameter that follow up to either the next specification of a ContextID parameter
or the end of the TransactionRequest, whichever comes first. The Con- or the end of the TransactionRequest, whichever comes first.
textID may be specific, unspecified, or null.
The Command parameter represents one of the Commands mentioned in the The Command parameter represents one of the Commands mentioned in the
"Command Details" subsection titled "Application Programming Interface". "Command Details" subsection titled "Application Programming Interface".
8.2.2. TransactionReply 8.2.2. TransactionReply
The TransactionReply is invoked by the receiver. There is one reply The TransactionReply is invoked by the receiver. There is one reply
invocation per transaction. A reply contains one or more Actions, each invocation per transaction. A reply contains one or more Actions, each
of which must specify its target Context and one or more Responses per of which must specify its target Context and one or more Responses per
Context. Context.
Internet draft MEGACO Protocol January 27, 2000
TransactionReply(TransactionID { TransactionReply(TransactionID {
ContextID { Response ... Response }, ContextID { Response ... Response },
. . . . . .
ContextID { Response ... Response } }) ContextID { Response ... Response } })
The TransactionID parameter must specify a keyword value for correlation The TransactionID parameter must be the same as that of the correspond-
with the corresponding TransactionRequest from the sender. ing TransactionRequest.
The ContextID parameter must specify a value to pertain to all Responses The ContextID parameter must specify a value to pertain to all Responses
for the action. The ContextID may be specific or null. for the action. The ContextID may be specific or null.
Internet draft MEGACO Protocol September 21, 1999
Each of the Response parameters represents a return value as mentioned Each of the Response parameters represents a return value as mentioned
in Section 7.2, or an error descriptor if the command execution encoun- in section 7.2, or an error descriptor if the command execution encoun-
tered an error. Commands after the point of failure are not processed tered an error. Commands after the point of failure are not processed
and, therefore, Responses are not issued for them. and, therefore, Responses are not issued for them.
An exception to this occurs if a command has been marked as optional in
the Transaction request. If the optional command generates an error,
the transaction still continues to execute, so the Reply would, in this
case, have Responses after an Error.
If the receiver encounters an error in processing a ContextID, the If the receiver encounters an error in processing a ContextID, the
requested Action response will consist of the context ID and a single requested Action response will consist of the context ID and a single
error descriptor. error descriptor, 422 Syntax Error in Action.
If the receiver encounters an error such that it cannot determine a If the receiver encounters an error such that it cannot determine a
legal Action, it will return a TransactionReply consisting of the Tran- legal Action, it will return a TransactionReply consisting of the Tran-
sactionID and a single error descriptor. sactionID and a single error descriptor, 422 Syntax Error in Action. If
the end of an action cannot be reliably determined but one or more
Actions can be parsed, it will process them and then send 422 Syntax
Error in Action as the last action for the transaction.If the receiver
encounters an error such that is cannot determine a legal Transaction,
it will return a TransactionReply with a null TransactionID and a single
error descriptor (403 Syntax Error in Transaction).
If the receiver encounters an error such that is cannot determine a If the end of a transaction can not be reliably determined and one or
legal Transaction, it will return a TransactionReply with a null Tran- more Actions can be parsed, it will process them and then return 403
sactionID and a single error descriptor. Syntax Error in Transaction as the last action reply for the transac-
tion. If no Actions can be parsed, it will return 403 Syntax Error in
Transaction as the only reply
If the terminationID cannot be reliably determined it will send 442 Syn-
tax Error in Command as the action reply.
If the end of a command cannot be reliably determined it will return 442
Syntax Error in Transaction as the reply to the last action it can
parse.
Internet draft MEGACO Protocol January 27, 2000
8.2.3. TransactionPending 8.2.3. TransactionPending
The receiver invokes the TransactionPending. A TransactionPending indi- The receiver invokes the TransactionPending. A TransactionPending indi-
cates that the Transaction is actively being processed, but has not been cates that the Transaction is actively being processed, but has not been
completed. It is used to prevent the sender from assuming the Transac- completed. It is used to prevent the sender from assuming the Transac-
tionRequest was lost where the Transaction will take some time to com- tionRequest was lost where the Transaction will take some time to com-
plete. plete.
TransactionPending(TransactionID { } ) TransactionPending(TransactionID { } )
The TransactionID parameter must specify a keyword value for correlation The TransactionID parameter must must be the same as that of the
with the corresponding TransactionRequest from the sender. A property corresponding TransactionRequest. A property of root (normalMGExecu-
of root (normalMGExecutionTime) is settable by the MGC to indicate the tionTime) is settable by the MGC to indicate the interval within which
interval within which the MGC expects a response to any transaction from the MGC expects a response to any transaction from the MG. Another pro-
the MG. Another property (normalMGCExecutionTime) is settable by the perty (normalMGCExecutionTime) is settable by the MGC to indicate the
MGC to indicate the interval within which the MG should expects a interval within which the MG should expects a response to any transac-
response to any transaction from the MGC. Senders may receive more than tion from the MGC. Senders may receive more than one TransactionPending
one TransactionPending for a command. for a command. If a duplicate request is received when pending, the
responder may send a duplicate pending immediately, or continue waiting
for its timer to trigger another Transaction Pending.
8.3. Messages 8.3. Messages
Multiple Transactions can be concatenated into a Message. Messages have Multiple Transactions can be concatenated into a Message. Messages have
a header, which includes the identity of the sender. The Message Iden- a header, which includes the identity of the sender. The Message Iden-
tifier (MID) of a message is set to a provisioned name (e.g. domain tifier (MID) of a message is set to a provisioned name (e.g. domain
address/domain name/device name) of the entity transmitting the message. address/domain name/device name) of the entity transmitting the message.
Domain name is a suggested default. Domain name is a suggested default.
Every Message contains a Version Number identifying the version of the Every Message contains a Version Number identifying the version of the
protocol the message conforms to. Versions are defined as in RFC2145, protocol the message conforms to. Versions are defined as in RFC2145,
and consist of a major/minor version with one or two digits each. and consist of one or two digits.
Internet draft MEGACO Protocol September 21, 1999 The transactions in a message are treated independently. There is no
order implied, there is no application or protocol acknowledgement of a
message.
9. TRANSPORT 9. TRANSPORT
The transport mechanism for the protocol should allow the reliable tran- The transport mechanism for the protocol should allow the reliable tran-
sport of transactions between an MGC and MG. The transport shall remain sport of transactions between an MGC and MG. The transport shall remain
independent of what particular commands are being sent and shall be independent of what particular commands are being sent and shall be
applicable to all application states. There are several transports applicable to all application states. There are several transports
defined for the protocol, which are defined in normative Annexes to this defined for the protocol, which are defined in normative Annexes to this
document. Additional Transports may be defined as additional annexes in document. Additional Transports may be defined as additional annexes in
subsequent editions of this document, or in separate documents. subsequent editions of this document, or in separate documents. For
transport of the protocol over IP, MGCs shall implement both TCP and
The MG is provisioned with a DNS name or IP address of a primary and Internet draft MEGACO Protocol January 27, 2000
zero or more secondary MGCs (see section 7.2.8) which is the address the
MG uses to send messages to the MGC. The MGC receives the Servi- UDP/ALF, an MG shall implement TCP or UDP/ALF or both.
ceChange message from the MG and can determine the MGs IP address.
Responses to commands are sent back to the source address of the com- The MG is provisioned with a name or address (such as DNS name or IP
mands. The initial ServiceChange message should be sent to port ???? if address) of a primary and zero or more secondary MGCs (see section
using TCP and port ???? if using UDP. The ServiceChange command contains 7.2.8) that is the address the MG uses to send messages to the MGC.
a ServiceChangePort parameter. The MG specifies the TCP/UDP port number The MGC receives the ServiceChange message from the MG and can determine
it wishes the MGC to use for communication. The MGC replies with the the MGs address. Responses to commands are sent back to the source
Port set to the TCP/UDP port number it wishes the MG to use for further address of the commands. The initial ServiceChange message should be
communications. sent to the ServiceChangeAddress (in an IP network, port ???? if using
TCP and port ???? if using UDP). The ServiceChange command contains a
ServiceChangeAddress parameter. The MG specifies the address (e.g.,
TCP/UDP port number) it wishes the MGC to use for communication. The
MGC replies with the ServiceChangeAddress set to the address it wishes
the MG to use for further communications.
9.1. Ordering of Commands
This document does not mandate that the underlying transport protocol
guarantees the sequencing of transactions sent to an entity. This pro-
perty tends to maximize the timeliness of actions, but it has a few
drawbacks. For example:
* Notify commands may be delayed and arrive at the MGC after the
transmission of a new command changing the EventsDescriptor
* If a new command is transmitted before a previous one is ack-
nowledged, there is no guarantee that prior command will be exe-
cuted before the new one.
Media Gateway Controllers that want to guarantee consistent operation of
the Media Gateway may use the following rules:
1. When a Media Gateway handles several Terminations, commands per-
taining to the different Terminations may be sent in parallel, for
example following a model where each Termination (or group of Ter-
minations) is controlled by its own process or its own thread.
2. In a given Context, there should normally be at most one outstand-
ing command (Add or Modify or Move). However, a Subtract command
may be issued at any time. In consequence, a Media Gateway may
sometimes receive a Modify command that applies to a previously
subtracted Termination. Such commands should be ignored, and an
error code should be returned.
3. On a given Termination, there should normally be at most one out-
standing Notify command at any time. The RequestId parameter
should be used to correlate Notify commands with the triggering
notification request.
Internet draft MEGACO Protocol January 27, 2000
4. In some cases, an implicitly or explicitly wildcarded Subtract com-
mand that applies to a group of Terminations may step in front of a
pending Add command. The Media Gateway Controller should individu-
ally delete all connections whose completion was pending at the
time of the global Subtract command. Also, new Add commands for
Terminations named by the wild-carding (or implied in a Multiplex
descriptor) may not be sent until the wild-carded Subtract command
is acknowledged.
5. AuditValue and AuditCapability are not subject to any sequencing.
6. ServiceChange shall always be the first command sent by a MG as
defined by the restart procedure. Any other command or response
must be delivered after this ServiceChange command. These rules do
not affect the command responder, which should always respond to
commands.
9.2. Protection against Restart Avalanche
In the event that a large number of Media Gateways are powered on simul-
taneously and they were to all initiate a ServiceChange transaction, the
Media Gateway Controller would very likely be swamped, leading to mes-
sage losses and network congestion during the critical period of service
restoration. In order to prevent such avalanches, the following behavior
is suggested:
1. When a Media Gateway is powered on, it should initiate a restart
timer to a random value, uniformly distributed between 0 and a max-
imum waiting delay (MWD). Care should be taken to avoid synchroni-
city of the random number generation between multiple Media Gate-
ways that would use the same algorithm.
2. The Media Gateway should then wait for either the end of this timer
or the detection of a local user activity, such as for example an
off-hook transition on a residential Media Gateway.
3. When the timer elapses, or when an activity is detected, the Media
Gateway should initiate the restart procedure.
The restart procedure simply requires the MG to guarantee that the first
message that the Media Gateway Controller sees from this MG is a Servi-
ceChange message informing the Media Gateway Controller about the res-
tart
The value of MWD is a configuration parameter that depends on the type
of the Media Gateway. The following reasoning may be used to determine
the value of this delay on residential gateways.
Internet draft MEGACO Protocol January 27, 2000
Media Gateway Controllers 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 Media Gateway Controller
transactions between each Media Gateway and the Media Gateway Con-
troller. This simple calculation shows that the Media Gateway Con-
troller is expected to handle 5 to 6 transactions for each Termination,
every 30 minutes on average, or, to put it otherwise, about one transac-
tion per Termination every 5 to 6 minutes on average. This suggests
that a reasonable value of MWD for a residential gateway would be 10 to
12 minutes. In the absence of explicit configuration, residential gate-
ways should adopt a value of 600 seconds for MWD.
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 Terminations, and also because the usage rate of these
Terminations is much higher than 10% during the peak busy hour, a typi-
cal value being 60%. These Terminations, during the peak hour, are this
expected to contribute about one transaction per minute to the Media
Gateway Controller load. A reasonable algorithm is to make the value of
MWD per "trunk" Termination six times shorter than the MWD per residen-
tial gateway, and also inversely proportional to the number of Termina-
tions 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.
10. SECURITY CONSIDERATIONS 10. SECURITY CONSIDERATIONS
This section covers security when using the protocol in an IP environ-
ment.
10.1. Protection of Protocol Connections 10.1. Protection of Protocol Connections
A security mechanism is clearly needed to prevent unauthorized entities A security mechanism is clearly needed to prevent unauthorized entities
from using the MEGACO/H.248 protocol for setting up unauthorized calls from using the protocol defined in this document for setting up unau-
or interfering with authorized calls. The security mechanism for the thorized calls or interfering with authorized calls. The security
MEGACO/H.248 protocol is IPsec [RFC2401 to RFC2411]. mechanism for the protocol when transported over IP networks is IPsec
[RFC2401 to RFC2411].
The AH header [RFC2402] affords data origin authentication, connection- The AH header [RFC2402] affords data origin authentication, connection-
less integrity and optional anti-replay protection of messages passed less integrity and optional anti-replay protection of messages passed
between the MG and the MGC. The ESP header[RFC2406] provides all the between the MG and the MGC. The ESP header [RFC2406] provides confiden-
above security services plus confidentiality of messages, if desired. tiality of messages, if desired. For instance, the ESP encryption ser-
For instance, the ESP encryption service should be requested if the ses- vice should be requested if the session descriptions are used to carry
sion descriptions are used to carry session keys, as defined in SDP. session keys, as defined in SDP.
MEGACO/H.248 implementations employing the ESP header SHALL comply with Implementations of the protocol defined in this document employing the
section 5 of [RFC2406], which defines a minimum set of algorithms for ESP header SHALL comply with section 5 of [RFC2406], which defines a
integrity checking and encryption. Similarly, MEGACO/H.248 implementa-
tions employing the AH header SHALL comply with section 5 of [RFC2402],
which defines a minimum set of algorithms for integrity checking using
manual keys.
MEGACO/H.248 implementations SHOULD use IKE [RFC2409] to permit more Internet draft MEGACO Protocol January 27, 2000
robust keying options. MEGACO/H.248 implementations employing IKE SHOULD
support authentication with RSA signatures and RSA public key
Internet draft MEGACO Protocol September 21, 1999 minimum set of algorithms for integrity checking and encryption. Simi-
larly, implementations employing the AH header SHALL comply with section
5 of [RFC2402], which defines a minimum set of algorithms for integrity
checking using manual keys.
encryption. Implementations SHOULD use IKE [RFC2409] to permit more robust keying
options. Implementations employing IKE SHOULD support authentication
with RSA signatures and RSA public key encryption.
10.2. Interim AH-within-MEGACO/H.248 scheme 10.2. Interim AH scheme
Implementation of IPsec requires that the AH or ESP header be inserted Implementation of IPsec requires that the AH or ESP header be inserted
immediately after the IP header. This cannot be easily done at the immediately after the IP header. This cannot be easily done at the
application level. Therefore, this presents a deployment problem for application level. Therefore, this presents a deployment problem for
the MEGACO/H.248 protocol where the underlying network implementation the protocol defined in this document where the underlying network
does not support IPsec. implementation does not support IPsec.
As an interim solution, the MEGACO/H.248 protocol defines an optional AH As an interim solution, an optional AH header is defined within the
header within the MEGACO/H.248 protocol header. The header fields are MEGACO protocol header. The header fields are exactly those of the SPI,
exactly those of the SPI, SEQUENCE NUMBER and DATA fields as defined in SEQUENCE NUMBER and DATA fields as defined in [RFC2402]. The semantics
[RFC2402]. The semantics of the header fields are the same as the "tran- of the header fields are the same as the "transport mode" of [RFC2402],
sport mode" of [RFC2402], except for the calculation of the Integrity except for the calculation of the Integrity Check value (ICV). In IPsec,
Check value (ICV). In IPsec, the ICV is calculated over the entire IP the ICV is calculated over the entire IP packet including the IP header.
packet including the IP header. This prevents spoofing of the IP This prevents spoofing of the IP addresses. To retain the same func-
addresses. To retain the same functionality, the ICV calculation should tionality, the ICV calculation should be performed across the entire
be performed across the entire transaction prepended by a synthesized IP transaction prepended by a synthesized IP header consisting of a 32 bit
header consisting of a 32 bit source IP address, a 32 bit destination source IP address, a 32 bit destination address and an 16 bit UDP
address and an 16 bit UDP encoded as 10 hex digits. When the AH-within- encoded as 10 hex digits. When the interim AH mechanism is employed when
MEGACO/H.248 mechanism is employed when TCP is the transport Layer, the TCP is the transport Layer, the UDP Port above becomes the TCP port, and
UDP Port above becomes the TCP port, and all other operations are the all other operations are the same.
same.
Implementations of the MEGACO/H.248 protocol SHALL implement IPsec where Implementations of the MEGACO protocol SHALL implement IPsec where the
the underlying operating system supports IPsec. Implementations of the underlying operating system and the transport network supports IPsec.
MEGACO/H.248 protocol using IPv4 SHALL implement the interim AH-within- Implementations of the protocol using IPv4 SHALL implement the interim
MEGACO/H.248 scheme. However, this interim scheme SHALL NOT be used when AH scheme. However, this interim scheme SHALL NOT be used when the
the underlying network layer supports IPsec. IPv6 Implementations are underlying network layer supports IPsec. IPv6 implementations are
assumed to support IPsec and SHALL NOT use the AH-within- MEGACO/H.248 assumed to support IPsec and SHALL NOT use the interim AH scheme.
interim scheme.
All implementations of the AH-within-MEGACO/H.248 interim mechanism All implementations of the interim AH mechanism SHALL comply with sec-
SHALL comply with section 5 of [RFC2402] which defines a minimum set of tion 5 of [RFC2402] which defines a minimum set of algorithms for
algorithms for integrity checking using manual keys. integrity checking using manual keys.
The AH-within-MEGACO/H.248 interim scheme does not provide protection The interim AH interim scheme does not provide protection against eaves-
against eavesdropping; thus forbidding third parties from monitoring the dropping; thus forbidding third parties from monitoring the connections
connections set up by a given termination. Also, it does not provide set up by a given termination. Also, it does not provide protection
protection against replay attacks. These procedures do not necessarily against replay attacks. These procedures do not necessarily protect
protect against denial of service attacks by misbehaving MGs or mis- against denial of service attacks by misbehaving MGs or misbehaving
behaving MGCs. However, they will provide an identification of these MGCs. However, they will provide an identification of these misbehaving
misbehaving entities, which should then be deprived of their authoriza-
tion through maintenance procedures.
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
entities, which should then be deprived of their authorization through
maintenance procedures.
10.3. Protection of Media Connections 10.3. Protection of Media Connections
The protocol allows the MGC to provide MGs with "session keys" that can The protocol allows the MGC to provide MGs with "session keys" that can
be used to encrypt the audio messages, protecting against eavesdropping. be used to encrypt the audio messages, protecting against eavesdropping.
A specific problem of packet networks is "uncontrolled barge-in." This A specific problem of packet networks is "uncontrolled barge-in". This
attack can be performed by directing media packets to the IP address and 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 UDP port used by a connection. If no protection is implemented, the
packets must be decompressed and the signals must be played on the "line packets must be decompressed and the signals must be played on the "line
side". side".
A basic protection against this attack is to only accept packets from A basic protection against this attack is to only accept packets from
known sources, checking for example that the IP source address and UDP known sources, checking for example that the IP source address and UDP
source port match the values announced in the RemoteDescriptor. This source port match the values announced in the RemoteDescriptor. This
has two inconveniences: it slows down connection establishment and it has two inconveniences: it slows down connection establishment and it
can be fooled by source spoofing: can be fooled by source spoofing:
- To enable the address-based protection, the MGC must obtain the * To enable the address-based protection, the MGC must obtain the
remote session description of the egress MG and pass it to the remote session description of the egress MG and pass it to the
ingress MG. This requires at least one network roundtrip, and ingress MG. This requires at least one network roundtrip, and
leaves us with a dilemma: either allow the call to proceed without leaves us with a dilemma: either allow the call to proceed without
waiting for the round trip to complete, and risk for example, waiting for the round trip to complete, and risk for example,
"clipping" a remote announcement, or wait for the full roundtrip "clipping" a remote announcement, or wait for the full roundtrip
and settle for slower call-set-up procedures. and settle for slower call-set-up procedures.
- Source spoofing is only effective if the attacker can obtain valid * Source spoofing is only effective if the attacker can obtain valid
pairs of source destination addresses and ports, for example by pairs of source destination addresses and ports, for example by
listening to a fraction of the traffic. To fight source spoofing, listening to a fraction of the traffic. To fight source spoofing,
one could try to control all access points to the network. But one could try to control all access points to the network. But
this is in practice very hard to achieve. this is in practice very hard to achieve.
An alternative to checking the source address is to encrypt and authen- An alternative to checking the source address is to encrypt and authen-
ticate the packets, using a secret key that is conveyed during the call ticate 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 set-up procedure. This will not slow down the call set- up, and provides
strong protection against address spoofing. strong protection against address spoofing.
11. MG-MGC CONTROL INTERFACE 11. MG-MGC CONTROL INTERFACE
The control association between MG and MGC is initiated at MG cold The control association between MG and MGC is initiated at MG cold
start, and announced by a ServiceChange message, but can be changed by start, and announced by a ServiceChange message, but can be changed by
subsequent events, such as failures or manual service events. While the subsequent events, such as failures or manual service events. While the
protocol does not have an explicit mechanism to support multiple MGCs protocol does not have an explicit mechanism to support multiple MGCs
controlling a physical MG, it has been designed to support the multiple controlling a physical MG, it has been designed to support the multiple
logical MG (within a single physical MG) that can be associated with logical MG (within a single physical MG) that can be associated with
different MGCs. different MGCs.
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
11.1. Multiple Virtual MGs 11.1. Multiple Virtual MGs
A virtual MG consists of a set of statically partitioned Terminations. A physical Media Gateway may be partitioned into one or more Virtual
The model does not require that other resources be statically allocated, MGs. A virtual MG consists of a set of statically partitioned physical
just Terminations. The mechanism for allocating Terminations to virtual Terminations and/or sets of ephemeral Terminations. A physical Termina-
MGs is a management method outside the scope of the protocol. Each of tion is controlled by one MGC. The model does not require that other
the virtual MGs appears to the MGC as a complete MG client. resources be statically allocated, just Terminations. The mechanism for
allocating Terminations to virtual MGs is a management method outside
the scope of the protocol. Each of the virtual MGs appears to the MGC
as a complete MG client.
In many cases, a physical MG may have only one network interface, which A physical MG may have only one network interface, which must be shared
must be shared across virtual MGs. In such a case, the packet/cell side across virtual MGs. In such a case, the packet/cell side Termination is
Termination is shared. It should be noted however, that in use, such shared. It should be noted however, that in use, such interfaces
interfaces require an ephemeral instance of the Termination to be require an ephemeral instance of the Termination to be created per flow,
created per flow, and thus sharing the Termination is straightforward. and thus sharing the Termination is straightforward. This mechanism
This mechanism does lead to a complication, namely that the MG must does lead to a complication, namely that the MG must always know which
always know which of its controlling MGCs should be notified if an event of its controlling MGCs should be notified if an event occurs on the
occurs on the interface. interface.
In normal operation, the MG will be instructed by the MGC to create net- In normal operation, the Virtual MG will be instructed by the MGC to
work flows (if it is the originating side), or to expect flow requests create network flows (if it is the originating side), or to expect flow
(if it is the terminating side), and no confusion will arise. However, requests (if it is the terminating side), and no confusion will arise.
if an unexpected event occurs, the MG must know what to do. However, if an unexpected event occurs, the Virtual MG must know what to
do with respect to the physical resources it is controlling.
If recovering from the event requires manipulation of the interface If recovering from the event requires manipulation of a physical
state, there can be only one MGC who can do so. These issues are interface's state, only one MGC should do so. These issues are resolved
resolved by allowing any of the MGCs to create EventDescriptors to be by allowing any of the MGCs to create EventsDescriptors to be notified
notified of such events, but only one MGC can have read/write access to of such events, but only one MGC can have read/write access to the phy-
the physical interface properties; all other MGCs have read-only access. sical interface properties; all other MGCs have read-only access. The
The management mechanism is used to designate which MGC has read/write management mechanism is used to designate which MGC has read/write capa-
capability, and is designated the Master MGC. bility, and is designated the Master MGC.
Each virtual MG has its own Root Termination. In most cases the values Each virtual MG has its own Root Termination. In most cases the values
for the properties of the Root Termination are independently settable by for the properties of the Root Termination are independently settable by
each MGC. Where there can only be one value, the parameter is read-only each MGC. Where there can only be one value, the parameter is read-only
to all but the Master MGC. to all but the Master MGC.
ServiceChange may only be applied to a Termination or set of Termina-
tions partitioned to the Virtual MG or created (in the case of ephemeral
Terminations) by that Virtual MG. ServiceChange may only be applied to
the Root by the Master MGC.
11.2. Cold Start 11.2. Cold Start
A MG is pre-provisioned by a management mechanism outside the scope of A MG is pre-provisioned by a management mechanism outside the scope of
this protocol with a Primary and (optionally) an ordered list of Secon- this protocol with a Primary and (optionally) an ordered list of
dary MGCs. Upon a cold start of the MG, it will issue a ServiceChange
command with a "Restart" method, on the Root Termination to its primary
MGC. If the MGC accepts the MG, it will send a Transaction Accept, with
the MGCIdToTry set to itself. If the MG receives a MGCIdToTry not equal
to the MGC it contacted, it sends a ServiceChange to the MGC specified
in the MGCIdToTry. It continues this process until it gets a control-
ling MGC to accept its registration, or it fails to get a reply. Upon
failure to obtain a reply, either from the Primary MGC, or a designated
successor, the MG tries it's pre-provisioned Secondary MGCs, in order.
Internet draft MEGACO Protocol September 21, 1999 Internet draft MEGACO Protocol January 27, 2000
11.3. Failure of an MG Secondary MGCs. Upon a cold start of the MG, it will issue a Servi-
ceChange command with a "Restart" method, on the Root Termination to its
primary MGC. If the MGC accepts the MG, it will send a Transaction
Accept, with the MGCIdToTry set to itself. If the MG receives an MGCId-
ToTry not equal to the MGC it contacted, it sends a ServiceChange to the
MGC specified in the MGCIdToTry. It continues this process until it
gets a controlling MGC to accept its registration, or it fails to get a
reply. Upon failure to obtain a reply, either from the Primary MGC, or a
designated successor, the MG tries its pre-provisioned Secondary MGCs,
in order. If the MG is unable to establish a control relationship with
any MGC, it shall wait a random amount of time as described in section
9.2 and then start contacting its primary, and if necessary, its secon-
dary MGCs again.
It is possible that the reply to a ServiceChange with Restart will be
lost, and a command will be received by the MG prior to the receipt of
the ServiceChange response. The MG shall issue error 505 - Command
Received before Restart Response.
11.3. Negotiation of Protocol Version
The first ServiceChange command from an MG shall contain the version
number of the protocol supported by the MG in the ServiceChangeVersion
parameter. Upon receiving such a message, if the MGC supports only a
lower version, then the MGC shall send a ServiceChangeReply with the
lower version and thereafter all the messages between MG and MGC shall
conform to the lower version of the protocol. If the MG is unable to
comply, it shall reject the association, with Error 406 Version Not Sup-
ported.
If the MGC supports a higher version than the MG but is able to support
the lower version proposed by the MG, it shall send a ServiceChangeReply
with the lower version and thereafter all the messages between MG and
MGC shall conform to the lower version of the protocol. If the MGC is
unable to comply, it shall reject the association, with Error 406 Ver-
sion Not Supported.
Protocol version negotiation may also occur at "handoff" and "failover"
ServiceChanges.
11.4. Failure of an MG
If a MG fails, but is capable of sending a message to the MGC, it sends If a MG fails, but is capable of sending a message to the MGC, it sends
a ServiceChange with an appropriate method (graceful or forced) and a ServiceChange with an appropriate method (graceful or forced) and
specifies the Root TerminationID. When it returns to service, it sends specifies the Root TerminationID. When it returns to service, it sends
a ServiceChange with a "Restart" method. a ServiceChange with a "Restart" method.
Allowing the MGC to send duplicate messages to both MGs accommodates Allowing the MGC to send duplicate messages to both MGs accommodates
Internet draft MEGACO Protocol January 27, 2000
pairs of MGs that are capable of redundant failover of one of the MGs. pairs of MGs that are capable of redundant failover of one of the MGs.
Only the Working MG shall accept or reject transactions. Upon failover, Only the Working MG shall accept or reject transactions. Upon failover,
the Primary MG sends a ServiceChange command with a "Failover" method the Primary MG sends a ServiceChange command with a "Failover" method
and a "Failed MG" reason. The MGC then uses the primary MG as the and a "MG Impending Failure" reason. The MGC then uses the primary MG
active MG. When the error condition is repaired, the Working MG can as the active MG. When the error condition is repaired, the Working MG
send a "ServiceChange" with a "Restart" method. can send a "ServiceChange" with a "Restart" method.
11.4. Failure of an MGC 11.5. Failure of an MGC
If the MG detects a failure of it's controlling MGC, it attempts to con- If the MG detects a failure of its controlling MGC, it attempts to con-
tact the next MGC on its pre-provisioned list. It starts it's attempts tact the next MGC on its pre-provisioned list. It starts its attempts
at the beginning (Primary MGC), unless that was the MGC that failed, in at the beginning (Primary MGC), unless that was the MGC that failed, in
which case it starts at it's first Secondary MGC. It sends a Servi- which case it starts at its first Secondary MGC. It sends a Servi-
ceChange message with a "Failover" method and a "Failed MGC" reason. ceChange message with a "Failover" method and a " MGC Impending Failure"
reason.
In partial failure, or manual maintenance reasons, an MGC may wish to In partial failure, or manual maintenance reasons, an MGC may wish to
direct its controlled MGs to use a different MGC. To do so, it sends a direct its controlled MGs to use a different MGC. To do so, it sends a
ServiceChange method to the MG with a "HandOff" method, and it's desig- ServiceChange method to the MG with a "HandOff" method, and its desig-
nated replacement in MGCIdToTry. The MG should send a ServiceChange mes- nated replacement in MGCIdToTry. The MG should send a ServiceChange mes-
sage with a "Forced" method and a "MGC directed change" reason to the sage with a "Failover" method and a "MGC directed change" reason to the
designated MGC. If it fails to get a reply, or fails to see an Audit designated MGC. If it fails to get a reply, or fails to see an Audit
command subsequently, it should behave as if it's MGC failed, and start command subsequently, it should behave as if its MGC failed, and start
contacting secondary MGCs. contacting secondary MGCs. If the MG is unable to establish a control
relationship with any MGC, it shall wait a random amount of time as
described in section 9.2 and then start contacting its primary, and if
necessary, its secondary MGCs again.
When the MGC initiates a HandOff, the handover should be transparent to No recommendation is made on how the MGCs involved in the Handoff main-
Operations on the Media Gateway. Commands in progress continue, tran- tain state information; this is considered to be out of scope of this
saction replies are sent to the new MGC, and the MG should expect out- recommendation. The MGC and MG may take the following steps when Handoff
standing transaction replies from the new MGC. All connections should occurs. When the MGC initiates a HandOff, the handover should be tran-
stay up. sparent to Operations on the Media Gateway. Transactions can be exe-
cuted in any order, and could be in progress when the ServiceChange is
executed. Accordingly, commands in progress continue, transaction
replies are sent to the new MGC (after a new control association is
established), and the MG should expect outstanding transaction replies
from the new MGC. No new messages shall be sent to the new MGC until
the control association is established. Repeated transaction requests
shall be directed to the new MGC. The MG shall maintain state on all
terminations and contexts.
It is possible that the MGC could be implemented in such a way that a It is possible that the MGC could be implemented in such a way that a
failed MGC is replaced by a working MGC where the identity of the new failed MGC is replaced by a working MGC where the identity of the new
MGC is the same as the failed one. In such a case, MGCIdToTry would be MGC is the same as the failed one. In such a case, MGCIdToTry would be
specified with the previous value. In such a case, the MG shall behave specified with the previous value and the MG shall behave as if the
as if the value was changed, and send a ServiceChange message, as above. value was changed, and send a ServiceChange message, as above.
failover by the above mechanism. Internet draft MEGACO Protocol January 27, 2000
Internet draft MEGACO Protocol September 21, 1999 Pairs of MGCs that are capable of redundant failover can notify the con-
trolled MGs of the failover by the above mechanism.
12. PACKAGE DEFINITION 12. PACKAGE DEFINITION
The primary mechanism for extension is by means of Packages. Packages The primary mechanism for extension is by means of Packages. Packages
define additional Properties, Events, Signals and Statistics that may define additional Properties, Events, Signals and Statistics that may
occur on Terminations. occur on Terminations.
Packages defined by IETF will appear in separate RFCs. Packages defined by IETF will appear in separate RFCs.
Packages relevant to H.323 systems are listed in an Annex to Recommenda- Packages relevant to H.323 systems are listed in an Annex to Recommenda-
tion H.323. tion H.323.
Packages defined by ITU-T will be described in Annexes to H.248. Packages defined by ITU-T will be described in Annexes to H.248.
12.1. Guidelines for defining packages 1) A public document or a standard forum document, which can be refer-
enced as the document that describes the package following the
Packages define properties, events, signals and statistics. Names of guideline above, should be specified.
all such defined constructs shall consist of the ID of the package, the
character "/" and the ID of the item, for example, "tone/ring". A Pack-
age shall contain the following sections:
1. Full Package name, PackageID, and description. PackageIDs shall be
a string of up to 64 characters, containing no spaces, and consist-
ing of alphas and digits, and possibly including the special char-
acter underscore ("_"). The PackageID is used in a TerminationSta-
teDescriptor, or the LocalControl Descriptor, for example,
"tone/dialtone" specifies a signal "dialtone" in the package
"tone". The Package name is descriptive only.
2. Properties defined by the package, specifying a Property name, Pro-
pertyID, possible values, and description. PropertyID shall be a
string of up to 64 characters, containing no spaces, and consisting
of alphas and digits, and possibly including the special character
underscore ("_"). The PropertyID is used in a TerminationSta-
teDescriptor, or the LocalControl Descriptor. For example
"foo/color" specifies the "color" property defined in the package
"foo". The Property name is descriptive only.
3. Events defined by the package, specifying an Event name, EventID,
possible Parameter names, ParameterIDs and possible values for each
parameter. EventIDs and ParameterIDs shall be a string of up to 64
characters, containing no spaces, and consisting of alphas and
digits, and possibly including the special character underscore
("_"). EventIDs and PropertyIDs are used in an Event Descriptor.
For example "line/offhook" specifies the "offhook" event defined in
the "line" package. The Event name is descriptive only.
4. Signals defined by the package, specifying a Signal name, SignalID,
possible Parameter names, ParameterIDs and possible values for each
Internet draft MEGACO Protocol September 21, 1999
parameter. SignalID and ParameterIDs shall be a string of up to 64
characters, containing no spaces, and consisting of alphas and
digits, and possibly including the special character underscore
("_"). SignalID and PropertyIDs are used in a Signal Descriptor.
The Signal name is descriptive only.
5. Statistics defined by the package, specifying a Statistic name,
StatisticID, units, and description. StatisticID shall be a string
of up to 64 characters, containing no spaces, and consisting of
alphas and digits, and possibly including the special character
underscore ("_"). The StatisticID is used in a Statistics Descrip-
tor. The Statistic name is descriptive only.
12.2. Example Package
Section 1. DTMF Package
PackageID: dtmf
Description: This package is used to detect and generate tones
on the analog trunk or line connection on a media gateway.
Section 2. Properties
2.1 Media Gateway Country Code
PropertyID: mgcountry
Possible values: 3 character string
Description: Country code from ITU??????
Section 3. Events
3.1 ToneDetected
EventID: tonedt
Parameters:
3.1.2 Stream ID 2) The document shall specify the version of the Package that it
describes.
ParameterID: streamid 3) The document should be available on a public web server and should
have a stable URL. The site should provide a mechanism to provide
comments and appropriate responses should be returned.
Direction: IN 12.1. Guidelines for defining packages
Possible Values: Integer in the range of 0-256 Packages define Properties, Events, Signals, and Statistics.
Internet draft MEGACO Protocol September 21, 1999 Names of all such defined constructs shall consist of the PackageID
(which uniquely identifies the package) and the ID of the item (which
uniquely identifies the item in that package). In the text encoding the
two shall be separated by a forward slash ("/") character. Example:
togen/playtone is the text encoding to refer to the play tone signal in
the tone generation package.
Description: id of audio stream to detect tones A Package will contain the following sections:
on.
3.1.3 Detected Tone List 12.1.1. Package Overall description of the package, specifying:
ParameterID: listoftones Package Name: only descriptive,
Direction: IN/OUT PackageID: Is an identifier, its text encoding may not be a key-
word in the base protocol Description:
Possible Values: a string (max 64 characters) Version: A new version of a package can only add additional
consisting of the characters '0', '1', '2',
'3', '4', '5', '6', '7', '8', '9', '*', '#',
'A', 'B', 'C', 'D', 'X', '/'
Description: one or more dtmf tones (to be) Internet draft MEGACO Protocol January 27, 2000
detected, separated by '/'
Example: "0/1/2/3/4/5/6/7/8/9/*/#". Properties, Events, Signals, Statistics and new possible values for
an existing parameter described in the original package. No dele-
tions or modifications shall be allowed. A version is an integer in
the range from 1 to 99.
3.1.4 Event Type Extends (Optional): A package may extend an existing package. The
version of the original package must be specified. When a package
extends another package it shall only add additional Properties,
Events, Signals, Statistics and new possible values for an existing
parameter described in the original package. An extended package
shall not redefine or overload a name defined in the original pack-
age. Hence, if package B version 1 extends package A version 1,
version 2 of B will not be able to extend the A version 2 if A ver-
sion 2 defines a name already in B version 1.
ParameterID: eventtype 12.1.2. Properties
Direction: OUT Properties defined by the package, specifying:
Property Name: only descriptive.
PropertyID: Is an identifier
Description:
Type: One of:
String: UTF-8 string
Integer: 4 byte signed integer
Double: 8 byte signed integer
Character: Unicode UTF-8 encoding of a single letter.
Could be more than one octet.
Enumeration: One of a list of possible unique values
(See 12.3)
Sub-list: A list of several values from a list
Boolean
Possible Values: Possible Values:
Defined in: Which descriptor the property is defined in.
LocalControl is for stream dependent properties.
TerminationState is for stream independent properties.
Characteristics: Read / Write or both, and (optionally), global:
Indicates whether a property is read-only, or read-write,
and if it is global. If Global is omitted, the property
is not global. If a property is declared as global,
the value of the property is shared by all terminations
realizing the package.
"MULTI": multiple digits have been accumu- 12.1.3. Events
lated and sent.
"START": one tone start detected
"LONG": one tone has been detected for
more than 2 seconds
"END': one tone end detected.
Description: What kind of detection has
occurred
3.2.2 Duration
ParameterID: duration
Direction: OUT
Internet draft MEGACO Protocol September 21, 1999
Possible Values: Integer (32 bit)
Description: When eventtype is END, the length
of the tone detected
Description: Detects a DTMF tone. Reports stream and
which tone was detected.
3.2 SilenceDetected
EventID: silencedt
Parameters:
3.2.1 Stream ID
ParameterID: streamid
Direction: IN
Possible Values: Integer in the range of 0-256
Description: id of audio stream to detect tones
on.
3.2.2 Duration
ParameterID: duration
Direction: IN/OUT
Possible Values: Integer (32 bit)
Description: How many ms to wait before
trigger
Description: This event is triggered after a
period of silence has occurred.
Section 4. Signals
4.1 Play Tones
SignalID: playtone
Parameters:
4.1.1 Stream ID
Internet draft MEGACO Protocol September 21, 1999 Events defined by the package, specifying:
ParameterID: streamid Internet draft MEGACO Protocol January 27, 2000
Direction: IN Event name: only descriptive.
EventID: Is an identifier
Description:
EventsDescriptor Parameters:
Parameters used by the MGC to configure the event,
and found in the EventsDescriptor. See section 12.2
ObservedEventsDescriptor Parameters:
Parameters returned to the MGC in Notify requests
and in replies to command requests from the MGC that
audit ObservedEventsDescriptor, and found in the
ObservedEventsDescriptor. See section 12.2
Possible Values: Integer in the range of 0-256 12.1.4. Signals
Description: id of audio stream to play tones Signals defined by the package, specifying:
on. Signal Name: only descriptive.
SignalID: Is an identifier. SignalID is used in a
SignalsDescriptor
Description
SignalType: One of:
OO (On/Off)
TO (TimeOut)
BR (Brief)
4.1.2 Tone List Note: SignalType may be defined such that it is dependent on the value
of one or more parameters. Signals that would be played with SignalType
BR should have a default duration. The package has to define the default
duration and signalType.
ParameterID: listoftones Duration: in hundredths of seconds
Additional Parameters: See section 12.2
Direction: IN/OUT 12.1.5. Statistics
Possible Values: a string (max 64 characters) Statistics defined by the package, specifying:
consisting of the Characters '0', '1', '2', Statistic name: only descriptive.
'3', '4', '5', '6', '7', '8', '9', '*', '#', StatisticID: Is an identifier
'A', 'B', 'C', 'D', 'X', '/' StatisticID is used in a StatisticsDescriptor
Description
Units: unit of measure, e.g. milliseconds, packets
Description: one or more dtmf tones to be 12.1.6. Procedures
played, separated by '/'
Example: "0/1/2/3/4/5/6/7/8/9/*/#". Additional guidance on the use of the package.
4.1.3 Signal Type Internet draft MEGACO Protocol January 27, 2000
ParameterID: signaltype 12.2. Guidelines to defining Properties, Statistics and Parameters to
Events and Signals.
Parameter Name: only descriptive
ParameterID: Is an identifier
Type: One of:
String: UTF-8 octet string
Integer: 4 octet signed integer
Double: 8 octet signed integer
Character: Unicode UTF-8 encoding of a single letter.
Could be more than one octet.
Enumeration: One of a list of possible unique
values (See 12.3)
Sub-list: A list of several values from a list
Boolean
Possible values: Possible values:
Description:
"BR" brief duration (provisioned) 12.3. Lists
"ON" Play until instructed to stop
"TO" Play until timed out
4.1.4 Duration
ParameterID: duration
Direction: IN/OUT
Possible Values: Integer (32 bit)
Description: If signalType is TO, How many ms Possible values for parameters include enumerations. Enumerations may
be defined in a list. It is recommended that the list be IANA
registered so that packages that extend the list can be defined without
concern for conflicting names.
Internet draft MEGACO Protocol September 21, 1999 12.4. Identifiers
to play each tone Identifiers in text encoding shall be strings of up to 64 characters,
containing no spaces, starting with an alphanumeric character and con-
sisting of alphanumeric characters and / or digits, and possibly includ-
ing the special character underscore ("_"). Identifiers in binary
encoding are 2 octets long. Both text and binary values shall be speci-
fied for each identifier, including identifiers used as values in
enumerated types.
12.3. Package Registration 12.5. Package Registration
A package can be registered with IANA for interoperability reasons. See A package can be registered with IANA for interoperability reasons. See
section 13 for IANA considerations. section 13 for IANA considerations.
13. IANA CONSIDERATIONS 13. IANA CONSIDERATIONS
13.1. Packages 13.1. Packages
The following considerations SHALL be met to register a package with The following considerations SHALL be met to register a package with
IANA: IANA:
1. A unique string name and serial number is registered for each pack- Internet draft MEGACO Protocol January 27, 2000
age.
2. A public document or a standard forum document, which can be refer- 1. A unique string name, unique serial number and version number is
enced as the document that describes the package following the registered for each package. The string name is used with text
guideline above, must be specified. The document SHALL specify the encoding. The serial number shall be used with binary encoding.
version of the Package that it describes. Serial Numbers 60000-64565 are reserved for private use. Serial
number 0 is reserved.
3. A contact name, email and postal addresses for that contact shall 2. A contact name, email and postal addresses for that contact shall
be specified. The contact information shall be updated by the be specified. The contact information shall be updated by the
defining organization as necessary. defining organization as necessary.
4. The document should be available on a public web server and should 3. A reference to a document that describes the package, which should
have a stable url. The site should provide a mechanism to provide be public: The document shall specify the version of the Package
comments and appropriate responses should be returned. that it describes. If the document is public, it should be located
on a public web server and should have a stable URL. The site
The following package names are reserved should provide a mechanism to provide comments and appropriate
responses should be returned.
* dtmf
* generic
* keypad
*
Packages registered by other than recognized standards bodies shall have
a minimum package name length of 8 characters
All other package names are first come-first served if all other condi- 4. Packages registered by other than recognized standards bodies shall
tions are met have a minimum package name length of 8 characters
Internet draft MEGACO Protocol September 21, 1999 5. All other package names are first come-first served if all other
conditions are met
13.2. Error Codes 13.2. Error Codes
The following considerations SHALL be met to register an error code with The following considerations SHALL be met to register an error code with
IANA: IANA:
1. A error number and a one line (80 character maximum) string is 1. An error number and a one line (80 character maximum) string is
registered for each error. registered for each error.
2. A complete description of the conditions under which the error is 2. A complete description of the conditions under which the error is
detected shall be included in a publicly available document. The detected shall be included in a publicly available document. The
description shall be sufficiently clear to differentiate the error description shall be sufficiently clear to differentiate the error
from all other existing error codes. from all other existing error codes.
3. The document should be available on a public web server and should 3. The document should be available on a public web server and should
have a stable url. have a stable URL.
4. Error numbers registered by recognized standards bodies shall have 4. Error numbers registered by recognized standards bodies shall have
3 or 4 character error numbers 3 or 4 character error numbers.
5. Error numbers registered by all other organizations or individuals 5. Error numbers registered by all other organizations or individuals
shall have 4 character error numbers shall have 4 character error numbers.
6. An error number shall not be redefined, nor modified except by the 6. An error number shall not be redefined, nor modified except by the
organization or individual that originally defined it, or their organization or individual that originally defined it, or their
successors or assigns. successors or assigns.
Internet draft MEGACO Protocol January 27, 2000
13.3. ServiceChange Reasons
The following considerations SHALL be met to register service change
reason with IANA:
1. A one phrase, 80-character maximum, unique reason code is
registered for each reason.
2. A complete description of the conditions under which the reason is
used is detected shall be included in a publicly available docu-
ment. The description shall be sufficiently clear to differentiate
the reason from all other existing reasons.
3. The document should be available on a public web server and should
have a stable URL.
14. CONTACT INFORMATION 14. CONTACT INFORMATION
IETF Editor IETF Editor
Brian Rosen Brian Rosen
FORE Systems Marconi
1000 FORE Drive 1000 FORE Drive
Warrendale, PA 15086 Warrendale, PA 15086
U.S.A. U.S.A.
Phone: +1 724-742-6826 Phone: +1 724-742-6826
Email: brosen@fore.com Email: brosen@fore.com
ITU Editor ITU Editor
John Segers John Segers
Lucent Technologies Lucent Technologies
Room HE 306 Room HE 306
Dept. Forward Looking Work Dept. Forward Looking Work
P.O. Box 18, 1270 AA Huizen P.O. Box 18, 1270 AA Huizen
Netherlands Netherlands
Phone: +31 35 687 4724 Phone: +31 35 687 4724
Email: jsegers@lucent.com Email: jsegers@lucent.com
skipping to change at page 54, line 4 skipping to change at page 70, line 46
Lucent Technologies Lucent Technologies
Room HE 306 Room HE 306
Dept. Forward Looking Work Dept. Forward Looking Work
P.O. Box 18, 1270 AA Huizen P.O. Box 18, 1270 AA Huizen
Netherlands Netherlands
Phone: +31 35 687 4724 Phone: +31 35 687 4724
Email: jsegers@lucent.com Email: jsegers@lucent.com
Additional IETF Authors Additional IETF Authors
Fernando Cuervo Fernando Cuervo
Internet draft MEGACO Protocol September 21, 1999
Nortel Networks Nortel Networks
P.O. Box 3511 Stn C Ottawa, ON, K1Y 4H7 P.O. Box 3511 Stn C Ottawa, ON, K1Y 4H7
Canada Canada
Email: cuervo@nortelnetworks.com Email: cuervo@nortelnetworks.com
Bryan Hill Bryan Hill
Gotham Networks Gotham Networks
15 Discovery Way 15 Discovery Way
Acton, MA 01720 Acton, MA 01720
Internet draft MEGACO Protocol January 27, 2000
USA USA
Phone: +1 978-263-6890 Phone: +1 978-263-6890
Email: bhill@gothamnetworks.com Email: bhill@gothamnetworks.com
Christian Huitema Christian Huitema
Telcordia Technologies Telcordia Technologies
MCC 1J236B MCC 1J236B
445 South Street 445 South Street
Morristown, NJ 07960 Morristown, NJ 07960
U.S.A. U.S.A.
skipping to change at page 54, line 39 skipping to change at page 71, line 30
Nancy Greene Nancy Greene
Nortel Networks Nortel Networks
P.O. Box 3511 Stn C P.O. Box 3511 Stn C
Ottawa, ON, K1Y 4H7 Ottawa, ON, K1Y 4H7
Canada Canada
Phone: +1 514-271-7221 Phone: +1 514-271-7221
Email: ngreene@nortelnetworks.com Email: ngreene@nortelnetworks.com
Abdallah Rayhan Abdallah Rayhan
Nortel Networks Nortel Networks
P.O. Box 3511 Stn C Ottawa, ON, K1Y 4H7 P.O. Box 3511 Stn C
Ottawa, ON, K1Y 4H7
Canada Canada
Phone: +1 613-763-9611
Email: arayhan@nortelnetworks.com Email: arayhan@nortelnetworks.com
15. ANNEX A - ASN.1 DESCRIPTION OF THE PROTOCOL (NORMATIVE) ANNEX A BINARY ENCODING OF THE PROTOCOL (NORMATIVE)
15.1. Specification language This Annex specifies the syntax of messages using the notation defined
in ASN.1 [ITU-T Recommendation X.680 (1997): Information Technology -
Abstract Syntax Notation One (ASN.1) - Specification of basic nota-
tion.]. Messages shall be encoded for transmission by applying the basic
encoding rules specified in [ITU-T Recommendation X.690(1994) Informa-
tion Technology - ASN.1 Encoding Rules: Specification of Basic
Encoding Rules (BER)].
The baseline text for this section will be taken from APC-1608. A.1. Coding of wildcards
15.2. Syntax specification The use of wildcards ALL and CHOOSE is allowed in the protocol. This
allows a MGC to partially specify Termination IDs and let the MG choose
from the values that conform to the partial specification. Termination
IDs may encode a hierarchy of names. This hierarchy is provisioned. For
This section will contain the protocol syntax specification using the Internet draft MEGACO Protocol January 27, 2000
language described in the previous section.
Internet draft MEGACO Protocol September 21, 1999 instance, a TerminationID may consist of a trunk group, a trunk within
the group and a circuit. Wildcarding must be possible at all levels.
The following paragraphs explain how this is achieved.
16. ANNEX B - TEXT ENCODING OF THE PROTOCOL (NORMATIVE) The ASN.1 description uses octet strings of up to 8 octets in length for
Termination IDs. This means that Termination IDs consist of at most 64
bits. A fully specified Termination ID may be preceded by a sequence of
wildcarding fields. A wildcarding field is octet in length. Bit 7 (the
most significant bit) of this octet specifies what type of wildcarding
is invoked: if the bit value equals 1, then the ALL wildcard is used;
if the bit value if 0, then the CHOOSE wildcard is used. Bit 6 of the
wildcarding field specifies whether the wildcarding pertains to one
level in the hierarchical naming scheme (bit value 0) or to the level of
the hierarchy specified in the wildcarding field plus all lower levels
(bit value 1). Bits 0 through 5 of the wildcarding field specify the
bit position in the Termination ID at which the starts.
16.1. Translation Mechanism We illustrate this scheme with some examples. Assume that Termination
IDs are three octets long and that each octet represents a level in a
hierarchical naming scheme. A valid Termination ID is
A future edition of this document will describe how the syntax of Annex 00000001 00011110 01010101.
A is translated into ABNF. This version contains hand-coded ABNF
16.2. ABNF specification Addressing ALL names with prefix 00000001 00011110 is done as follows:
The protocol syntax is presented in ABNF according to RFC2234. wildcarding field: 10000111
Termination ID: 00000001 00011110 xxxxxxxx.
The values of the bits labeled "x" is irrelevant and shall be ignored by
the receiver.
Indicating to the receiver that is must choose a name with 00011110 as
the second octet is done as follows:
wildcarding fields: 00010111 followed by 00000111
Termination ID: xxxxxxxx 00011110 xxxxxxxx.
The first wildcard field indicates a CHOOSE wildcard for the level in
the naming hierarchy starting at bit 23, the highest level in our
assumed naming scheme. The second wildcard field indicates a CHOOSE
wildcard for the level in the naming hierarchy starting at bit 7, the
lowest level in our assumed naming scheme.
Finally, a CHOOSE-wildcarded name with the highest level of the name
equal to 00000001 is specified as follows:
Internet draft MEGACO Protocol January 27, 2000
wildcard field: 01001111
Termination ID: 0000001 xxxxxxxx xxxxxxxx .
Bit value 1 at bit position 6 of the first octet of the wildcard field
indicates that the wildcarding pertains to the specified level in the
naming hierarchy and all lower levels.
Context IDs may also be wildcarded. In the case of Context IDs, how-
ever, specifying partial names is not allowed. Context ID 0x0 SHALL be
used to indicate the NULL Context, Context ID 0xFFFFFFFE SHALL be used
to indicate a CHOOSE wildcard, and Context ID 0xFFFFFFFF SHALL be used
to indicate an ALL wildcard.
TerminationID 0xFFFFFFFFFFFFFFFF SHALL be used to indicate the ROOT Ter-
mination.
A.2. ASN.1 syntax specification
This section contains the ASN.1 specification of the H.248 protocol syn-
tax.
NOTE - In case a transport mechanism is used that employs application
level framing, the definition of Transaction below changes. Refer to
the annex defining the transport mechanism for the definition that
applies in that case.
NOTE - The ASN.1 specification below contains a clause defining Termina-
tionIDList as a sequence of TerminationIDs. The length of this sequence
SHALL be one. The SEQUENCE OF construct is present only to allow future
extensions.
MEDIA-GATEWAY-CONTROL DEFINITIONS AUTOMATIC TAGS::=
BEGIN
MegacoMessage ::= SEQUENCE
{
authHeader AuthenticationHeader OPTIONAL,
mess Message
}
AuthenticationHeader ::= SEQUENCE
{
secParmIndex SecurityParmIndex,
seqNum SequenceNum,
ad AuthData
Internet draft MEGACO Protocol January 27, 2000
}
SecurityParmIndex ::= OCTET STRING(SIZE(4))
SequenceNum ::= OCTET STRING(SIZE(4))
AuthData ::= OCTET STRING (SIZE (16..32))
Message ::= SEQUENCE
{
version INTEGER(0..99),
mId MId, -- Name/address of message originator
messageBody CHOICE
{
messageError ErrorDescriptor,
transactions SEQUENCE OF Transaction
},
...
}
MId ::= CHOICE
{
ip4Address IP4Address,
ip6Address IP6Address,
domainName DomainName,
deviceName PathName,
mtpAddress OCTET STRING(SIZE(5)),
-- Addressing structure of mtpAddress:
-- 15 0
-- | PC | NI |
-- 14 bits 2 bits
...
}
DomainName ::= SEQUENCE
{
name IA5String,
-- The name starts with an alphanumeric digit followed by a
-- sequence of alphanumeric digits, hyphens and dots. No two
-- dots shall occur consecutively.
portNumber INTEGER(0..65535) OPTIONAL
}
IP4Address ::= SEQUENCE
{
address OCTET STRING (SIZE(4)),
portNumber INTEGER(0..65535) OPTIONAL
}
Internet draft MEGACO Protocol January 27, 2000
IP6Address ::= SEQUENCE
{
address OCTET STRING (SIZE(16)),
portNumber INTEGER(0..65535) OPTIONAL
}
PathName ::= IA5String(SIZE (1..64))
-- See section A.3
Transaction ::= CHOICE
{
transactionRequest TransactionRequest,
transactionPending TransactionPending,
transactionReply TransactionReply,
...
}
TransactionId ::= INTEGER(0..4294967295) -- 32 bit unsigned integer
TransactionRequest ::= SEQUENCE
{
transactionId TransactionId,
actions SEQUENCE OF ActionRequest,
...
}
TransactionPending ::= SEQUENCE
{
transactionId TransactionId,
...
}
TransactionReply ::= SEQUENCE
{
transactionId TransactionId,
transactionResult CHOICE
{
transactionError ErrorDescriptor,
actionReplies SEQUENCE OF ActionReply
},
...
}
ErrorDescriptor ::= SEQUENCE
{
errorCode ErrorCode,
errorText ErrorText OPTIONAL
Internet draft MEGACO Protocol January 27, 2000
}
ErrorCode ::= INTEGER(0..65535)
-- See section 13 for IANA considerations w.r.t. error codes
ErrorText ::= IA5String
ContextID ::= INTEGER(0..4294967295)
-- Context NULL Value: 0
-- Context CHOOSE Value: 429467294 (0xFFFFFFFE)
-- Context ALL Value: 4294967295 (0xFFFFFFFF)
ActionRequest ::= SEQUENCE
{
contextId ContextID,
contextRequest ContextRequest OPTIONAL,
contextAttrAuditReq ContextAttrAuditRequest OPTIONAL,
commandRequests SEQUENCE OF CommandRequest
}
ActionReply ::= SEQUENCE
{
contextId ContextID,
errorDescriptor ErrorDescriptor OPTIONAL,
contextReply ContextRequest OPTIONAL,
commandReply SEQUENCE OF CommandReply
}
ContextRequest ::= SEQUENCE
{
priority INTEGER(0..15) OPTIONAL,
emergency BOOLEAN OPTIONAL,
topologyReq SEQUENCE OF TopologyRequest OPTIONAL,
...
}
ContextAttrAuditRequest ::= SEQUENCE
{
topology NULL OPTIONAL,
emergency NULL OPTIONAL,
priority NULL OPTIONAL,
...
}
CommandRequest ::= SEQUENCE
{
Internet draft MEGACO Protocol January 27, 2000
command Command,
optional NULL OPTIONAL,
wildcardReturn NULL OPTIONAL,
...
}
Command ::= CHOICE
{
addReq AmmRequest,
moveReq AmmRequest,
modReq AmmRequest,
-- Add, Move, Modify requests have the same parameters
subtractReq SubtractRequest,
auditCapRequest AuditRequest,
auditValueRequest AuditRequest,
notifyReq NotifyRequest,
serviceChangeReq ServiceChangeRequest,
...
}
CommandReply ::= CHOICE
{
addReply AmmsReply,
moveReply AmmsReply,
modReply AmmsReply,
subtractReply AmmsReply,
-- Add, Move, Modify, Subtract replies have the same parameters
auditCapReply AuditReply,
auditValueReply AuditReply,
notifyReply NotifyReply,
serviceChangeReply ServiceChangeReply,
...
}
TopologyRequest ::= SEQUENCE
{
terminationFrom TerminationID,
terminationTo TerminationID,
topologyDirection ENUMERATED
{
bothway(0),
isolate(1),
oneway(2)
}
}
AmmRequest ::= SEQUENCE
{
Internet draft MEGACO Protocol January 27, 2000
terminationID TerminationIDList,
mediaDescriptor MediaDescriptor OPTIONAL,
modemDescriptor ModemDescriptor OPTIONAL,
muxDescriptor MuxDescriptor OPTIONAL,
eventsDescriptor EventsDescriptor OPTIONAL,
eventBufferDescriptor EventBufferDescriptor OPTIONAL,
signalsDescriptor SignalsDescriptor OPTIONAL,
digitMapDescriptor DigitMapDescriptor OPTIONAL,
auditDescriptor AuditDescriptor OPTIONAL,
...
}
AmmsReply ::= SEQUENCE
{
terminationID TerminationIDList,
terminationAudit TerminationAudit OPTIONAL
}
SubtractRequest ::= SEQUENCE
{
terminationID TerminationIDList,
auditDescriptor AuditDescriptor OPTIONAL
}
AuditRequest ::= SEQUENCE
{
terminationID TerminationID,
auditDescriptor AuditDescriptor OPTIONAL
}
AuditReply ::= SEQUENCE
{
terminationID TerminationID,
auditResult AuditResult
}
AuditResult ::= CHOICE
{
contextAuditResult TerminationIDList,
terminationAuditResult TerminationAudit
}
AuditDescriptor ::= SEQUENCE
{
auditToken BIT STRING
{
Internet draft MEGACO Protocol January 27, 2000
muxToken(0), modemToken(1), mediaToken(2),
eventsToken(3), signalsToken(4),
digitMapToken(5), statsToken(6),
observedEventsToken(7),
packagesToken(8), eventBufferToken(9)
} OPTIONAL,
...
}
TerminationAudit ::= SEQUENCE OF AuditReturnParameter
AuditReturnParameter ::= CHOICE
{
errorDescriptor ErrorDescriptor,
mediaDescriptor MediaDescriptor,
modemDescriptor ModemDescriptor,
muxDescriptor MuxDescriptor,
eventsDescriptor EventsDescriptor,
eventBufferDescriptor EventBufferDescriptor,
signalsDescriptor SignalsDescriptor,
digitMapDescriptor DigitMapDescriptor,
observedEventsDescriptor ObservedEventsDescriptor,
statisticsDescriptor StatisticsDescriptor,
packagesDescriptor PackagesDescriptor,
...
}
NotifyRequest ::= SEQUENCE
{
terminationID TerminationIDList,
observedEventsDescriptor ObservedEventsDescriptor,
errorDescriptor ErrorDescriptor OPTIONAL
}
NotifyReply ::= SEQUENCE
{
terminationID TerminationIDList OPTIONAL,
errorDescriptor ErrorDescriptor OPTIONAL
}
ObservedEventsDescriptor ::= SEQUENCE
{
requestId RequestID,
observedEventLst SEQUENCE OF ObservedEvent
}
ObservedEvent ::= SEQUENCE
{
Internet draft MEGACO Protocol January 27, 2000
eventName EventName,
streamID StreamID OPTIONAL,
eventParList SEQUENCE OF EventParameter,
timeNotation TimeNotation OPTIONAL
}
EventName ::= PkgdName
EventParameter ::= SEQUENCE
{
eventParameterName Name,
value Value
}
ServiceChangeRequest ::= SEQUENCE
{
terminationID TerminationIDList,
serviceChangeParms ServiceChangeParm
}
ServiceChangeReply ::= SEQUENCE
{
terminationID TerminationIDList,
serviceChangeResult ServiceChangeResult
}
-- For ServiceChangeResult, no parameters are mandatory. Hence the
-- distinction between ServiceChangeParm and ServiceChangeResParm.
ServiceChangeResult ::= CHOICE
{
errorDescriptor ErrorDescriptor,
serviceChangeResParms ServiceChangeResParm
}
WildcardField ::= OCTET STRING(SIZE(1))
TerminationID ::= SEQUENCE
{
wildcard SEQUENCE OF WildcardField,
id OCTET STRING(SIZE(1..8))
}
-- See Section A.1 for explanation of wildcarding mechanism.
-- Termination ID 0xFFFFFFFFFFFFFFFF indicates the ROOT Termination.
TerminationIDList ::= SEQUENCE OF TerminationID
MediaDescriptor ::= SEQUENCE
Internet draft MEGACO Protocol January 27, 2000
{
termStateDescr TerminationStateDescriptor OPTIONAL,
streams CHOICE
{
oneStream StreamParms,
multiStream SEQUENCE OF StreamDescriptor
},
...
}
StreamDescriptor ::= SEQUENCE
{
streamID StreamID,
streamParms StreamParms
}
StreamParms ::= SEQUENCE
{
localControlDescriptor LocalControlDescriptor OPTIONAL,
localDescriptor LocalRemoteDescriptor OPTIONAL,
r