idnits 2.17.1 draft-ietf-megaco-protocol-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? == No 'Intended status' indicated for this document; assuming Proposed Standard == The page length should not exceed 58 lines per page, but there was 144 longer pages, the longest (page 39) being 61 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 147 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Abstract section. ** There are 155 instances of too long lines in the document, the longest one being 75 characters in excess of 72. == There are 8 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 614 has weird spacing: '...andling for a...' == Line 834 has weird spacing: '...signals are n...' == Line 1194 has weird spacing: '...sts for the M...' == Line 1223 has weird spacing: '... native withi...' == Line 1284 has weird spacing: '...eceived when ...' == (7 more instances...) -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- Couldn't find a document date in the document -- date freshness check skipped. -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Missing reference section? 'ServiceChangeReplyDescriptor' on line 2177 looks like a reference -- Missing reference section? 'RFC2402' on line 2931 looks like a reference -- Missing reference section? 'RFC2406' on line 2888 looks like a reference -- Missing reference section? 'RFC2409' on line 2894 looks like a reference -- Missing reference section? 'RFC 2119' on line 4296 looks like a reference -- Missing reference section? 'DOT' on line 4712 looks like a reference -- Missing reference section? 'LF' on line 4819 looks like a reference -- Missing reference section? '00-27' on line 5641 looks like a reference -- Missing reference section? '0' on line 5643 looks like a reference -- Missing reference section? '3-5' on line 5643 looks like a reference -- Missing reference section? '8' on line 5643 looks like a reference -- Missing reference section? 'RFC 1889' on line 6393 looks like a reference Summary: 4 errors (**), 0 flaws (~~), 10 warnings (==), 15 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Internet Engineering Task Force Fernando Cuervo 2 INTERNET DRAFT Nortel Networks 3 February 8, 2000 Bryan Hill 4 Expires August 8, 2000 Gotham Networks 5 Nancy Greene 6 Nortel Networks 7 Christian Huitema 8 Telcordia Technologies 9 Abdallah Rayhan 10 Nortel Networks 11 Brian Rosen 12 Marconi 13 John Segers 14 Lucent Technologies 16 Megaco Protocol 18 Status of this document 20 This document is an Internet-Draft and is in full conformance with all 21 provisions of Section 10 of RFC2026. 23 Internet-Drafts are working documents of the Internet Engineering Task 24 Force (IETF), its areas, and its working groups. Note that other groups 25 may also distribute working documents as Internet-Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet- Drafts as reference material 30 or to cite them other than as "work in progress." 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/ietf/1id-abstracts.txt 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html. 38 This document will expire in August 2000. 40 Internet draft MEGACO Protocol February 8, 2000 42 1. SCOPE ..................................................... 7 43 2. REFERENCES ................................................ 7 44 2.1. Normative references ................................. 7 45 2.2. Informative references ............................... 8 46 3. DEFINITIONS ............................................... 9 47 4. ABBREVIATIONS ............................................. 10 48 5. CONVENTIONS ............................................... 10 49 6. CONNECTION MODEL .......................................... 10 50 6.1. Contexts ............................................. 14 51 6.1.1. Context Attributes and Descriptors .............. 15 52 6.1.2. Creating, Deleting and Modifying Contexts ....... 15 53 6.2. Terminations ......................................... 15 54 6.2.1. Termination Dynamics ............................ 16 55 6.2.2. TerminationIDs .................................. 16 56 6.2.3. Packages ........................................ 17 57 6.2.4. Termination Properties and Descriptors .......... 17 58 6.2.5. Root Termination ................................ 19 59 7. COMMANDS .................................................. 20 60 7.1. Descriptors .......................................... 21 61 7.1.1. Specifying Parameters ........................... 21 62 7.1.2. Modem Descriptor ................................ 22 63 7.1.3. Multiplex Descriptor ............................ 22 64 7.1.4. Media Descriptor ................................ 22 65 7.1.5. Termination State Descriptor .................... 23 66 7.1.6. Stream Descriptor ............................... 24 67 7.1.7. LocalControl Descriptor ......................... 24 68 7.1.8. Local and Remote Descriptors .................... 25 69 7.1.9. Events Descriptor ............................... 28 70 7.1.10. EventBuffer Descriptor ......................... 29 71 7.1.11. Signals Descriptor ............................. 29 72 7.1.12. Audit Descriptor ............................... 31 73 7.1.13. ServiceChange Descriptor ....................... 32 74 7.1.14. DigitMap Descriptor ............................ 32 75 7.1.15. Statistics Descriptor .......................... 35 76 7.1.16. Packages Descriptor ............................ 36 77 7.1.17. ObservedEvents Descriptor ...................... 36 78 7.1.18. Topology Descriptor ............................ 36 79 7.2. Command Application Programming Interface ............ 39 80 7.2.1. Add ............................................. 39 81 7.2.2. Modify .......................................... 41 82 7.2.3. Subtract ........................................ 42 83 7.2.4. Move ............................................ 43 84 7.2.5. AuditValue ...................................... 44 85 7.2.6. AuditCapabilities ............................... 45 86 7.2.7. Notify .......................................... 46 87 7.2.8. ServiceChange ................................... 46 88 7.2.9. Manipulating and Auditing Context Attributes .... 50 89 7.2.10. Generic Command Syntax ......................... 51 91 Internet draft MEGACO Protocol February 8, 2000 93 7.3. Command Error Codes .................................. 51 94 8. TRANSACTIONS .............................................. 53 95 8.1. Common Parameters .................................... 54 96 8.1.1. Transaction Identifiers ......................... 54 97 8.1.2. Context Identifiers ............................. 55 98 8.2. Transaction Application Programming Interface ........ 55 99 8.2.1. TransactionRequest .............................. 55 100 8.2.2. TransactionReply ................................ 56 101 8.2.3. TransactionPending .............................. 57 102 8.3. Messages ............................................. 57 103 9. TRANSPORT ................................................. 58 104 9.1. Ordering of Commands ................................. 58 105 9.2. Protection against Restart Avalanche ................. 59 106 10. SECURITY CONSIDERATIONS .................................. 60 107 10.1. Protection of Protocol Connections .................. 60 108 10.2. Interim AH scheme ................................... 61 109 10.3. Protection of Media Connections ..................... 62 110 11. MG-MGC CONTROL INTERFACE ................................. 63 111 11.1. Multiple Virtual MGs ................................ 63 112 11.2. Cold Start .......................................... 64 113 11.3. Negotiation of Protocol Version ..................... 64 114 11.4. Failure of an MG .................................... 65 115 11.5. Failure of an MGC ................................... 65 116 12. PACKAGE DEFINITION ....................................... 66 117 12.1. Guidelines for defining packages .................... 66 118 12.1.1. Package Overall description of the package, .... 67 119 12.1.2. Properties ..................................... 67 120 12.1.3. Events ......................................... 68 121 12.1.4. Signals ........................................ 68 122 12.1.5. Statistics ..................................... 69 123 12.1.6. Procedures ..................................... 69 124 12.2. Guidelines to defining Properties, Statistics and ... 69 125 12.3. Lists ............................................... 69 126 12.4. Identifiers ......................................... 69 127 12.5. Package Registration ................................ 70 128 13. IANA CONSIDERATIONS ...................................... 70 129 13.1. Packages ............................................ 70 130 13.2. Error Codes ......................................... 70 131 13.3. ServiceChange Reasons ............................... 71 132 14. CONTACT INFORMATION ...................................... 71 133 ANNEX A BINARY ENCODING OF THE PROTOCOL (NORMATIVE) ........... 73 134 A.1. Coding of wildcards .................................. 73 135 A.2. ASN.1 syntax specification ........................... 74 136 A.3. Digit maps and path names ............................ 89 137 ANNEX B TEXT ENCODING OF THE PROTOCOL (NORMATIVE) ............. 90 138 B.1. Coding of wildcards .................................. 90 139 B.2. ABNF specification ................................... 90 140 ANNEX C TAGS FOR MEDIA STREAM PROPERTIES (NORMATIVE) ..........101 142 Internet draft MEGACO Protocol February 8, 2000 144 C.1. General Media Attributes .............................102 145 C.2. Mux Properties .......................................102 146 C.3. General bearer properties ............................102 147 C.4. General ATM properties ...............................103 148 C.5. Frame Relay ..........................................104 149 C.6. IP ...................................................104 150 C.7. ATM AAL2 .............................................104 151 C.8. ATM AAL1 .............................................104 152 C.9. Bearer Capabilities ..................................105 153 C.10. AAL5 Properties .....................................106 154 C.11. SDP Equivalents .....................................107 155 C.12. H.245 ...............................................107 156 ANNEX D TRANSPORT OVER IP (NORMATIVE) .........................107 157 D.1. Transport over IP/UDP using Application Level ........107 158 D.1.1. Providing At-Most-Once Functionality ............107 159 D.1.2. Transaction identifiers and three-way handshake 108 160 D.1.3. Computing retransmission timers .................110 161 D.1.4. Provisional responses ...........................111 162 D.1.5. Repeating Requests, Responses and ...............111 163 D.2. Using TCP ............................................112 164 D.2.1. Providing the At-Most-Once functionality ........113 165 D.2.2. Transaction identifiers and three way handshake 113 166 D.2.3. Computing retransmission timers .................113 167 D.2.4. Provisional responses ...........................113 168 D.2.5. Ordering of commands ............................114 169 ANNEX E BASIC PACKAGES ........................................114 170 E.1. Generic ..............................................114 171 E.1.1. Properties ......................................114 172 E.1.2. Events ..........................................114 173 E.2.2. Events ..........................................118 174 E.2.3. Signals .........................................118 175 E.2.4. Statistics ......................................118 176 E.2.5. Procedures ......................................118 177 E.3. Tone Generator Package ...............................118 178 E.3.1. Properties ......................................118 179 E.3.2. Events ..........................................118 180 E.3.3. Signals .........................................118 181 E.3.4. Statistics ......................................119 182 E.3.5. Procedures ......................................119 183 E.4. Tone Detection Package ...............................119 184 E.4.1. Properties ......................................119 185 E.4.2. Events ..........................................119 186 E.4.3. Signals .........................................121 187 E.4.4. Statistics ......................................121 188 E.4.5. Procedures ......................................121 189 E.5. Basic DTMF Generator Package .........................121 190 E.5.1. Properties ......................................121 191 E.5.2. Events ..........................................121 193 Internet draft MEGACO Protocol February 8, 2000 195 E.5.3. Signals .........................................122 196 E.5.4. Statistics ......................................122 197 E.5.5. Procedures ......................................122 198 E.6. DTMF detection Package ...............................123 199 E.6.1. Properties ......................................123 200 E.6.2. Events ..........................................123 201 E.6.3. Signals .........................................125 202 E.6.4. Statistics ......................................125 203 E.6.5. Procedures ......................................125 204 E.7. Call Progress Tones Generator Package ................125 205 E.7.1. Properties ......................................125 206 E.7.2. Events ..........................................125 207 E.7.3. Signals .........................................125 208 E.7.4. Statistics ......................................126 209 E.7.5. Procedures ......................................126 210 E.8. Call Progress Tones Detection Package ................126 211 E.8.1. Properties ......................................126 212 E.8.2. Events ..........................................126 213 E.8.3. Signals .........................................127 214 E.8.4. Statistics ......................................127 215 E.8.5. Procedures ......................................127 216 E.9. Analog Line Supervision Package ......................127 217 E.9.1. Properties ......................................127 218 E.9.2. Events ..........................................127 219 E.9.3. Signals .........................................128 220 E.9.4. Statistics ......................................129 221 E.9.5. Procedures ......................................129 222 E.10. Basic Continuity Package ............................129 223 E.10.1. Properties .....................................129 224 E.10.2. Events .........................................129 225 E.10.3. Signals ........................................129 226 E.10.4. Statistics .....................................130 227 E.10.5. Procedures .....................................130 228 E.11. Network Package .....................................130 229 E.11.1. Properties .....................................131 230 E.11.2. Events .........................................131 231 E.11.3. Signals ........................................132 232 E.11.4. Statistics .....................................132 233 E.11.5. Procedures .....................................132 234 E.12. RTP Package .........................................132 235 E.12.1. Properties .....................................133 236 E.12.2. Events .........................................133 237 E.12.3. Signals ........................................133 238 E.12.4. Statistics .....................................133 239 E.12.5. Procedures .....................................134 240 E.13. DS0 Package ........................................134 241 E.13.1. Properties .....................................134 242 E.13.2. Events .........................................135 244 Internet draft MEGACO Protocol February 8, 2000 246 E.13.3. Signals ........................................131 247 E.13.4. Statistics .....................................131 248 E.13.5. Procedures .....................................132 249 APPENDIX A EXAMPLE CALL FLOWS (INFORMATIVE) ..............132 250 A.1. Residential Gateway to Residential Gateway Call ......132 251 A.1.1. Programming Residential GW Analog Line ..........132 253 Internet draft MEGACO Protocol February 8, 2000 255 TABLE OF FIGURES 256 Figure 1: Example of MEGACOH.248 Connection Model ...............12 257 Figure 3: Example Call Waiting Scenario / Alerting Applied to T1 13 258 Figure 4: Example Call Waiting Scenario / Answer by T1 ..........14 259 Figure 5: Example topologies ...................................38 260 Figure 6: Transactions, Actions and Commands.....................53 262 1. SCOPE 264 MEGACO defines the protocols used between elements of a physically 265 decomposed multimedia Gateway consisting of a Media Gateway and a Media 266 Gateway Controller. There are no functional differences from a system 267 view between a decomposed gateway, with distributed sub- components 268 potentially on more than one physical device, and a monolithic gateway. 269 This document does not define how gateways, multipoint control units or 270 integrated voice response units (IVRs) work. Instead it creates a gen- 271 eral framework that is suitable for these applications. 273 Packet network interfaces may include IP, ATM or possibly others. The 274 interfaces will support a variety of SCN signalling systems, including 275 tone signalling, ISDN, ISUP, QSIG, and GSM. National variants of these 276 signalling systems will be supported where applicable. 278 The protocol definition in this document is common text with ITU Recom- 279 mendation H.248. 281 2. REFERENCES 283 2.1. Normative references 285 ITU-T Recommendation H.225.0 (1998): "Call Signalling Protocols and 286 Media Stream Packetization for Packet Based Multimedia Communications 287 Systems". 289 ITU-T Recommendation H.235 (02/98): "Security and encryption for H- 290 Series (H.323 and other H.245-based) multimedia terminals". 292 ITU-T Recommendation H.245 (1998): "Control Protocol for Multimedia Com- 293 munication". 295 ITU-T Recommendation H.323 (1998): "Packet Based Multimedia Communica- 296 tion Systems". 298 ITU-T Recommendation I.363.1 (08/96), "B-ISDN ATM Adaptation Layer 299 specification: Type 1 AAL". 301 Internet draft MEGACO Protocol February 8, 2000 303 ITU-T Recommendation I.366.1 (06/98), "Segmentation and Reassembly Ser- 304 vice Specific Convergence Sublayer for the AAL type 2". 306 ITU-T Recommendation I.366.2 (02/99), "AAL type 2 service specific con- 307 vergence sublayer for trunking". 309 ITU-T Recommendation Q.931 (05/98): "Digital Subscriber Signalling Sys- 310 tem No. 1 (DSS 1) - ISDN User-Network Interface Layer 3 Specification 311 for Basic Call Control" 313 ITU-T Recommendation X.680 (1997): "Information technology-Abstract Syn- 314 tax Notation One (ASN.1): Specification of basic notation". 316 ITU-T draft Recommendation H.246 (1998), "Interworking of H-series mul- 317 timedia terminals with H-series multimedia terminals and voice/voiceband 318 terminals on GSTN and ISDN". 320 RFC 1006, "ISO Transport Service on top of the TCP, Version 3", Marshall 321 T. Rose, Dwight E. Cass, May 1987. 323 RFC 2119, "Key words for use in RFCs to Indicate Requirement Levels", 324 Scott Bradner, March 1997. RFC 2234, "Augmented BNF for Syntax Specifi- 325 cations: ABNF", D. Crocker, P. Overell, November 1997. 327 RFC 2327, "SDP: Session Description Protocol", M. Handley, V. Jacobson, 328 April 1998. 330 RFC 2402, "IP Authentication Header", S. Kent, R. Atkinson, November 331 1998. 333 RFC 2406, "IP Encapsulating Security Payload (ESP)", S. Kent, R. Atkin- 334 son, November 1998. 336 2.2. Informative references 338 ITU-T Recommendation E.180/Q.35 (1998): "Technical characteristics of 339 tones for the telephone service" 341 ITU-T Recommendation Q.724 (1988): "Signalling procedures" 343 RFC 768, "User Datagram Protocol", J.Postel, August 1980. 345 RFC 793, "TRANSMISSION CONTROL PROTOCOL", J.Postel, September 1981. 347 RFC 1889, "RTP: A Transport Protocol for Real-Time Applications", H. 348 Schulzrinne, S. Casner, R. Frederick, V. Jacobson, January 1996. 350 RFC 1890, "RTP Profile for Audio and Video Conferences with Minimal 352 Internet draft MEGACO Protocol February 8, 2000 354 Control", H. Schulzrinne, January 1996. 356 RFC 2401, "Security Architecture for the Internet Protocol", S. Kent, R. 357 Atkinson, November 1998. 359 RFC 2543, " SIP: Session Initiation Protocol", M. Handley, H. 360 Schulzrinne, E. Schooler, J. Rosenberg, March 1999. 362 RFC 2460, "Internet Protocol, Version 6 (IPv6) Specification", S. Deer- 363 ing, R. Hinden, December 1998. 365 3. DEFINITIONS 367 Access Gateway: A type of gateway that provides a User to Network Inter- 368 face (UNI) such as ISDN. 370 Descriptor: A syntactic element of the protocol that groups related pro- 371 perties. For instance, the properties of a media flow on the MG can be 372 set by the MGC by including the appropriate descriptor in a command. 374 Media Gateway (MG): The media gateway converts media provided in one 375 type of network to the format required in another type of network. For 376 example, a MG could terminate bearer channels from a switched circuit 377 network (i.e., DS0s) and media streams from a packet network (e.g., RTP 378 streams in an IP network). This gateway may be capable of processing 379 audio, video and T.120 alone or in any combination, and will be capable 380 of full duplex media translations. The MG may also play audio/video mes- 381 sages and performs other IVR functions, or may perform media conferenc- 382 ing. 384 Media Gateway Controller (MGC): Controls the parts of the call state 385 that pertain to connection control for media channels in a MG. 387 Multipoint Control Unit (MCU): An entity that controls the setup and 388 coordination of a multi- user conference that typically includes pro- 389 cessing of audio, video and data. 391 Residential Gateway: A gateway that interworks an analogue line to a 392 packet network. A residential gateway typically contains one or two 393 analogue lines and is located at the customer premises. 395 SCN FAS Signalling Gateway: This function contains the SCN Signalling 396 Interface that terminates SS7, ISDN or other signalling links where the 397 call control channel and bearer channels are collocated in the same phy- 398 sical span. 400 SCN NFAS Signalling Gateway: This function contains the SCN Signalling 401 Interface that terminates SS7 or other signalling links where the call 403 Internet draft MEGACO Protocol February 8, 2000 405 control channels are separated from bearer channels. 407 Stream: Bidirectional media or control flow received/sent by a media 408 gateway as part of a call or conference. 410 Trunk: A communication channel between two switching systems such as a 411 DS0 on a T1 or E1 line. 413 Trunking Gateway: A gateway between SCN network and packet network that 414 typically terminates a large number of digital circuits. 416 4. ABBREVIATIONS 418 This recommendation defines the following terms. 419 ATM Asynchronous Transfer Mode 420 BRI Basic Rate Interface 421 CAS Channel Associated Signalling 422 DTMF Dual Tone Multi-Frequency 423 FAS Facility Associated Signalling 424 GW GateWay 425 IP Internet Protocol 426 ISUP ISDN User Part 427 MG Media Gateway 428 MGC Media Gateway Controller 429 NFAS Non-Facility Associated Signalling 430 PRI Primary Rate Interface 431 PSTN Public Switched Telephone Network 432 QoS Quality of Service 433 RTP Real-time Transport Protocol 434 SCN Switched Circuit Network 435 SG Signalling Gateway 436 SS7 Signalling System No. 7 438 5. CONVENTIONS 440 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 441 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 442 document are to be interpreted as described in RFC2119. 444 6. CONNECTION MODEL 446 The connection model for the protocol describes the logical entities, or 447 objects, within the Media Gateway that can be controlled by the Media 448 Gateway Controller. The main abstractions used in the connection model 449 are Terminations and Contexts. 451 A Termination sources and/or sinks one or more streams. In a multimedia 452 conference, a Termination can be multimedia and sources or sinks 454 Internet draft MEGACO Protocol February 8, 2000 456 multiple media streams. The media stream parameters, as well as modem, 457 and bearer parameters are encapsulated within the Termination. 459 A Context is an association between a collection of Terminations. There 460 is a special type of Context, the null Context, which contains all Ter- 461 minations that are not associated to any other Termination. For 462 instance, in a decomposed access gateway, all idle lines are represented 463 by Terminations in the null Context. 465 Following is a graphical depiction of these concepts. The diagram of 466 Figure 1 gives several examples and is not meant to be an all-inclusive 467 illustration. The asterisk box in each of the Contexts represents the 468 logical association of Terminations implied by the Context. 470 Internet draft MEGACO Protocol February 8, 2000 472 +------------------------------------------------------+ 473 |Media Gateway | 474 | +-------------------------------------------------+ | 475 | |Context +-------------+ | | 476 | | | Termination | | | 477 | | |-------------| | | 478 | | +-------------+ +->| SCN Bearer |<---+-> 479 | | | Termination | +-----+ | | Channel | | | 480 | | |-------------| | |---+ +-------------+ | | 481 <-+--->| RTP Stream |---| * | | | 482 | | | | | |---+ +-------------+ | | 483 | | +-------------+ +-----+ | | Termination | | | 484 | | | |-------------| | | 485 | | +->| SCN Bearer |<---+-> 486 | | | Channel | | | 487 | | +-------------+ | | 488 | +-------------------------------------------------+ | 489 | | 490 | | 491 | +------------------------------+ | 492 | |Context | | 493 | +-------------+ | +-------------+ | | 494 | | Termination | | +-----+ | Termination | | | 495 | |-------------| | | | |-------------| | | 496 <-+->| SCN Bearer | | | * |------| SCN Bearer |<---+-> 497 | | Channel | | | | | Channel | | | 498 | +-------------+ | +-----+ +-------------+ | | 499 | +------------------------------+ | 500 | | 501 | | 502 | +-------------------------------------------------+ | 503 | |Context | | 504 | | +-------------+ +-------------+ | | 505 | | | Termination | +-----+ | Termination | | | 506 | | |-------------| | | |-------------| | | 507 <-+--->| SCN Bearer |---| * |------| SCN Bearer |<---+-> 508 | | | Channel | | | | Channel | | | 509 | | +-------------+ +-----+ +-------------+ | | 510 | +-------------------------------------------------+ | 511 | ___________________________________________________ | 512 +------------------------------------------------------+ 513 Figure 1: Example of MEGACO Connection Model 515 The example below shows an example of one way to accomplish a call- 516 waiting scenario in a decomposed access gateway, illustrating the relo- 517 cation of a Termination between Contexts. Terminations T1 and T2 belong 518 to Context C1 in a two-way audio call. A second audio call is waiting 520 Internet draft MEGACO Protocol February 8, 2000 522 for T1 from Termination T3. T3 is alone in Context C2. T1 accepts the 523 call from T3, placing T2 on hold. This action results in T1 moving into 524 Context C2, as shown below. 526 +------------------------------------------------------+ 527 |Media Gateway | 528 | +-------------------------------------------------+ | 529 | |Context C1 | | 530 | | +-------------+ +-------------+ | | 531 | | | Term. T2 | +-----+ | Term. T1 | | | 532 | | |-------------| | | |-------------| | | 533 <-+--->| RTP Stream |---| * |------| SCN Bearer |<---+-> 534 | | | | | | | Channel | | | 535 | | +-------------+ +-----+ +-------------+ | | 536 | +-------------------------------------------------+ | 537 | | 538 | +-------------------------------------------------+ | 539 | |Context C2 | | 540 | | +-------------+ | | 541 | | +-----+ | Term. T3 | | | 542 | | | | |-------------| | | 543 | | | * |------| SCN Bearer |<---+-> 544 | | | | | Channel | | | 545 | | +-----+ +-------------+ | | 546 | +-------------------------------------------------+ | 547 +------------------------------------------------------+ 548 Figure 2 Example Call Waiting Scenario / Alerting Applied to T1 550 Internet draft MEGACO Protocol February 8, 2000 552 +------------------------------------------------------+ 553 |Media Gateway | 554 | +-------------------------------------------------+ | 555 | |Context C1 | | 556 | | +-------------+ | | 557 | | | Term. T2 | +-----+ | | 558 | | |-------------| | | | | 559 <-+--->| RTP Stream |---| * | | | 560 | | | | | | | | 561 | | +-------------+ +-----+ | | 562 | +-------------------------------------------------+ | 563 | | 564 | +-------------------------------------------------+ | 565 | |Context C2 | | 566 | | +-------------+ +-------------+ | | 567 | | | Term. T1 | +-----+ | Term. T3 | | | 568 | | |-------------| | | |-------------| | | 569 <-+--->| SCN Bearer |---| * |------| SCN Bearer |<---+-> 570 | | | Channel | | | | Channel | | | 571 | | +-------------+ +-----+ +-------------+ | | 572 | +-------------------------------------------------+ | 573 +------------------------------------------------------+ 574 Figure 3. Example Call Waiting Scenario / Answer by T1 576 6.1. Contexts 578 A Context is an association between a number of Terminations. The Con- 579 text describes the topology (who hears/sees whom) and the media mixing 580 and/or switching parameters if more than two Terminations are involved 581 in the association. 583 There is a special Context called the null Context. It contains Termina- 584 tions that are not associated to any other Termination. Terminations in 585 the null Context can have their parameters examined or modified, and may 586 have events detected on them. 588 In general, an Add command is used to add Terminations to Contexts. If 589 the MGC does not specify an existing Context to which the Termination is 590 to be added, the MG creates a new Context. A Termination may be removed 591 from a Context with a Subtract command, and a Termination may be moved 592 from one Context to another with a Move command. A Termination SHALL 593 exist in only one Context at a time. 595 The maximum number of Terminations in a Context is a MG property. Media 596 gateways that offer only point-to-point connectivity might allow at most 597 two Terminations per Context. Media gateways that support multipoint 599 Internet draft MEGACO Protocol February 8, 2000 601 conferences might allow three or more terminations per Context. 603 6.1.1. Context Attributes and Descriptors 605 The attributes of Contexts are: 607 ContextID, a 32 bit unsigned integer chosen by the MG. The topology 608 (who hears/sees whom). The topology of a Context describes the flow of 609 media between the Terminations within a Context. In contrast, the mode 610 of a Termination (send/receive/...) describes the flow of the media at 611 the ingress/egress of the media gateway. 613 The priority is used for a context in order to provide the MG with 614 information about a certain precedence handling for a context. The MGC 615 can also use the priority to control autonomously the traffic precedence 616 in the MG in a smooth way in certain situations (e.g. restart), when a 617 lot of contexts must be handled simultaneously. 619 * An indicator for an emergency call is also provided to allow a 620 preference handling in the MG. 622 6.1.2. Creating, Deleting and Modifying Contexts 624 The protocol can be used to (implicitly) create Contexts and modify the 625 parameter values of existing Contexts. The protocol has commands to add 626 Terminations to Contexts, subtract them from Contexts, and to move Ter- 627 minations between Contexts. Contexts are deleted implicitly when the 628 last remaining Termination is subtracted or moved out. 630 6.2. Terminations 632 A Termination is a logical entity on a MG that sources and/or sinks 633 media and/or control streams. A Termination is described by a number of 634 characterizing Properties, which are grouped in a set of Descriptors 635 that are included in commands. Terminations have unique identities (Ter- 636 minationIDs), assigned by the MG at the time of their creation. 638 Terminations representing physical entities have a semi-permanent 639 existence. For example, a Termination representing a TDM channel might 640 exist for as long as it is provisioned in the gateway. Terminations 641 representing ephemeral information flows, such as RTP flows, would usu- 642 ally exist only for the duration of their use. 644 Ephemeral Terminations are created by means of an Add command. They are 645 destroyed by means of a Subtract command. In contrast, when a physical 646 Termination is Added to or Subtracted from a Context, it is taken from 647 or to the null Context, respectively. 649 Internet draft MEGACO Protocol February 8, 2000 651 Terminations may have signals applied to them. Signals are MG generated 652 media streams such as tones and announcements as well as line signals 653 such as hookswitch. Terminations may be programmed to detect Events, 654 the occurrence of which can trigger notification messages to the MGC, or 655 action by the MG. Statistics may be accumulated on a Termination. 656 Statistics are reported to the MGC upon request (by means of the Audit- 657 Value command, see section 7.2.5) and when the Termination is taken out 658 of the call it is in. 660 Multimedia gateways may process multiplexed media streams. For example, 661 Recommendation H.221 describes a frame structure for multiple media 662 streams multiplexed on a number of digital 64 kbit/s channels. Such a 663 case is handled in the connection model in the following way. For every 664 bearer channel that carries part of the multiplexed streams, there is a 665 Termination. The Terminations that source/sink the digital channels are 666 connected to a separate Termination called the multiplexing Termination. 667 This Termination describes the multiplex used (e.g. how the H.221 frames 668 are carried over the digital channels used). The MuxDescriptor is used 669 to this end. If multiple media are carried, this Termination contains 670 multiple StreamDescriptors. The media streams can be associated with 671 streams sourced/sunk by other Terminations in the Context. 673 Terminations may be created which represent multiplexed bearers, such as 674 an ATM AAL2. When a new multiplexed bearer is to be created, an ephem- 675 eral termination is created in a context established for this purpose. 676 When the termination is subtracted, the multiplexed bearer is destroyed. 678 6.2.1. Termination Dynamics 680 The protocol can be used to create new Terminations and to modify pro- 681 perty values of existing Terminations. These modifications include the 682 possibility of adding or removing events and/or signals. The Termina- 683 tion properties, and events and signals are described in the ensuing 684 sections. An MGC can only release/modify terminations and the resources 685 that the termination represents which it has previously seized via, 686 e.g., the Add command. 688 6.2.2. TerminationIDs 690 Terminations are referenced by a TerminationID, which is an arbitrary 691 schema chosen by the MG. 693 TerminationIDs of physical Terminations are provisioned in the Media 694 Gateway. The TerminationIDs may be chosen to have structure. For 695 instance, a TerminationID may consist of trunk group and a trunk within 696 the group. 698 A wildcarding mechanism using two types of wildcards can be used with 700 Internet draft MEGACO Protocol February 8, 2000 702 TerminationIDs. The two wildcards are ALL and CHOOSE. The former is 703 used to address multiple Terminations at once, while the latter is used 704 to indicate to a media gateway that it must select a Termination satis- 705 fying the partially specified TerminationID. This allows, for instance, 706 that a MGC instructs a MG to choose a circuit within a trunk group. 708 When ALL is used in the TerminationID of a command, the effect is ident- 709 ical to repeating the command with each of the matching TerminationIDs. 710 Since each of these commands may generate a response, the size of the 711 entire response may be large. If individual responses are not required, 712 a wildcard response may be requested. In such a case, a single response 713 is generated, which contains the UNION of all of the individual 714 responses which otherwise would have been generated. Wildcard response 715 may be particularly useful in the Audit commands. 717 The encoding of the wildcarding mechanism is detailed in Annexes A and 718 B. 720 6.2.3. Packages 722 Different types of gateways may implement Terminations that have widely 723 differing characteristics. Variations in Terminations are accommodated 724 in the protocol by allowing Terminations to have optional Properties, 725 Events, Signals and Statistics implemented by MGs. 727 In order to achieve MG/MGC interoperability, such options are grouped 728 into Packages, and a Termination realizes a set of such Packages. More 729 information on definition of packages can be found in section 12. An 730 MGC can audit a Termination to determine which Packages it realizes. 732 Properties, Events, Signals and Statistics defined in Packages, as well 733 as parameters to them, are referenced by identifiers (Ids). Identifiers 734 are scoped. For each package, PropertyIds, EventIds, SignalIds, Statis- 735 ticsIds and ParameterIds have unique name spaces and the same identifier 736 may be used in each of them. Two PropertyIds in different packages may 737 also have the same identifier, etc. 739 6.2.4. Termination Properties and Descriptors 741 Terminations have properties. The properties have unique PropertyIDs. 742 Most properties have default values. When a Termination is created, 743 properties get their default values, unless the controller specifically 744 sets a different value. The default value of a property of a physical 745 Termination can be changed by setting it to a different value when the 746 Termination is in the null Context. Every time such a Termination 747 returns to the null Context, the values of its properties are reset to 748 this default value. 750 Internet draft MEGACO Protocol February 8, 2000 752 There are a number of common properties for Terminations and properties 753 specific to media streams. The common properties are also called the 754 termination state properties. For each media stream, there are local 755 properties and properties of the received and transmitted flows. 757 Properties not included in the base protocol are defined in Packages. 758 These properties are referred to by a name consisting of the PackageName 759 and a PropertyId. Most properties have default values described in the 760 Package description. Properties may be read-only or read/write. The pos- 761 sible values of a property may be audited, as can their current values. 762 For properties that are read/write, the MGC can set their values. A 763 property may be declared as "Global" which has a single value shared by 764 all terminations realizing the package. Related properties are grouped 765 into descriptors for convenience. 767 When a Termination is Added to a Context, the value of its read/write 768 properties can be set by including the appropriate descriptors as param- 769 eters to the Add command. Properties not mentioned in the command 770 retain their prior values. Similarly, a property of a Termination in a 771 Context may have its value changed by the Modify command. Properties 772 not mentioned in the Modify command retain their prior values. Proper- 773 ties may also have their values changed when a Termination is moved from 774 one Context to another as a result of a Move command. In some cases, 775 descriptors are returned as output from a command. The following table 776 lists all of the possible Descriptors and their use. Not all descrip- 777 tors are legal as input or output parameters to every command. Descrip- 778 tors 780 |Descriptor Name |Description | 781 |__________________|____________________________________________________| 782 |Modem |Identifies modem type and properties when | 783 | |applicable | 784 |__________________|____________________________________________________| 785 |Mux |Describes multiplex type for multimedia terminations| 786 | |(e.g. H.221, H.223, H.225.0) and Terminations | 787 | |forming the input mux. | 788 |__________________|____________________________________________________| 789 |Media |A list of media stream specifications (see 7.1.4) | 790 |__________________|____________________________________________________| 791 |TerminationState |Properties of a Termination (which can be defined in| 792 | |Packages) that are not stream specific. | 793 |__________________|____________________________________________________| 794 |Stream |A list of remote/local/localControl descriptors for | 795 | |a single stream | |__________________|____________________________________________________| 796 |Local |Contains properties that specify the media flows | 797 | |that MG receives from the remote entity. | 798 |__________________|____________________________________________________| 799 | | | 801 Internet draft MEGACO Protocol February 8, 2000 803 |Remote |Contains properties that specify the media flows | 804 | |that the MG sends to the remote entity. | |__________________|____________________________________________________| 805 |LocalControl |Contains properties (which can be defined in | 806 | |packages) that are of interest between the MG and | 807 | |the MGC | |__________________|____________________________________________________| 808 |Events |Describes events to be detected by the MG and what | 809 | |to do when an event is detected | |__________________|____________________________________________________| 810 |EventBuffer |Describes events to be detected by the MG when Event| 811 | |Buffering is active | |__________________|____________________________________________________| 812 |Signals |Describes signals and/or actions to be applied (e.g.| 813 | |Busy Tone) to the Terminations | |__________________|____________________________________________________| 814 |Audit |In Audit commands, identifies which information is | 815 | |desired | 816 |__________________|____________________________________________________| 817 |Packages |In AuditValue, returns a list of Packages realized | 818 | |by a Termination | |__________________|____________________________________________________| 819 |DigitMap |Instructions for handling DTMF tones at the MG | 820 |__________________|____________________________________________________| 821 |ServiceChange |In ServiceChange, what, why service change occurred,| 822 | |etc. | 823 |__________________|____________________________________________________| 824 |ObservedEvents |In Notify or AuditValue, report of events observed | 825 |__________________|____________________________________________________| 826 |Statistics |In Subtract and Audit, Report of Statistics kept on | 827 | |a Termination. | |__________________|____________________________________________________| 829 6.2.5. Root Termination 831 Occasionally, a command must refer to the entire gateway, rather than a 832 termination within it. A special TerminationID, "Root" is reserved for 833 this purpose. Packages may be defined on Root. Root thus may have pro- 834 perties and events (signals are not appropriate for root). Accord- 835 ingly, the root TerminationID may appear in: 837 * a Modify command - to change a property or set an event 839 * a Notify command - to report an event 841 * an AuditValue return - to examine the values of properties imple- 842 mented on root 844 * an AuditCapability - to determine what properties of root are 845 implemented 847 * a ServiceChange - to declare the gateway in or out of service Any 848 other use of the root TerminationID is an error. 850 Internet draft MEGACO Protocol February 8, 2000 852 7. COMMANDS 854 The protocol provides commands for manipulating the logical entities of 855 the protocol connection model, Contexts and Terminations. Commands pro- 856 vide control at the finest level of granularity supported by the proto- 857 col. For example, Commands exist to add Terminations to a Context, 858 modify Terminations, subtract Terminations from a Context, and audit 859 properties of Contexts or Terminations. Commands provide for complete 860 control of the properties of Contexts and Terminations. This includes 861 specifying which events a Termination is to report, which 862 signals/actions are to be applied to a Termination and specifying the 863 topology of a Context (who hears/sees whom). 865 Most commands are for the specific use of the Media Gateway Controller 866 as command initiator in controlling Media Gateways as command 867 responders. The exceptions are the Notify and ServiceChange commands: 868 Notify is sent from Media Gateway to Media Gateway Controller, and Ser- 869 viceChange may be sent by either entity. Below is an overview of the 870 commands; they are explained in more detail in section 7.2. 872 1. Add. The Add command adds a termination to a context. The Add com- 873 mand on the first Termination in a Context is used to create a Con- 874 text. 876 2. Modify. The Modify command modifies the properties, events and sig- 877 nals of a termination. 879 3. Subtract. The Subtract command disconnects a Termination from its 880 Context and returns statistics on the Termination's participation 881 in the Context. The Subtract command on the last Termination in a 882 Context deletes the Context. 884 4. Move. The Move command atomically moves a Termination to another 885 context. 887 5. AuditValue. The AuditValue command returns the current state of 888 properties, events, signals and statistics of Terminations. 890 6. AuditCapabilities. The AuditCapabilities command returns all the 891 possible values for Termination properties, events and signals 892 allowed by the Media Gateway. 894 7. Notify. The Notify command allows the Media Gateway to inform the 895 Media Gateway Controller of the occurrence of events in the Media 896 Gateway. 898 8. ServiceChange. The ServiceChange Command allows the Media Gateway 899 to notify the Media Gateway Controller that a Termination or group 901 Internet draft MEGACO Protocol February 8, 2000 903 of Terminations is about to be taken out of service or has just 904 been returned to service. ServiceChange is also used by the MG to 905 announce its availability to an MGC (registration), and to notify 906 the MGC of impending or completed restart of the MG. The MGC may 907 announce a handover to the MG by sending it a ServiceChange com- 908 mand. The MGC may also use ServiceChange to instruct the MG to 909 take a Termination or group of Terminations in or out of service. 911 These commands are detailed in sections 7.2.1 through 7.2.8 913 7.1. Descriptors 915 The parameters to a command are termed Descriptors. A Descriptor con- 916 sists of a name and a list of items. Some items may have values. Many 917 Commands share common Descriptors. This subsection enumerates these 918 Descriptors. Descriptors may be returned as output from a command. 919 Parameters and parameter usage specific to a given Command type are 920 described in the subsection that describes the Command. 922 7.1.1. Specifying Parameters 924 Command parameters are structured into a number of descriptors. In gen- 925 eral, the text format of descriptors is 926 DescriptorName={parm=value, parm=value....} 928 Parameters may be fully specified, over-specified or under-specified: 930 1. Fully specified parameters have a single, unambiguous value that 931 the command initiator is instructing the command responder to use 932 for the specified parameter. 934 2. Under-specified parameters, using the CHOOSE value, allow the com- 935 mand responder to choose any value it can support. 937 3. Over-specified parameters have a list of potential values. The 938 list order specifies the command initiator's order of preference of 939 selection. The command responder chooses one value from the 940 offered list and returns that value to the command initiator. 942 Unspecified mandatory parameters (i.e. mandatory parameters not speci- 943 fied in a descriptor) result in the command responder retaining the pre- 944 vious value for that parameter. Unspecified optional parameters result 945 in the command responder using the default value of the parameter. When- 946 ever a parameter is underspecified or overspecified, the descriptor con- 947 taining the value chosen by the responder is included as output from the 948 command. 950 Each command specifies the TerminationId the command operates on. This 952 Internet draft MEGACO Protocol February 8, 2000 954 TerminationId may be "wildcarded". When the TerminationId of a command 955 is wildcarded, the effect shall be as if the command was repeated with 956 each of the TerminationIds matched. 958 7.1.2. Modem Descriptor 960 The Modem descriptor specifies the modem type and parameters, if any, 961 required for use in e.g. H.324 and text conversation. The descriptor 962 includes the following modem types: V.18, V.22, V.22bis, V.32, V.32bis, 963 V.34, V.90, V.91, Synchronous ISDN, and allows for extensions. By 964 default, no modem descriptor is present in a Termination. 966 7.1.3. Multiplex Descriptor 968 In multimedia calls, a number of media streams are carried on a (possi- 969 bly different) number of bearers. The multiplex descriptor associates 970 the media and the bearers. The descriptor includes the multiplex type: 972 * H.221 974 * H.223, 976 * H.226, 978 * V.76, 980 * Possible Extensions 982 and a set of TerminationIDs representing the multiplexed inputs, in 983 order. For example: 985 Mux = H.221{ MyT3/1/2, MyT3/2/13, MyT3/3/6, MyT3/21/22} 987 7.1.4. Media Descriptor 989 The Media Descriptor specifies the parameters for all the media streams. 990 These parameters are structured into two descriptors, a Termination 991 State Descriptor, which specifies the properties of a termination that 992 are not stream dependent, and one or more Stream Descriptors each of 993 which describes a single media stream. 995 A stream is identified by a StreamID. The StreamID is used to link the 996 streams in a Context that belong together. Multiple streams exiting a 997 termination shall be synchronized with each other. Within the Stream 998 Descriptor, there are up to three subsidiary descriptors, LocalControl, 999 Local, and Remote. The relationship between these descriptors is thus: 1001 Internet draft MEGACO Protocol February 8, 2000 1003 Media Descriptor 1004 TerminationStateDescriptor 1005 Stream Descriptor 1006 LocalControl Descriptor 1007 Local Descriptor 1008 Remote Descriptor 1010 StreamIDs are numbered from 1 upward. As a convenience a LocalControl, 1011 Local, or Remote descriptor may be included in the Media Descriptor 1012 without an enclosing Stream descriptor. In this case, the StreamID is 1013 assumed to be 1. 1015 7.1.5. Termination State Descriptor 1017 The Termination State Descriptor contains the ServiceStates property, 1018 the EventBuffer flag and properties of a termination (defined in Pack- 1019 ages) that are not stream specific. 1021 The ServiceStates property describes the overall state of the termina- 1022 tion (not stream-specific). A Termination can be in one of the follow- 1023 ing states: "test", "out of service", or "in service". The "test" state 1024 indicates that the termination is not used for normal traffic, but for 1025 testing. A Termination with state "test" cannot be seized for traffic. 1026 The state "out of service" indicates a fault in the termination and can- 1027 not be used for traffic. The state "in service" indicates that a termi- 1028 nation can be used or is being used for normal traffic. "in service" is 1029 the default state. 1031 Values assigned to Properties may be simple values 1032 (integer/string/enumeration) or may be underspecified, where more than 1033 one value is supplied and the MG may make a choice: 1035 * Alternative Values - multiple values in a list, one of which must 1036 be selected 1038 * Ranges - minimum and maximum values, any value between min and max 1039 must be selected, boundary values included 1041 * Greater Than/Less Than - value must be greater/less than specified 1042 value 1044 * CHOOSE Wildcard - the MG chooses from the allowed values for the 1045 property The EventBuffer flag specifies whether events are buffered 1046 following detection of an event in the Events Descriptor, or pro- 1047 cessed immediately. See section 7.1.9 for details. 1049 Internet draft MEGACO Protocol February 8, 2000 1051 7.1.6. Stream Descriptor 1053 A Stream descriptor specifies the parameters of a single bi-directional 1054 stream. These parameters are structured into three descriptors: one 1055 that contains termination properties specific to a stream and one each 1056 for local and remote flows. The Stream Descriptor includes a StreamID 1057 which identifies the stream. Streams are created by specifiying a new 1058 StreamID on one of the terminations in a Context. A stream is deleted by 1059 setting empty Local and Remote descriptors for the stream with Reserve 1060 in LocalControl set to "false" on all terminations in the context which 1061 previously supported that stream. 1063 If a termination is moved from one context to another, the following 1064 applies: 1066 * if a streamID of an active stream in the moved termination matches 1067 a streamID in the context it was moved to, the associated stream 1068 remains active on that termination; 1070 * if a streamID of an active stream in the moved termination does not 1071 match any streamID in the context it was moved to, the stream SHALL 1072 be set to inactive; 1074 * if a stream is inactive on the moved termination, it SHALL remain 1075 inactive in the new context until its mode is changed explicitly; 1077 * the modes of streams on terminations already present in the new 1078 context are unaffected by the fact that a termination is moved into 1079 the context. 1081 7.1.7. LocalControl Descriptor 1083 The LocalControl Descriptor contains the Mode property, the Reserve pro- 1084 perty and properties of a termination (defined in Packages) that are 1085 stream specific, and are of interest between the MG and the MGC. Values 1086 of properties may be underspecified as in section 7.1.5 1088 The allowed values for the mode property are send-only, receive-only, 1089 send/receive, inactive, and loop-back. "Send" and "receive" are with 1090 respect to the exterior of the context, so that, for example, a stream 1091 set to mode=sendonly does not pass received media into the context. 1092 Signals and Events are not affected by mode. 1094 The boolean-valued Reserve property of a Termination indicates what the 1095 MG is expected to do when it receives a local and/or remote descriptor. 1097 If the value of Reserve is True, the MG SHALL reserve resources for all 1098 alternatives specified in the local and/or remote descriptors it 1100 Internet draft MEGACO Protocol February 8, 2000 1102 currently has resources available for. It SHALL respond with the alter- 1103 natives it reserves resources for. If it cannot not support any of the 1104 alternatives, it SHALL respond with a reply to the MGC that contains 1105 empty local and/or remote descriptors. 1107 If the value of Reserve is False, the MG SHALL choose one of the alter- 1108 natives specified in the local descriptor (if present) and one of the 1109 alternatives specified in the remote descriptor (if present). If the MG 1110 has not yet reserved resources to support the selected alternative, it 1111 SHALL reserve the resources. If, on the other hand, it already reserved 1112 resources for the Termination addressed (because of a prior exchange 1113 with Reserve equal to True), it SHALL release any excess resources it 1114 reserved previously. Finally, the MG shall send a reply to the MGC con- 1115 taining the alternatives for the local and/or remote descriptor that it 1116 selected. If the MG does not have sufficient resources to support any 1117 of the alternatives specified, is SHALL respond with error 510 (insuffi- 1118 cient resources). 1120 The default value of Reserve is False. 1122 A new setting of the LocalControl Descriptor completely replaces the 1123 previous setting of that descriptor in the MG. Thus to retain informa- 1124 tion from the previous setting the MGC must include that information in 1125 the new setting. If the MGC wishes to delete some information from the 1126 existing descriptor, it merely resends the descriptor (in a Modify com- 1127 mand) with the unwanted information stripped out 1129 7.1.8. Local and Remote Descriptors 1131 The MGC uses Local and Remote descriptors to reserve and commit MG 1132 resources for media decoding and encoding for the given Stream(s) and 1133 Termination to which they apply. The MG includes these descriptors in 1134 its response to indicate what it is actually prepared to support. The 1135 MG SHALL include additional properties and their values in its response 1136 if these properties are mandatory yet not present in the requests made 1137 by the MGC (e.g., by specifying detailed video encoding parameters where 1138 the MGC only specified the payload type). 1140 Local refers to the media received by the MG and Remote refers to the 1141 media sent by the MG. 1143 When text encoding the protocol, the descriptors consist of session 1144 descriptions as defined in SDP (RFC2327), except that the "s=", "t=" and 1145 "o=" lines are optional. When multiple session descriptions are provided 1146 in one descriptor, the "v=" lines are required as delimiters; otherwise 1147 they are optional. Implementations shall accept session descriptions 1148 that are fully conformant to RFC2327. When binary encoding the protocol 1149 the descriptor consists of groups of properties (tag-value pairs) as 1151 Internet draft MEGACO Protocol February 8, 2000 1153 specified in Annex C. Each such group may contain the parameters of a 1154 session description. 1156 Below, the semantics of the local and remote descriptors are specified 1157 in detail. The specification consists of two parts. The first part 1158 specifies the interpretation of the contents of the descriptor. The 1159 second part specifies the actions the MG must take upon receiving the 1160 local and remote descriptors. The actions to taken by the MG depend on 1161 the value of the Reserve property of the LocalControl descriptor. 1163 Either the local or the remote descriptor or both may be 1165 * unspecified (i.e., absent), 1167 * empty, 1169 * underspecified through use of CHOOSE in a property value, 1171 * fully specified, or 1173 * overspecified through presentation of multiple groups of proper- 1174 ties. 1176 Where the descriptors have been passed from the MGC to the MG, they are 1177 interpreted according to the rules given in section 7.1.1, with the fol- 1178 lowing additional comments for clarification: 1180 a) An unspecified Local or Remote descriptor is considered to be a 1181 missing mandatory parameter. It requires the MG to use whatever 1182 was last specified for that descriptor. It is possible that there 1183 was no previously-specified value, in which case the descriptor 1184 concerned is ignored in further processing of the command. 1186 b) An empty Local (Remote) descriptor in a message from the MGC signi- 1187 fies a request to release any resources reserved for the media flow 1188 received (sent). 1190 c) If multiple groups of properties are present in a Local or Remote 1191 descriptor, the order of preference is descending. 1193 d) Underspecified or overspecified properties within a group of pro- 1194 perties sent by the MGC are requests for the MG to choose a value 1195 which it can support for each of those properties. In case of an 1196 overspecified property, the list of values is in descending order 1197 of preference. 1199 Subject to the above rules, subsequent action depends on the value of 1200 the "Reserve" parameter in LocalControl. 1202 Internet draft MEGACO Protocol February 8, 2000 1204 If Reserve is true, the MG reserves the resources required to support 1205 any of the alternatives that it can currently support. 1207 NOTE - If a Local or Remote descriptor contains multiple groups of pro- 1208 perties, the MG is requested to reserve resources so that it can decode 1209 or encode one media stream according to any of the alternatives. For 1210 instance, if the Local descriptor contains two groups of properties, one 1211 specifying packetized G.711 A-law audio and the other G.723.1 audio, the 1212 MG reserves resources so that it can decode one audio stream encoded in 1213 G.711 A-law format or G.723.1 format. The MG should not reserve 1214 resources to decode two audio streams, one encoded in G.711 A-law and 1215 one in G.723.1. 1217 * If the MG has insufficient resources to support all alternatives 1218 requested by the MGC and the MGC requested resources in both Local 1219 and Remote, the MGC should reserve resources to support at least 1220 one alternative each within Local and Remote. 1222 * If the MG has insufficient resources to support at least one alter- 1223 native within a Local (Remote) descriptor received from the MGC, 1224 it shall return an empty Local (Remote) in response. 1226 * In its response to the MGC, the MG SHALL include local and remote 1227 descriptors for all groups of properties it reserved resources for. 1228 If the MG is incapable of supporting at least one of the alterna- 1229 tives within the Local (Remote) descriptor received from the MGC, 1230 it SHALL return an empty Local (Remote) descriptor. 1232 * If the Mode property of the TerminationState descriptor is RecvOnly 1233 or SendRecv, the MG must be prepared to receive media encoded 1234 according to any of the alternatives included in its response to 1235 the MGC. 1237 If Reserve is False then the MG SHOULD apply the following rules to 1238 resolve Local and Remote to a single alternative each: 1240 * If symmetric coding is not possible, the MG chooses the first 1241 alternative in Local for which it is able to support at least one 1242 alternative in Remote. 1244 * If the MG is unable to support at least one Local and one Remote 1245 alternative, it returns Error 510 (Insufficient Resources). 1247 * The MG returns its selected alternative in Local and Remote. 1249 A new setting of a Local or Remote Descriptor completely replaces the 1250 previous setting of that descriptor in the MG. Thus to retain informa- 1251 tion from the previous setting the MGC must include that information in 1253 Internet draft MEGACO Protocol February 8, 2000 1255 the new setting. If the MGC wishes to delete some information from the 1256 existing descriptor, it merely resends the descriptor (in a Modify com- 1257 mand) with the unwanted information stripped out. 1259 7.1.9. Events Descriptor 1261 The EventsDescriptor parameter contains a RequestIdentifier and a list 1262 of events that the Media Gateway is requested to detect and report. The 1263 RequestIdentifier is used to correlate the request with the notifica- 1264 tions that it may trigger. Requested events include, for example, fax 1265 tones, continuity tones, and on-hook and off-hook transitions. 1267 Each event in the descriptor contains the Event name, an optional 1268 streamID, an optional KeepActive flag, and optional parameters. The 1269 Event name consists of a Package Name (where the event is defined) and 1270 an EventID. The ALL wildcard may be used for the EventID, indicating 1271 that all events from the specified package have to be detected. The 1272 default streamIDis 0, indicating that the event to be detected is not 1273 related to a particular media stream. Events can have parameters. This 1274 allows a single event description to have some variation in meaning 1275 without creating large numbers of individual events. Further event 1276 parameters are defined in the package. 1278 The MG shall send a Notify command to the MGC when it detects an event 1279 in the Events Descriptor. If the EventBuffer flag is "on", following 1280 detection of such an event, normal handling of events is suspended, and 1281 any event found in the EventBuffer Descriptor which is subsequently 1282 detected is added to the end of a FIFO queue, along with the time that 1283 it was detected. A command containing an Events Descriptor which is 1284 received when the EventBuffer flag is on causes the following sequence 1285 to be executed: 1287 1. The first event in the FIFO queue is examined. If it is in the 1288 Events listed in the new events descriptor, the MG shall send a 1289 Notify command to the MGC and remove the event from the FIFO queue. 1290 The time stamp of the Notify shall be the time the event was actu- 1291 ally detected. 1293 2. If the event is not in the new Events Descriptor, it shall be dis- 1294 carded. 1296 3. If the queue is empty, the sequence shall be stopped, and normal 1297 event processing shall be resumed. If there are any events remain- 1298 ing in the queue, the sequence repeats. 1300 If the EventBuffer flag is off when the new Events Descriptor is 1301 received, the queue is flushed, and no events are added to it. The 1302 default state of EventBuffer is off. 1304 Internet draft MEGACO Protocol February 8, 2000 1306 Normally, detection of an event shall cause any active signals to stop. 1307 When KeepActive is specified in the event, the MG shall not interrupt 1308 any signals active on the Termination on which the event is detected. 1310 An event can include an Embedded Signals descriptor and/or an Embedded 1311 Events Descriptor which, if present, replaces the current Signals/Events 1312 descriptor when the event is detected. It is possible, for example, to 1313 specify that the dial-tone Signal be generated when an off-hook Event is 1314 detected, or that the dial-tone Signal be stopped when a digit is 1315 detected. A media gateway controller shall not send EventsDescriptors 1316 with an event both marked KeepActive and containing an embedded Sig- 1317 nalsDescriptor. 1319 Only one level of embedding is permitted. An embedded EventsDescriptor 1320 SHALL NOT contain another embedded EventsDescriptor. 1322 An Events Descriptor received by a media gateway replaces any previous 1323 Events Descriptor. Event notification in process shall complete, and 1324 events detected after the command containing the new EventsDescriptor 1325 executes, shall be processed according to the new EventsDescriptor. 1327 7.1.10. EventBuffer Descriptor 1329 The EventBuffer Descriptor contains a list of events, with their parame- 1330 ters if any, that the MG is requested to detect and buffer when no 1331 Events Descriptor is active (See 7.1.9). 1333 7.1.11. Signals Descriptor 1335 A SignalsDescriptor is a parameter that contains the set of signals that 1336 the Media Gateway is asked to apply to a Termination. A SignalsDescrip- 1337 tor contains a number of signals and/or sequential signal lists. A Sig- 1338 nalsDescriptor may contain zero signals and sequential signal lists. 1339 Support of sequential signal lists is optional. 1341 Signals are defined in packages. Signals shall be named with a Package 1342 name (in which the signal is defined) and a SignalID. No wildcard shall 1343 be used in the SignalID. Signals that occur in a SignalsDescriptor have 1344 an optional StreamID parameter (default is 0, to indicate that the sig- 1345 nal is not related to a particular media stream), an optional signal 1346 type (see below), an optional duration and possibly parameters defined 1347 in the package that defines the signal. This allows a single signal to 1348 have some variation in meaning, obviating the need to create large 1349 numbers of individual signals. Finally, the optional parameter 1350 "notifyCompletion" allows the MGC to indicate that it wishes to be noti- 1351 fied when this signal finishes playout. When the MGC enables the Signal 1352 Completion event (see section E.1.2) in an Event Descriptor, that event 1353 is detected whenever a signal terminates and "notifyCompletion" for that 1355 Internet draft MEGACO Protocol February 8, 2000 1357 signal is set to TRUE.. 1359 The duration is an integer value that is expressed in hundredths of a 1360 second. 1362 There are three types of signals: 1364 * on/off - the signal lasts until it is turned off, 1366 * timeout - the signal lasts until it is turned off or a specific 1367 period of time elapses, 1369 * brief - the signal duration is so short that it will stop on its 1370 own unless a new signal is applied that causes it to stop; no 1371 timeout value is needed. 1373 If the signal type is specified in a SignalsDescriptor, it overrides the 1374 default signal type (see Section 12.1.4). If duration is specified for 1375 an on/off signal, it SHALL be ignored. 1377 A sequential signal list consists of a signal list identifier, a 1378 sequence of signals to be played sequentially, and a signal type. Only 1379 the trailing element of the sequence of signals in a sequential signal 1380 list may be an on/off signal. If the trailing element of the sequence 1381 is an on/off signal, the signal type of the sequential signal list shall 1382 be on/off as well. If the sequence of signals in a sequential signal 1383 list contains signals of type timeout and the trailing element is not of 1384 type on/off, the type of the sequential signal list SHALL be set to 1385 timeout. The duration of a sequential signal list with type timeout is 1386 the sum of the durations of the signals it contains. If the sequence of 1387 signals in a sequential signal list contains only signals of type brief, 1388 the type of the sequential signal list SHALL be set to brief. A signal 1389 list is treated as a single signal of the specified type when played 1390 out. 1392 Multiple signals and sequential signal lists in the same SignalsDescrip- 1393 tor shall be played simultaneously. 1395 Signals are defined as proceeding from the termination towards the exte- 1396 rior of the Context unless otherwise specified in a package. When the 1397 same Signal is applied to multiple Terminations within one Transaction, 1398 the MG should consider using the same resource to generate these Sig- 1399 nals. 1401 Production of a Signal on a Termination is stopped by application of a 1402 new SignalsDescriptor, or detection of an Event on the Termination (see 1403 section 7.1.9). 1405 Internet draft MEGACO Protocol February 8, 2000 1407 A new SignalsDescriptor replaces any existing SignalsDescriptor. Any 1408 signals applied to the Termination not in the replacement descriptor 1409 shall be stopped, and new signals are applied. Signals present in both 1410 the existing and replacement descriptor, with the same parameters in 1411 both, shall be continued. If the replacement descriptor contains a 1412 sequential signal list with the same identifier as the existing descrip- 1413 tor, then 1415 * the signal type and sequence of signals in the sequential signal 1416 list in the replacement descriptor shall be ignored, and 1418 * the playing of the signals in the sequential signal list in the 1419 existing descriptor shall not be interrupted. 1421 7.1.12. Audit Descriptor 1423 Specifies what information is to be audited. The Audit Descriptor 1424 specifies the list of descriptors to be returned. Audit may be used in 1425 any command to force the return of a descriptor even if the descriptor 1426 in the command was not present, or had no underspecified parameters. 1427 Possible items in the Audit Descriptor are: 1429 ________________ 1430 | Modem | 1431 |_______________| 1432 | Mux | 1433 |_______________| 1434 | Events | 1435 |_______________| 1436 | Media | 1437 |_______________| 1438 | Signals | 1439 |_______________| 1440 | ObservedEvents| 1441 |_______________| 1442 | DigitMap | 1443 |_______________| 1444 | Statistics | 1445 |_______________| 1446 | Packages | 1447 |_______________| 1448 | EventBuffer | 1449 |_______________| 1451 Audit may be empty, in which case, no descriptors are returned. This is 1452 useful in Subtract, to inhibit return of statistics, especially when 1453 using wildcard. 1455 Internet draft MEGACO Protocol February 8, 2000 1457 7.1.13. ServiceChange Descriptor 1459 The ServiceChangeDescriptor contains the following parameters: 1461 * ServiceChangeMethod 1463 * ServiceChangeReason 1465 * ServiceChangeAddress 1467 * ServiceChangeDelay 1469 * ServiceChangeProfile 1471 * ServiceChangeVersion 1473 * ServiceChangeMGCId 1475 * TimeStamp 1477 See section 7.2.8 1479 7.1.14. DigitMap Descriptor 1481 A DigitMap is a dialing plan resident in the Media Gateway used for 1482 detecting and reporting digit events received on a Termination. The 1483 DigitMap Descriptor contains a DigitMap name and the DigitMap to be 1484 assigned. A digit map may be preloaded into the MG by management action 1485 and referenced by name in an EventsDescriptor, may be defined dynami- 1486 cally and subsequently referenced by name, or the actual digitmap itself 1487 may be specified in the EventsDescriptor. 1489 DigitMaps defined in a DigitMapDescriptor can occur in any of the stan- 1490 dard Termination manipulation Commands of the protocol. A DigitMap, 1491 once defined, can be used on all Terminations specified by the (possibly 1492 wildcarded) TerminationID in such a command. When a DigitMap is defined 1493 dynamically in a DigitMap Descriptor: 1495 * A new DigitMap is created by specifying a name that is not yet 1496 defined. The value shall be present. 1498 * A DigitMap value is updated by supplying a new value for a name 1499 that is already defined. Terminations presently using the digitmap 1500 shall continue to use the old definition; subsequent EventsDescrip- 1501 tors specifying the name, including any EventsDescriptor in the 1502 command containing the DigitMap descriptor, shall use the new one. 1504 * A DigitMap is deleted by supplying an empty value for a name that 1506 Internet draft MEGACO Protocol February 8, 2000 1508 is already defined. Terminations presently using the digitmap shall 1509 continue to use the old definition. 1511 The collection of digits according to a DigitMap may be protected by 1512 three timers, viz. a start timer (T), short timer (S), and long timer 1513 (L). 1515 1. The start timer (T) is used prior to any digits having been dialed. 1517 2. If the Media Gateway can determine that at least one more digit is 1518 needed for a digit string to match any of the allowed patterns in 1519 the digit map, then the interdigit timer value should be set to a 1520 long (L) duration (e.g.-16 seconds). 1522 3. If the digit string has matched one of the patterns in the digit 1523 map, but it 1524 is possible that more digits could be received which would cause a 1525 match 1526 with a different pattern, then instead of reporting the match 1527 immediately, 1528 the MG must apply the short timer (S) and wait for more digits. 1530 The timers are configurable parameters to a DigitMap. The Start timer 1531 is started at the beginning of every digit map use, but can be overrid- 1532 den. 1534 The formal syntax of the digit map is described by the DigitMap rule in 1535 the formal syntax description of the protocol (see Annex A and Annex B). 1536 A DigitMap, according to this syntax, is defined either by a string or 1537 by a list of strings. Each string in the list is an alternative event 1538 sequence, specified either as a sequence of digit map symbols or as a 1539 regular expression of digit map symbols. These digit map symbols, the 1540 digits "0" through "9" and letters "A" through a maximum value depending 1541 on the signalling system concerned, but never exceeding "K", correspond 1542 to specified events within a package which has been designated in the 1543 Events Descriptor on the termination to which the digit map is being 1544 applied. (The mapping between events and digit map symbols is defined 1545 in the documentation for packages associated with channel-associated 1546 signalling systems such as DTMF, MF, or R2. Digits "0" through "9" MUST 1547 be mapped to the corresponding digit events within the signalling system 1548 concerned. Letters should be allocated in logical fashion, facilitating 1549 the use of range notation for alternative events.) The letter "x" is 1550 used as a wildcard, designating any event corresponding to symbols in 1551 the range "0"-"9". The string may also contain explicit ranges and, 1552 more generally, explicit sets of symbols, designating alternative events 1553 any one of which satisfies that position of the digit map. Finally, the 1554 dot symbol "." stands for zero or more repetitions of the event selector 1555 (event, range of events, set of alternative events, or wildcard) which 1557 Internet draft MEGACO Protocol February 8, 2000 1559 precedes it. As a consequence of the third timing rule above, inter- 1560 event timing while matching the dot symbol uses the short timer. 1562 In addition to these event symbols, the string may contain "L" duration 1563 modifiers. An "L" designates a long event: placed in front of the 1564 symbol(s) designating the event(s) which satisfy a given digit position, 1565 it indicates that that position is satisfied only if the duration of the 1566 event exceeds the long-duration threshold. The value of this threshold 1567 is assumed to be provisioned in the MG. 1569 A digit map is active while the event descriptor which invoked it is 1570 active and it has not completed. A digit map completes when: 1572 * a timer has expired, or 1574 * an alternative event sequence has been matched and no other alter- 1575 native event sequence in the digit map could be matched through 1576 detection of an additional event (unambiguous match), or 1578 * an event has been detected such that a match to a complete alterna- 1579 tive event sequence of the digit map will be impossible no matter 1580 what additional events are received. 1582 Upon completion, a digit map completion event as defined in the package 1583 providing the events being mapped into the digit map shall be generated. 1584 Pending completion, successive events shall be processed according to 1585 the following rules: 1587 The "current dial string", an internal variable, is initially empty. The 1588 set of candidate alternative event sequences includes all of the alter- 1589 natives specified in the digit map. 1591 At each step, a timer is set to wait for the next event. The rules for 1592 determining how long to wait are listed above. If the timer expires and 1593 a member of the candidate set of alternatives is fully satisfied, a 1594 timeout completion with full match is reported. If the timer expires and 1595 part or none of any candidate alternative is satisfied, a timeout com- 1596 pletion with partial match is reported. 1598 If an event is detected before the timer expires, it is mapped to a igit 1599 string symbol and added to the end of the current dial string. The dura- 1600 tion of the event (long or not long) is noted if and only if this is 1601 relevant in the current symbol position (because at least one of the 1602 candidate alternative event sequences includes the "L" modifier at this 1603 position in the sequence). 1605 The current dial string is compared to the candidate alternative event 1606 sequences, and any of these which do not match are discarded from the 1608 Internet draft MEGACO Protocol February 8, 2000 1610 candidate set. If a sequence expecting a long-duration event at this 1611 position is matched (i.e. the event had long duration and met the 1612 specification for this position), then any alternative event sequences 1613 not specifying a long duration event at this position are discarded, and 1614 the current dial string is modified by inserting an "L" in front of the 1615 symbol representing the latest event. If no sequence expecting a long- 1616 duration event at this position is matched, any such sequences are dis- 1617 carded from the candidate set, but the observed event duration is 1618 treated as irrelevant in assessing matches to the remaining candidates. 1620 If exactly one candidate remains, a completion event is generated indi- 1621 cating an unambiguous match. If no candidates remain, but one of the 1622 candidates from the previous step was fully satisfied before the latest 1623 event was detected, a completion event is generated indicating a full 1624 match and an extra event. If no candidates remain and no candidate from 1625 the previous step was fully satisfied before the latest event was 1626 detected, a completion event is generated indicating a partial match and 1627 an extra event. If multiple candidates remain, steps 1 through 4 are 1628 repeated. 1630 As an example, consider the following dial plan: 1632 _______________________________________________________ 1633 | 0 | Local operator | 1634 | 00 | Long distance operator | 1635 | xxxx | Local extension number | 1636 | 8xxxxxxx | Local number | 1637 | #xxxxxxx | Off-site extension | 1638 | *xx | Star services | 1639 | 91xxxxxxxxxx | Long distance number | 1640 | 9011 + up to 15 digits | International number | 1641 |__________________________|___________________________| 1643 If the DTMF detection package described in Annex E (section E.6) is used 1644 to collect the dialed digits, then the dialing plan shown above results 1645 in the following digit map: 1647 (0 | 00 | [1-7]xxx | 8xxxxxxx | Fxxxxxxx | Exx | 91xxxxxxxxxx | 9011x. ) 1649 7.1.15. Statistics Descriptor 1651 The Statistics parameter provides information describing the status and 1652 usage of a Termination during its existence within a specific Context. 1653 There is a set of standard statistics kept for each termination where 1654 appropriate (number of octets sent and received for example). The par- 1655 ticular statistical properties that are reported for a given Termination 1657 Internet draft MEGACO Protocol February 8, 2000 1659 are determined by the Packages realized by the Termination. By default, 1660 statistics are reported when the Termination is Subtracted from the Con- 1661 text. This behavior can be overridden by including an empty Audit- 1662 Descriptor in the Subtract command. Statistics may also be returned 1663 from the AuditValue command, or any Add/Move/Modify command using the 1664 Audit descriptor. 1666 Statistics are cumulative; reporting Statistics does not reset them. 1667 Statistics are reset when a Termination is Subtracted from a Context. 1669 7.1.16. Packages Descriptor 1671 Used only with the AuditValue command, the PackageDescriptor returns a 1672 list of Packages realized by the Termination. 1674 7.1.17. ObservedEvents Descriptor 1676 ObservedEvents is supplied with the Notify command to inform the MGC of 1677 which event(s) were detected. Used with the AuditValue command, the 1678 ObservedEventsDescriptor returns events in the event buffer which have 1679 not been Notified. In addition, if a digit map is active, the Obser- 1680 vedEventsDescriptor shall contain a digit map completion event as 1681 defined in the package whose events are being mapped. This event shall 1682 show the contents of the current dial string at the time the audit 1683 request was processed. ObservedEvents contains the RequestIdentifier of 1684 the EventsDescriptor that triggered the notification, the event(s) 1685 detected and the detection time(s). Detection times are reported with a 1686 precision of hundredths of a second. Time is expressed in UTC. 1688 7.1.18. Topology Descriptor 1690 A topology descriptor is used specify flow directions between termina- 1691 tions in a Context. Contrary to the descriptors in previous sections, 1692 the topology descriptor applies to a Context instead of a Termination. 1693 The default topology of a Context is that each termination's transmis- 1694 sion is received by all other terminations. The Topology Descriptor is 1695 optional to implement. 1697 The Topology Descriptor occurs before the commands in an action. It is 1698 possible to have an action containing only a Topology Descriptor, pro- 1699 vided that the context to which the action applies already exists. 1701 A topology descriptor consists of a sequence of triples of the form (T1, 1702 T2, association). T1 and T2 specify Terminations within the Context, 1703 possibly using the ALL or CHOOSE wildcard. The association specifies 1704 how media flows between these two Terminations as follows. 1706 * (T1, T2, isolate) means that the Terminations matching T2 do not 1708 Internet draft MEGACO Protocol February 8, 2000 1710 receive media from the Terminations matching T1, nor vice versa. 1712 * (T1, T2, oneway) means that the Terminations that match T2 receive 1713 media from the Terminations matching T1, but not vice versa. In 1714 this case use of the ALL wildcard such that there are Terminations 1715 that match both T1 and T2 is not allowed. 1717 * (T1, T2, bothway) means that the Terminations matching T2 receive 1718 media from the Terminations matching T1, and vice versa. In this 1719 case it is allowed to use wildcards such that there are Termina- 1720 tions that match both T1 and T2. However, if there is a Termina- 1721 tion that matches both, no loopback is introduced; loopbacks are 1722 created by setting the TerminationMode. 1724 CHOOSE wildcards may be used in T1 and T2 as well, under the following 1725 restrictions: 1727 * the action (see section 8) of which the topology descriptor is part 1728 contains an Add command in which a CHOOSE wildcard is used; 1730 * if a CHOOSE wildcard occurs in T1 or T2, then a partial name SHALL 1731 NOT be specified. 1733 The CHOOSE wildcard in a topology descriptor matches the TerminationID 1734 that the MG assigns in the first Add command that uses a CHOOSE wildcard 1735 in the same action. An existing Termination that matches T1 or T2 in 1736 the Context to which a Termination is added, is connected to the newly 1737 added Termination as specified by the topology descriptor. The default 1738 association when a termination is not mentioned in the Topology descrip- 1739 tor is bothway (if T3 is added to a context with T1 and T2 with topology 1740 (T3,T1,oneway) it will be connected bothway to T2). 1742 The figure below and the table following it show some examples of the 1743 effect of including topology descriptors in actions. 1745 Internet draft MEGACO Protocol February 8, 2000 1747 Context 1 Context 2 Context 3 1748 +------------------+ +------------------+ +------------------+ 1749 | +----+ | | +----+ | | +----+ | 1750 | | T2 | | | | T2 | | | | T2 | | 1751 | +----+ | | +----+ | | +----+ | 1752 | ^ ^ | | ^ | | ^ | 1753 | | | | | | | | | | 1754 | +--+ +--+ | | +---+ | | +--+ | 1755 | | | | | | | | | | 1756 | v v | | v | | | | 1757 | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | 1758 | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | 1759 | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | 1760 +------------------+ +------------------+ +------------------+ 1761 1. No Topology Desc. 2. T1, T2 Isolate 3. T3, T2 oneway 1762 Context 1 Context 2 Context 3 1764 +------------------+ +------------------+ +------------------+ 1765 | +----+ | | +----+ | | +----+ | 1766 | | T2 | | | | T2 | | | | T2 | | 1767 | +----+ | | +----+ | | +----+ | 1768 | | | | ^ | | ^ ^ | 1769 | | | | | | | | | | 1770 | +--+ | | +---+ | | +--+ +--+ | 1771 | | | | | | | | | | 1772 | v | | v | | v v | 1773 | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | 1774 | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | | | T1 |<-->| T3 | | 1775 | +----+ +----+ | | +----+ +----+ | | +----+ +----+ | 1776 +------------------+ +------------------+ +------------------+ 1777 1. T2, T3 oneway 2. T2, T3 bothway 3. T1, T2 bothway 1779 Figure 4: Example topologies 1781 Internet draft MEGACO Protocol February 8, 2000 1783 _______________________________________________________________________ 1784 |Topology | Description | 1785 |_________|____________________________________________________________| 1786 |1 |No topology descriptors. When no topology descriptors are | 1787 | |included, all terminations have a both way connection to all| 1788 | |other terminations. | 1789 |_________|____________________________________________________________| 1790 |2 |T1, T2, Isolated. Removes the connection between T1 and T2.| 1791 | |T3 has a both way connection with both T1 and T2. | 1792 |_________|____________________________________________________________| 1793 |3 |T3, T2, oneway. A oneway connection from T3 to T2 (i.e. T2 | 1794 | |receives media flow from T3). A bothway connection between | 1795 | |T1 and T3. | 1796 |_________|____________________________________________________________| 1797 |4 |T2, T3, oneway. A oneway connection between T2 to T3. | 1798 | |T1 and T3 remain bothway connected | 1799 |_________|____________________________________________________________| 1800 |5 |T2, T3 bothway. T2 is bothway connected to T3. | 1801 | |This results in the same as 2. | 1802 |_________|____________________________________________________________| 1803 |6 |T1, T2 bothway. (T2, T3 bothway and T1,T3 bothway may be | 1804 | |implied or explicit). terminations have a bothway | 1805 |_________|____________________________________________________________| 1807 A oneway connection must implemented in such a way that the other Termi- 1808 nations in the Context are not aware of the change in topology. 1810 7.2. Command Application Programming Interface 1812 Following is an Application Programming Interface (API) describing the 1813 Commands of the protocol. This API is shown to illustrate the Commands 1814 and their parameters and is not intended to specify implementation (e.g. 1815 via use of blocking function calls). It describes the input parameters 1816 in parentheses after the command name and the return values in front of 1817 the Command. This is only for descriptive purposes; the actual Command 1818 syntax and encoding are specified in later subsections. All parameters 1819 enclosed by square brackets ([. . . ]) are considered optional. 1821 7.2.1. Add 1823 The Add Command adds a Termination to a Context. 1825 TerminationID 1826 [,MediaDescriptor] 1827 [,ModemDescriptor] 1828 [,MuxDescriptor] 1830 Internet draft MEGACO Protocol February 8, 2000 1832 [,EventsDescriptor] 1833 [,SignalsDescriptor] 1834 [,DigitMapDescriptor] 1835 [,ObservedEventsDescriptor] 1836 [,EventBufferDescriptor] 1837 [,StatisticsDescriptor] 1838 [,PackagesDescriptor] 1839 Add( TerminationID 1840 [, MediaDescriptor] 1841 [, ModemDescriptor] 1842 [, MuxDescriptor] 1843 [, EventsDescriptor] 1844 [, SignalsDescriptor] 1845 [, DigitMapDescriptor] 1846 [, AuditDescriptor] 1847 ) 1849 The TerminationID specifies the termination to be added to the Context. 1850 The Termination is either created, or taken from the null Context. For 1851 an existing Termination, the TerminationID would be specific. For a 1852 Termination that does not yet exist, the TerminationID is specified as 1853 CHOOSE in the command. The new TerminationID will be returned. Wild- 1854 cards may be used in an Add, but such usage would be unusual. If the 1855 wildcard matches more than one TerminationID, all possible matches are 1856 attempted, with results reported for each one. The order of attempts 1857 when multiple TerminationIDs match is not specified. 1859 The optional MediaDescriptor describes all media streams. 1861 The optional ModemDescriptor and MuxDescriptor specify a modem and mul- 1862 tiplexer if applicable. For convenience, if a Multiplex Descriptor is 1863 present in an Add command and lists any Terminations that are not 1864 currently in the Context, such Terminations are added to the context as 1865 if individual Add commands listing the Terminations were invoked. If an 1866 error occurs on such an implied Add, error 471 - Implied Add for Multi- 1867 plex failure shall be returned and further processing of the command 1868 shall cease. 1870 The EventsDescriptor parameter is optional. If present, it provides the 1871 list of events that should be detected on the Termination. 1873 The SignalsDescriptor parameter is optional. If present, it provides 1874 the list of signals that should be applied to the Termination. 1876 The DigitMapDescriptor parameter is optional. If present, defines a 1877 DigitMap definition that may be used in an EventsDescriptor. 1879 Internet draft MEGACO Protocol February 8, 2000 1881 The AuditDescriptor is optional. If present, the command will return 1882 descriptors as specified in the AuditDescriptor. 1884 All descriptors that can be modified could be returned by MG if a param- 1885 eter was underspecified or overspecified. ObservedEvents, Statistics, 1886 and Packages, and the EventBuffer Descriptors are returned only if 1887 requested in the AuditDescriptor. Add SHALL NOT be used on a Termina- 1888 tion with a serviceState of "OutofService". 1890 7.2.2. Modify 1892 The Modify Command modifies the properties of a Termination. 1894 TerminationID 1895 [,MediaDescriptor] 1896 [,ModemDescriptor] 1897 [,MuxDescriptor] 1898 [,EventsDescriptor] 1899 [,SignalsDescriptor] 1900 [,DigitMapDescriptor] 1901 [,ObservedEventsDescriptor] 1902 [,EventBufferDescriptor] 1903 [,StatisticsDescriptor] 1904 [,PackagesDescriptor] 1905 Modify( TerminationID 1906 [, MediaDescriptor] 1907 [, ModemDescriptor] 1908 [, MuxDescriptor] 1909 [, EventsDescriptor] 1910 [, SignalsDescriptor] 1911 [, DigitMapDescriptor] 1912 [, AuditDescriptor] 1913 ) 1915 The TerminationID may be specific if a single Termination in the Context 1916 is to be modified. Use of wildcards in the TerminationID may be 1917 appropriate for some operations. If the wildcard matches more than one 1918 TerminationID, all possible matches are attempted, with results reported 1919 for each one. The order of attempts when multiple TerminationIDs match 1920 is not specified. The CHOOSE option is an error, as the Modify command 1921 may only be used on existing Terminations. 1923 The remaining parameters to Modify are the same as those to Add. Possi- 1924 ble return values are the same as those to Add. Modify SHALL NOT be 1925 used on a Termination with a serviceState of "OutofService". 1927 Internet draft MEGACO Protocol February 8, 2000 1929 7.2.3. Subtract 1931 The Subtract Command disconnects a Termination from its Context and 1932 returns statistics on the Termination's participation in the Context. 1934 TerminationID 1935 [,MediaDescriptor] 1936 [,ModemDescriptor] 1937 [,MuxDescriptor] 1938 [,EventsDescriptor] 1939 [,SignalsDescriptor] 1940 [,DigitMapDescriptor] 1941 [,ObservedEventsDescriptor] 1942 [,EventBufferDescriptor] 1943 [,StatisticsDescriptor] 1944 [,PackagesDescriptor] 1945 Subtract(TerminationID 1946 [, AuditDescriptor] 1947 ) 1949 TerminationID in the input parameters represents the Termination that is 1950 being subtracted. The TerminationID may be specific or may be a wild- 1951 card value indicating that all (or a set of related) Terminations in the 1952 Context of the Subtract Command are to be subtracted. If the wildcard 1953 matches more than one TerminationID, all possible matches are attempted, 1954 with results reported for each one. The order of attempts when multiple 1955 TerminationIDs match is not specified. The CHOOSE option is an error, as 1956 the Subtract command may only be used on existing Terminations. ALL may 1957 be used as the ContextID as well as the TerminationId in a Subtract, 1958 which would have the effect of deleting all contexts, deleting all 1959 ephemeral terminations, and returning all physical terminations to Null 1960 context. 1962 By default, the Statistics parameter is returned to report information 1963 collected on the Termination or Terminations specified in the Command. 1964 The information reported applies to the Termination's or 1965 Terminations'Termination's or Terminations' existence in the Context 1966 from which it or they are being subtracted. 1968 The AuditDescriptor is optional. If present, the command will return 1969 descriptors as specified in the AuditDescriptor. Possible return 1970 values are the same as those to Add. 1972 When a provisioned Termination is Subtracted from a context, its pro- 1973 perty values shall revert to: 1975 Internet draft MEGACO Protocol February 8, 2000 1977 * The default value, if specified for the property and not overridden 1978 by provisioning or modification within the null context 1980 * The provisioned value, if not overridden by modification in the 1981 null context 1983 * The last value set by a modification while the termination was in 1984 the null context. 1986 7.2.4. Move 1988 The Move Command moves a Termination to another Context from its current 1989 Context in one atomic operation. The Move command is the only command 1990 that refers to a Termination in a Context different from that to which 1991 the command is applied. The Move command shall not be used to move Ter- 1992 minations to or from the null Context. 1994 TerminationID 1995 [,MediaDescriptor] 1996 [,ModemDescriptor] 1997 [,MuxDescriptor] 1998 [,EventsDescriptor] 1999 [,SignalsDescriptor] 2000 [,DigitMapDescriptor] 2001 [,ObservedEventsDescriptor] 2002 [,EventBufferDescriptor] 2003 [,StatisticsDescriptor] 2004 [,PackagesDescriptor] 2005 Move( TerminationID 2006 [, MediaDescriptor] 2007 [, ModemDescriptor] 2008 [, MuxDescriptor] 2009 [, EventsDescriptor] 2010 [, SignalsDescriptor] 2011 [, DigitMapDescriptor] 2012 [, AuditDescriptor] 2013 ) 2015 The TerminationID specifies the Termination to be moved. It may be 2016 wildcarded. If the wildcard matches more than one TerminationID, all 2017 possible matches are attempted, with results reported for each one. The 2018 order of attempts when multiple TerminationIDs match is not specified. 2019 By convention, the Termination is subtracted from its previous Context. 2020 The Context to which the Termination is moved is indicated by the target 2021 ContextId in the Action. If the last remaining Termination is moved out 2022 of a Context, the Context is deleted. 2024 Internet draft MEGACO Protocol February 8, 2000 2026 The remaining descriptors are processed as in the Modify Command. The 2027 AuditDescriptor with the Statistics option, for example, would return 2028 statistics on the Termination just prior to the Move. Possible descrip- 2029 tors returned from Move are the same as for Add. Move SHALL NOT be used 2030 on a Termination with a serviceState of "OutofService". 2032 7.2.5. AuditValue 2034 The AuditValue Command returns the current values of properties, events, 2035 signals and statistics associated with Terminations. 2037 TerminationID 2038 [,MediaDescriptor] 2039 [,ModemDescriptor] 2040 [,MuxDescriptor] 2041 [,EventsDescriptor] 2042 [,SignalsDescriptor] 2043 [,DigitMapDescriptor] 2044 [,ObservedEventsDescriptor] 2045 [,EventBufferDescriptor] 2046 [,StatisticsDescriptor] 2047 [,PackagesDescriptor] 2048 AuditValue(TerminationID, 2049 AuditDescriptor 2050 ) 2052 TerminationID may be specific or wildcarded. If the wildcard matches 2053 more than one TerminationID, all possible matches are attempted, with 2054 results reported for each one. The order of attempts when multiple Ter- 2055 minationIDs match is not specified. If a wildcarded response is 2056 requested, only one command return is generated, with the contents con- 2057 taining the union of the values of all Terminations matching the wild- 2058 card. This convention may reduce the volume of data required to audit a 2059 group of Terminations. Use of CHOOSE is an error. 2061 The appropriate descriptors, with the current values for the Termina- 2062 tion, are returned from AuditValue. Values appearing in multiple 2063 instances of a descriptor are defined to be alternate values supported, 2064 with each parameter in a descriptor considered independent. 2066 ObservedEvents returns a list of events in the EventBuffer, Packages- 2067 Descriptor returns a list of packages realized by the Termination. 2068 DigitMapDescriptor returns the name or value of the current DigitMap for 2069 the Termination. DigitMap applied to the root Termination returns all 2070 named DigitMaps in the gateway. Statistics returns the current values 2071 of all statistics being kept on the Termination. Specifying an empty 2073 Internet draft MEGACO Protocol February 8, 2000 2075 Audit Descriptor results in only the TerminationID being returned. This 2076 may be useful to get a list of TerminationIDs when used with wildcard. 2078 AuditValue results depend on the Context, viz. specific, null, or wild- 2079 carded. The TerminationID may be specific, or wildcarded. 2081 The following illustrates other information that can be obtained with 2082 the Audit Command: 2084 ________________________________________________________________________ 2085 |ContextID |TerminationID| Information Obtained | 2086 |Specific | wildcard |Audit of matching Terminations in a Context| 2087 |Specific | specific |Audit of a single Termination in a Context | 2088 |Null | Root |Audit of Media Gateway state and events | 2089 |Null | wildcard |Audit of all matching Terminations | 2090 |Null | specific |Audit of a single Termination outside of | 2091 | | |any Context | 2092 |All | wildcard |Audit of all matching Terminations and the | 2093 | | |Context to which they are associated | 2094 |All | Root | List of all ContextIds | 2095 |____________|_____________|___________________________________________| 2097 7.2.6. AuditCapabilities 2099 The AuditCapabilities Command returns the possible values of properties, 2100 events, signals and statistics associated with Terminations. 2102 TerminationID 2103 [,MediaDescriptor] 2104 [,ModemDescriptor] 2105 [,MuxDescriptor] 2106 [,EventsDescriptor] 2107 [,SignalsDescriptor] 2108 [,ObservedEventsDescriptor] 2109 [,EventBufferDescriptor] 2110 [,StatisticsDescriptor] 2111 AuditCapabilities(TerminationID, 2112 AuditDescriptor) 2114 The appropriate descriptors, with the possible values for the Termina- 2115 tion are returned from AuditCapabilities. Descriptors may be repeated 2116 where there are multiple possible values. values. If a wildcarded 2117 response is requested, only one command return is generated, with the 2118 contents containing the union of the values of all Terminations matching 2119 the wildcard. This convention may reduce the volume of data required to 2121 Internet draft MEGACO Protocol February 8, 2000 2123 audit a group of Terminations. 2125 Interpretation of what capabilities are requested for various values of 2126 ContextID and TerminationID is the same as in AuditValue. 2128 The EventsDescriptor returns the list of possible events on the Termina- 2129 tion together with the list of all possible values for the 2130 EventsDescriptor Parameters. The SignalsDescriptor returns the list of 2131 possible signals that could be applied to the Termination together with 2132 the list of all possible values for the Signals Parameters. Statis- 2133 ticsDescriptor returns the names of the statistics being kept on the 2134 termination. ObservedEventsDescriptor returns the names of active 2135 events on the termination. DigitMap and Packages are not legal in 2136 AuditCapability 2138 7.2.7. Notify 2140 The Notify Command allows the Media Gateway to notify the Media Gateway 2141 Controller of events occurring within the Media Gateway. 2143 Notify(TerminationID, 2144 ObservedEventsDescriptor) 2146 The TerminationID parameter specifies the Termination issuing the Notify 2147 Command. The TerminationID shall be a fully qualified name. 2149 The ObservedEventsDescriptor contains the RequestID and a list of events 2150 that the Media Gateway detected in the order that they were detected. 2151 Each event in the list is accompanied by parameters associated with the 2152 event and an indication of the time that the event was detected. Notify 2153 Commands shall occur only as the result of detection of an event speci- 2154 fied by an Events Descriptor which is active on the termination con- 2155 cerned. 2157 The RequestID returns the RequestID parameter of the EventsDescriptor 2158 that triggered the Notify Command. It is used to correlate the notifi- 2159 cation with the request that triggered it. The events in the list must 2160 have been requested via the triggering EventsDescriptor or embedded 2161 EventsDescriptor. 2163 7.2.8. ServiceChange 2165 The ServiceChange Command allows the Media Gateway to notify the Media 2166 Gateway Controller that a Termination or group of Terminations is about 2167 to be taken out of service or has just been returned to service. The 2168 Media Gateway Controller may indicate that Termination(s) shall be taken 2169 out of or returned to service. The Media Gateway may notify the MGC 2171 Internet draft MEGACO Protocol February 8, 2000 2173 that the capability of a Termination has changed. It also allows a MGC 2174 to hand over control of a MG to another MGC. 2176 TerminationID 2177 [ServiceChangeReplyDescriptor] 2178 ServiceChange(TerminationID, 2179 ServiceChangeDescriptor 2180 ) 2182 The TerminationID parameter specifies the Termination(s) that are taken 2183 out of or returned to service. Wildcarding of Termination names is per- 2184 mitted, with the exception that the CHOOSE mechanism shall not be used. 2185 Use of the "Root" TerminationID indicates a ServiceChange affecting the 2186 entire Media Gateway. 2188 The ServiceChangeDescriptor contains the following parameters as 2189 required: 2191 * ServiceChangeMethod 2193 * ServiceChangeReason 2195 * ServiceChangeDelay 2197 * ServiceChangeAddress 2199 * ServiceChangeProfile 2201 * ServiceChangeVersion 2203 * ServiceChangeMGCId 2205 * TimeStamp 2207 The ServiceChangeMethod parameter specifies the type of ServiceChange 2208 that will or has occurred: 2210 1) Graceful - indicates that the specified Terminations will be taken 2211 out of service after the specified ServiceChangeDelay; established 2212 connections are not yet affected, but the Media Gateway Controller 2213 should refrain from establishing new connections and should attempt 2214 to gracefully tear down existing connections. The MG should set 2215 termination serviceState to "test" until the expiry of Servi- 2216 ceChangeDelay or the removal of the termination from an active con- 2217 text (whichever is first), then set it to "out of service". 2219 2) Forced - indicates that the specified Terminations were taken 2221 Internet draft MEGACO Protocol February 8, 2000 2223 abruptly out of service and any established connections associated 2224 with them were lost. The MGC is responsible for cleaning up the 2225 context (if any) with which the failed termination is associated. 2226 At a minimum the termination shall be subtracted from the context. 2227 The termination serviceState should be "out of service". 2229 3) Restart - indicates that service will be restored on the specified 2230 Terminations after expiration of the ServiceChangeDelay. The ser- 2231 viceState should be set to "inService" upon expiry of Servi- 2232 ceChangeDelay. 2234 4) Disconnected - always applied with the Root TerminationID, indi- 2235 cates that the MG lost communication with the MGC, but it was sub- 2236 sequently restored. Since MG state may have changed, the MGC may 2237 wish to use the Audit command to resynchronize its state with the 2238 MG's. 2240 5) Handoff - sent from the MGC to the MG, this reason indicates that 2241 the MGC is going out of service and a new MGC association must be 2242 established. Sent from the MG to the MGC, this indicates that the 2243 MG is attempting to establish a new association in accordance with 2244 a Handoff received from the MGC with which it was previously asso- 2245 ciated. 2247 6) Failover - sent from MG to MGC to indicate the primary MG is out of 2248 service and a secondary MG is taking over, and sent from MG to 2249 (new) MGC in response to the MG having received a ServiceChange 2250 with ServiceChangeMethod equal to Handoff. 2252 7) Another value whose meaning is mutually understood between the MG 2253 and the MGC. 2255 The ServiceChangeReason parameter specifies the reason why the Servi- 2256 ceChange has or will occur. It consists of an alphanumeric token (IANA 2257 registered) and an explanatory string. 2259 The optional ServiceChangeAddress parameter specifies the address (e.g., 2260 IP port number for IP networks) to be used for subsequent communica- 2261 tions. It can be specified in the input parameter descriptor or the 2262 returned result descriptor. ServiceChangeAddress and ServiceChangeMgcId 2263 parameters shall not both be present in the ServiceChangeDescriptor or 2264 the ServiceChangeResultDescriptor. The ServiceChangeAddress provides an 2265 address to be used within the context of the association currently being 2266 negotiated, while the ServiceChangeMgcId provides an alternate address 2267 where the MG should seek to establish another association. 2269 The optional ServiceChangeDelay parameter is expressed in seconds. If 2270 the delay is absent or set to zero, the delay value should be considered 2272 Internet draft MEGACO Protocol February 8, 2000 2274 to be null. In the case of a "graceful" ServiceChangeMethod, a null 2275 delay indicates that the Media Gateway Controller should wait for the 2276 natural removal of existing connections and should not establish new 2277 connections. . For "graceful" only, null delay means the MG should set 2278 serviceState to "test" immediately, then wait indefinitely for the ter- 2279 mination to be removed from any active context before setting service- 2280 State to "out of service". For "restart", null means immediate return 2281 to service. 2283 The optional ServiceChangeProfile parameter specifies the Profile (if 2284 any) of the protocol supported. The ServiceChangeProfile includes the 2285 version of the profile supported. 2287 The optional ServiceChangeVersion parameter contains the protocol ver- 2288 sion and is used if protocol version negotiation occurs (see section 2289 11.3). 2291 The optional TimeStamp parameter specifies the actual time as kept by 2292 the sender. It can be used by the responder to determine how its notion 2293 of time differs from that of its correspondent. TimeStamp is sent with a 2294 precision of hundredths of a second, and is expressed in UTC. 2296 The optional Extension parameter may contain any value whose meaning is 2297 mutually understood by the MG and MGC. 2299 A ServiceChange Command specifying the "Root" for the TerminationID and 2300 ServiceChangeMethod equal to Restart is a registration command by which 2301 a Media Gateway announces its existence to the Media Gateway Controller. 2302 The Media Gateway is expected to be provisioned with the name of one 2303 primary and optionally some number of alternate Media Gateway Controll- 2304 ers. 2305 Acknowledgement of the ServiceChange Command completes the registra- 2306 tion process. The MG may specify an address in the ServiceChangeAddress 2307 parameter of the ServiceChange request, and the MGC may also do so in 2308 the ServiceChange reply. In either case, the recipient must use the 2309 supplied address as the destination for all subsequent transaction 2310 requests within the association. At the same time, as indicated in sec- 2311 tion 9, transaction replies and pending indications must be sent to the 2312 address from which the corresponding requests originated. This must be 2313 done even if it implies extra messaging because commands and responses 2314 cannot be packed together. The TimeStamp parameter shall be sent with a 2315 registration command and its response. 2317 The Media Gateway Controller may return a ServiceChangeMGCId parameter 2318 that describes the Media Gateway Controller that should preferably be 2319 contacted for further service by the Media Gateway. In this case the 2320 Media Gateway shall reissue the ServiceChange command to the new Media 2321 Gateway Controller. The Gateway specified in a ServiceChangeMGCId, if 2323 Internet draft MEGACO Protocol February 8, 2000 2325 provided, shall be contacted before any further alternate MGCs. On a 2326 HandOff message from MGC to MG, the ServiceChangeMGCId is the new MGC 2327 that will take over from the current MGC. 2329 The return from ServiceChange is empty except when the Root termina- 2330 tionID is used. In that case it includes the following parameters as 2331 required: 2333 * ServiceChangeAddress, if the responding MGC wishes to specify an 2334 new destination for messages from the MG for the remainder of the 2335 association; 2337 * ServiceChangeMgcId, if the responding MGC does not wish to sustain 2338 an association with the MG; 2340 * ServiceChangeProfile, if the responder wishes to negotiate the pro- 2341 file to be used for the association; 2343 * ServiceChangeVersion, if the responder wishes to negotiate the ver- 2344 sion of the protocol to be used for the association. 2346 The following ServiceChangeReasons are defined. This list may be 2347 extended by an IANA registration as outlined in section 13.3 2349 900 Service Restored 2350 901 MG Cold Boot 2351 902 MG Warm Boot 2352 903 MGC Directed Change 2353 904 Termination malfunctioning 2354 905 Termination taken out of service 2355 906 Loss of lower layer connectivity (e.g. downstream 2356 sync) 2357 907 Transmission Failure 2358 908 MG Impending Failure 2359 909 MGC Impending Failure 2360 910 Media Capability Failure 2361 911 Modem Capability Failure 2362 912 Mux Capability Failure 2363 913 Signal Capability Failure 2364 914 Event Capability Failure 2365 915 State Loss 2367 7.2.9. Manipulating and Auditing Context Attributes 2369 The commands of the protocol as discussed in the preceding sections 2370 apply to terminations. This section specifies how contexts are manipu- 2371 lated and audited. 2373 Internet draft MEGACO Protocol February 8, 2000 2375 Commands are grouped into actions (see section 8). An action applies to 2376 one context. In addition to commands, it may contain context manipula- 2377 tion and auditing instructions. 2379 An action request sent to a MG may include a request to audit attributes 2380 of a context. An action may also include a request to change the attri- 2381 butes of a context. 2383 The context properties that may be included in an action reply are used 2384 to return information to a MGC. This can be information requested by an 2385 audit of context attributes or details of the effect of manipulation of 2386 a context. 2388 If a MG receives an action which contains both a request to audit con- 2389 text attributes and a request to manipulate those attributes, the 2390 response SHALL include the values of the attributes after processing the 2391 manipulation request. 2393 7.2.10. Generic Command Syntax 2395 The protocol can be encoded in a binary format or in a text format. 2396 MGCs should support both encoding formats. MGs may support both for- 2397 mats. 2399 The protocol syntax for the binary format of the protocol is defined in 2400 Annex A. Annex C specifies the encoding of the Local and Remote 2401 descriptors for use with the binary format. 2403 A complete ABNF of the text encoding of the protocol per RFC2234 is 2404 given in Annex B. SDP, as modified herein is used as the encoding of 2405 the Local and Remote Descriptors for use with the text encoding. 2407 7.3. Command Error Codes 2409 Errors consist of an IANA registered error code and an explanatory 2410 string. Sending the explanatory string is optional. Implementations 2411 are encouraged to append diagnostic information to the end of the 2412 string. 2414 When a MG reports an error to a MGC, it does so in an error descriptor. 2415 An error descriptor consists of an error code and optionally the associ- 2416 ated explanatory string. 2418 The identified error codes are: 2420 400 - Bad Request 2421 401 - Protocol Error 2422 402 - Unauthorized 2424 Internet draft MEGACO Protocol February 8, 2000 2426 403 - Syntax Error in Transaction 2427 404 - Syntax Error in TransactionReply 2428 405 - Syntax Error in TransactionPending 2429 406 - Version Not Supported 2430 410 - Incorrect identifier 2431 411 - The transaction refers to an unknown ContextId 2432 412 - No ContextIDs available 2433 421 - Unknown action or illegal combination of actions 2434 422 - Syntax Error in Action 2435 430 - Unknown TerminationID 2436 431 - No TerminationID matched a wildcard 2437 432 - Out of TerminationIDs or No TerminationID available 2438 433 - TerminationID is already in a Context 2439 440 - Unsupported or unknown Package 2440 441 - Missing RemoteDescriptor 2441 442 - Syntax Error in Command 2442 443 - Unsupported or Unknown Command 2443 444 - Unsupported or Unknown Descriptor 2444 445 - Unsupported or Unknown Property 2445 446 - Unsupported or Unknown Parameter 2446 447 - Descriptor not legal in this command 2447 448 - Descriptor appears twice in a command 2448 450 - No such property in this package 2449 451 - No such event in this package 2450 452 - No such signal in this package 2451 453 - No such statistic in this package 2452 454 - No such parameter value in this package 2453 455 - Parameter illegal in this Descriptor 2454 456 - Parameter or Property appears twice in this Descriptor 2455 461 - TransactionIDs in Reply do not match Request 2456 462 - Commands in Transaction Reply do not match commands in request 2457 463 - TerminationID of Transaction Reply does not match request 2458 464 - Missing reply in Transaction Reply 2459 465 - TransactionID in Transaction Pending does not match any open request 2460 466 - Illegal Duplicate Transaction Request 2461 467 - Illegal Duplicate Transaction Reply 2462 471 - Implied Add for Multiplex failure 2464 500 - Internal Gateway Error 2465 501 - Not Implemented 2466 502 - Not ready. 2467 503 - Service Unavailable 2468 504 - Command Received from unauthorized entity 2469 505 - Command Received before Restart Response 2470 510 - Insufficient resources 2471 512 - Media Gateway unequipped to detect requested Event 2472 513 - Media Gateway unequipped to generate requested Signals 2473 514 - Media Gateway cannot send the specified announcement 2475 Internet draft MEGACO Protocol February 8, 2000 2477 515 - Unsupported Media Type 2478 517 - Unsupported or invalid mode 2479 518 - Event buffer full 2480 519 - Out of space to store digit map 2481 520 - Media Gateway does not have a digit map 2482 521 - Termination is "ServiceChangeing" 2483 526 - Insufficient bandwidth 2484 529 - Internal hardware failure 2485 530 - Temporary Network failure 2486 531 - Permanent Network failure 2487 581 - Does Not Exist 2489 8. TRANSACTIONS 2491 Commands between the Media Gateway Controller and the Media Gateway are 2492 grouped into Transactions, each of which is identified by a Transac- 2493 tionID. Transactions consist of one or more Actions. An Action con- 2494 sists of a series of Commands that are limited to operating within a 2495 single Context. Consequently each Action typically specifies a Contex- 2496 tID. However, there are two circumstances where a specific ContextID is 2497 not provided with an Action. One is the case of modification of a Ter- 2498 mination outside of a Context. The other is where the controller 2499 requests the gateway to create a new Context. Following is a graphic 2500 representation of the Transaction, Action and Command relationships. 2502 +----------------------------------------------------------+ 2503 | Transaction x | 2504 | +----------------------------------------------------+ | 2505 | | Action 1 | | 2506 | | +---------+ +---------+ +---------+ +---------+ | | 2507 | | | Command | | Command | | Command | | Command | | | 2508 | | | 1 | | 2 | | 3 | | 4 | | | 2509 | | +---------+ +---------+ +---------+ +---------+ | | 2510 | +----------------------------------------------------+ | 2511 | | 2512 | +----------------------------------------------------+ | 2513 | | Action 2 | | 2514 | | +---------+ | | 2515 | | | Command | | | 2516 | | | 1 | | | 2517 | | +---------+ | | 2518 | +----------------------------------------------------+ | 2519 | | 2520 | +----------------------------------------------------+ | 2521 | | Action 3 | | 2522 | | +---------+ +---------+ +---------+ | | 2523 | | | Command | | Command | | Command | | | 2525 Internet draft MEGACO Protocol February 8, 2000 2527 | | | 1 | | 2 | | 3 | | | 2528 | | +---------+ +---------+ +---------+ | | 2529 | +----------------------------------------------------+ | 2530 +----------------------------------------------------------+ 2531 Figure 5 Transactions, Actions and Commands 2533 Transactions are presented as TransactionRequests. Corresponding 2534 responses to a TransactionRequest are received in a single reply, possi- 2535 bly preceded by a number of TransactionPending messages (see section 2536 8.2.3). 2538 Transactions guarantee ordered Command processing. That is, Commands 2539 within a Transaction are executed sequentially. Ordering of Transactions 2540 is NOT guaranteed - transactions may be executed in any order, or simul- 2541 taneously. 2543 At the first failing Command in a Transaction, processing of the remain- 2544 ing Commands in that Transaction stops. If a command contains a wild- 2545 carded TerminationID, the command is attempted with each of the actual 2546 TerminationIDs matching the wildcard. A response within the Transac- 2547 tionReply is included for each matching TerminationID, even if one or 2548 more instances generated an error. If any TerminationID matching a 2549 wildcard results in an error when executed, any commands following the 2550 wildcarded command are not attempted. Commands may be marked as 2551 "Optional" which can override this behaviour - if a command marked as 2552 Optional results in an error, subsequent commands in the Transaction 2553 will be executed. 2555 The TransactionReply includes the return values for the Commands that 2556 were executed successfully, and the Command and error descriptor for any 2557 Command that failed. TransactionPending is used to periodically notify 2558 the receiver that a Transaction has not completed yet, but is actively 2559 being processed. 2561 Applications SHOULD implement an application level timer per transac- 2562 tion. Expiration of the timer should cause a retransmission of the 2563 request. Receipt of a Reply should cancel the timer. Receipt of Pending 2564 should restart the timer. 2566 8.1. Common Parameters 2568 8.1.1. Transaction Identifiers 2570 Transactions are identified by a TransactionID, which is assigned by 2571 sender and is unique within the scope of the sender. 2573 Internet draft MEGACO Protocol February 8, 2000 2575 8.1.2. Context Identifiers 2577 Contexts are identified by a ContextID, which is assigned by the Media 2578 Gateway and is unique within the scope of the Media Gateway. The Media 2579 Gateway Controller shall use the ContextID supplied by the Media Gateway 2580 in all subsequent Transactions relating to that Context. The protocol 2581 makes reference to a distinguished value that may be used by the Media 2582 Gateway Controller when referring to a Termination that is currently not 2583 associated with a Context, namely the null ContextID. 2585 The CHOOSE wildcard is used to request that the Media Gateway create a 2586 new Context. The MGC shall not use partially specified ContextIDs con- 2587 taining the CHOOSE wildcard. The MGC may use the ALL wildcard to 2588 address all Contexts on the MG. 2590 8.2. Transaction Application Programming Interface 2592 Following is an Application Programming Interface (API) describing the 2593 Transactions of the protocol. This API is shown to illustrate the Tran- 2594 sactions and their parameters and is not intended to specify implementa- 2595 tion (e.g. via use of blocking function calls). It will describe the 2596 input parameters and return values expected to be used by the various 2597 Transactions of the protocol from a very high level. Transaction syntax 2598 and encodings are specified in later subsections. 2600 8.2.1. TransactionRequest 2602 The TransactionRequest is invoked by the sender. There is one Transac- 2603 tion per request invocation. A request contains one or more Actions, 2604 each of which specifies its target Context and one or more Commands per 2605 Context. 2607 TransactionRequest(TransactionId { 2608 ContextID {Command ... Command}, 2609 . . . 2610 ContextID {Command ... Command } }) 2612 The TransactionID parameter must specify a value for later correlation 2613 with the TransactionReply or TransactionPending response from the 2614 receiver. 2616 The ContextID parameter must specify a value to pertain to all Commands 2617 that follow up to either the next specification of a ContextID parameter 2618 or the end of the TransactionRequest, whichever comes first. 2620 The Command parameter represents one of the Commands mentioned in the 2621 "Command Details" subsection titled "Application Programming Interface". 2623 Internet draft MEGACO Protocol February 8, 2000 2625 8.2.2. TransactionReply 2627 The TransactionReply is invoked by the receiver. There is one reply 2628 invocation per transaction. A reply contains one or more Actions, each 2629 of which must specify its target Context and one or more Responses per 2630 Context. 2632 TransactionReply(TransactionID { 2633 ContextID { Response ... Response }, 2634 . . . 2635 ContextID { Response ... Response } }) 2637 The TransactionID parameter must be the same as that of the correspond- 2638 ing TransactionRequest. 2640 The ContextID parameter must specify a value to pertain to all Responses 2641 for the action. The ContextID may be specific or null. 2643 Each of the Response parameters represents a return value as mentioned 2644 in section 7.2, or an error descriptor if the command execution encoun- 2645 tered an error. Commands after the point of failure are not processed 2646 and, therefore, Responses are not issued for them. 2648 An exception to this occurs if a command has been marked as optional in 2649 the Transaction request. If the optional command generates an error, 2650 the transaction still continues to execute, so the Reply would, in this 2651 case, have Responses after an Error. 2653 If the receiver encounters an error in processing a ContextID, the 2654 requested Action response will consist of the context ID and a single 2655 error descriptor, 422 Syntax Error in Action. 2657 If the receiver encounters an error such that it cannot determine a 2658 legal Action, it will return a TransactionReply consisting of the Tran- 2659 sactionID and a single error descriptor, 422 Syntax Error in Action. If 2660 the end of an action cannot be reliably determined but one or more 2661 Actions can be parsed, it will process them and then send 422 Syntax 2662 Error in Action as the last action for the transaction.If the receiver 2663 encounters an error such that is cannot determine a legal Transaction, 2664 it will return a TransactionReply with a null TransactionID and a single 2665 error descriptor (403 Syntax Error in Transaction). 2667 If the end of a transaction can not be reliably determined and one or 2668 more Actions can be parsed, it will process them and then return 403 2669 Syntax Error in Transaction as the last action reply for the transac- 2670 tion. If no Actions can be parsed, it will return 403 Syntax Error in 2671 Transaction as the only reply 2673 Internet draft MEGACO Protocol February 8, 2000 2675 If the terminationID cannot be reliably determined it will send 442 Syn- 2676 tax Error in Command as the action reply. 2678 If the end of a command cannot be reliably determined it will return 442 2679 Syntax Error in Transaction as the reply to the last action it can 2680 parse. 2682 8.2.3. TransactionPending 2684 The receiver invokes the TransactionPending. A TransactionPending indi- 2685 cates that the Transaction is actively being processed, but has not been 2686 completed. It is used to prevent the sender from assuming the Transac- 2687 tionRequest was lost where the Transaction will take some time to com- 2688 plete. 2690 TransactionPending(TransactionID { } ) 2692 The TransactionID parameter must must be the same as that of the 2693 corresponding TransactionRequest. A property of root (normalMGExecu- 2694 tionTime) is settable by the MGC to indicate the interval within which 2695 the MGC expects a response to any transaction from the MG. Another pro- 2696 perty (normalMGCExecutionTime) is settable by the MGC to indicate the 2697 interval within which the MG should expects a response to any transac- 2698 tion from the MGC. Senders may receive more than one TransactionPending 2699 for a command. If a duplicate request is received when pending, the 2700 responder may send a duplicate pending immediately, or continue waiting 2701 for its timer to trigger another Transaction Pending. 2703 8.3. Messages 2705 Multiple Transactions can be concatenated into a Message. Messages have 2706 a header, which includes the identity of the sender. The Message Iden- 2707 tifier (MID) of a message is set to a provisioned name (e.g. domain 2708 address/domain name/device name) of the entity transmitting the message. 2709 Domain name is a suggested default. 2711 Every Message contains a Version Number identifying the version of the 2712 protocol the message conforms to. Versions consist of one or two 2713 digits, beginning with version 1 for the present version of the proto- 2714 col. 2716 The transactions in a message are treated independently. There is no 2717 order implied, there is no application or protocol acknowledgement of a 2718 message. 2720 Internet draft MEGACO Protocol February 8, 2000 2722 9. TRANSPORT 2724 The transport mechanism for the protocol should allow the reliable tran- 2725 sport of transactions between an MGC and MG. The transport shall remain 2726 independent of what particular commands are being sent and shall be 2727 applicable to all application states. There are several transports 2728 defined for the protocol, which are defined in normative Annexes to this 2729 document. Additional Transports may be defined as additional annexes in 2730 subsequent editions of this document, or in separate documents. For 2731 transport of the protocol over IP, MGCs shall implement both TCP and 2732 UDP/ALF, an MG shall implement TCP or UDP/ALF or both. 2734 The MG is provisioned with a name or address (such as DNS name or IP 2735 address) of a primary and zero or more secondary MGCs (see section 2736 7.2.8) that is the address the MG uses to send messages to the MGC. If 2737 TCP or UDP is used as the protocol transport and the port to which the 2738 initial ServiceChange request is to be sent is not otherwise known, that 2739 request should be sent to the default port number for the protocol. 2740 This port number is xxxx for text-encoded operation or yyyy for binary- 2741 encoded operation, for either UDP or TCP. The MGC receives the message 2742 containing the ServiceChange request from the MG and can determine the 2743 MG's address from it. As described in section 7.2.8, either the MG or 2744 the MGC may supply an address in the ServiceChangeAddress parameter to 2745 which subsequent transaction requests must be addressed, but responses 2746 (including the response to the initial ServiceChange request) must 2747 always be sent back to the address which was the source of the 2748 corresponding request. 2750 9.1. Ordering of Commands 2752 This document does not mandate that the underlying transport protocol 2753 guarantees the sequencing of transactions sent to an entity. This pro- 2754 perty tends to maximize the timeliness of actions, but it has a few 2755 drawbacks. For example: 2757 * Notify commands may be delayed and arrive at the MGC after the 2758 transmission of a new command changing the EventsDescriptor 2760 * If a new command is transmitted before a previous one is ack- 2761 nowledged, there is no guarantee that prior command will be exe- 2762 cuted before the new one. 2764 Media Gateway Controllers that want to guarantee consistent operation of 2765 the Media Gateway may use the following rules: 2767 1. When a Media Gateway handles several Terminations, commands per- 2768 taining to the different Terminations may be sent in parallel, for 2769 example following a model where each Termination (or group of 2771 Internet draft MEGACO Protocol February 8, 2000 2773 Terminations) is controlled by its own process or its own thread. 2775 2. In a given Context, there should normally be at most one outstand- 2776 ing command (Add or Modify or Move). However, a Subtract command 2777 may be issued at any time. In consequence, a Media Gateway may 2778 sometimes receive a Modify command that applies to a previously 2779 subtracted Termination. Such commands should be ignored, and an 2780 error code should be returned. 2782 3. On a given Termination, there should normally be at most one out- 2783 standing Notify command at any time. The RequestId parameter 2784 should be used to correlate Notify commands with the triggering 2785 notification request. 2787 4. In some cases, an implicitly or explicitly wildcarded Subtract com- 2788 mand that applies to a group of Terminations may step in front of a 2789 pending Add command. The Media Gateway Controller should individu- 2790 ally delete all connections whose completion was pending at the 2791 time of the global Subtract command. Also, new Add commands for 2792 Terminations named by the wild-carding (or implied in a Multiplex 2793 descriptor) may not be sent until the wild-carded Subtract command 2794 is acknowledged. 2796 5. AuditValue and AuditCapability are not subject to any sequencing. 2798 6. ServiceChange shall always be the first command sent by a MG as 2799 defined by the restart procedure. Any other command or response 2800 must be delivered after this ServiceChange command. These rules do 2801 not affect the command responder, which should always respond to 2802 commands. 2804 9.2. Protection against Restart Avalanche 2806 In the event that a large number of Media Gateways are powered on simul- 2807 taneously and they were to all initiate a ServiceChange transaction, the 2808 Media Gateway Controller would very likely be swamped, leading to mes- 2809 sage losses and network congestion during the critical period of service 2810 restoration. In order to prevent such avalanches, the following behavior 2811 is suggested: 2813 1. When a Media Gateway is powered on, it should initiate a restart 2814 timer to a random value, uniformly distributed between 0 and a max- 2815 imum waiting delay (MWD). Care should be taken to avoid synchroni- 2816 city of the random number generation between multiple Media Gate- 2817 ways that would use the same algorithm. 2819 2. The Media Gateway should then wait for either the end of this timer 2820 or the detection of a local user activity, such as for example an 2822 Internet draft MEGACO Protocol February 8, 2000 2824 off-hook transition on a residential Media Gateway. 2826 3. When the timer elapses, or when an activity is detected, the Media 2827 Gateway should initiate the restart procedure. 2829 The restart procedure simply requires the MG to guarantee that the first 2830 message that the Media Gateway Controller sees from this MG is a Servi- 2831 ceChange message informing the Media Gateway Controller about the res- 2832 tart 2834 The value of MWD is a configuration parameter that depends on the type 2835 of the Media Gateway. The following reasoning may be used to determine 2836 the value of this delay on residential gateways. 2838 Media Gateway Controllers are typically dimensioned to handle the peak 2839 hour traffic load, during which, in average, 10% of the lines will be 2840 busy, placing calls whose average duration is typically 3 minutes. The 2841 processing of a call typically involves 5 to 6 Media Gateway Controller 2842 transactions between each Media Gateway and the Media Gateway Con- 2843 troller. This simple calculation shows that the Media Gateway Con- 2844 troller is expected to handle 5 to 6 transactions for each Termination, 2845 every 30 minutes on average, or, to put it otherwise, about one transac- 2846 tion per Termination every 5 to 6 minutes on average. This suggests 2847 that a reasonable value of MWD for a residential gateway would be 10 to 2848 12 minutes. In the absence of explicit configuration, residential gate- 2849 ways should adopt a value of 600 seconds for MWD. 2851 The same reasoning suggests that the value of MWD should be much shorter 2852 for trunking gateways or for business gateways, because they handle a 2853 large number of Terminations, and also because the usage rate of these 2854 Terminations is much higher than 10% during the peak busy hour, a typi- 2855 cal value being 60%. These Terminations, during the peak hour, are this 2856 expected to contribute about one transaction per minute to the Media 2857 Gateway Controller load. A reasonable algorithm is to make the value of 2858 MWD per "trunk" Termination six times shorter than the MWD per residen- 2859 tial gateway, and also inversely proportional to the number of Termina- 2860 tions that are being restarted. For example MWD should be set to 2.5 2861 seconds for a gateway that handles a T1 line, or to 60 milliseconds for 2862 a gateway that handles a T3 line. 2864 10. SECURITY CONSIDERATIONS 2866 This section covers security when using the protocol in an IP environ- 2867 ment. 2869 10.1. Protection of Protocol Connections 2871 A security mechanism is clearly needed to prevent unauthorized entities 2873 Internet draft MEGACO Protocol February 8, 2000 2875 from using the protocol defined in this document for setting up unau- 2876 thorized calls or interfering with authorized calls. The security 2877 mechanism for the protocol when transported over IP networks is IPsec 2878 [RFC2401 to RFC2411]. 2880 The AH header [RFC2402] affords data origin authentication, connection- 2881 less integrity and optional anti-replay protection of messages passed 2882 between the MG and the MGC. The ESP header [RFC2406] provides confiden- 2883 tiality of messages, if desired. For instance, the ESP encryption ser- 2884 vice should be requested if the session descriptions are used to carry 2885 session keys, as defined in SDP. 2887 Implementations of the protocol defined in this document employing the 2888 ESP header SHALL comply with section 5 of [RFC2406], which defines a 2889 minimum set of algorithms for integrity checking and encryption. Simi- 2890 larly, implementations employing the AH header SHALL comply with section 2891 5 of [RFC2402], which defines a minimum set of algorithms for integrity 2892 checking using manual keys. 2894 Implementations SHOULD use IKE [RFC2409] to permit more robust keying 2895 options. Implementations employing IKE SHOULD support authentication 2896 with RSA signatures and RSA public key encryption. 2898 10.2. Interim AH scheme 2900 Implementation of IPsec requires that the AH or ESP header be inserted 2901 immediately after the IP header. This cannot be easily done at the 2902 application level. Therefore, this presents a deployment problem for 2903 the protocol defined in this document where the underlying network 2904 implementation does not support IPsec. 2906 As an interim solution, an optional AH header is defined within the 2907 MEGACO protocol header. The header fields are exactly those of the SPI, 2908 SEQUENCE NUMBER and DATA fields as defined in [RFC2402]. The semantics 2909 of the header fields are the same as the "transport mode" of [RFC2402], 2910 except for the calculation of the Integrity Check value (ICV). In IPsec, 2911 the ICV is calculated over the entire IP packet including the IP header. 2912 This prevents spoofing of the IP addresses. To retain the same func- 2913 tionality, the ICV calculation should be performed across the entire 2914 transaction prepended by a synthesized IP header consisting of a 32 bit 2915 source IP address, a 32 bit destination address and an 16 bit UDP 2916 encoded as 10 hex digits. When the interim AH mechanism is employed when 2917 TCP is the transport Layer, the UDP Port above becomes the TCP port, and 2918 all other operations are the same. 2920 Implementations of the MEGACO protocol SHALL implement IPsec where the 2921 underlying operating system and the transport network supports IPsec. 2922 Implementations of the protocol using IPv4 SHALL implement the interim 2924 Internet draft MEGACO Protocol February 8, 2000 2926 AH scheme. However, this interim scheme SHALL NOT be used when the 2927 underlying network layer supports IPsec. IPv6 implementations are 2928 assumed to support IPsec and SHALL NOT use the interim AH scheme. 2930 All implementations of the interim AH mechanism SHALL comply with sec- 2931 tion 5 of [RFC2402] which defines a minimum set of algorithms for 2932 integrity checking using manual keys. 2934 The interim AH interim scheme does not provide protection against eaves- 2935 dropping; thus forbidding third parties from monitoring the connections 2936 set up by a given termination. Also, it does not provide protection 2937 against replay attacks. These procedures do not necessarily protect 2938 against denial of service attacks by misbehaving MGs or misbehaving 2939 MGCs. However, they will provide an identification of these misbehaving 2940 entities, which should then be deprived of their authorization through 2941 maintenance procedures. 2943 10.3. Protection of Media Connections 2945 The protocol allows the MGC to provide MGs with "session keys" that can 2946 be used to encrypt the audio messages, protecting against eavesdropping. 2948 A specific problem of packet networks is "uncontrolled barge-in". This 2949 attack can be performed by directing media packets to the IP address and 2950 UDP port used by a connection. If no protection is implemented, the 2951 packets must be decompressed and the signals must be played on the "line 2952 side". 2954 A basic protection against this attack is to only accept packets from 2955 known sources, checking for example that the IP source address and UDP 2956 source port match the values announced in the Remote Descriptor. This 2957 has two inconveniences: it slows down connection establishment and it 2958 can be fooled by source spoofing: 2960 * To enable the address-based protection, the MGC must obtain the 2961 remote session description of the egress MG and pass it to the 2962 ingress MG. This requires at least one network roundtrip, and 2963 leaves us with a dilemma: either allow the call to proceed without 2964 waiting for the round trip to complete, and risk for example, 2965 "clipping" a remote announcement, or wait for the full roundtrip 2966 and settle for slower call-set-up procedures. 2968 * Source spoofing is only effective if the attacker can obtain valid 2969 pairs of source destination addresses and ports, for example by 2970 listening to a fraction of the traffic. To fight source spoofing, 2971 one could try to control all access points to the network. But 2972 this is in practice very hard to achieve. 2974 Internet draft MEGACO Protocol February 8, 2000 2976 An alternative to checking the source address is to encrypt and authen- 2977 ticate the packets, using a secret key that is conveyed during the call 2978 set-up procedure. This will not slow down the call set- up, and provides 2979 strong protection against address spoofing. 2981 11. MG-MGC CONTROL INTERFACE 2983 The control association between MG and MGC is initiated at MG cold 2984 start, and announced by a ServiceChange message, but can be changed by 2985 subsequent events, such as failures or manual service events. While the 2986 protocol does not have an explicit mechanism to support multiple MGCs 2987 controlling a physical MG, it has been designed to support the multiple 2988 logical MG (within a single physical MG) that can be associated with 2989 different MGCs. 2991 11.1. Multiple Virtual MGs 2993 A physical Media Gateway may be partitioned into one or more Virtual 2994 MGs. A virtual MG consists of a set of statically partitioned physical 2995 Terminations and/or sets of ephemeral Terminations. A physical Termina- 2996 tion is controlled by one MGC. The model does not require that other 2997 resources be statically allocated, just Terminations. The mechanism for 2998 allocating Terminations to virtual MGs is a management method outside 2999 the scope of the protocol. Each of the virtual MGs appears to the MGC 3000 as a complete MG client. 3002 A physical MG may have only one network interface, which must be shared 3003 across virtual MGs. In such a case, the packet/cell side Termination is 3004 shared. It should be noted however, that in use, such interfaces 3005 require an ephemeral instance of the Termination to be created per flow, 3006 and thus sharing the Termination is straightforward. This mechanism 3007 does lead to a complication, namely that the MG must always know which 3008 of its controlling MGCs should be notified if an event occurs on the 3009 interface. 3011 In normal operation, the Virtual MG will be instructed by the MGC to 3012 create network flows (if it is the originating side), or to expect flow 3013 requests (if it is the terminating side), and no confusion will arise. 3014 However, if an unexpected event occurs, the Virtual MG must know what to 3015 do with respect to the physical resources it is controlling. 3017 If recovering from the event requires manipulation of a physical 3018 interface's state, only one MGC should do so. These issues are resolved 3019 by allowing any of the MGCs to create EventsDescriptors to be notified 3020 of such events, but only one MGC can have read/write access to the phy- 3021 sical interface properties; all other MGCs have read-only access. The 3022 management mechanism is used to designate which MGC has read/write capa- 3023 bility, and is designated the Master MGC. 3025 Internet draft MEGACO Protocol February 8, 2000 3027 Each virtual MG has its own Root Termination. In most cases the values 3028 for the properties of the Root Termination are independently settable by 3029 each MGC. Where there can only be one value, the parameter is read-only 3030 to all but the Master MGC. 3032 ServiceChange may only be applied to a Termination or set of Termina- 3033 tions partitioned to the Virtual MG or created (in the case of ephemeral 3034 Terminations) by that Virtual MG. 3036 11.2. Cold Start 3038 A MG is pre-provisioned by a management mechanism outside the scope of 3039 this protocol with a Primary and (optionally) an ordered list of Secon- 3040 dary MGCs. Upon a cold start of the MG, it will issue a ServiceChange 3041 command with a "Restart" method, on the Root Termination to its primary 3042 MGC. If the MGC accepts the MG, it will send a Transaction Accept, with 3043 the MGCIdToTry set to itself. If the MG receives a ServiceChangeMGCId 3044 not equal to the MGC it contacted, it sends a ServiceChange to the MGC 3045 specified in the ServiceChangeMGCId. It continues this process until it 3046 gets a controlling MGC to accept its registration, or it fails to get a 3047 reply. Upon failure to obtain a reply, either from the Primary MGC, or a 3048 designated successor, the MG tries its pre-provisioned Secondary MGCs, 3049 in order. If the MG is unable to establish a control relationship with 3050 any MGC, it shall wait a random amount of time as described in section 3051 9.2 and then start contacting its primary, and if necessary, its secon- 3052 dary MGCs again. 3054 It is possible that the reply to a ServiceChange with Restart will be 3055 lost, and a command will be received by the MG prior to the receipt of 3056 the ServiceChange response. The MG shall issue error 505 - Command 3057 Received before Restart Response. 3059 11.3. Negotiation of Protocol Version 3061 The first ServiceChange command from an MG shall contain the version 3062 number of the protocol supported by the MG in the ServiceChangeVersion 3063 parameter. Upon receiving such a message, if the MGC supports only a 3064 lower version, then the MGC shall send a ServiceChangeReply with the 3065 lower version and thereafter all the messages between MG and MGC shall 3066 conform to the lower version of the protocol. If the MG is unable to 3067 comply and it has established a transport connection to the MGC, it 3068 should close that connection. In any event, it should reject all subse- 3069 quent requests from the MGC with Error 406 Version Not Supported. 3071 If the MGC supports a higher version than the MG but is able to support 3072 the lower version proposed by the MG, it shall send a ServiceChangeReply 3073 with the lower version and thereafter all the messages between MG and 3074 MGC shall conform to the lower version of the protocol. If the MGC is 3076 Internet draft MEGACO Protocol February 8, 2000 3078 unable to comply, it shall reject the association, with Error 406 Ver- 3079 sion Not Supported. 3081 Protocol version negotiation may also occur at "handoff" and "failover" 3082 ServiceChanges. 3084 11.4. Failure of an MG 3086 If a MG fails, but is capable of sending a message to the MGC, it sends 3087 a ServiceChange with an appropriate method (graceful or forced) and 3088 specifies the Root TerminationID. When it returns to service, it sends 3089 a ServiceChange with a "Restart" method. 3091 Allowing the MGC to send duplicate messages to both MGs accommodates 3092 pairs of MGs that are capable of redundant failover of one of the MGs. 3093 Only the Working MG shall accept or reject transactions. Upon failover, 3094 the Primary MG sends a ServiceChange command with a "Failover" method 3095 and a "MG Impending Failure" reason. The MGC then uses the primary MG 3096 as the active MG. When the error condition is repaired, the Working MG 3097 can send a "ServiceChange" with a "Restart" method. 3099 11.5. Failure of an MGC 3101 If the MG detects a failure of its controlling MGC, it attempts to con- 3102 tact the next MGC on its pre-provisioned list. It starts its attempts 3103 at the beginning (Primary MGC), unless that was the MGC that failed, in 3104 which case it starts at its first Secondary MGC. It sends a Servi- 3105 ceChange message with a "Failover" method and a "MGC Impending Failure" 3106 reason. 3108 In partial failure, or manual maintenance reasons, an MGC may wish to 3109 direct its controlled MGs to use a different MGC. To do so, it sends a 3110 ServiceChange method to the MG with a "HandOff" method, and its desig- 3111 nated replacement in ServiceChangeMGCId. The MG should send a Servi- 3112 ceChange message with a "Handoff" method and a "MGC directed change" 3113 reason to the designated MGC. If it fails to get a reply, or fails to 3114 see an Audit command subsequently, it should behave as if its MGC 3115 failed, and start contacting secondary MGCs. If the MG is unable to 3116 establish a control relationship with any MGC, it shall wait a random 3117 amount of time as described in section 9.2 and then start contacting its 3118 primary, and if necessary, its secondary MGCs again. 3120 No recommendation is made on how the MGCs involved in the Handoff main- 3121 tain state information; this is considered to be out of scope of this 3122 recommendation. The MGC and MG may take the following steps when Handoff 3123 occurs. When the MGC initiates a HandOff, the handover should be tran- 3124 sparent to Operations on the Media Gateway. Transactions can be exe- 3125 cuted in any order, and could be in progress when the ServiceChange is 3127 Internet draft MEGACO Protocol February 8, 2000 3129 executed. Accordingly, commands in progress continue, transaction 3130 replies are sent to the new MGC (after a new control association is 3131 established), and the MG should expect outstanding transaction replies 3132 from the new MGC. No new messages shall be sent to the new MGC until 3133 the control association is established. Repeated transaction requests 3134 shall be directed to the new MGC. The MG shall maintain state on all 3135 terminations and contexts. 3137 It is possible that the MGC could be implemented in such a way that a 3138 failed MGC is replaced by a working MGC where the identity of the new 3139 MGC is the same as the failed one. In such a case, ServiceChangeMGCId 3140 would be specified with the previous value and the MG shall behave as if 3141 the value was changed, and send a ServiceChange message, as above. 3143 Pairs of MGCs that are capable of redundant failover can notify the con- 3144 trolled MGs of the failover by the above mechanism. 3146 12. PACKAGE DEFINITION 3148 The primary mechanism for extension is by means of Packages. Packages 3149 define additional Properties, Events, Signals and Statistics that may 3150 occur on Terminations. 3152 Packages defined by IETF will appear in separate RFCs. 3154 Packages relevant to H.323 systems are listed in an Annex to Recommenda- 3155 tion H.323. 3157 Packages defined by ITU-T will be described in Annexes to H.248. 3159 1) A public document or a standard forum document, which can be refer- 3160 enced as the document that describes the package following the 3161 guideline above, should be specified. 3163 2) The document shall specify the version of the Package that it 3164 describes. 3166 3) The document should be available on a public web server and should 3167 have a stable URL. The site should provide a mechanism to provide 3168 comments and appropriate responses should be returned. 3170 12.1. Guidelines for defining packages 3172 Packages define Properties, Events, Signals, and Statistics. 3174 Names of all such defined constructs shall consist of the PackageID 3175 (which uniquely identifies the package) and the ID of the item (which 3176 uniquely identifies the item in that package). In the text encoding the 3178 Internet draft MEGACO Protocol February 8, 2000 3180 two shall be separated by a forward slash ("/") character. Example: 3181 togen/playtone is the text encoding to refer to the play tone signal in 3182 the tone generation package. 3184 A Package will contain the following sections: 3186 12.1.1. Package Overall description of the package, specifying: 3188 Package Name: only descriptive, 3190 PackageID: Is an identifier Description: 3192 Version: A new version of a package can only add additional Proper- 3193 ties, Events, Signals, Statistics and new possible values for an 3194 existing parameter described in the original package. No deletions 3195 or modifications shall be allowed. A version is an integer in the 3196 range from 1 to 99. 3198 Extends (Optional): A package may extend an existing package. The 3199 version of the original package must be specified. When a package 3200 extends another package it shall only add additional Properties, 3201 Events, Signals, Statistics and new possible values for an existing 3202 parameter described in the original package. An extended package 3203 shall not redefine or overload a name defined in the original pack- 3204 age. Hence, if package B version 1 extends package A version 1, 3205 version 2 of B will not be able to extend the A version 2 if A ver- 3206 sion 2 defines a name already in B version 1. 3208 12.1.2. Properties 3210 Properties defined by the package, specifying: 3212 Property Name: only descriptive. 3213 PropertyID: Is an identifier 3214 Description: 3215 Type: One of: 3216 String: UTF-8 string 3217 Integer: 4 byte signed integer 3218 Double: 8 byte signed integer 3219 Character: Unicode UTF-8 encoding of a single letter. 3220 Could be more than one octet. 3221 Enumeration: One of a list of possible unique values 3222 (See 12.3) 3223 Sub-list: A list of several values from a list 3224 Boolean 3225 Possible Values: 3226 Defined in: Which descriptor the property is defined in. 3228 Internet draft MEGACO Protocol February 8, 2000 3230 LocalControl is for stream dependent properties. 3231 TerminationState is for stream independent properties. 3232 Characteristics: Read / Write or both, and (optionally), global: 3233 Indicates whether a property is read-only, or read-write, 3234 and if it is global. If Global is omitted, the property 3235 is not global. If a property is declared as global, 3236 the value of the property is shared by all terminations 3237 realizing the package. 3239 12.1.3. Events 3241 Events defined by the package, specifying: 3242 Event name: only descriptive. 3243 EventID: Is an identifier 3244 Description: 3245 EventsDescriptor Parameters: 3246 Parameters used by the MGC to configure the event, 3247 and found in the EventsDescriptor. See section 12.2 3248 ObservedEventsDescriptor Parameters: 3249 Parameters returned to the MGC in Notify requests 3250 and in replies to command requests from the MGC that 3251 audit ObservedEventsDescriptor, and found in the 3252 ObservedEventsDescriptor. See section 12.2 3254 12.1.4. Signals 3256 Signals defined by the package, specifying: 3257 Signal Name: only descriptive. 3258 SignalID: Is an identifier. SignalID is used in a 3259 SignalsDescriptor 3260 Description 3261 SignalType: One of: 3262 OO (On/Off) 3263 TO (TimeOut) 3264 BR (Brief) 3266 Note: SignalType may be defined such that it is dependent on the value 3267 of one or more parameters. Signals that would be played with SignalType 3268 BR should have a default duration. The package has to define the default 3269 duration and signalType. 3271 Duration: in hundredths of seconds 3272 Additional Parameters: See section 12.2 3274 Internet draft MEGACO Protocol February 8, 2000 3276 12.1.5. Statistics 3278 Statistics defined by the package, specifying: 3279 Statistic name: only descriptive. 3280 StatisticID: Is an identifier 3281 StatisticID is used in a StatisticsDescriptor 3282 Description 3283 Units: unit of measure, e.g. milliseconds, packets 3285 12.1.6. Procedures 3287 Additional guidance on the use of the package. 3289 12.2. Guidelines to defining Properties, Statistics and Parameters to 3290 Events and Signals. 3292 Parameter Name: only descriptive 3293 ParameterID: Is an identifier 3294 Type: One of: 3295 String: UTF-8 octet string 3296 Integer: 4 octet signed integer 3297 Double: 8 octet signed integer 3298 Character: Unicode UTF-8 encoding of a single letter. 3299 Could be more than one octet. 3300 Enumeration: One of a list of possible unique 3301 values (See 12.3) 3302 Sub-list: A list of several values from a list 3303 Boolean 3304 Possible values: 3305 Description: 3307 12.3. Lists 3309 Possible values for parameters include enumerations. Enumerations may 3310 be defined in a list. It is recommended that the list be IANA 3311 registered so that packages that extend the list can be defined without 3312 concern for conflicting names. 3314 12.4. Identifiers 3316 Identifiers in text encoding shall be strings of up to 64 characters, 3317 containing no spaces, starting with an alphanumeric character and con- 3318 sisting of alphanumeric characters and / or digits, and possibly includ- 3319 ing the special character underscore ("_"). Identifiers in binary 3320 encoding are 2 octets long. Both text and binary values shall be speci- 3321 fied for each identifier, including identifiers used as values in 3323 Internet draft MEGACO Protocol February 8, 2000 3325 enumerated types. 3327 12.5. Package Registration 3329 A package can be registered with IANA for interoperability reasons. See 3330 section 13 for IANA considerations. 3332 13. IANA CONSIDERATIONS 3334 13.1. Packages 3336 The following considerations SHALL be met to register a package with 3337 IANA: 3339 1. A unique string name, unique serial number and version number is 3340 registered for each package. The string name is used with text 3341 encoding. The serial number shall be used with binary encoding. 3342 Serial Numbers 60000-64565 are reserved for private use. Serial 3343 number 0 is reserved. 3345 2. A contact name, email and postal addresses for that contact shall 3346 be specified. The contact information shall be updated by the 3347 defining organization as necessary. 3349 3. A reference to a document that describes the package, which should 3350 be public: The document shall specify the version of the Package 3351 that it describes. If the document is public, it should be located 3352 on a public web server and should have a stable URL. The site 3353 should provide a mechanism to provide comments and appropriate 3354 responses should be returned. 3356 4. Packages registered by other than recognized standards bodies shall 3357 have a minimum package name length of 8 characters 3359 5. All other package names are first come-first served if all other 3360 conditions are met 3362 13.2. Error Codes 3364 The following considerations SHALL be met to register an error code with 3365 IANA: 3367 1. An error number and a one line (80 character maximum) string is 3368 registered for each error. 3370 2. A complete description of the conditions under which the error is 3371 detected shall be included in a publicly available document. The 3372 description shall be sufficiently clear to differentiate the error 3374 Internet draft MEGACO Protocol February 8, 2000 3376 from all other existing error codes. 3378 3. The document should be available on a public web server and should 3379 have a stable URL. 3381 4. Error numbers registered by recognized standards bodies shall have 3382 3 or 4 character error numbers. 3384 5. Error numbers registered by all other organizations or individuals 3385 shall have 4 character error numbers. 3387 6. An error number shall not be redefined, nor modified except by the 3388 organization or individual that originally defined it, or their 3389 successors or assigns. 3391 13.3. ServiceChange Reasons 3393 The following considerations SHALL be met to register service change 3394 reason with IANA: 3396 1. A one phrase, 80-character maximum, unique reason code is 3397 registered for each reason. 3399 2. A complete description of the conditions under which the reason is 3400 used is detected shall be included in a publicly available docu- 3401 ment. The description shall be sufficiently clear to differentiate 3402 the reason from all other existing reasons. 3404 3. The document should be available on a public web server and should 3405 have a stable URL. 3407 14. CONTACT INFORMATION 3409 IETF Editor 3410 Brian Rosen 3411 Marconi 3412 1000 FORE Drive 3413 Warrendale, PA 15086 3414 U.S.A. 3415 Phone: +1 724-742-6826 3416 Email: brosen@fore.com 3418 ITU Editor 3419 John Segers 3420 Lucent Technologies 3421 Room HE 306 3422 Dept. Forward Looking Work 3423 P.O. Box 18, 1270 AA Huizen 3425 Internet draft MEGACO Protocol February 8, 2000 3427 Netherlands 3428 Phone: +31 35 687 4724 3429 Email: jsegers@lucent.com 3431 Additional IETF Authors 3432 Fernando Cuervo 3433 Nortel Networks 3434 P.O. Box 3511 Stn C Ottawa, ON, K1Y 4H7 3435 Canada 3436 Email: cuervo@nortelnetworks.com 3438 Bryan Hill 3439 Gotham Networks 3440 15 Discovery Way 3441 Acton, MA 01720 3442 USA 3443 Phone: +1 978-263-6890 3444 Email: bhill@gothamnetworks.com 3446 Christian Huitema 3447 Telcordia Technologies 3448 MCC 1J236B 3449 445 South Street 3450 Morristown, NJ 07960 3451 U.S.A. 3452 Phone: +1 973-829-4266 3453 EMail: huitema@research.telcordia.com 3455 Nancy Greene 3456 Nortel Networks 3457 P.O. Box 3511 Stn C 3458 Ottawa, ON, K1Y 4H7 3459 Canada 3460 Phone: +1 514-271-7221 3461 Email: ngreene@nortelnetworks.com 3463 Abdallah Rayhan 3464 Nortel Networks 3465 P.O. Box 3511 Stn C 3466 Ottawa, ON, K1Y 4H7 3467 Canada 3468 Phone: +1 613-763-9611 3469 Email: arayhan@nortelnetworks.com 3471 Internet draft MEGACO Protocol February 8, 2000 3473 ANNEX A BINARY ENCODING OF THE PROTOCOL (NORMATIVE) 3475 This Annex specifies the syntax of messages using the notation defined 3476 in ASN.1 [ITU-T Recommendation X.680 (1997): Information Technology - 3477 Abstract Syntax Notation One (ASN.1) - Specification of basic nota- 3478 tion.]. Messages shall be encoded for transmission by applying the basic 3479 encoding rules specified in [ITU-T Recommendation X.690(1994) Informa- 3480 tion Technology - ASN.1 Encoding Rules: Specification of Basic 3481 Encoding Rules (BER)]. 3483 A.1. Coding of wildcards 3485 The use of wildcards ALL and CHOOSE is allowed in the protocol. This 3486 allows a MGC to partially specify Termination IDs and let the MG choose 3487 from the values that conform to the partial specification. Termination 3488 IDs may encode a hierarchy of names. This hierarchy is provisioned. For 3489 instance, a TerminationID may consist of a trunk group, a trunk within 3490 the group and a circuit. Wildcarding must be possible at all levels. 3491 The following paragraphs explain how this is achieved. 3493 The ASN.1 description uses octet strings of up to 8 octets in length for 3494 Termination IDs. This means that Termination IDs consist of at most 64 3495 bits. A fully specified Termination ID may be preceded by a sequence of 3496 wildcarding fields. A wildcarding field is octet in length. Bit 7 (the 3497 most significant bit) of this octet specifies what type of wildcarding 3498 is invoked: if the bit value equals 1, then the ALL wildcard is used; 3499 if the bit value if 0, then the CHOOSE wildcard is used. Bit 6 of the 3500 wildcarding field specifies whether the wildcarding pertains to one 3501 level in the hierarchical naming scheme (bit value 0) or to the level of 3502 the hierarchy specified in the wildcarding field plus all lower levels 3503 (bit value 1). Bits 0 through 5 of the wildcarding field specify the 3504 bit position in the Termination ID at which the starts. 3506 We illustrate this scheme with some examples. Assume that Termination 3507 IDs are three octets long and that each octet represents a level in a 3508 hierarchical naming scheme. A valid Termination ID is 3510 00000001 00011110 01010101. 3512 Addressing ALL names with prefix 00000001 00011110 is done as follows: 3514 wildcarding field: 10000111 3515 Termination ID: 00000001 00011110 xxxxxxxx. 3517 The values of the bits labeled "x" is irrelevant and shall be ignored by 3518 the receiver. 3520 Internet draft MEGACO Protocol February 8, 2000 3522 Indicating to the receiver that is must choose a name with 00011110 as 3523 the second octet is done as follows: 3525 wildcarding fields: 00010111 followed by 00000111 3526 Termination ID: xxxxxxxx 00011110 xxxxxxxx. 3528 The first wildcard field indicates a CHOOSE wildcard for the level in 3529 the naming hierarchy starting at bit 23, the highest level in our 3530 assumed naming scheme. The second wildcard field indicates a CHOOSE 3531 wildcard for the level in the naming hierarchy starting at bit 7, the 3532 lowest level in our assumed naming scheme. 3534 Finally, a CHOOSE-wildcarded name with the highest level of the name 3535 equal to 00000001 is specified as follows: 3537 wildcard field: 01001111 3538 Termination ID: 0000001 xxxxxxxx xxxxxxxx . 3540 Bit value 1 at bit position 6 of the first octet of the wildcard field 3541 indicates that the wildcarding pertains to the specified level in the 3542 naming hierarchy and all lower levels. 3544 Context IDs may also be wildcarded. In the case of Context IDs, how- 3545 ever, specifying partial names is not allowed. Context ID 0x0 SHALL be 3546 used to indicate the NULL Context, Context ID 0xFFFFFFFE SHALL be used 3547 to indicate a CHOOSE wildcard, and Context ID 0xFFFFFFFF SHALL be used 3548 to indicate an ALL wildcard. 3550 TerminationID 0xFFFFFFFFFFFFFFFF SHALL be used to indicate the ROOT Ter- 3551 mination. 3553 A.2. ASN.1 syntax specification 3555 This section contains the ASN.1 specification of the H.248 protocol syn- 3556 tax. 3558 NOTE - In case a transport mechanism is used that employs application 3559 level framing, the definition of Transaction below changes. Refer to 3560 the annex defining the transport mechanism for the definition that 3561 applies in that case. 3563 NOTE - The ASN.1 specification below contains a clause defining Termina- 3564 tionIDList as a sequence of TerminationIDs. The length of this sequence 3565 SHALL be one. The SEQUENCE OF construct is present only to allow future 3566 extensions. 3568 Internet draft MEGACO Protocol February 8, 2000 3570 MEDIA-GATEWAY-CONTROL DEFINITIONS AUTOMATIC TAGS::= 3571 BEGIN 3573 MegacoMessage ::= SEQUENCE 3574 { 3575 authHeader AuthenticationHeader OPTIONAL, 3576 mess Message 3577 } 3579 AuthenticationHeader ::= SEQUENCE 3580 { 3581 secParmIndex SecurityParmIndex, 3582 seqNum SequenceNum, 3583 ad AuthData 3584 } 3586 SecurityParmIndex ::= OCTET STRING(SIZE(4)) 3588 SequenceNum ::= OCTET STRING(SIZE(4)) 3590 AuthData ::= OCTET STRING (SIZE (16..32)) 3592 Message ::= SEQUENCE 3593 { 3594 version INTEGER(0..99), 3595 mId MId, -- Name/address of message originator 3596 messageBody CHOICE 3597 { 3598 messageError ErrorDescriptor, 3599 transactions SEQUENCE OF Transaction 3600 }, 3601 ... 3602 } 3604 MId ::= CHOICE 3605 { 3606 ip4Address IP4Address, 3607 ip6Address IP6Address, 3608 domainName DomainName, 3609 deviceName PathName, 3610 mtpAddress OCTET STRING(SIZE(5)), 3611 -- Addressing structure of mtpAddress: 3612 -- 15 0 3613 -- | PC | NI | 3614 -- 14 bits 2 bits 3615 ... 3616 } 3618 Internet draft MEGACO Protocol February 8, 2000 3620 DomainName ::= SEQUENCE 3621 { 3622 name IA5String, 3623 -- The name starts with an alphanumeric digit followed by a 3624 -- sequence of alphanumeric digits, hyphens and dots. No two 3625 -- dots shall occur consecutively. 3626 portNumber INTEGER(0..65535) OPTIONAL 3627 } 3629 IP4Address ::= SEQUENCE 3630 { 3631 address OCTET STRING (SIZE(4)), 3632 portNumber INTEGER(0..65535) OPTIONAL 3633 } 3635 IP6Address ::= SEQUENCE 3636 { 3637 address OCTET STRING (SIZE(16)), 3638 portNumber INTEGER(0..65535) OPTIONAL 3639 } 3641 PathName ::= IA5String(SIZE (1..64)) 3642 -- See section A.3 3644 Transaction ::= CHOICE 3645 { 3646 transactionRequest TransactionRequest, 3647 transactionPending TransactionPending, 3648 transactionReply TransactionReply, 3649 ... 3650 } 3652 TransactionId ::= INTEGER(0..4294967295) -- 32 bit unsigned integer 3654 TransactionRequest ::= SEQUENCE 3655 { 3656 transactionId TransactionId, 3657 actions SEQUENCE OF ActionRequest, 3658 ... 3659 } 3661 TransactionPending ::= SEQUENCE 3662 { 3663 transactionId TransactionId, 3664 ... 3665 } 3667 TransactionReply ::= SEQUENCE 3669 Internet draft MEGACO Protocol February 8, 2000 3671 { 3672 transactionId TransactionId, 3673 transactionResult CHOICE 3674 { 3675 transactionError ErrorDescriptor, 3676 actionReplies SEQUENCE OF ActionReply 3677 }, 3678 ... 3679 } 3681 ErrorDescriptor ::= SEQUENCE 3682 { 3683 errorCode ErrorCode, 3684 errorText ErrorText OPTIONAL 3685 } 3687 ErrorCode ::= INTEGER(0..65535) 3688 -- See section 13 for IANA considerations w.r.t. error codes 3690 ErrorText ::= IA5String 3692 ContextID ::= INTEGER(0..4294967295) 3694 -- Context NULL Value: 0 3695 -- Context CHOOSE Value: 429467294 (0xFFFFFFFE) 3696 -- Context ALL Value: 4294967295 (0xFFFFFFFF) 3698 ActionRequest ::= SEQUENCE 3699 { 3700 contextId ContextID, 3701 contextRequest ContextRequest OPTIONAL, 3702 contextAttrAuditReq ContextAttrAuditRequest OPTIONAL, 3703 commandRequests SEQUENCE OF CommandRequest 3704 } 3706 ActionReply ::= SEQUENCE 3707 { 3708 contextId ContextID, 3709 errorDescriptor ErrorDescriptor OPTIONAL, 3710 contextReply ContextRequest OPTIONAL, 3711 commandReply SEQUENCE OF CommandReply 3712 } 3714 ContextRequest ::= SEQUENCE 3715 { 3716 priority INTEGER(0..15) OPTIONAL, 3718 Internet draft MEGACO Protocol February 8, 2000 3720 emergency BOOLEAN OPTIONAL, 3721 topologyReq SEQUENCE OF TopologyRequest OPTIONAL, 3722 ... 3723 } 3725 ContextAttrAuditRequest ::= SEQUENCE 3726 { 3727 topology NULL OPTIONAL, 3728 emergency NULL OPTIONAL, 3729 priority NULL OPTIONAL, 3730 ... 3731 } 3733 CommandRequest ::= SEQUENCE 3734 { 3735 command Command, 3736 optional NULL OPTIONAL, 3737 wildcardReturn NULL OPTIONAL, 3738 ... 3739 } 3741 Command ::= CHOICE 3742 { 3743 addReq AmmRequest, 3744 moveReq AmmRequest, 3745 modReq AmmRequest, 3746 -- Add, Move, Modify requests have the same parameters 3747 subtractReq SubtractRequest, 3748 auditCapRequest AuditRequest, 3749 auditValueRequest AuditRequest, 3750 notifyReq NotifyRequest, 3751 serviceChangeReq ServiceChangeRequest, 3752 ... 3753 } 3755 CommandReply ::= CHOICE 3756 { 3757 addReply AmmsReply, 3758 moveReply AmmsReply, 3759 modReply AmmsReply, 3760 subtractReply AmmsReply, 3761 -- Add, Move, Modify, Subtract replies have the same parameters 3762 auditCapReply AuditReply, 3763 auditValueReply AuditReply, 3764 notifyReply NotifyReply, 3765 serviceChangeReply ServiceChangeReply, 3766 ... 3767 } 3769 Internet draft MEGACO Protocol February 8, 2000 3771 TopologyRequest ::= SEQUENCE 3772 { 3773 terminationFrom TerminationID, 3774 terminationTo TerminationID, 3775 topologyDirection ENUMERATED 3776 { 3777 bothway(0), 3778 isolate(1), 3779 oneway(2) 3780 } 3781 } 3783 AmmRequest ::= SEQUENCE 3784 { 3785 terminationID TerminationIDList, 3786 mediaDescriptor MediaDescriptor OPTIONAL, 3787 modemDescriptor ModemDescriptor OPTIONAL, 3788 muxDescriptor MuxDescriptor OPTIONAL, 3789 eventsDescriptor EventsDescriptor OPTIONAL, 3790 eventBufferDescriptor EventBufferDescriptor OPTIONAL, 3791 signalsDescriptor SignalsDescriptor OPTIONAL, 3792 digitMapDescriptor DigitMapDescriptor OPTIONAL, 3793 auditDescriptor AuditDescriptor OPTIONAL, 3794 ... 3795 } 3797 AmmsReply ::= SEQUENCE 3798 { 3799 terminationID TerminationIDList, 3800 terminationAudit TerminationAudit OPTIONAL 3801 } 3803 SubtractRequest ::= SEQUENCE 3804 { 3805 terminationID TerminationIDList, 3806 auditDescriptor AuditDescriptor OPTIONAL 3807 } 3809 AuditRequest ::= SEQUENCE 3810 { 3811 terminationID TerminationID, 3812 auditDescriptor AuditDescriptor 3813 } 3815 AuditReply ::= SEQUENCE 3816 { 3817 terminationID TerminationID, 3818 auditResult AuditResult 3820 Internet draft MEGACO Protocol February 8, 2000 3822 } 3824 AuditResult ::= CHOICE 3825 { 3826 contextAuditResult TerminationIDList, 3827 terminationAuditResult TerminationAudit 3828 } 3830 AuditDescriptor ::= SEQUENCE 3831 { 3832 auditToken BIT STRING 3833 { 3834 muxToken(0), modemToken(1), mediaToken(2), 3835 eventsToken(3), signalsToken(4), 3836 digitMapToken(5), statsToken(6), 3837 observedEventsToken(7), 3838 packagesToken(8), eventBufferToken(9) 3839 } OPTIONAL, 3840 ... 3841 } 3843 TerminationAudit ::= SEQUENCE OF AuditReturnParameter 3845 AuditReturnParameter ::= CHOICE 3846 { 3847 errorDescriptor ErrorDescriptor, 3848 mediaDescriptor MediaDescriptor, 3849 modemDescriptor ModemDescriptor, 3850 muxDescriptor MuxDescriptor, 3851 eventsDescriptor EventsDescriptor, 3852 eventBufferDescriptor EventBufferDescriptor, 3853 signalsDescriptor SignalsDescriptor, 3854 digitMapDescriptor DigitMapDescriptor, 3855 observedEventsDescriptor ObservedEventsDescriptor, 3856 statisticsDescriptor StatisticsDescriptor, 3857 packagesDescriptor PackagesDescriptor, 3858 ... 3859 } 3861 NotifyRequest ::= SEQUENCE 3862 { 3863 terminationID TerminationIDList, 3864 observedEventsDescriptor ObservedEventsDescriptor, 3865 errorDescriptor ErrorDescriptor OPTIONAL 3866 } 3868 Internet draft MEGACO Protocol February 8, 2000 3870 NotifyReply ::= SEQUENCE 3871 { 3872 terminationID TerminationIDList OPTIONAL, 3873 errorDescriptor ErrorDescriptor OPTIONAL 3874 } 3876 ObservedEventsDescriptor ::= SEQUENCE 3877 { 3878 requestId RequestID, 3879 observedEventLst SEQUENCE OF ObservedEvent 3880 } 3882 ObservedEvent ::= SEQUENCE 3883 { 3884 eventName EventName, 3885 streamID StreamID OPTIONAL, 3886 eventParList SEQUENCE OF EventParameter, 3887 timeNotation TimeNotation OPTIONAL 3888 } 3890 EventName ::= PkgdName 3892 EventParameter ::= SEQUENCE 3893 { 3894 eventParameterName Name, 3895 value Value 3896 } 3898 ServiceChangeRequest ::= SEQUENCE 3899 { 3900 terminationID TerminationIDList, 3901 serviceChangeParms ServiceChangeParm 3902 } 3904 ServiceChangeReply ::= SEQUENCE 3905 { 3906 terminationID TerminationIDList, 3907 serviceChangeResult ServiceChangeResult 3908 } 3910 -- For ServiceChangeResult, no parameters are mandatory. Hence the 3911 -- distinction between ServiceChangeParm and ServiceChangeResParm. 3913 ServiceChangeResult ::= CHOICE 3914 { 3915 errorDescriptor ErrorDescriptor, 3916 serviceChangeResParms ServiceChangeResParm 3917 } 3919 Internet draft MEGACO Protocol February 8, 2000 3921 WildcardField ::= OCTET STRING(SIZE(1)) 3923 TerminationID ::= SEQUENCE 3924 { 3925 wildcard SEQUENCE OF WildcardField, 3926 id OCTET STRING(SIZE(1..8)) 3927 } 3928 -- See Section A.1 for explanation of wildcarding mechanism. 3929 -- Termination ID 0xFFFFFFFFFFFFFFFF indicates the ROOT Termination. 3931 TerminationIDList ::= SEQUENCE OF TerminationID 3933 MediaDescriptor ::= SEQUENCE 3934 { 3936 termStateDescr TerminationStateDescriptor OPTIONAL, 3937 streams CHOICE 3938 { 3939 oneStream StreamParms, 3940 multiStream SEQUENCE OF StreamDescriptor 3941 }, 3942 ... 3943 } 3945 StreamDescriptor ::= SEQUENCE 3946 { 3947 streamID StreamID, 3948 streamParms StreamParms 3949 } 3951 StreamParms ::= SEQUENCE 3952 { 3953 localControlDescriptor LocalControlDescriptor OPTIONAL, 3954 localDescriptor LocalRemoteDescriptor OPTIONAL, 3955 remoteDescriptor LocalRemoteDescriptor OPTIONAL, 3956 ... 3957 } 3959 LocalControlDescriptor ::= SEQUENCE 3960 { 3961 streamMode StreamMode OPTIONAL, 3962 reserve BOOLEAN, 3963 propertyParms SEQUENCE OF PropertyParm, 3964 ... 3965 } 3967 StreamMode ::= ENUMERATED 3968 { 3970 Internet draft MEGACO Protocol February 8, 2000 3972 sendOnly(0), 3973 recvOnly(1), 3974 sendRecv(2), 3975 inactive(3), 3976 loopBack(4), 3977 ... 3978 } 3980 -- In PropertyParm, value is a SEQUENCE OF octet string. When sent 3981 -- by an MGC the interpretation is as follows: 3982 -- empty sequence means CHOOSE 3983 -- one element sequence specifies value 3984 -- longer sequence means "choose one of the values" 3985 -- The relation field may only be selected if the value sequence 3986 -- has length 1. It indicates that the MG has to choose a value 3987 -- for the property. E.g., x > 3 (using the greaterThan 3988 -- value for relation) instructs the MG to choose any value larger 3989 -- than 3 for property x. 3990 -- The range field may only be selected if the value sequence 3991 -- has length 2. It indicates that the MG has to choose a value 3992 -- in the range between the first octet in the value sequence and 3993 -- the trailing octet in the value sequence, including the 3994 -- boundary values. 3995 -- When sent by the MG, only responses to an AuditCapability request 3996 -- may contain multiple values, a range, or a relation field. 3998 PropertyParm ::= SEQUENCE 3999 { 4000 name PkgdName, 4001 value SEQUENCE OF OCTET STRING, 4002 extraInfo CHOICE 4003 { 4004 relation Relation, 4005 range BOOLEAN 4006 } OPTIONAL 4008 } 4010 Name ::= OCTET STRING(SIZE(2)) 4012 PkgdName ::= OCTET STRING(SIZE(4)) 4013 -- represents Package Name (2 octets) plus Property Name (2 octets) 4014 -- To wildcard a package use 0xFFFF for first two octets, choose 4015 -- is not allowed. Wildcard of a package name is permitted only if 4016 -- Property Name is also wildcarded. To reference native property 4017 -- tag specified in Annex C, use 0x0000 as first two octets. 4019 Relation ::= ENUMERATED 4021 Internet draft MEGACO Protocol February 8, 2000 4023 { 4024 greaterThan(0), 4025 smallerThan(1), 4026 unequalTo(2), 4027 ... 4028 } 4030 LocalRemoteDescriptor ::= SEQUENCE 4031 { 4032 propGrps SEQUENCE OF PropertyGroup, 4033 ... 4034 } 4036 PropertyGroup ::= SEQUENCE OF PropertyParm 4038 TerminationStateDescriptor ::= SEQUENCE 4039 { 4040 propertyParms SEQUENCE OF PropertyParm, 4041 eventBufferFlag BOOLEAN, 4042 serviceState ServiceState OPTIONAL, 4043 ... 4044 } 4046 ServiceState ::= ENUMERATED 4047 { 4048 test(0), 4049 outOfSvc(1), 4050 inSvc(2), 4051 ... 4052 } 4054 MuxDescriptor ::= SEQUENCE 4055 { 4056 muxType MuxType, 4057 termList SEQUENCE OF TerminationID, 4058 ... 4059 } 4061 MuxType ::= ENUMERATED 4062 { 4063 h221(0), 4064 h223(1), 4065 h226(2), 4066 v76(3), 4067 ... 4068 } 4070 StreamID ::= INTEGER(0..65535) -- 16 bit unsigned integer 4072 Internet draft MEGACO Protocol February 8, 2000 4074 EventsDescriptor ::= SEQUENCE 4075 { 4076 requestID RequestID, 4077 eventList SEQUENCE OF RequestedEvent 4078 } 4080 RequestedEvent ::= SEQUENCE 4081 { 4082 pkgdName PkgdName, 4083 streamID StreamID OPTIONAL, 4084 eventAction RequestedActions OPTIONAL, 4085 evParList SEQUENCE OF EventParameter 4086 } 4088 RequestedActions ::= SEQUENCE 4089 { 4090 keepActive BOOLEAN, 4091 eventDM EventDM OPTIONAL, 4092 secondEvent SecondEventsDescriptor OPTIONAL, 4093 signalsDescriptor SignalsDescriptor OPTIONAL, 4094 ... 4095 } 4097 EventDM ::= CHOICE 4098 { digitMapName DigitMapName, 4099 digitMapValue DigitMapValue 4100 } 4102 SecondEventsDescriptor ::= SEQUENCE 4103 { 4104 requestID RequestID, 4105 eventList SEQUENCE OF SecondRequestedEvent 4106 } 4108 SecondRequestedEvent ::= SEQUENCE 4109 { 4110 pkgdName PkgdName, 4111 streamID StreamID OPTIONAL, 4112 eventAction SecondRequestedActions OPTIONAL, 4113 evParList SEQUENCE OF EventParameter 4114 } 4116 SecondRequestedActions ::= SEQUENCE 4117 { 4118 keepActive BOOLEAN, 4119 eventDM EventDM OPTIONAL, 4120 signalsDescriptor SignalsDescriptor OPTIONAL, 4122 Internet draft MEGACO Protocol February 8, 2000 4124 ... 4125 } 4127 EventBufferDescriptor ::= SEQUENCE OF ObservedEvent 4129 SignalsDescriptor ::= SEQUENCE OF SignalRequest 4131 SignalRequest ::=CHOICE 4132 { 4133 signal Signal, 4134 seqSigList SeqSigList 4135 } 4137 SeqSigList ::= SEQUENCE 4138 { 4139 id INTEGER(0..65535), 4140 signalList SEQUENCE OF Signal 4141 } 4143 Signal ::= SEQUENCE 4144 { 4145 signalName SignalName, 4146 streamID StreamID OPTIONAL, 4147 sigType SignalType OPTIONAL, 4148 duration INTEGER (0..65535) OPTIONAL, 4149 notifyCompletion BOOLEAN, 4150 sigParList SEQUENCE OF SigParameter 4151 } 4153 SignalType ::= ENUMERATED 4154 { 4155 brief(0), 4156 onOff(1), 4157 timeOut(2), 4158 ... 4159 } 4161 SignalName ::= PkgdName 4163 SigParameter ::= SEQUENCE 4164 { 4165 sigParameterName Name, 4166 value Value 4167 } 4169 RequestID ::= INTEGER(0..4294967295) -- 32 bit unsigned integer 4171 ModemDescriptor ::= SEQUENCE 4173 Internet draft MEGACO Protocol February 8, 2000 4175 { 4176 mtl SEQUENCE OF ModemType, 4177 mpl SEQUENCE OF PropertyParm 4179 } 4181 ModemType ::= ENUMERATED 4182 { 4183 v18(0), 4184 v22(1), 4185 v22bis(2), 4186 v32(3), 4187 v32bis(4), 4188 v34(5), 4189 v90(6), 4190 v91(7), 4191 synchISDN(8), 4192 ... 4193 } 4195 DigitMapDescriptor ::= SEQUENCE 4196 { 4197 digitMapName DigitMapName, 4198 digitMapValue DigitMapValue 4199 } 4201 DigitMapName ::= Name 4203 DigitMapValue ::= SEQUENCE 4204 { 4205 startTimer INTEGER(0..99) OPTIONAL, 4206 shortTimer INTEGER(0..99) OPTIONAL, 4207 longTimer INTEGER(0..99) OPTIONAL, 4208 digitMapBody IA5String 4209 -- See Section A.3 for explanation of digit map syntax 4210 } 4212 ServiceChangeParm ::= SEQUENCE 4213 { 4214 serviceChangeMethod ServiceChangeMethod, 4215 serviceChangeAddress ServiceChangeAddress OPTIONAL, 4216 serviceChangeVersion INTEGER(0..99) OPTIONAL, 4217 serviceChangeProfile ServiceChangeProfile OPTIONAL, 4218 serviceChangeReason Value, 4219 serviceChangeDelay INTEGER(0..4294967295) OPTIONAL, 4220 -- 32 bit unsigned integer 4221 serviceChangeMgcId MId OPTIONAL, 4222 timeStamp TimeNotation OPTIONAL, 4224 Internet draft MEGACO Protocol February 8, 2000 4226 } 4228 ServiceChangeAddress ::= CHOICE 4229 { 4230 portNumber INTEGER(0..65535), -- TCP/UDP port number 4231 ip4Address IP4Address, 4232 ip6Address IP6Address, 4233 domainName DomainName, 4234 deviceName PathName, 4235 mtpAddress OCTET STRING(SIZE(5)), 4236 ... 4237 } 4239 ServiceChangeResParm ::= SEQUENCE 4240 { 4241 serviceChangeMgcId MId OPTIONAL, 4242 serviceChangeAddress ServiceChangeAddress OPTIONAL, 4243 serviceChangeVersion INTEGER(0..99) OPTIONAL, 4244 serviceChangeProfile ServiceChangeProfile OPTIONAL 4245 } 4247 ServiceChangeMethod ::= ENUMERATED 4248 { 4249 failover(0), 4250 forced(1), 4251 graceful(2), 4252 restart(3), 4253 disconnected(4), 4254 handOff(5), 4255 ... 4256 } 4258 ServiceChangeProfile ::= SEQUENCE 4259 { 4260 profileName Name, 4261 version INTEGER(0..99) 4262 } 4264 PackagesDescriptor ::= SEQUENCE OF PackagesItem 4266 PackagesItem ::= SEQUENCE 4267 { 4268 packageName Name, 4269 packageVersion INTEGER(0..99) 4270 } 4272 StatisticsDescriptor ::= SEQUENCE OF StatisticsParameter 4274 Internet draft MEGACO Protocol February 8, 2000 4276 StatisticsParameter ::= SEQUENCE 4277 { 4278 statName PkgdName, 4279 statValue Value 4280 } 4282 TimeNotation ::= SEQUENCE 4283 { 4284 date IA5String(SIZE(8)), -- yyyymmdd format 4285 time IA5String(SIZE(8)) -- hhmmssss format 4286 } 4288 Value ::= OCTET STRING 4290 END 4292 A.3. Digit maps and path names 4294 >From a syntactic viewpoint, digit maps are strings with syntactic res- 4295 trictions imposed upon them. The syntax of valid digit maps is specified 4296 in ABNF [RFC 2119]. The syntax for digit maps presented in this section 4297 is for illustrative purposes only. The definition of digitMap in Annex B 4298 takes precedence in the case of differences between the two. 4300 digitMap = (digitString / LWSP "(" LWSP digitStringList LWSP 4301 ")" LWSP) 4302 digitStringList = digitString *( LWSP "/" LWSP digitString ) 4303 digitString = 1*(digitStringElement) 4304 digitStringElement = digitPosition [DOT] 4305 digitPosition = digitMapLetter / digitMapRange 4306 digitMapRange = ("x" / LWSP "[" LWSP digitLetter LWSP "]" LWSP) 4307 digitLetter = *((DIGIT "-" DIGIT) / digitMapLetter) 4308 digitMapLetter = DIGIT / %x41-4B / %x61-6B / ; Mapped events 0-9, 4309 ; A-K (a-k) 4310 "L" ; Long duration modifier 4311 LWSP = *(WSP / COMMENT / EOL) 4312 WSP = SP / HTAB 4313 COMMENT = ";" *(SafeChar / RestChar / WSP) EOL 4314 EOL = (CR [LF]) / LF 4315 SP = %x20 4316 HTAB = %x09 4317 CR = &x0D 4318 LF = %x0A 4319 SafeChar = DIGIT / ALPHA / "+" / "-" / "&" / "!" / "_" / "/" / 4320 "'" / "?" / "@" / "^" / "`" / "~" / "*" / "$" / " 4322 Internet draft MEGACO Protocol February 8, 2000 4324 "(" / ")" / "%" / "." 4325 RestChar = ";" / "[" / "]" / "{" / "}" / ":" / "," / "#" / 4326 "<" / ">" / "=" / %x22 4327 DIGIT = %x30-39 ; digits 0 through 9 4328 ALPHA = %x41-5A / %x61-7A ; A-Z, a-z 4330 A path name is also a string with syntactic restrictions imposed upon 4331 it. The ABNF production defining it is copied from Annex B. 4333 PathName = NAME *(["/"] ["*"] ["@"] (ALPHA / DIGIT)) ["*"] 4334 NAME = ALPHA *63(ALPHA / DIGIT / "_" ) 4336 ANNEX B TEXT ENCODING OF THE PROTOCOL (NORMATIVE) 4338 B.1. Coding of wildcards 4340 In a text encoding of the protocol, while TerminationIDs are arbitrary, 4341 by judicious choice of names, the wildcard character, "*" may be made 4342 more useful. When the wildcard character is encountered, it will 4343 "match" all TerminationIDs having the same previous and following char- 4344 acters (if appropriate). For example, if there were TerminationIDs of 4345 R13/3/1, R13/3/2 and R13/3/3, the TerminationID R13/3/* would match all 4346 of them. There are some circumstances where ALL Terminations must be 4347 referred to. The TerminationID "*" suffices, and is referred to as ALL. 4348 The CHOOSE TerminationID "$" may be used to signal to the MG that it has 4349 to create an ephemeral Termination or select an idle physical Termina- 4350 tion. 4352 B.2. ABNF specification 4354 The protocol syntax is presented in ABNF according to RFC2234. The pro- 4355 tocol is not case sensitive. Identifiers are not case sensitive. 4357 megacoMessage = LWSP [authenticationHeader SEP ] message 4359 authenticationHeader = AuthToken EQUAL SecurityParmIndex COLON 4360 SequenceNum COLON AuthData 4362 SecurityParmIndex = "0x" 8(HEXDIG) 4363 SequenceNum = "0x" 8(HEXDIG) 4364 AuthData = "0x" 32*64(HEXDIG) 4366 message = MegacopToken SLASH Version SEP mId SEP 4368 Internet draft MEGACO Protocol February 8, 2000 4370 messageBody 4372 messageBody = ( errorDescriptor / transactionList ) 4374 transactionList = 1*( transactionRequest / transactionReply / 4375 transactionPending) 4377 transactionPending = PendingToken EQUAL TransactionID LBRKT RBRKT 4379 transactionRequest = TransToken EQUAL TransactionID LBRKT 4380 actionRequest *(COMMA actionRequest) RBRKT 4382 actionRequest = CtxToken EQUAL ContextID LBRKT (( 4383 contextRequest [COMMA commandRequestList]) 4384 / commandRequestList) RBRKT 4386 contextRequest = ((contextAudit [COMMA contextProperties]) 4387 / contextProperties) 4389 contextProperties = contextProperty *(COMMA contextProperty) 4391 ; at-most-once 4392 contextProperty = (topologyDescriptor / priority / 4393 EmergencyToken) 4395 contextAudit = ContextAuditToken LBRKT 4396 contextAuditProperties *(COMMA 4397 contextAuditProperties) RBRKT 4399 ; at-most-once 4400 contextAuditProperties = ( TopologyToken / EmergencyToken / 4401 PriorityToken ) 4403 commandRequestList=["O-"] commandRequest *(COMMA ["O-"]commandRequest) 4405 commandRequest = ( ammRequest / subtractRequest / auditRequest / 4406 notifyRequest / serviceChangeRequest) 4408 transactionReply = ReplyToken EQUAL TransactionID LBRKT 4409 ( errorDescriptor / actionReplyList ) RBRKT 4411 actionReplyList = actionReply *(COMMA actionReply ) 4413 actionReply = CtxToken EQUAL ContextID LBRKT 4414 ( errorDescriptor / commandReply ) RBRKT 4416 commandReply = (( contextProperties [COMMA commandReplyList] ) / 4417 commandReplyList ) 4419 Internet draft MEGACO Protocol February 8, 2000 4421 commandReplyList = commandReplys *(COMMA commandReplys ) 4423 commandReplys = (serviceChangeReply / auditReply / ammsReply / 4424 notifyReply ) 4426 ;Add Move and Modify have the same request parameters 4427 ammRequest = (AddToken / MoveToken / ModifyToken ) EQUAL 4428 TerminationID [LBRKT ammParameter *(COMMA 4429 ammParameter) RBRKT] 4431 ;at-most-once 4432 ammParameter = (mediaDescriptor / modemDescriptor / 4433 muxDescriptor / eventsDescriptor / 4434 signalsDescriptor / digitMapDescriptor / 4435 eventBufferDescriptor / auditDescriptor) 4437 ammsReply = (AddToken / MoveToken / ModifyToken / 4438 SubtractToken ) EQUAL TerminationID [ LBRKT 4439 terminationAudit RBRKT ] 4441 subtractRequest = ["W-"] SubtractToken EQUAL TerminationID 4442 [ LBRKT auditDescriptor RBRKT] 4444 auditRequest = ["W-"] (AuditValueToken / AuditCapToken ) EQUAL 4445 TerminationID LBRKT auditDescriptor RBRKT 4447 auditReply = (AuditValueToken / AuditCapToken ) 4448 ( contextTerminationAudit / auditOther) 4450 auditOther = EQUAL TerminationID LBRKT 4451 terminationAudit RBRKT 4453 terminationAudit = auditReturnParameter *(COMMA auditReturnParameter) 4455 contextTerminationAudit = EQUAL CtxToken ( terminationIDList / 4456 LBRKT errorDescriptor RBRKT ) 4457 ;at-most-once except errorDescriptor 4458 auditReturnParameter = (mediaDescriptor / modemDescriptor / 4459 muxDescriptor / eventsDescriptor / 4460 signalsDescriptor / digitMapDescriptor / 4461 observedEventsDescriptor / eventBufferDescriptor / 4462 statisticsDescriptor / packagesDescriptor / 4463 errorDescriptor ) 4465 auditDescriptor = AuditToken LBRKT [ auditItem 4466 *(COMMA auditItem) ] RBRKT 4468 notifyRequest = NotifyToken EQUAL TerminationID 4470 Internet draft MEGACO Protocol February 8, 2000 4472 LBRKT ( observedEventsDescriptor / 4473 errorDescriptor ) RBRKT 4475 notifyReply = NotifyToken EQUAL TerminationID 4476 [ LBRKT errorDescriptor RBRKT ] 4478 serviceChangeRequest = ServiceChangeToken EQUAL TerminationID 4479 LBRKT serviceChangeDescriptor RBRKT 4481 serviceChangeReply = ServiceChangeToken EQUAL TerminationID 4482 [LBRKT (errorDescriptor / 4483 serviceChangeReplyDescriptor) RBRKT] 4485 errorDescriptor = ErrorToken EQUAL ErrorCode 4486 LBRKT [quotedString] RBRKT 4488 ErrorCode = 1*4(DIGIT) ; could be extended 4490 TransactionID = UINT32 4492 mId = (( domainAddress / domainName ) 4493 [":" portNumber]) / mtpAddress / deviceName 4495 ; ABNF allows two or more consecutive "." although it is meaningless 4496 ; in a domain name. 4497 domainName = "<" (ALPHA / DIGIT) *63(ALPHA / DIGIT / "-" / 4498 ".") ">" 4499 deviceName = pathNAME 4501 ContextID = (UINT32 / "*" / "-" / "$") 4503 domainAddress = "[" (IPv4address / IPv6address) "]" 4504 ;RFC2373 contains the definition of IP6Addresses. 4505 IPv6address = hexpart [ ":" IPv4address ] 4506 IPv4address = V4hex DOT V4hex DOT V4hex DOT V4hex 4507 V4hex = 1*3(DIGIT) ; "0".."225" 4508 ; this production, while occurring in RFC2373, is not referenced 4509 ; IPv6prefix = hexpart SLASH 1*2DIGIT 4510 hexpart = hexseq "::" [ hexseq ] / "::" [ hexseq ] / 4511 hexseq 4512 hexseq = hex4 *( ":" hex4) 4513 hex4 = 1*4HEXDIG 4515 portNumber = UINT16 4517 ; An mtp address is five octets long 4518 mtpAddress = MTPToken LBRKT octetString RBRKT 4520 Internet draft MEGACO Protocol February 8, 2000 4522 terminationIDList = LBRKT TerminationID *(COMMA TerminationID) 4523 RBRKT 4525 ; Total length of pathNAME must not exceed 64 chars. 4526 pathNAME = ["*"] NAME *("/" / "*"/ ALPHA / DIGIT /"_" / "$" ) 4527 ["@" pathDomainName ] 4529 ; ABNF allows two or more consecutive "." although it is meaningless 4530 ; in a path domain name. 4531 pathDomainName = (ALPHA / DIGIT / "*" ) 4532 *63(ALPHA / DIGIT / "-" / "*" / ".") 4534 TerminationID = "ROOT" / pathNAME / "$" / "*" 4536 mediaDescriptor = MediaToken LBRKT mediaParm *(COMMA mediaParm) RBRKT 4538 ; at-most-once per item 4539 ; and either streamParm or streamDescriptor but not both 4540 mediaParm = (streamParm / streamDescriptor / 4541 terminationStateDescriptor) 4543 ; at-most-once 4544 streamParm = ( localDescriptor / remoteDescriptor / 4545 localControlDescriptor ) 4547 streamDescriptor = StreamToken EQUAL StreamID LBRKT streamParm 4548 *(COMMA streamParm) RBRKT 4550 localControlDescriptor = LocalControlToken LBRKT localParm 4551 *(COMMA localParm) RBRKT 4553 ; at-most-once per item 4554 localParm = ( streamMode / propertyParm / reservedMode) 4556 reservedMode = ReservedToken EQUAL ( "ON" / "OFF" ) 4558 streamMode = ModeToken EQUAL streamModes 4560 streamModes = (SendonlyToken / RecvonlyToken / SendrecvToken / 4561 InactiveToken / LoopbackToken ) 4563 propertyParm = pkgdName parmValue 4564 parmValue = (EQUAL alternativeValue/ INEQUAL VALUE) 4565 alternativeValue = ( VALUE / LSBRKT VALUE *(COMMA VALUE) RSBRKT / 4566 LSBRKT VALUE DOT DOT VALUE RSBRKT ) 4568 INEQUAL = LWSP (">" / "<" / "#" ) LWSP 4569 LSBRKT = LWSP "[" LWSP 4571 Internet draft MEGACO Protocol February 8, 2000 4573 RSBRKT = LWSP "]" LWSP 4575 localDescriptor = LocalToken LBRKT octetString RBRKT 4577 remoteDescriptor = RemoteToken LBRKT octetString RBRKT 4579 eventBufferDescriptor= EventBufferToken LBRKT observedEvent 4580 *( COMMA observedEvent ) RBRKT 4582 eventBufferFlag = BufferToken EQUAL ("ON" / "OFF" ) 4584 terminationStateDescriptor = TerminationStateToken LBRKT 4585 terminationStateParm *( COMMA terminationStateParm ) RBRKT 4587 ; at-most-once per item 4588 terminationStateParm=(propertyParm / serviceStates / eventBufferFlag ) 4590 serviceStates = ServiceStatesToken EQUAL ( TestToken / 4591 OutOfSvcToken / InSvcToken ) 4593 muxDescriptor = MuxToken EQUAL MuxType terminationIDList 4595 MuxType = ( H221Token / H223Token / H226Token / V75Token 4596 extensionParameter ) 4598 StreamID = UINT16 4599 pkgdName = (PackageName SLASH ItemID) / ; specific item 4600 (PackageName SLASH "*" ) / ; all events in pkg 4601 ( "*" SLASH "*" ) ; all events supported by MG 4602 PackageName = NAME 4603 ItemID = NAME 4605 eventsDescriptor = EventsToken EQUAL RequestID LBRKT 4606 requestedEvent *( COMMA requestedEvent ) RBRKT 4608 requestedEvent = pkgdName [ LBRKT eventParameter 4609 *( COMMA eventParameter ) RBRKT ] 4611 ; at-most-once each of embedOrKeepActive , eventDM or eventStream 4612 eventParameter = ( embedOrKeepActive / eventDM / eventStream 4613 / eventOther ) 4614 embedOrKeepActive = eventEmbedded / KeepActiveToken 4616 eventEmbedded = EmbedToken LBRKT embedFirst [COMMA embedFirst ] RBRKT 4617 ; at-most-once of each 4618 embedFirst = ( signalsDescriptor / secondEventEmbeddedDescriptor ) 4620 secondEventEmbeddedDescriptor= EventsToken EQUAL RequestID LBRKT 4622 Internet draft MEGACO Protocol February 8, 2000 4624 secondRequestedEvent *(COMMA secondRequestedEvent) RBRKT 4626 secondRequestedEvent = pkgdName [ LBRKT secondEventParameter 4627 *( COMMA secondEventParameter ) RBRKT ] 4629 ; at-most-once each of embedOrKeepActive , eventDM or eventStream 4630 secondEventParameter = ( SecondEmbedOrKeepActive / eventDM / 4631 eventStream / eventOther ) 4633 secondEmbedOrKeepActive = secondEventEmbedded / KeepActiveToken 4635 secondEventEmbedded = EmbedToken LBRKT signalsDescriptor RBRKT 4637 eventStream = StreamToken EQUAL StreamID 4639 eventOther = eventParameterName parmValue 4641 eventParameterName = NAME 4643 eventDM = DigitMapToken ((EQUAL digitMapName ) / 4644 (LBRKT digitMapValue RBRKT )) 4646 signalsDescriptor = SignalsToken LBRKT [ signalParm 4647 *(COMMA signalParm)] RBRKT 4649 signalParm = signalList / signalRequest 4651 signalRequest = signalName [ LBRKT sigParameter 4652 *(COMMA sigParameter) RBRKT ] 4654 signalList = SignalListToken EQUAL signalListId LBRKT 4655 signalListParm *(COMMA signalListParm) RBRKT 4657 signalListId = UINT16 4659 ;exactly once signalType, at most once duration and every signal 4660 ;parameter 4661 signalListParm = signalRequest 4663 signalName = pkgdName 4664 ;at-most-once sigStream, at-most-once sigSignalType, 4665 ;at-most-once sigDuration, every signalParameterName at most once 4666 sigParameter = sigStream / sigSignalType / sigDuration / 4667 sigOther 4668 / notifyCompletion 4669 sigStream = StreamToken EQUAL StreamID 4670 sigOther = sigParameterName parmValue 4671 sigParameterName = NAME 4673 Internet draft MEGACO Protocol February 8, 2000 4675 sigSignalType = SignalTypeToken EQUAL signalType 4676 signalType = (OnOffToken / TimeOutToken / BriefToken) 4677 sigDuration = DurationToken EQUAL UINT16 4678 notifyCompletion = NotifyCompletionToken EQUAL ("ON" / "OFF" ) 4680 observedEventsDescriptor = ObservedEventsToken EQUAL RequestID 4681 LBRKT observedEvent *(COMMA observedEvent) RBRKT 4683 ;time per event, because it might be buffered 4684 observedEvent = [ TimeStamp LWSP COLON] LWSP 4685 pkgdName [ LBRKT observedEventParameter 4686 *(COMMA observedEventParameter) RBRKT ] 4688 ;at-most-once eventStream, every eventParameterName at most once 4689 observedEventParameter = eventStream / eventOther 4691 RequestID = UINT32 4693 modemDescriptor = ModemToken (( EQUAL modemType) / 4694 (LSBRKT modemType *(COMMA modemType) RSBRKT)) 4695 [ LBRKT NAME parmValue 4696 *(COMMA NAME parmValue) RBRKT ] 4698 ; at-most-once 4699 modemType = (V32bisToken / V22bisToken / V18Token / 4700 V22Token / V32Token / V34Token / V90Token / 4701 V91Token / SynchISDNToken / extensionParameter) 4703 digitMapDescriptor = DigitMapToken EQUAL digitMapName 4704 ( LBRKT digitMapValue RBRKT ) 4705 digitMapName = NAME 4706 digitMapValue = ["T" COLON Timer COMMA] ["S" COLON Timer COMMA] 4707 ["L" COLON Timer COMMA] digitMap 4708 Timer = 1*2DIGIT 4709 digitMap = (digitString / LWSP "(" LWSP digitStringList LWSP ")" LWSP) 4710 digitStringList = digitString *( LWSP "|" LWSP digitString ) 4711 digitString = 1*(digitStringElement) 4712 digitStringElement = digitPosition [DOT] 4713 digitPosition = digitMapLetter / digitMapRange 4714 digitMapRange = ("x" / LWSP "[" LWSP digitLetter LWSP "]" LWSP) 4715 digitLetter = *((DIGIT "-" DIGIT ) / digitMapLetter) 4716 digitMapLetter = DIGIT / %x41-4B / %x61-6B / ; 0-9, A-K, (a-k) 4717 "L" ; Long duration modifier 4719 ;at-most-once 4720 auditItem = ( MuxToken / ModemToken / MediaToken / 4721 SignalsToken / EventBufferToken / 4722 DigitMapToken / StatsToken / EventsToken / 4724 Internet draft MEGACO Protocol February 8, 2000 4726 ObservedEventsToken / PackagesToken ) 4728 serviceChangeDescriptor = ServicesToken LBRKT serviceChangeParm 4729 *(COMMA serviceChangeParm) RBRKT 4731 serviceChangeParm = (serviceChangeMethod / serviceChangeReason / 4732 serviceChangeDelay / serviceChangeAddress / 4733 serviceChangeProfile / extension / TimeStamp / 4734 serviceChangeMgcId / serviceChangeVersion ) 4736 serviceChangeReplyDescriptor = ServicesToken LBRKT 4737 servChgReplyParm *(COMMA servChgReplyParm) RBRKT 4739 ;at-most-once. Version is REQUIRED on first ServiceChange response 4740 servChgReplyParm = (serviceChangeAddress / serviceChangeMgcId / 4741 serviceChangeProfile / serviceChangeVersion ) 4742 serviceChangeMethod = MethodToken EQUAL (FailoverToken / 4743 ForcedToken / GracefulToken / RestartToken / 4744 DisconnectedToken / HandOffToken / 4745 extensionParameter) 4747 serviceChangeReason = ReasonToken EQUAL VALUE 4748 serviceChangeDelay = DelayToken EQUAL UINT32 4749 serviceChangeAddress = ServiceChangeAddressToken EQUAL VALUE 4750 serviceChangeMgcId = MgcIdToken EQUAL mId 4751 serviceChangeProfile = ProfileToken EQUAL NAME SLASH Version 4752 serviceChangeVersion = VersionToken EQUAL Version 4753 extension = extensionParameter parmValue 4755 packagesDescriptor = PackagesToken LBRKT packagesItem 4756 *(COMMA packagesItem) RBRKT 4758 Version = 1*2(DIGIT) 4759 packagesItem = NAME "-" UINT16 4761 TimeStamp = Date "T" Time ; per ISO 8601:1988 4762 ; Date = yyyymmdd 4763 Date = 8(DIGIT) 4764 ; Time = hhmmssss 4765 Time = 8(DIGIT) 4766 statisticsDescriptor = StatsToken LBRKT statisticsParameter 4767 *(COMMA statisticsParameter ) RBRKT 4769 ;at-most-once per item 4770 statisticsParameter = pkgdName EQUAL VALUE 4772 topologyDescriptor = TopologyToken LBRKT terminationA COMMA 4773 terminationB COMMA topologyDirection RBRKT 4775 Internet draft MEGACO Protocol February 8, 2000 4777 terminationA = TerminationID 4778 terminationB = TerminationID 4779 topologyDirection = BothwayToken / IsolateToken / OnewayToken 4781 priority = PriorityToken EQUAL UINT16 4783 extensionParameter = "X" ("-" / "+") 1*6(ALPHA / DIGIT) 4785 ; octetString is used to describe SDP defined in RFC2327. 4786 ; Caution should be taken if CRLF in RFC2327 is used. 4787 ; To be safe, use EOL in this ABNF. 4788 ; Whenever "}" appears in SDP, it is escaped by " 4789 octetString = *(nonEscapeChar) 4790 nonEscapeChar = ( "" / %x01-7C / %x7E-FF ) 4791 quotedString = DQUOTE 1* (SafeChar / RestChar/ WSP) DQUOTE 4793 UINT16 = 1*5(DIGIT) ; %x0-FFFF 4794 UINT32 = 1*10(DIGIT) ; %x0-FFFFFFFF 4796 NAME = ALPHA *63(ALPHA / DIGIT / "_" ) 4797 VALUE = quotedString / 1* (SafeChar) 4798 SafeChar = DIGIT / ALPHA / "+" / "-" / "&" / 4799 "!" / "_" / "/" / "'" / "?" / "@" / 4800 "^" / "`" / "~" / "*" / "$" / " 4801 "(" / ")" / "%" / "|" / "." 4803 EQUAL = LWSP %x3D LWSP ; "=" 4804 COLON = %x3A ; ":" 4805 LBRKT = LWSP %x7B LWSP ; "{" 4806 RBRKT = LWSP %x7D LWSP ; "}" 4807 COMMA = LWSP %x2C LWSP ; "," 4808 DOT = %x2E ; "." 4809 SLASH = %x2F ; "/" 4810 ALPHA = %x41-5A / %x61-7A ; A-Z / a-z 4811 DIGIT = %x30-39 ; 0-9 4812 DQUOTE = %x22 ; " (Double Quote) 4813 HEXDIG = ( DIGIT / "A" / "B" / "C" / "D" / "E" / "F" ) 4814 SP = %x20 ; space 4815 HTAB = %x09 ; horizontal tab 4816 CR = %x0D ; Carriage return 4817 LF = %x0A ; linefeed 4818 LWSP = *( WSP / COMMENT / EOL ) 4819 EOL = (CR [LF] / LF ) 4820 WSP = SP / HTAB ; white space 4821 SEP = ( WSP / EOL / COMMENT) LWSP 4822 COMMENT = ";" *(SafeChar/ RestChar / WSP / %x22) EOL 4823 RestChar = ";" / "[" / "]" / "{" / "}" / ":" / "," / "#" / 4824 "<" / ">" / "=" 4826 Internet draft MEGACO Protocol February 8, 2000 4828 AddToken = ("Add" / "A") 4829 AuditToken = ("Audit" / "AT") 4830 AuditCapToken = ("AuditCapability" / "AC") 4831 AuditValueToken = ("AuditValue" / "AV") 4832 AuthToken = ("Authentication" / "AU") 4833 BothwayToken = ("Bothway" / "BW") 4834 BriefToken = ("Brief" / "BR") 4835 BufferToken = ("Buffer" / "BF") 4836 CtxToken = ("Context" / "C") 4837 ContextAuditToken = ("ContextAudit" / "CA") 4838 DigitMapToken = ("DigitMap" / "DM") 4839 DiscardToken = ("Discard" / "DS") 4840 DisconnectedToken = ("Disconnected" / "DC") 4841 DelayToken = ("Delay" / "DL") 4842 DurationToken = ("Duration" / "DR") 4843 EmbedToken = ("Embed" / "EB") 4844 EmergencyToken = ("Emergency" / "EM") 4845 ErrorToken = ("Error" / "ER") 4846 EventBufferToken = ("EventBuffer" / "EB") 4847 EventsToken = ("Events" / "E") 4848 FailoverToken = ("Failover" / "FL") 4849 ForcedToken = ("Forced" / "FO") 4850 GracefulToken = ("Graceful" / "GR") 4851 H221Token = ("H221" ) 4852 H223Token = ("H223" ) 4853 H226Token = ("H226" ) 4854 HandOffToken = ("HandOff" / "HO") 4855 InactiveToken = ("Inactive" / "IN") 4856 IsolateToken = ("Isolate" / "IS") 4857 InSvcToken = ("InService" / "IV") 4858 KeepActiveToken = ("KeepActive" / "KA") 4859 LocalToken = ("Local" / "L") 4860 LocalControlToken = ("LocalControl" / "O") 4861 LoopbackToken = ("Loopback" / "LB") 4862 MediaToken = ("Media" / "M") 4863 MegacopToken = ("MEGACO" / "!") 4864 MethodToken = ("Method" / "MT") 4865 MgcIdToken = ("MgcIdToTry" / "MG") 4866 ModeToken = ("Mode" / "MO") 4867 ModifyToken = ("Modify" / "MF") 4868 ModemToken = ("Modem" / "MD") 4869 MoveToken = ("Move" / "MV") 4870 MTPToken = ("MTP") 4871 MuxToken = ("Mux" / "MX") 4872 NotifyToken = ("Notify" / "N") 4873 NotifyCompletionToken = ("NotifyCompletion" / "NC") 4874 ObservedEventsToken = ("ObservedEvents" / "OE") 4875 OnewayToken = ("Oneway" / "OW") 4877 Internet draft MEGACO Protocol February 8, 2000 4879 OnOffToken = ("OnOff" / "OO") 4880 OutOfSvcToken = ("OutOfService" / "OS") 4881 PackagesToken = ("Packages" / "PG") 4882 PendingToken = ("Pending" / "PN") 4883 PriorityToken = ("Priority" / "PR") 4884 ProfileToken = ("Profile" / "PF") 4885 ReasonToken = ("Reason" / "RE") 4886 RecvonlyToken = ("ReceiveOnly" / "RC") 4887 ReplyToken = ("Reply" / "P") 4888 RestartToken = ("Restart" / "RS") 4889 RemoteToken = ("Remote" / "R") 4890 ReservedToken = ("Reserved" / "RV") 4891 SendonlyToken = ("SendOnly" / "SO") 4892 SendrecvToken = ("SendReceive" / "SR") 4893 ServicesToken = ("Services" / "SV") 4894 ServiceStatesToken = ("ServiceStates" / "SI") 4895 ServiceChangeToken = ("ServiceChange" / "SC") 4896 ServiceChangeAddressToken = ("ServiceChangeAddress" / "AD") 4897 SignalListToken = ("SignalList" / "SL") 4898 SignalsToken = ("Signals" / "SG") 4899 SignalTypeToken = ("SignalType" / "SY") 4900 StatsToken = ("Statistics" / "SA") 4901 StreamToken = ("Stream" / "ST") 4902 SubtractToken = ("Subtract" / "S") 4903 SynchISDNToken = ("SynchISDN" / "SN") 4904 TerminationStateToken = ("TerminationState" / "TS") 4905 TestToken = ("Test" / "TE") 4906 TimeOutToken = ("TimeOut" / "TO") 4907 TopologyToken = ("Topology" / "TP") 4908 TransToken = ("Transaction" / "T") 4909 V18Token = ("V18") 4910 V22Token = ("V22") 4911 V22bisToken = ("V22b") 4912 V32Token = ("V32") 4913 V32bisToken = ("V32b") 4914 V34Token = ("V34") 4915 V76Token = ("V76") 4916 V90Token = ("V90") 4917 V91Token = ("V91") 4919 ANNEX C TAGS FOR MEDIA STREAM PROPERTIES (NORMATIVE) 4921 Parameters for Local descriptors and Remote descriptors are specified as 4922 tag-value pairs if binary encoding is used for the protocol. This annex 4923 contains the property names (PropertyID), the tags (Property Tag), type 4924 of the property (Type) and the values (Value).Values presented in the 4926 Internet draft MEGACO Protocol February 8, 2000 4928 Value field when the field contains references shall be regarded as 4929 "information". The reference contains the normative values. If a value 4930 field does not contain a reference then the values in that field can be 4931 considered as "normative". 4933 Tags are given as hexadecimal numbers in this annex. When setting the 4934 value of a property, a MGC may underspecify the value according to one 4935 of the mechanisms specified in section 7.1.1. 4937 For type "enumeration" the value is represented by the value in brack- 4938 ets, e.g., Send(0), Receive(1). 4940 C.1. General Media Attributes 4942 ________________________________________________________________________ 4943 |PropertyID | Tag | Type | Value | 4944 |Media |1001 |Enumeration|Audio(0), Video(1) ,Data(2), | 4945 |TransMode |1002 |Enumeration|Send(0), Receive(1), Send&Receive(2) | 4946 |NumChan |1003 |UINT | 0-255 | 4947 |SamplingRate |1004 |UINT | 0-2^32 | 4948 |Bitrate |1005 |Integer |(0..4294967295) Note-units of 100 bit | 4949 |Acodec |1006 | |. Audio Codec Type | 4950 |Samplepp |1007 |UINT |Maximum samples per packet:0-65535 | 4951 |Silencesupp |1008 |BOOLEAN |Silence Suppression | 4952 |Encrypttype |1009 |Octet str |Ref.: rec. H.245 | 4953 |Encryptkey |100A |Octet str |SIZE(0..65535) Encryption key | 4954 |Echocanc |100B |Enumeration|Echo Canceller:Off(0),G.165(1),G168(2)| 4955 |Gain |100C |UINT |Gain in db: 0-65535 | 4956 |Jitterbuff |100D |UINT |Jitter buffer size in ms: 0-65535 | 4957 |PropDelay |100E |UINT | Propagation Delay: 0..65535 | 4958 |RTPpayload |100F |integer |Payload type in RTP Profile | 4959 |_____________|_____|___________|______________________________________| 4961 C.2. Mux Properties 4963 _________________________________________________________________________ 4964 |PropertyID| Tag | Type | Value | 4965 |H.221 | 2001 | Octet string| H222LogicalChannelParameters | 4966 |H223 | 2002 | Octet string| H223LogicalChannelParameters | 4967 |V76 | 2003 | Octet String| V76LogicalChannelParameters | 4968 |H2250 | 2004 | Octet String| H2250LogicalChannelParameters| 4969 |__________|____________|______________|________________________________| 4971 C.3. General bearer properties 4973 Internet draft MEGACO Protocol February 8, 2000 4975 _____________________________________________________________________ 4976 | PropertyID| Tag | Type | Value | 4977 | Mediatx | 3001 | Enumeration| Media Transport Type | 4978 | BIR | 3002 | 4 OCTET | Value depends on transport | 4979 | NSAP | 3003 | 20 OCTET | Ref: ITU X.213 Annex A | 4980 |___________|____________|_____________|_____________________________| 4982 C.4. General ATM properties 4984 _________________________________________________________________ 4985 PropertyID Tag Type Value 4986 AESA 4001 20 OCTETS ATM End System Address 4987 VPVC 4002 2x16b int VPC-VCI 4988 SC 4003 4 bits Service Category 4989 BCOB 4004 5b integer Broadband Bearer Class 4990 BBTC 4005 octet Broadband Transfer Capability 4991 ATC 4006 Enumeration I.371 ATM Traffic Cap. 4992 STC 4007 2 bits Susceptibility to clipping 4993 UPCC 4008 2 bits User Plane Connection config 4994 PCR0 4009 24b integer Peak Cell Rate CLP=0 4995 SCR0 400A 24b integer Sustainable Cell Rate CLP=0 4996 MBS0 400B 24b integer Maximum Burst Size CLP=0 4997 PCR1 400C 24b integer Peak Cell Rate CLP=0+1 4998 SCR2 400D 24b integer Sustain. Cell Rate CLP=0+1 4999 MBS3 400E 24b integer Maximum Burst Size CLP=0+1 5000 BEI 400F Boolean Best Effort Indicator 5001 TI 4010 Boolean Tagging 5002 FD 4011 Boolean Frame Discard 5003 FCDV 4012 24b integer Forward P-P CDV 5004 BCDV 4013 24b integer Backward P-P CDV 5005 FCLR0 4014 8b integer Fwd Cell Loss Ratio CLP=0 5006 BCLR0 4015 8b integer Bkwd P-P CLR CLP=0 5007 FCLR1 4016 8b integer Fwd Cell Loss Ratio CLP=0+1 5008 BCLR1 4017 8b integer Bkwd P-P CLR CLP=0+1 5009 FCDV 4018 24b integer Fwd Cell Delay Variation 5010 BCDV 4019 24b integer Bkwd Cell Delay Variation 5011 FACDV 401A 24b integer Fwd Acceptable P-P-P CDV 5012 BACDV 401B 24b integer Bkwd Acceptable P-P CDV 5013 FCCDV 401C 24b integer Fwd Cumulative P-P CDV 5014 BCCDV 401D 24b integer Bkwd Cumulative P-P CDV 5015 FCLR 401E 8b integer Acceptable Fwd CLR 5016 BCLR 401F 8b integer Acceptable Bkwd CLR 5017 EETD 4020 16b integer End-to-end transit delay 5018 Mediatx 4021 AAL Type 5019 QosClass 4022 Integer 0-4 Qos Class 5020 AALtype 4023 1 OCTET AAL Type Reference 5021 _________________________________________________________________ 5023 Internet draft MEGACO Protocol February 8, 2000 5025 C.5. Frame Relay 5026 ______________________________________________________________________ 5027 | PropertyID| |Tag | |Type | | Value | | 5028 | DLCI | |5001| |Unsigned Integer| Data link connection id | | 5029 | CID | |5002| |Unsigned Integer| sub-channel id. | | 5030 | SID | |5003| |Unsigned Integer| silence insertion descriptor | 5031 | Payload | |5004| |Unsigned Integer| Primary Payload Type | | 5032 |___________|______|__________________|_______________________________| 5034 C.6. IP 5036 _____________________________________________________________________ 5037 | PropertyID| Tag | Type | Value | 5038 | IPv4 | 6001 | 32 BITS | Ipv4Address or Ipv6 address | 5039 | IPv6 | 6002 | 128 BITS | IPv6 Address | 5040 | Port | 6002 | 0-65535 | Port | 5041 | TCP | 6003 | Boolean | | 5042 | UDP | 6004 | Boolean | | 5043 |___________|____________|____________|______________________________| 5045 C.7. ATM AAL2 5047 _______________________________________________________________________________ 5048 |PropertyID| Tag | Type | Value | 5049 |AESA | 7001 | 20 OCTETS | AAL2 service endpoint address | 5050 |BIR | See C.3| 4 OCTETS | Served user generated reference | 5051 |ALC | 7002 | 12 OCTETS | AAL2 link | 5052 |SSCS | 7003 | 8..14 OCTETS | Service specific convergence sublayer | 5053 |SUT | 7004 | 1..254 octets| Served user transport param | 5054 |TCI | 7005 | BOOLEAN | Test connection | 5055 |Timer_CU | 7006 | 32b integer | Timer-CU | 5056 |MaxCPSSDU | 7007 | 8b integer | Max. Common Part Sublayer SDU | 5057 |SCLP | 7008 | Boolean | Set Cell Local PriorityLP bit | 5058 |EETR | 7009 | Boolean | End to End Timing Required | 5059 |__________|_________|_______________|________________________________________| 5061 C.8. ATM AAL1 5063 Internet draft MEGACO Protocol February 8, 2000 5065 |PropertyID| Tag | Type | Value | 5066 |BIR | See Table C.3| 4 OCTETS |GIT (Generic Identifier Transport)| 5067 |AAL1ST | 8001 | 1 OCTET | AAL1 Subtype | 5068 |CBRR | 8002 | 1 OCTET | CBR Rate | 5069 |SCRI | 8003 | 1 OCTET | Src. Clock Freq. Recovery Method | 5070 |ECM | 8004 | 1 OCTET | Error Correction Method | 5071 |SDTB | 8005 | 16b integer | Structured Data Transfer Blksize | 5072 |PFCI | 8006 | 8b integer | Partially filled cells identifier| 5073 |EETR | See Table C.7| See Table C.7| | 5074 |__________|_______________|_______________|__________________________________| 5076 C.9. Bearer Capabilities 5078 Internet draft MEGACO Protocol February 8, 2000 5080 ________________________________________________________________________ 5081 |PropertyID | Tag | Type | Value | 5082 |TMR | 9001| 1 OCTET | Transmission Medium Requirement | 5083 |TMRSR | 9002| 1 OCTET | Trans. Medium Requirement Subrate| 5084 |Contcheck | 0003| BOOLEAN | Continuity Check | 5085 |ITC | 9004| 5 BITS | Information Transfer Capability | 5086 |TransMode | 9005| 2 BITS | Transfer Mode | 5087 |TransRate | 9006| 5 BITS | Transfer Rate | 5088 |MULT | 9007| 7 BITS | Rate Multiplier | 5089 |USI | 9008| 5 BITS | User Information Layer 1 Protocol| 5090 |Syncasync | 9009| BOOLEAN | Synchronous-Asynchronous | 5091 |Userrate | 900B| 5 BITS | User Rate Reference | 5092 |INTRATE | 900C| 2 BITS | Intermediate Rate | 5093 |Nictx | 900D| BOOLEAN | Tx Network Independent Clock | 5094 |Nicrx | 900E| BOOLEAN | Rx Network independent clock | 5095 |Flowconttx | 900F| BOOLEAN | Tx Flow Control | 5096 |Flowcontrx | 9010| BOOLEAN | Rx Flow control | 5097 |Rateadapthdr | 9011| BOOLEAN | Rate adapt header-no header | 5098 |Multiframe | 9012| BOOLEAN | Multiple frame estab. | 5099 |OPMODE | 9013| BOOLEAN | Mode of operation | 5100 |Llidnegot | 9014| BOOLEAN | Logical link identifier neg. | 5101 |Assign | 9015| BOOLEAN | Assignor-assignee | 5102 |Inbandneg | 9016| BOOLEAN | In-band or out-band negotiation | 5103 |Stopbits | 9017| 2 BITS | Number of stop bits | 5104 |Databits | 9018| 2 BIT | Number of data bits | 5105 |Parity | 9019| 3 BIT | Parity information | 5106 |Duplexmode | 901A| BOOLEAN | Mode duplex | 5107 |Modem | 901B| 6 BIT | Modem Type | 5108 |layer2prot | 901C| 5 BIT | User info layer 2 protocol | 5109 |layer3prot | 901D| 5 BIT | User info layer 3 protocol | 5110 |addlayer3prot| 901E| OCTET | Addl User Info L3 protocol | 5111 |DialledN | 901F| 10 OCTETS | Dialled Number | 5112 |DiallingN | 9020| 10 OCTETS | Dialling Number | 5113 |ECHOCI | 9021| Enumeration| Echo Control Information | 5114 |NCI | 9022| 1 OCTET | Nature of Connection Indicators | 5115 |_____________|______|_____________|___________________________________| 5117 C.10. AAL5 Properties 5119 ______________________________________________________________________ 5120 | PropertyID| Tag | Type | Value | 5121 | FMSDU | A001 | 32b integer| Forward Maximum CPCS-SDU Size: | 5122 | BMSDU | A002 | 2b integer | Backwards Maximum CPCS-SDU Size| 5123 | SSCS | See C.7| See C.7 | See table C. | 5124 | SC | See C.4| See C.4 | See table C.4 | 5125 |___________|_________|_____________|_________________________________| 5127 Internet draft MEGACO Protocol February 8, 2000 5129 C.11. SDP Equivalents 5131 ______________________________________________________________ 5132 | PropertyID| Tag | Type | Value | 5133 | SDP_V | B001| STRING| Protocol Version | 5134 | SDP_O | B002| STRING| Owner-creator and session ID | 5135 | SDP_S | B003| STRING| Sesson name | 5136 | SDP_I | B004| STRING| Session identifier | 5137 | SDP_U | B005| STRING| URI of descriptor | 5138 | SDC_E | B006| STRING| email address | 5139 | SDP_P | B007| STRING| phone number | 5140 | SDP_C | B008| STRING| Connection information | 5141 | SDP_B | B009| STRING| Bandwidth Information | 5142 | SDP_Z | B00A| STRING| time zone adjustment | 5143 | SDP_K | B00B| STRING| Encryption Key | 5144 | SDP_A | B00C| STRING| Zero or more session attributes| 5145 | SDP_T | B00D| STRING| Active Session Time | 5146 | SDP_R | B00E| STRING| Zero or more repeat times | 5147 |___________|______|________|_________________________________| 5149 C.12. H.245 5151 ________________________________________________________________________ 5152 |OLC | C001| octet string| H.245 OpenLogicalChannel structure. | 5153 |OLCack| C002| octet string| H.245 OpenLogicalChannelAck structure.| 5154 |OLCcnf| C003| octet string| OpenLogicalChannelConfirm structure. | 5155 |OLCrej| C004| octet string| OpenLogicalChannelReject structure. | 5156 |CLC | C005| octet string| CloseLogicalChannel structure. | 5157 |CLCack| C006| octet string| CloseLogicalChannelAck structure. | 5158 |______|______|______________|_________________________________________| 5160 ANNEX D TRANSPORT OVER IP (NORMATIVE) 5162 D.1. Transport over IP/UDP using Application Level Framing 5164 Protocol messages defined in this document may be transmitted over UDP. 5165 When no port is provided by the peer (see section 7.2.8), the commands 5166 should be sent to the default number, xxxx for text-encoded operation or 5167 yyyy for binary-encoded operation. Responses must always be sent to the 5168 address and port from which the corresponding commands were sent. 5170 D.1.1. Providing At-Most-Once Functionality 5172 Messages, being carried over UDP, may be subject to losses. In the 5173 absence of a timely response, commands are repeated. Most commands are 5175 Internet draft MEGACO Protocol February 8, 2000 5177 not idempotent. The state of the MG would become unpredictable if, for 5178 example, Add commands were executed several times. The transmission 5179 procedures shall thus provide an "At- Most-Once" functionality. 5181 Peer protocol entities are expected to keep in memory a list of the 5182 responses that they sent to recent transactions and a list of the tran- 5183 sactions that are currently outstanding. The transaction identifiers of 5184 incoming messages are compared to the transaction identifiers of the 5185 recent responses to the same MId. If a match is found, the entity does 5186 not execute the transaction, but simply repeats the response. The 5187 remaining messages will be compared to the list of current transactions. 5188 If a match is found, indicating a duplicate transaction, the entity does 5189 not execute the transaction, which is simply ignored. 5191 The procedure uses a long timer value, noted LONG-TIMER in the follow- 5192 ing. The timer should be set larger than the maximum duration of a 5193 transaction, which should take into account the maximum number of 5194 repetitions, the maximum value of the repetition timer and the maximum 5195 propagation delay of a packet in the network. A suggested value is 30 5196 seconds. 5198 The copy of the responses may be destroyed either LONG-TIMER seconds 5199 after the response is issued, or when the entity receives a confirmation 5200 that the response has been received, through the "Response Acknowledge- 5201 ment parameter". For transactions that are acknowledged through this 5202 parameter, the entity shall keep a copy of the transaction-id for LONG- 5203 TIMER seconds after the response is issued, in order to detect and 5204 ignore duplicate copies of the transaction request that could be pro- 5205 duced by the network. 5207 D.1.2. Transaction identifiers and three-way handshake 5209 Transaction identifiers are 32 bit integer numbers. A Media Gateway 5210 Controller may decide to use a specific number space for each of the MGs 5211 that they manage, or to use the same number space for all MGs that 5212 belong to some arbitrary group. MGCs may decide to share the load of 5213 managing a large MG between several independent processes. These 5214 processes will share the same transaction number space. There are mul- 5215 tiple possible implementations of this sharing, such as having a cen- 5216 tralized allocation of transaction identifiers, or pre-allocating non- 5217 overlapping ranges of identifiers to different processes. The implemen- 5218 tations shall guarantee that unique transaction identifiers are allo- 5219 cated to all transactions that originate from a logical MGC (identical 5220 mId). MGs can simply detect duplicate transactions by looking at the 5221 transaction identifier and mId only. 5223 The Response Acknowledgement parameter can be found in any message. It 5224 carries a set of "confirmed transaction-id ranges". Entities may choose 5226 Internet draft MEGACO Protocol February 8, 2000 5228 to delete the copies of the responses to transactions whose id is 5229 included in "confirmed transaction-id ranges" received in the transac- 5230 tion response messages. They should silently discard further commands 5231 when the transaction-id falls within these ranges. 5233 The "confirmed transaction-id ranges" values shall not be used if more 5234 than LONG-TIMER seconds have elapsed since the MG issued its last 5235 response to that MGC, or when a MG resumes operation. In this situa- 5236 tion, transactions should be accepted and processed, without any test on 5237 the transaction-id. 5239 Messages that carry the "Response Acknowledgement" parameter may be 5240 transmitted in any order. The entity shall retain the "confirmed 5241 transaction-id ranges" received in for LONG- TIMER seconds. 5243 The ASN.1 of Annex A is modified as follows. The definition of Transac- 5244 tion of Annex A is replaced by 5246 Transaction ::= CHOICE 5247 { 5248 transactionRequest TransactionRequest, 5249 transactionPending TransactionPending, 5250 transactionReply TransactionReply, 5251 transactionResponseAck TransactionResponseAck 5252 } 5254 The definition of TransactionResponseAck reads 5256 TransactionResponseAck ::= SEQUENCE 5257 { 5258 firstAck TransactionId, 5259 lastAck TransactionId OPTIONAL 5260 } 5262 If only the firstAck is present in a response acknowledgement, only one 5263 transaction is acknowledged. If both firstAck and lastAck are present, 5264 then the range of transactions from firstAck to lastAck is acknowledged. 5266 The ABNF of Annex B is modified so that: 5268 transactionList = 1*(transactionRequest / transactionReply / 5269 transactionPending / transactionResponseAck) 5271 transactionResponseAck = ResponseAckToken LBRKT transactionAck 5272 *(COMMA transactionAck) RBRKT 5274 Internet draft MEGACO Protocol February 8, 2000 5276 transactionAck = transactionID / (transactionID "-" transactionID) 5277 ResponseAckToken = "TransactionResponseAck" | "K" 5279 D.1.3. Computing retransmission timers 5281 It is the responsibility of the requesting entity to provide suitable 5282 time outs for all outstanding transactions, and to retry transactions 5283 when time outs have been exceeded. Furthermore, when repeated transac- 5284 tions fail to be acknowledged, it is the responsibility of the request- 5285 ing entity to seek redundant services and/or clear existing or pending 5286 connections. 5288 The specification purposely avoids specifying any value for the 5289 retransmission timers. These values are typically network dependent. The 5290 retransmission timers should normally estimate the timer value by 5291 measuring the time spent between the sending of a command and the return 5292 of a response. One possibility is to use the algorithm implemented in 5293 TCP-IP, which uses two variables: 5295 * The average acknowledgement delay, AAD, estimated through an 5296 exponentially smoothed average of the observed delays. 5298 * The average deviation, ADEV, estimated through an exponentially 5299 smoothed average of the absolute value of the difference between 5300 the observed delay and the current average. 5302 The retransmission timer, in TCP, is set to the sum of the average delay 5303 plus N times the average deviation. The maximum value of the timer 5304 should however be bounded for the protocol defined in this document, in 5305 order to guarantee that no repeated packet would be received by the 5306 gateways after LONG-TIMER seconds. A suggested maximum value is 4 5307 seconds. After any retransmission, the entity should do the following: 5309 * It should double the estimated value of the average delay, AAD 5311 * It should compute a random value, uniformly distributed between 0.5 5312 AAD and AAD 5314 * It should set the retransmission timer to the sum of that random 5315 value and N times the average deviation. 5317 This procedure has two effects. Because it includes an exponentially 5318 increasing component, it will automatically slow down the stream of mes- 5319 sages in case of congestion. Because it includes a random component, it 5320 will break the potential synchronization between notifications triggered 5321 by the same external event. 5323 Internet draft MEGACO Protocol February 8, 2000 5325 D.1.4. Provisional responses 5327 Executing some transactions may require a long time. Long execution 5328 times may interact with the timer based retransmission procedure. This 5329 may result either in an inordinate number of retransmissions, or in 5330 timer values that become too long to be efficient. Entities that can 5331 predict that a transaction will require a long execution time may send a 5332 provisional response, "Transaction Pending". They should send this 5333 response if they receive a repetition of a transaction that is still 5334 being executed. 5336 Entities that receive a Transaction Pending shall switch to a different 5337 repetition timer for repeating requests. The root termination has a 5338 property (ProvisionalResponseTimerValue), which can be set to the 5339 requested maximum number of milliseconds between receipt of a command 5340 and transmission of the TransactionPending response. Upon receipt of a 5341 final response, an immediate confirmation shall be sent, and normal 5342 repetition timers shall be used thereafter. Receipt of a Transaction 5343 Pending after receipt of a reply shall be ignored. 5345 D.1.5. Repeating Requests, Responses and Acknowledgements 5347 The protocol is organized as a set of transactions, each of which is 5348 composed request and a response, commonly referred to as an acknowledge- 5349 ment. The protocol messages, being carried over UDP, may be subject to 5350 losses. In the absence of a timely response, transactions are repeated. 5351 Entities are expected to keep in memory a list of the responses that 5352 they sent to recent transactions, i.e. a list of all the responses they 5353 sent over the last LONG-TIMER seconds, and a list of the transactions 5354 that are currently being executed. 5356 The repetition mechanism is used to guard against three types of possi- 5357 ble errors: 5359 * transmission errors, when for example a packet is lost due to noise 5360 on a line or congestion in a queue; 5362 * component failure, when for example an interface to a entity 5363 becomes unavailable; 5365 * entity failure, when for example an entire entity become unavail- 5366 able. 5368 The entities should be able to derive from the past history an estimate 5369 of the packet loss rate due to transmission errors. In a properly con- 5370 figured system, this loss rate should be kept very low, typically less 5371 than 1%. If a Media Gateway Controller or a Media Gateway has to repeat 5372 a message more than a few times, it is very legitimate to assume that 5374 Internet draft MEGACO Protocol February 8, 2000 5376 something else than a transmission error is occurring. For example, 5377 given a loss rate of 1%, the probability that five consecutive transmis- 5378 sion attempts fail is 1 in 100 billion, an event that should occur less 5379 than once every 10 days for a Media Gateway Controller that processes 1 5380 000 transactions per second. (Indeed, the number of repetition that is 5381 considered excessive should be a function of the prevailing packet loss 5382 rate.) We should note that the "suspicion threshold", which we will call 5383 "Max1", is normally lower than the "disconnection threshold", which 5384 should be set to a larger value. 5386 A classic retransmission algorithm would simply count the number of suc- 5387 cessive repetitions, and conclude that the association is broken after 5388 retransmitting the packet an excessive number of times (typically 5389 between 7 and 11 times.) In order to account for the possibility of an 5390 undetected or in-progress "failover", we modify the classic algorithm so 5391 that if the Media Gateway receives a valid ServiceChange message 5392 announcing a failover, it will start transmitting outstanding commands 5393 to that new MGC. Responses to commands are still transmitted to the 5394 source address of the command. 5396 In order to automatically adapt to network load, this document specifies 5397 exponentially increasing timers. If the initial timer is set to 200 5398 milliseconds, the loss of a fifth retransmission will be detected after 5399 about 6 seconds. This is probably an acceptable waiting delay to detect 5400 a failover. The repetitions should continue after that delay not only in 5401 order to perhaps overcome a transient connectivity problem, but also in 5402 order to allow some more time for the execution of a failover - waiting 5403 a total delay of 30 seconds is probably acceptable. 5405 It is, however, important that the maximum delay of retransmissions be 5406 bounded. Prior to any retransmission, it is checked that the time 5407 elapsed since the sending of the initial datagram is no greater than T- 5408 MAX. If more than T-MAX time has elapsed, the MG concludes that the MGC 5409 has failed, and it begins its recovery process. When the MG establishes 5410 a new control association, it can retransmit to the new MGC. The value 5411 T-MAX is related to the LONG- TIMER value: the LONG-TIMER value is 5412 obtained by adding to T-MAX the maximum propagation delay in the net- 5413 work. 5415 D.2. Using TCP 5417 Protocol messages as defined in this document may be transmitted over 5418 TCP. When no port is specified by the other side (see section 7.2.8), 5419 the commands should be sent to the default port. The defined protocol 5420 has messages as the unit of transfer, while TCP is a stream-oriented 5421 protocol. TPKT, according to RFC1006 SHALL be used to delineate mes- 5422 sages within the TCP stream. 5424 Internet draft MEGACO Protocol February 8, 2000 5426 In a transaction-oriented protocol, there are still ways for transaction 5427 requests or responses to be lost. As such, it is recommended that enti- 5428 ties using TCP transport implement application level timers for each 5429 request and each response, similar to those specified for application 5430 level framing over UDP. 5432 D.2.1. Providing the At-Most-Once functionality 5434 Messages, being carried over TCP, are not subject to transport losses, 5435 but loss of a transaction request or its reply may nonetheless be noted 5436 in real implementations. In the absence of a timely response, commands 5437 are repeated. Most commands are not idempotent. The state of the MG 5438 would become unpredictable if, for example, Add commands were executed 5439 several times. 5441 To guard against such losses, it is recommended that entities follow the 5442 procedures in section D.1.1 5444 D.2.2. Transaction identifiers and three way handshake 5446 For the same reasons, it is possible that transaction replies may be 5447 lost even with a reliable delivery protocol such as TCP. It is recom- 5448 mended that entities follow the procedures in section D.1.2 5450 D.2.3. Computing retransmission timers 5452 With reliable delivery, the incidence of loss of a transaction request 5453 or reply is expected to be very low. Therefore, only simple timer 5454 mechanisms are required. Exponential back-off algorithms should not be 5455 necessary, although they could be employed where, as in an MGC, the code 5456 to do so is already required, since MGCs must implement ALF/UDP as well 5457 as TCP. 5459 D.2.4. Provisional responses 5461 As with UDP, executing some transactions may require a long time. Enti- 5462 ties that can predict that a transaction will require a long execution 5463 time may send a provisional response, "Transaction Pending". They should 5464 send this response if they receive a repetition of a transaction that is 5465 still being executed. 5467 Entities that receive a Transaction Pending shall switch to a longer 5468 repetition timer for that transaction. 5470 Entities shall retain Transactions and replies until they are confirmed. 5471 The basic procedure of section D.1.4 should be followed, but simple 5472 timer values should be sufficient. 5474 Internet draft MEGACO Protocol February 8, 2000 5476 D.2.5. Ordering of commands 5478 TCP provides ordered delivery of transactions. No special procedures 5479 are required. It should be noted that ALF/UDP allows sending entity to 5480 modify its behavior under congestion, and in particular, could reorder 5481 transactions when congestion is encountered. TCP could not achieve the 5482 same results. 5484 ANNEX E BASIC PACKAGES 5486 This Annex contains definitions of some packages for use with MEGACO. 5488 E.1. Generic 5490 PackageID: g (0x000e) 5491 Version: 1 5492 Extends: None 5493 Description: 5494 Generic package for commonly encountered items 5496 E.1.1. Properties 5498 None 5500 E.1.2. Events 5502 Cause 5503 EventID: cause (0x0001) 5504 Generic error event 5505 Event Descriptor Parameters: 5506 General Cause 5507 ParameterID: Generalcause (0x0001) 5508 This parameter groups the failures into six groups, 5509 which the MGC may act upon. 5510 Possible values: Enumerated, 5511 "NR" Normal Release (0x0001) 5512 "UR" Unavailable Resources (0x0002) 5513 "FT" Failure, Temporary (0x0003) 5514 "FP" Failure, Permanent (0x0004) 5515 "IW" Interworking Error (0x0005) 5516 "UN" Unsupported (0x0006) 5517 Failure Cause 5518 ParameterID: Failurecause (0x0002) 5519 Possible Values: OCTET STRING 5520 Description: The Release Cause is the value generated 5521 by the Released equipment, i.e. a released network 5522 connection. The concerned value is defined in the 5524 Internet draft MEGACO Protocol February 8, 2000 5526 appropriate bearer control protocol. 5527 Signal Completion 5528 EventID: sc (0x0002) 5529 Indicates termination of one or more signals for which the 5530 notifyCompletion parameter was set to "ON". For further 5531 procedural description, see sections 7.1.11, 7.1.17, and 7.2.7. 5533 ObservedEvents Descriptor parameters: 5534 Signal Identity 5535 ParameterID: SigID (0x0001) 5536 This parameter identifies the signals which have terminated. 5537 Type: list 5538 Possible values: a list of signals and/or sequential 5539 signal lists which have terminated. A signal outside 5540 of a sequential signal list shall be identified using 5541 the pkgdName syntax without wildcarding. An 5542 individual signal inside of a sequential signal list 5543 shall be identified using the sequential signal list 5544 syntax with the correct signal list identifier, 5545 enclosing the name of the specific signal which 5546 terminated in pkgdName syntax. 5548 Termination Method 5549 ParameterID: Meth (0x0002) 5550 Indicates the means by which the signal terminated. 5551 Type: enumeration 5552 Possible values: 5553 "TO" (0x0001) Duration expired 5554 "EV" (0x0002) Interrupted by event 5555 "SD" (0x0003) Halted by new Signals Descriptor 5556 "FL" (0x0004) Failure 5558 Internet draft MEGACO Protocol February 8, 2000 5560 19.1.3. Signals 5562 None 5564 19.1.4. Statistics 5566 None 5568 19.2. Base Root Package 5570 Base Root Package 5572 PackageID: root (0x000f) 5573 Version: 1 5574 Extends: None 5575 Description: 5576 This package defines Gateway wide properties. 5578 19.2.1. Properties 5580 MaxNrOfContexts 5581 PropertyID: maxNumberOfContexts (0x0001) 5582 The value of this property gives the maximum number of 5583 contexts that can exist at any time. The NULL context 5584 is not included in this number. 5585 Type: Double 5586 Possible values: 1 and up 5587 MaxTerminationsPerContext 5588 PropertyID: maxTerminationsPerContext (0x0002) 5589 The maximum number of allowed terminations in a context, 5590 see section 6.1 5591 Type: Integer 5592 Possible Values: any integer 5593 Defined In: TerminationState 5594 normalMGExecutionTime 5595 PropertyId: normalMGExecutionTime (0x0003) 5596 Settable by the MGC to indicate the interval within which 5597 the MGC expects a response to any transaction from 5598 the MG (exclusive of network delay) 5599 Type: Integer 5600 Possible Values: any integer, represents milliseconds 5601 normalMGCExecutionTime 5602 PropertyId: normalMGCExecutionTime (0x0004) 5603 Settable by the MGC to indicate the interval within which 5604 the MG should expects a response to any transaction 5605 from the MGC (exclusive of network delay) 5607 Internet draft MEGACO Protocol February 8, 2000 5609 Type: Integer 5610 Possible Values: any integer, represents milliseconds 5611 ProvisionalResponseTimerValue 5612 PropertyId: ProvisionalResponseTimerValue (0x0005) 5613 Indicates the time within which to expect a Pending 5614 Response if a Transaction cannot be completed. 5615 Initially set to normalMGExecutionTime or 5616 normalMGCExecutionTime as appropriate, plus network 5617 delay, but may be lowered. 5618 Pattern 5619 PropertyId: Pattern (0x0006) 5620 Name pattern of a set of terminations in the gateway. 5621 Used to discover the names of terminations that 5622 can be audited. Includes ephemeral terminations. 5623 MGs SHOULD use one pattern for each type of 5624 termination (same packages implemented), but no 5625 two Patterns can have the same value. 5626 Type: String 5627 Possible Value: 5628 A string of up to 64 characters using the following 5629 characters: 5630 a-z,A-Z,0-9, and "/" - the actual character 5631 in the name 5632 * - any set of characters 5633 ?a - any single character 5634 ?0 - any digit 5635 ?a - any alpha 5636 [n,n,..,n] - alternatives, one of the 5637 alternatives listed, n can be a substring 5638 of alphas or digits 5639 [n-n] - range, any number in the range, 5640 n can be a number or an alpha, for example 5641 [00-27] or [a-e] 5642 Note, mixing of alternatives or ranges is allowed, 5643 as in: [0,3-5,8] 5644 Characteristics: Read-only 5645 MaxPatterns 5646 PropertyId: MaxPatterns (0x0007) 5647 The number of patterns in the gateway 5648 Type: Integer 5649 Possible Value: any integer 5650 Characteristics: Read-only 5651 PatternNum 5652 PropertyId: PatternNum (0x0008) 5653 Which pattern to read, zero based. Set by the MGC to 5654 read a specific pattern in Pattern 5655 Type: Integer 5656 Possible Value: any integer less than MaxPatterns 5658 Internet draft MEGACO Protocol February 8, 2000 5660 E.2.2. Events 5662 None 5664 E.2.3. Signals 5666 None 5668 E.2.4. Statistics 5670 None 5672 E.2.5. Procedures 5674 None 5676 E.3. Tone Generator Package 5678 PackageID: tonegen (0x0001) 5679 Version: 1 5680 Extends: None 5681 Description: 5682 This package defines signals to generate audio tones. 5683 This package does not specify parameter values. It is 5684 intended to be extendable. Generally, tones are defined 5685 as an individual signal with a parameter, ind, 5686 representing "interdigit" time delay, and a tone id to 5687 be used with playtones. A tone id should be kept 5688 consistent with any tone generation for the same tone. 5689 MGs are expected to be provisioned with the characteristics 5690 of appropriate tones for the country in which the MG is located. 5692 E.3.1. Properties 5694 None 5696 E.3.2. Events 5698 None 5700 E.3.3. Signals 5702 Play tone 5704 SignalID: pt (0x0001) 5705 Plays audio tone over an audio channel 5706 Signal Type: Brief 5708 Internet draft MEGACO Protocol February 8, 2000 5710 Duration: Provisioned 5711 Additional Parameters: 5712 Tone id list 5713 ParameterID: tl (0x0001) 5714 Type: list of tone ids. 5715 List of tones to be played in sequence. 5716 The list SHALL contain one or more tone ids. 5717 Inter signal duration 5718 ParameterID: ind (0x0002) 5719 Type: integer. 5720 Timeout between two consecutive tones in milliseconds 5722 No tone ids are specified in this package. Packages that extend this 5723 package can add possible values for tone id as well as adding individual 5724 tone signals 5726 E.3.4. Statistics 5728 None 5730 E.3.5. Procedures 5732 None 5734 E.4. Tone Detection Package 5736 PackageID: tonedet (0x0002) 5737 Version: 1 5738 Extends: None 5739 This Package defines events for audio tone detection. 5740 Tones are selected by name (tone id). MGs are expected 5741 to be provisioned with the characteristics of appropriate 5742 tones for the country in which the MG is located. 5744 This package does not specify parameter values. It is intended to be 5745 extendable. 5747 E.4.1. Properties 5749 None 5751 E.4.2. Events 5753 Start tone detected 5754 EventID: std, 0x0001 5755 Detects the start of a tone. The characteristics of positive 5757 Internet draft MEGACO Protocol February 8, 2000 5759 tone detection is implementation dependent. 5760 EventsDescriptor parameters: 5761 Tone id list 5762 ParameterID: tl (0x0001) 5763 Type: list of tone ids 5764 Possible values: The only tone id defined in this 5765 package is "wild card" which is "*" in 5766 text encoding and 0x0000 in binary. 5767 Extensions to this package would add 5768 possible values for tone id. 5769 If tl is "wild card", any tone id is detected 5770 ObservedEventsDescriptor parameters: 5771 Tone id 5772 ParameterID: tid (0x0003) 5773 Type: Enumeration 5774 Possible values: "wildcard" as defined above is the 5775 only value defined in this package. Extensions 5776 to this package would add additional possible 5777 values for tone id 5778 End tone detected 5779 EventID: etd, 0x0002 5780 Detects the end of a tone. 5781 EventDescriptor parameters: 5782 Tone id list 5783 ParameterID: tl (0x0001) 5784 Type: enumeration or list of enumerated types 5785 Possible values: No possible values are specified 5786 in this package. Extensions to this package 5787 would add possible values for tone id 5788 ObservedEventsDescriptor parameters: 5789 Tone id 5790 ParameterID: tid (0x0003) 5791 Type: Enumeration 5792 Possible values: "wildcard" as defined above is the 5793 only value defined in this package. 5794 Extensions to this package would add possible 5795 values for tone id 5796 Duration 5797 ParameterId: dur (0x0002) 5798 Type: integer, in milliseconds 5799 This parameter contains the duration of the tone 5800 from first detection until it stopped. 5801 Long tone detected 5802 EventID: ltd, 0x0003 5803 Detects that a tone has been playing for at least a certain 5804 amount of time 5805 EventDescriptor parameters: 5806 Tone id list 5808 Internet draft MEGACO Protocol February 8, 2000 5810 ParameterID: tl (0x0001) 5811 Type: enumeration or list 5812 Possible values: "wildcard" as defined above is the 5813 only value defined in this package. Extensions 5814 to this package would add possible values for 5815 tone id 5816 Duration: 5817 ParameterID: dur (0x0002) 5818 Type: integer, duration to test against 5819 Possible values: any legal integer, expressed in 5820 milliseconds 5821 ObservedEventsDescriptor parameters: 5822 Tone id: 5823 ParameterID: tid (0x0003) 5824 Possible values: No possible values are specified 5825 in this package. Extensions to this package 5826 would add possible values for tone id 5828 E.4.3. Signals 5830 None 5832 E.4.4. Statistics 5834 None 5836 E.4.5. Procedures 5838 None 5840 E.5. Basic DTMF Generator Package 5842 PackageID: dg (0x0003) 5843 Version: 1 5844 Extends: tonegen version 1 5845 This package defines the basic DTMF tones as signals and 5846 extends the allowed values of parameter tl of playtone 5847 in tonegen. 5849 E.5.1. Properties 5851 None 5853 E.5.2. Events 5855 None 5857 Internet draft MEGACO Protocol February 8, 2000 5859 E.5.3. Signals 5861 dtmf character 0 5862 SignalID: d0 (0x0010) 5863 Generate DTMF 0 tone. The physical characteristic of DTMF 0 5864 is defined in the gateway. 5865 Signal Type: Brief 5866 Duration: Provisioned 5867 Additional Parameters: 5868 None 5869 Additional Values: 5870 d0 (0x0010) is defined as a toneid for playtone 5872 The other dtmf characters are specified in exactly the same way. For 5873 brevity's sake only a table with the signal names and the signal IDs is 5874 included. Note that each dtmf character is defined as both a signal and 5875 a toneid, thus extending the basic tone generation package. Also note 5876 that dtmf SignalIds are different from the names used in a digit map. 5878 ________________________________ 5879 | Signal Name | Signal ID | 5880 | dtmf character 1| d1 (0x0011)| 5881 | dtmf character 2| d2 (0x0012)| 5882 | dtmf character 3| d3 (0x0013)| 5883 | dtmf character 4| d4 (0x0014)| 5884 | dtmf character 5| d5 (0x0015)| 5885 | dtmf character 6| d6 (0x0016)| 5886 | dtmf character 7| d7 (0x0017)| 5887 | dtmf character 8| d8 (0x0018)| 5888 | dtmf character 9| d9 (0x0019)| 5889 | dtmf character *| ds (0x0020)| 5890 | dtmf character #| do (0x0021)| 5891 | dtmf character A| da (0x001a)| 5892 | dtmf character B| db (0x001b)| 5893 | dtmf character C| dc (0x001c)| 5894 | dtmf character D| dd (0x001d)| 5895 |_________________|_____________| 5897 E.5.4. Statistics 5899 None 5901 E.5.5. Procedures 5903 None 5905 Internet draft MEGACO Protocol February 8, 2000 5907 E.6. DTMF detection Package 5909 PackageID: dd (0x0004) 5910 Version: 1 5911 Extends: tonedet version 1 5912 This package defines the basic DTMF tones detection. 5913 This Package extends the possible values of tone id 5914 in the "start tone detected" "end tone detected" 5915 and "long tone detected" events. 5917 Additional tone id values are all tone ids described in package dg 5918 (basic DTMF generator package). 5920 The following table maps DTMF events to digit map symbols as described 5921 in section 7.1.14. 5923 _________________________________ 5924 | DTMF;Event Symbol| | 5925 | d0 | ;"0" | 5926 | d1 | "1" | 5927 | d2 | "2" | 5928 | d3 | "3" | 5929 | d4 | "4" | 5930 | d5 | "5" | 5931 | d6 | ;"6" | 5932 | d7 | ;"7" | 5933 | d8 | ;"8" | 5934 | d9 | ;"9" | 5935 | da | "A" or "a"| 5936 | db | "B" or "b"| 5937 | dc | "C" or "c"| 5938 | dd | "D" or "d"| 5939 | ds | "E" or "e"| 5940 | do | "F" or "f"| 5941 |___________________|____________| 5943 E.6.1. Properties 5945 None 5947 E.6.2. Events 5949 DTMF digits 5950 EventIds are defined with the same names as the SignalIds 5951 defined in the table found in section E.5.3 5953 DigitMap Completion Event 5955 Internet draft MEGACO Protocol February 8, 2000 5957 EventID: ce, 0x0001 5958 Raised when a digit map completes as described in section 5959 7.1.14, or when an AuditValue requesting events is applied to 5960 a termination, as described in section 7.1.7. 5962 EventsDescriptor parameters: none. This event is armed through 5963 activation of a DigitMap Descriptor in accompaniment with an 5964 events descriptor specifying the set of DTMF digit events to 5965 be mapped into the digit map. 5967 ObservedEventsDescriptor parameters: 5968 DigitString 5969 ParameterID: ds (0x0001) 5970 Type: string of digit map symbols (possibly empty) 5971 Possible values: any sequence of the characters "0" through 5972 "9", "A" through "F", and the long duration modifier "L". 5973 Description: the portion of the current dial string as 5974 described in section 7.1.14 which matched part or all 5975 of an alternative event sequence specified in the digit map. 5977 Extra 5978 ParameterID: ex (0x0002) 5979 Type: digit map symbol 5980 Possible values: any one of the characters "0" through 5981 "9" or "A" through "F" 5982 Description: the final digit map symbol added to the current 5983 dial string in the case where as a result it was determined 5984 that no match of the digit map was possible. This 5985 parameter is present only when that outcome has occurred. 5987 Termination Method 5988 ParameterID: Meth (0x0003) 5989 Type: enumeration 5990 Possible values: 5991 "MA" (0x0001) Unambiguous match 5992 "PM" (0x0002) Partial match, timer expired or 5993 unmatched event 5994 "FM" (0x0003) Full match, timer expired or 5995 unmatched event 5996 "AU" (0x0004) Audit, collection in progress 5997 Description: indicates the reason for generation of the event. See the procedures in section 7.1.14. The Extra parameter may be 5998 present only if the "PM" or "FM" termination method is reported. 5999 Its absence in those cases indicates that termination was by timer 6000 expiry. The "AU" reason shall be used only for a response to an 6001 AuditValue of the termination while digit collection is in progress. 6003 Internet draft MEGACO Protocol February 8, 2000 6005 E.6.3. Signals 6007 None 6009 E.6.4. Statistics 6011 None 6013 E.6.5. Procedures 6015 None 6017 E.7. Call Progress Tones Generator Package 6019 PackageID: cg, 0x0005 6020 Version: 1 6021 Extends: tonegen version 1 6022 This package defines the basic call progress tones as signals 6023 and extends the allowed values of the tl parameter of 6024 playtone in tonegen. 6026 E.7.1. Properties 6028 None 6030 E.7.2. Events 6032 None 6034 E.7.3. Signals 6036 Dial Tone 6037 SignaID: dt (0x0030) 6038 Generate dial tone. The physical characteristic of dial tone 6039 is available in the gateway. 6040 Signal Type: Timeout 6041 Duration: Provisioned 6042 Additional Parameters: 6043 None 6044 Additional Values 6045 dt (0x0030) is defined as a tone id for playtone 6047 The other tones of this package are defined in exactly the same way. For 6048 brevity's sake only a table with the signal names and the signal IDs is 6049 included. Note that each tone is defined as both a signal and a toneid, 6050 thus extending the basic tone generation package. 6052 Internet draft MEGACO Protocol February 8, 2000 6054 l | l. 6055 Signal Name!Signal ID/tone id Ringing Tone!rt (0x0031) Busy Tone!bt 6056 (0x0032) Congestion Tone!ct (0x0033) Special Information 6057 Tone!sit(0x0034) Warning Tone!wt (0x0035) Payphone Recognition Tone!pt 6058 (0x0036) Call Waiting Tone!cw (0x0037) Caller Waiting Tone!cr (0x0038) 6060 E.7.4. Statistics 6062 None 6064 E.7.5. Procedures 6066 NOTE - The required set of tone ids corresponds to those defined in 6067 Recommendation E.180/Q.35 [ITU-T Recommendation E.180/Q.35 (1998)]. See 6068 E.180 for definition of the meanings of these tones. 6070 E.8. Call Progress Tones Detection Package 6072 PackageID: cd (0x0006) 6073 Version: 1 6074 Extends: tonedet version 1 6075 This package defines the basic call progress detection tones. 6076 This Package extends the possible values of tone id 6077 in the "start tone detected", "end tone detected" and 6078 "long tone detected" events. 6079 Additional values 6080 tone id values are defined for start tone detected, 6081 end tone detected and long tone detected with 6082 the same values as those in package cg (call 6083 progress tones generation package). 6085 The required set of tone ids corresponds to Recommendation E.180/Q.35 6086 [ITU-T Recommendation E.180/Q.35 (1998)]. See Recommendation E.180/Q.35 6087 for definition of the meanings of these tones. 6089 E.8.1. Properties 6091 none 6093 E.8.2. Events 6095 Events are defined as in the dtmf detection package (dd) for the tones 6096 listed in the table of section E.7.3 6098 Internet draft MEGACO Protocol February 8, 2000 6100 E.8.3. Signals 6102 none 6104 E.8.4. Statistics 6106 none 6108 E.8.5. Procedures 6110 none 6112 E.9. Analog Line Supervision Package 6114 PackageID: al, 0x0009 6115 Version: 1 6116 Extends: None 6117 This package defines events and signals for an analog line. 6119 E.9.1. Properties 6121 None 6123 E.9.2. Events 6125 onhook 6126 EventID: on (0x0004) 6127 Detects handset going on hook. If the first event 6128 descriptor after (re)establishment of MGC control over 6129 the specific termination concerned or the MG as a whole 6130 contains the on-hook event request and the line is already 6131 on-hook, the MG shall raise an on-hook event as if on-hook 6132 had occurred immediately after the event descriptor became 6133 active. 6134 EventDescriptor parameters 6135 None 6136 ObservedEventsDescriptor parameters 6137 None 6138 offhook 6139 EventID: of (0x0005) 6140 Detects handset going off hook. If the first event 6141 descriptor after (re)establishment of MGC control 6142 over the specific termination concerned or the MG 6143 as a whole contains the off-hook event request and 6144 the line is already off-hook, the MG shall raise an 6145 off-hook event as if off-hook had occurred immediately 6146 after the event descriptor became active. 6147 EventDescriptor parameters 6149 Internet draft MEGACO Protocol February 8, 2000 6151 None 6152 ObservedEventsDescriptor parameters 6153 None 6154 flashhook 6155 EventID: fl, 0x0006 6156 Detects handset flash. A flash occurs when an onhook is 6157 followed by an offhook between a minimum and 6158 maximum duration. 6159 EventDescriptor parameters 6160 Minimum duration 6161 ParameterID: mindur (0x0004) 6162 Type: integer in milliseconds 6163 Default value is provisioned 6164 Maximum duration 6165 ParameterID: maxdur (0x0005) 6166 Type: integer in milliseconds 6167 Default value is provisioned 6168 ObservedEventsDescriptor parameters 6169 None 6171 E.9.3. Signals 6173 ring 6174 SignalID: ri, 0x0002 6175 Applies ringing on the line 6176 Signal Type: TimeOut 6177 Duration: Provisioned 6178 Additional Parameters: 6179 Cadence 6180 ParameterID: cad (0x0006) 6181 Type: list of integers representing durations of 6182 alternating on and off segments, constituting 6183 a complete ringing cycle starting with an on. 6184 Units in milliseconds 6185 Default is fixed or provisioned. Restricted function 6186 MGs may ignore cadence values they are 6187 incapable of generating. 6188 Frequency 6189 ParameterID: freq (0x0007) 6190 Type: integer in Hz 6191 Default is fixed or provisioned. Restricted function 6192 MGs may ignore frequency values they are 6193 incapable of generating. 6195 Internet draft MEGACO Protocol February 8, 2000 6197 E.9.4. Statistics 6199 None 6201 E.9.5. Procedures 6203 None 6205 E.10. Basic Continuity Package 6207 PackageID: ct (0x000a) 6208 Version: 1 6209 Extends: None 6210 This package defines events and signals for continuity test. 6212 E.10.1. Properties 6214 None 6216 E.10.2. Events 6218 Completion 6219 EventID: cmp, 0x0005 6220 Detects test completion. 6221 EventDescriptor parameters 6222 None 6223 ObservedEventsDescriptor parameters 6224 Result 6225 ParameterID: res (0x0008) 6226 Type: Enumeration 6227 Possible values: success (0x0001), failure (0x0000) 6229 E.10.3. Signals 6231 Initiate 6232 SignalID: ini (0x0003) 6233 Initiates continuity test of a specified type 6234 Signal Type: OnOff 6235 Additional Parameters: 6236 Test type 6237 ParameterID: tt 6238 Description: this parameter, if present, gives 6239 guidance to the MG on which type of continuity 6240 test to perform for the indicated Termination. 6241 It is necessary only where multiple choices 6242 are valid for that termination. In general, 6244 Internet draft MEGACO Protocol February 8, 2000 6246 the MG will have to make use of information 6247 provisioned for the given termination in order 6248 to know the exact flavour of continuity test 6249 to run. 6250 Type: enumeration of possible test types 6251 Possible Values: q724 (extendible) 6252 Default is provisioned 6253 Respond 6254 SignalID: rsp (0x0004) 6255 Responds to a continuity test of a specified type 6256 Signal Type: OnOff 6257 Additional Parameters: 6258 Test type 6259 ParameterID: tt 6260 Type: enumeration of possible test types 6261 Description: this parameter, if present, 6262 gives guidance to the MG on which type of 6263 continuity test to perform for the 6264 indicated Termination. It is necessary 6265 only where multiple choices are valid for 6266 that termination. In general, the MG will 6267 have to make use of information provisioned 6268 for the given termination in order to know 6269 the exact flavour of continuity test to run. 6270 Possible Values: q724 (extendable) 6271 Default is provisioned 6273 E.10.4. Statistics 6275 None 6277 E.10.5. Procedures 6279 When a MGC initiates or responds to a MG by sending the Initiate or 6280 Response signal to the MG, the MG shall perform the continuity test in 6281 accordance with the specified test type and additional information pro- 6282 visioned in the MG for the affected termination. 6284 E.11. Network Package 6286 PackageID: nt (0x000b) 6287 Version: 1 6288 Extends: None 6289 This package defines properties of network terminations 6290 independent of network type. 6292 Internet draft MEGACO Protocol February 8, 2000 6294 E.11.1. Properties 6296 Maximum Jitter Buffer 6297 PropertyID: jit (0x0007) 6298 This property puts a maximum size on the jitter buffer. 6299 Type: integer in milliseconds 6300 Possible Values: This property is specified in milliseconds. 6301 Defined In: LocalControlDescriptor 6302 Characteristics: read/write 6304 Silence Suppression 6305 PropertyID: ssup (0x1008) 6306 This property indicates whether silence suppression is to 6307 be activated in the encoding of the audio media flow to 6308 which it relates. 6309 Type: Boolean 6310 Possible values: True if silence suppression is to be applied. 6311 Defined in: LocalControl 6312 Characteristics: read/write 6314 E.11.2. Events 6316 network failure 6317 EventID: netfail, 0x0005 6318 The termination generates this event upon detection of a 6319 failure due to external or internal network reasons. 6320 EventDescriptor parameters 6321 none 6322 ObservedEventsDescriptor parameters 6323 cause 6324 ParameterID: cs (0x0001) 6325 Type: String 6326 Possible values: any text string 6327 This parameter may be included with the failure 6328 event to provide diagnostic information on the 6329 reason of failure. 6330 quality alert 6331 EventID: qualert, 0x0006 6332 This property allows the MG to indicate a loss of quality 6333 of the network connection. The MG may do this by 6334 measuring packet loss, interarrival jitter, propogation 6335 delay and then indicating this using a percentage of 6336 quality loss. 6337 EventDescriptor parameters 6338 Threshold 6339 ParameterId: th (0x0001) 6340 Type: integer 6342 Internet draft MEGACO Protocol February 8, 2000 6344 Possible Values: threshold for percent of quality 6345 loss measured, calculated based on a 6346 provisioned method, that could take into 6347 consideration packet loss, jitter, and delay 6348 for example. Event is triggered when 6349 calculation exceeds the threshold. 6350 ObservedEventsDescriptor parameters 6351 Threshold 6352 ParameterId: th (0x0001) 6353 Type: integer 6354 Possible Values: percent of quality loss measured, 6355 calculated based on a provisioned method, 6356 that could take into consideration packet loss, 6357 jitter, and delay for example. 6359 E.11.3. Signals 6361 none 6363 E.11.4. Statistics 6365 Duration 6366 StatisticsID: dur (0x0001) 6367 Description: Provides duration of time the termination has 6368 been in the context. 6369 Type: Double, in milliseconds 6370 Octets Sent 6371 StatisticID: os (0x0002) 6372 Type: double 6373 Possible Values: any 64 bit integer 6374 Octets Received 6375 StatisticID: or (0x0003) 6376 Type: double 6377 Possible Values: any 64 bit integer 6379 E.11.5. Procedures 6381 none 6383 E.12. RTP Package 6385 PackageID: rtp (0x000c) 6386 Version: 1 6387 Extends: Network Package version 1 6388 This package is used to support packet based multimedia 6389 data transfer by means of the Real-time Transport Protocol 6391 Internet draft MEGACO Protocol February 8, 2000 6393 (RTP) [RFC 1889]. 6395 E.12.1. Properties 6397 None 6399 E.12.2. Events 6401 Payload Transition 6402 EventID: pltrans, 0x0001 6403 This event detects and notifies when there is a transition 6404 of the RTP payload format from one format to another. 6405 EventDescriptor parameters 6406 none 6407 ObservedEventsDescriptor parameters 6408 ParameterName: rtppayload 6409 ParameterID: rtppltype, 0x01 6410 Type: list of enumerated types. 6411 Possible values: The encoding method shall be 6412 specified by using one or several valid 6413 encoding names, as defined in the RTP AV 6414 Profile or registered with IANA. 6416 E.12.3. Signals 6418 None 6420 E.12.4. Statistics 6422 Packets Sent 6423 StatisticID: ps (0x0004) 6424 Type: double 6425 Possible Values: any 64 bit integer 6426 Packets Received 6427 StatisticID: pr (0x0005) 6428 Type: double 6429 Possible Values: any 64 bit integer 6430 Packet Loss 6431 StatisticID: pl (0x0006) 6432 Describes the current rate of packet loss on an RTP stream, 6433 as defined in IETF RFC 1889. Packet loss is expressed as 6434 percentage value: number of packets lost in the interval 6435 between two reception reports, divided by the number of 6436 packets expected during that interval. 6437 Type: double 6438 Possible Values: a 32 bit whole number and a 32 bit fraction. 6440 Internet draft MEGACO Protocol February 8, 2000 6442 Jitter 6443 StatisticID: jit (0x0007) 6444 Requests the current value of the interarrival jitter 6445 on an RTP stream as defined in IETF RFC 1889. 6446 Jitter measures the variation in interarrival time 6447 for RTP data packets. 6448 Delay 6449 StatisticID:delay (0x0008) 6450 Requests the current value of packet propagation delay 6451 expressed in timestamp units. Same as average latency. 6453 E.12.5. Procedures 6455 none 6457 E.13. DS0 Package 6459 PackageID: ds0 (0x000d) 6460 Version: 1 6461 Extends: Network Package version 1 6462 This package is used to support DS0 terminations. 6464 E.13.1. Properties 6466 Echo Cancellation 6467 PropertyID: ec (0x0008) 6468 By default, the telephony gateways always perform 6469 echo cancellation according to G.165/G.168. 6470 However, it is necessary, for some calls, to turn 6471 off these operations. 6472 Type: enumerated 6473 Possible Values: 6474 "on" (echo cancellation is permanently enabled 6475 and will disregard any incoming tones) 6476 "g165" (echo cancellation is according to 6477 G.165/G.168: echo cancellation is on to start 6478 with, but will turn itself off when it sees a 6479 2100Hz tone with phase reversal (i.e. a CED fax 6480 tone, or an ANS modem tone) 6481 "g164" (echo cancellation is according to G.164) 6482 "off" (echo cancellation is turned off.) 6483 The default is "g165". 6484 Defined In: LocalControlDescriptor 6485 Characteristics: read/write 6487 Gain Control 6489 Internet draft MEGACO Protocol February 8, 2000 6491 PropertyID: gain (0x000a) 6492 Gain control, or usage of of signal level adaptation and 6493 noise level reduction is used to adapt the level of 6494 the signal. However, it is necessary, for example 6495 for modem calls, to turn off this function. 6496 Type: enumeration (integer) 6497 Possible Values: 6498 The gain control parameter may either be specified 6499 as "automatic" (0xffffffff), or as an explicit number 6500 of decibels of gain (any other integer value). 6501 The default is provisioned in the MG. 6502 Defined In: LocalControlDescriptor 6503 Characteristics: read/write 6505 E.13.2. Events 6507 none 6509 E.13.3. Signals 6511 none 6513 E.13.4. Statistics 6515 None 6517 E.13.5. Procedures 6519 None 6521 APPENDIX A EXAMPLE CALL FLOWS (INFORMATIVE) 6523 All Megaco implementors must read the normative part of this document 6524 carefully before implementing from it. No one should use the examples in 6525 this section as stand-alone explanations of how to create protocol mes- 6526 sages. 6528 The examples in this section use SDP for encoding of the Local and 6529 Remote stream descriptors. SDP is defined in RFC 2327. If there is any 6530 discrepancy between the SDP in the examples, and RFC 2327, the RFC 6531 should be consulted for correctness. Audio profiles used are those 6532 defined in RFC 1890, and others registered with IANA. For example, G.711 6533 A-law is called PCMA in the SDP, and is assigned profile 0. G.723 is 6534 profile 4, and H263 is profile 34. See also http://www.isi.edu/in- 6535 notes/iana/assignments/rtp-parameters 6537 Internet draft MEGACO Protocol February 8, 2000 6539 A.1. Residential Gateway to Residential Gateway Call 6541 This example scenario illustrates the use of the elements of the proto- 6542 col to set up a Residential Gateway to Residential Gateway call over an 6543 IP-based network. For simplicity, this example assumes that both 6544 Residential Gateways involved in the call are controlled by the same 6545 Media Gateway Controller. 6547 A.1.1. Programming Residential GW Analog Line Terminations for Idle 6548 Behavior 6550 The following illustrates the API invocations from the Media Gateway 6551 Controller and Media Gateways to get the Terminations in this scenario 6552 programmed for idle behavior. Both the originating and terminating 6553 Media Gateways have idle AnalogLine Terminations programmed to look for 6554 call initiation events (i.e.-offhook) by using the Modify Command with 6555 the appropriate parameters. The null Context is used to indicate that 6556 the Terminations are not yet involved in a Context. The ROOT termination 6557 is used to indicate the entire MG instead of a termination within the 6558 MG. 6560 In this example, MG1 has the IP address 124.124.124.222, MG2 is 6561 125.125.125.111, and the MGC is 123.123.123.4. The default Megaco port 6562 is 55555 for all three. 6564 1. An MG registers with an MGC using the ServiceChange command: 6566 MG1 to MGC: 6567 MEGACO/1 [124.124.124.222] 6568 Transaction = 9998 { 6569 Context = - { 6570 ServiceChange = ROOT {Services { 6571 Method=Restart, 6572 ServiceChangeAddress=55555, Profile=ResGW/1} 6573 } 6574 } 6575 } 6577 2. The MGC sends a reply: 6579 MGC to MG1: 6580 MEGACO/1 [123.123.123.4]:55555 6581 Reply = 9998 { 6582 Context = - {ServiceChange = ROOT { 6583 Services {ServiceChangeAddress=55555, Profile=ResGW/1} } } 6584 } 6586 Internet draft MEGACO Protocol February 8, 2000 6588 3. The MGC programs a Termination in the NULL context. The termina- 6589 tionId is A4444, the streamId is 1, the requestId in the Events 6590 descriptor is 2222. The mId is the identifier of the sender of 6591 this message, in this case, it is the IP address and port 6592 [123.123.123.4]:55555. Mode for this stream is set to SendReceive. 6593 "al" is the analog line supervision package. 6595 MGC to MG1: 6596 MEGACO/1 [123.123.123.4]:55555 6597 Transaction = 9999 { 6598 Context = - { 6599 Modify = A4444 { 6600 Media { Stream = 1 { 6601 LocalControl { 6602 Mode = SendReceive, 6603 ds0/gain=2, ; in dB, 6604 ds0/ec=G165 6605 }, 6606 Local { 6607 v=0 6608 c=IN IP4 $ 6609 m=audio $ RTP/AVP 0 6610 a=fmtp:PCMU VAD=X-NNVAD ; special voice activity 6611 ; detection algorithm 6612 } 6613 } 6614 }, 6615 Events = 2222 {al/of} 6616 } 6617 } 6618 } 6620 The dialplan script could have been loaded into the MG previously. Its 6621 function would be to wait for the OffHook, turn on dialtone and start 6622 collecting DTMF digits. However in this example, we use the digit map, 6623 which is put into place after the offhook is detected (step 5 below). 6625 Note that the embedded EventsDescriptor could have been used to combine 6626 steps 3 and 4 with steps 8 and 9, eliminating steps 6 and 7. 6628 4. The MG1 accepts the Modify with this reply: 6630 MG1 to MGC: 6631 MEGACO/1 [124.124.124.222]:55555 6632 Reply = 9999 { 6633 Context = - {Modify = A4444} 6635 Internet draft MEGACO Protocol February 8, 2000 6637 } 6639 5. A similar exchange happens between MG2 and the MGC, resulting in an 6640 idle Termination called A5555. 6642 A.1.2. Collecting Originator Digits and Initiating Termination 6644 The following builds upon the previously shown conditions. It illus- 6645 trates the transactions from the Media Gateway Controller and originat- 6646 ing Media Gateway (MG1) to get the originating Termination (A4444) 6647 through the stages of digit collection required to initiate a connection 6648 to the terminating Media Gateway (MG2). 6650 6. MG1 detects an offhook event from User 1 and reports it to the 6651 Media Gateway Controller via the Notify Command. 6653 MG1 to MGC: 6654 MEGACO/1 [124.124.124.222]:55555 6655 Transaction = 10000 { 6656 Context = - { 6657 Notify = A4444 {ObservedEvents =2222 { 6658 19990729T22000000:al/of}} 6659 } 6660 } 6662 7. And the Notify is acknowledged. 6664 MGC to MG1: 6665 MEGACO/1 [123.123.123.4]:55555 6666 Reply = 10000 { 6667 Context = - {Notify = A4444} 6668 } 6670 8. The MGC Modifies the termination to play dial tone, and to look for 6671 digits now. There is also an embedded event to stop dialtone upon 6672 detection of the first digit. dd is the DTMF Detection package, and 6673 ce is the completion event. 6675 MGC to MG1: 6676 MEGACO/1 [123.123.123.4]:55555 6677 Transaction = 10001 { 6679 Internet draft MEGACO Protocol February 8, 2000 6681 Context = - { 6682 Modify = A4444 { 6683 Events = 2223 { 6684 al/on, dd/ce {DigitMap=Dialplan0} 6685 }, 6686 Signals {cg/dt}, 6687 DigitMap= Dialplan0{ 6688 (0| 00|[1-7]xxx|8xxxxxxx|Fxxxxxxx|Exx|91xxxxxxxxxx|9011x.)} 6689 } 6690 } 6691 } 6693 9. And the Modify is acknowledged. 6695 MG1 to MGC: 6696 MEGACO/1 [124.124.124.222]:55555 6697 Reply = 10001 { 6698 Context = - {Modify = A4444} 6699 } 6701 10. Next, digits are accumulated by MG1 as they are dialed by User 1. 6702 Dialtone is stopped upon detection of the first digit, using the 6703 embedded event in step 8. When an appropriate match is made of col- 6704 lected digits against the currently programmed Dialplan for A4444, 6705 another Notify is sent to the Media Gateway Controller. 6707 MG1 to MGC: 6708 MEGACO/1 [124.124.124.222]:55555 6709 Transaction = 10002 { 6710 Context = - { 6711 Notify = A4444 {ObservedEvents =2223 { 6712 19990729T22010001:dd/ce{ds="916135551212",Meth=FM}}} 6713 } 6714 } 6716 11. And the Notify is acknowledged. 6718 MGC to MG1: 6719 MEGACO/1 [123.123.123.4]:55555 6720 Reply = 10002 { 6721 Context = - {Notify = A4444} 6722 } 6724 Internet draft MEGACO Protocol February 8, 2000 6726 12. The controller then analyses the digits and determines that a con- 6727 nection needs to be made from MG1 to MG2. Both the TDM termination 6728 A4444, and an RTP termination are added to a new context in MG1. 6729 Mode is ReceiveOnly since Remote descriptor values are not yet 6730 specified. Preferred codecs are in the MGC's preferred order of 6731 choice. 6733 MGC to MG1: 6734 MEGACO/1 [123.123.123.4]:55555 6735 Transaction = 10003 { 6736 Context = $ { 6737 Add = A4444, 6738 Add = $ { 6739 Media { 6740 Stream = 1 { 6741 LocalControl { 6742 Mode = ReceiveOnly, 6744 nt/jit=40, ; in ms 6745 }, 6746 Local { 6747 v=0 6748 c=IN IP4 $ 6749 m=audio $ RTP/AVP 4 6750 a=ptime:30 6751 v=0 6752 c=IN IP4 $ 6753 m=audio $ RTP/AVP 0 6754 } 6755 } 6756 } 6757 } 6758 } 6759 } 6761 NOTE - The MGC states its preferred parameter values as a series of sdp 6762 blocks in Local. The MG fills in the Local Descriptor in the Reply. 6764 13. MG1 acknowledges the new Termination and fills in the Local IP 6765 address and UDP port. It also makes a choice for the codec based on 6766 the MGC preferences in Local. MG1 sets the RTP port to 2222. 6768 MEGACO/1 [124.124.124.222]:55555 6769 Reply = 10003 { 6770 Context = 2000 { 6772 Internet draft MEGACO Protocol February 8, 2000 6774 Add = A4444, 6775 Add=A4445{ 6776 Media { 6777 Stream = 1 { 6778 Local { 6779 v=0 6780 c=IN IP4 124.124.124.222 6781 m=audio 2222 RTP/AVP 4 6782 a=ptime:30 6783 a=recvonly 6784 } ; RTP profile for G.723 is 4 6785 } 6786 } 6787 } 6788 } 6789 } 6791 14. The MGC will now associate A5555 with a new Context on MG2, and 6792 establish an RTP Stream (i.e, A5556 will be assigned), SendReceive 6793 connection through to the originating user, User 1. The MGC also 6794 sets ring on A5555. 6796 MGC to MG2: 6797 MEGACO/1 [123.123.123.4]:55555 6798 Transaction = 50003 { 6799 Context = $ { 6800 Add = A5555 { Media { 6801 Stream = 1 { 6802 LocalControl {Mode = SendReceive} }}, 6803 Events = 1234{al/of}, 6804 Signals {al/ri} 6805 }, 6806 Add = $ {Media { 6807 Stream = 1 { 6808 LocalControl { 6809 Mode = SendReceive, 6810 nt/jit=40 ; in ms 6811 }, 6812 Local { 6813 v=0 6814 c=IN IP4 $ 6815 m=audio $ RTP/AVP 4 6816 a=ptime:30 6817 }, 6818 Remote { 6819 v=0 6821 Internet draft MEGACO Protocol February 8, 2000 6823 c=IN IP4 124.124.124.222 6824 m=audio 2222 RTP/AVP 4 6825 a=ptime:30 6826 } ; RTP profile for G.723 is 4 6827 } 6828 } 6829 } 6830 } 6831 } 6833 15. This is acknowledged. The stream port number is different from the 6834 control port number. In this case it is 1111 (in the SDP). 6836 MG2 to MGC: 6837 MEGACO/1 [124.124.124.222]:55555 6838 Reply = 50003 { 6839 Context = 5000 { 6840 Add = A5555{}, 6841 Add = A5556{ 6842 Media { 6843 Stream = 1 { 6844 Local { 6845 v=0 6846 c=IN IP4 125.125.125.111 6847 m=audio 1111 RTP/AVP 4 6848 } 6849 } ; RTP profile for G723 is 4 6850 } 6851 } 6852 } 6853 } 6855 16. The above IPAddr and UDPport need to be given to MG1 now. 6857 MGC to MG1: 6858 MEGACO/1 [123.123.123.4]:55555 6859 Transaction = 10005 { 6860 Context = 2000 { 6861 Modify = A4444 { 6862 Signals {cg/rt} 6863 }, 6864 Modify = A4445 { 6865 Media { 6867 Internet draft MEGACO Protocol February 8, 2000 6869 Stream = 1 { 6870 Remote { 6871 v=0 6872 c=IN IP4 125.125.125.111 6873 m=audio 1111 RTP/AVP 4 6874 } 6875 } ; RTP profile for G723 is 4 6876 } 6877 } 6878 } 6879 } 6881 MG1 to MGC: 6882 MEGACO/1 [124.124.124.222]:55555 6883 Reply = 10005 { 6884 Context = 2000 {Modify = A4444, Modify = A4445} 6885 } 6887 17. The two gateways are now connected and User 1 hears the RingBack. 6888 The MG2 now waits until User2 picks up the receiver and then the 6889 two-way call is established. 6891 From MG2 to MGC: 6893 MEGACO/1 [125.125.125.111]:55555 6894 Transaction = 50005 { 6895 Context = 5000 { 6896 Notify = A5555 {ObservedEvents =1234 { 6897 19990729T22020002:al/of}} 6898 } 6899 } 6901 From MGC to MG2: 6903 MEGACO/1 [123.123.123.4]:55555 6904 Reply = 50005 { 6905 Context = - {Notify = A5555} 6906 } 6908 From MGC to MG2: 6910 MEGACO/1 [123.123.123.4]:55555 6911 Transaction = 50006 { 6912 Context = 5000 { 6913 Modify = A5555 { 6914 Events = 1235 {al/on}, 6916 Internet draft MEGACO Protocol February 8, 2000 6918 Signals { } ; to turn off ringing 6919 } 6920 } 6921 } 6923 From MG2 to MGC: 6925 MEGACO/1 [125.125.125.111]:55555 6926 Reply = 50006 { 6927 Context = 5000 {Modify = A4445} 6928 } 6930 18. Change mode on MG1 to SendReceive, and stop the ringback. 6932 MGC to MG1: 6933 MEGACO/1 [123.123.123.4]:55555 6934 Transaction = 10006 { 6935 Context = 2000 { 6936 Modify = A4445 { 6937 Media { 6938 Stream = 1 { 6939 LocalControl { 6940 Mode=SendReceive 6941 } 6942 } 6943 } 6944 }, 6945 Modify = A4444 { 6946 Signals { } 6947 } 6948 } 6949 } 6951 from MG1 to MGC: 6952 MEGACO/1 [124.124.124.222]:55555 6953 Reply = 10006 { 6954 Context = 2000 {Modify = A4445, Modify = A4444}} 6956 E. The MGC decides to Audit the RTP termination on MG2. 6958 MEGACO/1 [123.123.123.4]:55555 6959 Transaction = 50007 { 6960 Context = - {AuditValue = A5556{ 6961 Audit{Media, DigitMap, Events, Signals, Packages, Statistics }} 6963 Internet draft MEGACO Protocol February 8, 2000 6965 } 6966 } 6968 20. The MG2 replies. An RTP termination has no events nor signals, so 6969 these are left out in the reply . 6971 MEGACO/1 [125.125.125.111]:55555 6972 Reply = 50007 { 6973 Context = - { 6974 AuditValue = A5556 { 6975 Media { 6976 Stream = 1 { 6977 LocalControl { Mode = SendReceive, 6978 nt/jit=40 }, 6979 Local { 6980 v=0 6981 c=IN IP4 125.125.125.111 6982 m=audio 1111 RTP/AVP 4 6983 a=ptime:30 6984 }, 6985 Remote { 6986 v=0 6987 c=IN IP4 124.124.124.222 6988 m=audio 2222 RTP/AVP 4 6989 a=ptime:30 6990 } } }, 6991 Packages {nt-1, rtp-1}, 6992 Statistics { rtp/ps=1200, ; packets sent 6993 nt/os=62300, ; octets sent 6994 rtp/pr=700, ; packets received 6995 nt/or=45100, ; octets received 6996 rtp/pl=0.2, ; % packet loss 6997 rtp/jit=20, 6998 rtp/delay=40 } ; avg latency 6999 } 7000 } 7001 } 7003 21. When the MGC receives an onhook signal from one of the MGs, it 7004 brings down the call. In this example, the user at MG2 hangs up 7005 first. 7007 From MG2 to MGC: 7009 Internet draft MEGACO Protocol February 8, 2000 7011 MEGACO/1 [125.125.125.111]:55555 7012 Transaction = 50008 { 7013 Context = 5000 { 7014 Notify = A5555 {ObservedEvents =1235 { 7015 19990729T24020002:al/on} 7016 } 7017 } 7018 } 7020 From MGC to MG2: 7022 MEGACO/1 [123.123.123.4]:55555 7023 Reply = 50008 { 7024 Context = - {Notify = A5555} 7025 } 7027 22. The MGC now sends both MGs a Subtract to take down the call. Only 7028 the subtracts to MG2 are shown here. Each termination has its own 7029 set of statistics that it gathers. An MGC may not need to request 7030 both to be returned. A5555 is a physical termination, and A5556 is 7031 an RTP termination. 7033 From MGC to MG2: 7035 MEGACO/1 [123.123.123.4]:55555 7036 Transaction = 50009 { 7037 Context = 5000 { 7038 Subtract = A5555 {Audit{Statistics}}, 7039 Subtract = A5556 {Audit{Statistics}} 7040 } 7041 } 7043 From MG2 to MGC: 7045 MEGACO/1 [125.125.125.111]:55555 7046 Reply = 50009 { 7047 Context = 5000 { 7048 Subtract = A5555 { 7049 Statistics { 7050 nt/os=45123, ; Octets Sent 7051 nt/dur=40 ; in seconds 7052 } 7053 }, 7054 Subtract = A5556 { 7055 Statistics { 7056 rtp/ps=1245, ; packets sent 7058 Internet draft MEGACO Protocol February 8, 2000 7060 nt/os=62345, ; octets sent 7061 rtp/pr=780, ; packets received 7062 nt/or=45123, ; octets received 7063 rtp/pl=10, ; % packets lost 7064 rtp/jit=27, 7065 rtp/delay=48 ; average latency 7066 } 7067 } 7068 } 7069 } 7071 23. The MGC now sets up both MG1 and MG2 to be ready to detect the next 7072 off-hook event. See step 1. Note that this could be the default 7073 state of a termination in the null context, and if this were the 7074 case, no message need be sent from the MGC to the MG. Once a termi- 7075 nation returns to the null context, it goes back to the default 7076 termination values for that termination.