RFC 3991

Media Gateway Control Protocol (MGCP) Redirect and Reset Package

πŸ“… published February 2005, from ietf

RFC 3991: Media Gateway Control Protocol (MGCP) Redirect and Reset Package πŸŽ€

Okay bestie, this one is from the Network Working Group and it's an Informational doc, which means it's sharing info, not setting an Internet standard πŸ’… It came out in February 2005, written by B. Foster and F. Andreasen, both at Cisco Systems. The title block doesn't list anything it obsoletes or updates, so it's a standalone moment ✨


Status of This Memo πŸ“

This memo gives info to the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited 🌸

Copyright (C) The Internet Society (2005).

IESG Note 🚨

Okay, this part is important, so listen up πŸ‘‚ This doc is being published for the info of the community. It describes a non-IETF protocol that's already being deployed in a bunch of products. Implementers should know about RFC 3015, which came out of the IETF Megaco Working Group and the ITU-T SG16. It's considered the standards-based way (including reviewed security considerations) to meet the needs that MGCP was designed to address by the IETF and the ITU-T. So yeah, RFC 3015 is the one to check out 🫢

Abstract πŸ¦‹

The base Media Gateway Control Protocol (MGCP) spec (RFC 3435) lets endpoints get redirected one at a time. This doc adds extensions in the form of a new MGCP package that gives you ways to redirect and reset a whole group of endpoints at once. It also lets you redirect endpoints more accurately by giving a list of Call Agents in a preferred order. Iconic πŸ‘‘

Table of Contents

   1.  Introduction..................................................  2
       1.1.  Conventions Used in This Document.......................  3
   2.  Redirect and Reset Package....................................  3
       2.1.  NotifiedEntityList Extension Parameter..................  3
       2.2.  Endpoint Specifier......................................  4
             2.2.1.  EndpointList and EndpointMap Extension
                     Parameters......................................  4
             2.2.2.  Application to Out-of-Service Endpoints.........  6
       2.3.  Redirect................................................  6
       2.4.  Reset Extension Parameter...............................  7
       2.5.  Return Codes............................................  8
   3.  IANA Considerations...........................................  9
   4.  Security Considerations.......................................  9
   5.  Normative References..........................................  9
   Authors' Addresses................................................ 10
   Full Copyright Statement.......................................... 11

1. Introduction πŸ’–

Okay so the base MGCP spec [2] lets a Call Agent set a new NotifiedEntity parameter to redirect one or more endpoints to a new Call Agent. That has to happen inside a NotificationRequest or a connection handling command. The catch is that these commands change endpoint or connection state, so you usually can't send one command to a whole group of endpoints. So if a new Call Agent takes over for a failed one, it has to redirect endpoints one at a time. If there's a huge number of them (like in a big trunking gateway), that could take forever ngl 😭

This doc defines a brand new redirect and reset package for MGCP. It lets the Call Agent redirect a whole group of endpoints without messing with endpoint or connection state. Main character energy 🧚

There's also a new NotifiedEntityList parameter in here. It's similar to NotifiedEntity, but it lets you list multiple domain names. So the Call Agent can point endpoints at a preferred, ordered list of backup Call Agents, which is way more precise πŸŽ€

The third thing this package does is reset and re-initialize one or more groups of endpoints efficiently. That's super useful when a Call Agent fails over 🌈

1.1. Conventions Used in This Document πŸ“š

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

2. Redirect and Reset Package 🌸

Here's the package info:

Package Name: RED
Version: 0

And this package does the following:

  • Defines a new NotifiedEntityList extension parameter. It works the same as the NotifiedEntity parameter in [2], but it allows more than one domain name to be specified.
  • Lets a Call Agent pass a new NotifiedEntity or NotifiedEntityList to a collection of endpoints specified by an "all of" wildcard. This is useful if a new Call Agent takes over from a previous one and wants endpoints to send messages to it from now on.
  • Lets a Call Agent request that one or more groups of endpoints do a reset, which can help after certain kinds of failures.

2.1. NotifiedEntityList Extension Parameter πŸ¦‹

The NotifiedEntityList parameter is encoded as "NL". It's followed by a colon and a comma-separated list of NotifiedEntity values, as defined in the MGCP spec [2]. Like this:

RED/NL: ca1@myca.whatever.net, ca2@mybackupca.whatever.net

The NotifiedEntityList works kinda like the NotifiedEntity parameter, except it lets you list multiple domain names. So the NotifiedEntityList sets a new "notified entity" for the endpoint.

The NotifiedEntityList parameter is optional in any command or response where the NotifiedEntity parameter is allowed. After a restart, the NotifiedEntityList starts out empty, unless it's been provisioned otherwise. In later commands, it keeps its current value until it's explicitly changed. If both a NotifiedEntity parameter and a non-empty NotifiedEntityList parameter have been set (not necessarily at the same time), then the NotifiedEntity value gets treated as if it were implicitly added to the beginning of the NotifiedEntityList. So NotifiedEntity always defines the first domain name to contact, unless it's been explicitly set to empty. In that case, the NotifiedEntityList defines the "notified entity". If the NotifiedEntityList is also empty, then the normal MGCP handling of an empty "notified entity" applies. We'll call the list of domain names that comes out of all these rules the "notified entity list" πŸ’…

When the "notified entity list" isn't empty, transmission is first attempted with the first domain name in the list. This follows the normal MGCP retransmission procedures described in [2]. Each of the IP addresses for this domain name MUST first be tried as specified in [2]. If that doesn't work, each of the IP addresses for the second domain name MUST then be attempted, and so on. Those attempts follow the normal MGCP retransmission procedures, with "N" (the number of retransmissions) set to zero for each domain name (see Section 4.3 in [2]). Whenever retransmission to a new domain name starts, the default retransmission timer value (RTO), etc., SHOULD be used. The estimator (T-DELAY) and measurements (AAD and ADEV) used for the transmission to the previous domain name are now considered obsolete 🫠

Here's the tea though: the maximum transaction lifetime rules still apply as usual. So retransmission to any IP address for any of the domain names MUST NOT happen more than T-Max seconds after the command was first sent, no matter where it was sent. The Max1 DNS query MAY be performed for each of the domain names, or it MAY simply be performed for the first domain name. The Max2 DNS query, however, MUST NOT be performed for any domain name except the last one. Also, only the last IP address of the last domain name can reach Max2 retransmissions. So retransmission to all the other IP addresses, every one except the last IP address of the last domain name in the list, MUST end after Max1 retransmissions ⏰

You can audit the current value of the NotifiedEntityList parameter through AuditEndpoint. The value of the NotifiedEntity parameter won't be included there, so you have to audit that one separately. Support for the NotifiedEntityList in AuditConnection is permissible, but it's neither required nor recommended πŸ™ˆ

2.2. Endpoint Specifier πŸŽ€

2.2.1. EndpointList and EndpointMap Extension Parameters 🧚

A simple "all-of" wildcard, as defined in [2], might not be enough to accurately specify the endpoints you care about. Here's an example: a Call Agent fails over, and now there's a state mismatch for endpoints that were involved in transient calls. To re-sync, the Call Agent can use the reset extension parameter described in section 2.4 of this document, to make sure idle endpoints are actually idle. The tricky part is that these endpoints might be randomly spread out across the available endpoints in a large trunk gateway πŸ˜΅β€πŸ’«

So to handle that, the RED package adds some new parameters for picking out the endpoints of interest for the EndpointConfiguration Command. These are the EndpointList and the EndpointMap extension parameters. These parameters MUST only be used when a virtual endpoint corresponding to the gateway is specified as the LocalEndpointName, like this:

EPCF 1200 MG@gw1.whatever.net MGCP 1.0

Here, "MG" is the virtual endpoint name associated with the gateway.

The EndPointList parameter is a list of endpoint names. It can include one or more lines in the following format:

"RED/EL:" 0*WSP RangedLocalName 0*("," 0*WSP RangedLocalName)

RangedLocalName is a LocalEndpointName that can include the range wildcard notation described in Appendix E (section E.5) of [2], as well as an "all" wildcard. But the two forms MUST NOT be mixed in a single command. The grammar looks like this:

RangeWildcard  = "*" / "[" NumericalRange *("," NumericalRange)"]"
NumericalRange = 1*(DIGIT) [ "-" 1*(DIGIT) ]

Example:

RED/EL: ds/ds1-1/[1-24], ds/ds1-2/[1-24], ds/ds1-3/[1-24]

You can add an EndpointMap parameter with the following format to narrow things down further:

"RED/MP:" 0*WSP TrueOrFalse 0*(TrueOrFalse)

TrueOrFalse = "T" / "F"

"T" means the command should be applied to the matching endpoint, and "F" means it shouldn't. This parameter can be combined with the reset extension parameter described in section 2.4 of this document to force arbitrarily distributed endpoints into an idle state 🌈

If the EndpointMap parameter is used, it MUST be immediately preceded (i.e., on the previous line) by an EndPointList parameter. That's how it knows which endpoints it's referring to. The EndPointList MUST NOT contain the "all" wildcard. You can provide several EndpointList and EndpointMap parameter lines. It's considered an error if an EndpointMap parameter extends beyond the endpoints specified in the preceding EndPointList parameter. In that case, return code 800 MUST be used (see section 2.5). Yikes πŸ’€

The EndpointList and EndpointMap parameters MUST only be used with the EndpointConfiguration command. The EndpointList parameter MAY be provided without an EndpointMap parameter. However, as mentioned earlier, an EndpointMap parameter MUST be immediately preceded by an EndpointList parameter. Neither of these parameters is auditable πŸ”₯

For an example of EndpointMap parameter usage, see Section 2.4.

2.2.2. Application to Out-of-Service Endpoints ✨

okay so, quick heads up: the EndpointConfiguration command is normally only valid for in-service endpoints πŸ’…. If an EndpointConfiguration request is sent to a wildcarded LocalEndpointName [2] and any of the endpoints specified are out-of-service, the command will fail with return code 501 (endpoint not ready) πŸ™ˆ.

BUT, as long as the gateway is in service and able to respond to MGCP commands, it can still apply the endpoint configuration command to endpoints specified by the EndpointList and/or EndpointMap parameters (regardless of whether those endpoints are in-service) πŸŽ€. Of course, the endpoint configuration info will NOT be kept over gateway restarts 😭. The Call Agent would have to reapply the endpoint configuration after it gets an RSIP with the restart method "restart" πŸ”„. For example, if a new "notified entity" was provided, it would have no effect, since the provisioned value would be used upon restart πŸ’€.

EndpointList and/or EndpointMap parameters MUST only be used with a virtual endpoint name corresponding to the gateway (as indicated above) 🧚. If it is used with any other endpoint name (whether wildcarded or not), then error code 801 (section 2.5) MUST be returned 🚫.

2.3. Redirect πŸ¦‹

A new extension parameter for use with the EndpointConfiguration command is defined. A new NotifiedEntity value can be included with a "RED/N" parameter, like this:

EPCF 1200 *@gw1.whatever.net MGCP 1.0
RED/N: ca1@ca1234.whatever.net

This changes the "notified entity" for the endpoint(s) to the value specified. If the "all of" wildcard convention is used, the NotifiedEntity value replaces all of the existing "notified entities" for those endpoints. If NotifiedEntity is left out of a later EndpointConfiguration command, the "notified entity" stays unchanged 🌸.

If the "notified entity" is a domain name that resolves to multiple IP addresses, one of the resolved addresses MUST be selected. If one of those IP addresses is the IP address of the Call Agent sending the request, that IP address SHOULD be selected first πŸ’œ.

The NotifiedEntityList parameter can also be specified in an endpoint configuration command, like so:

EPCF 1200 *@gw1.whatever.net MGCP 1.0
RED/NL: ca1@myca.whatever.net, ca2@mybackupca.whatever.net

Note that this command will only succeed if all the endpoints on the gateway are in-service πŸ‘‘.

As mentioned in section 2.2, it can also apply this to the gateway virtual endpoint:

EPCF 1200 MG@gw1.whatever.net MGCP 1.0
RED/EL: *
RED/NL: ca1@myca.whatever.net, ca2@mybackupca.whatever.net

Note that the outcome of this command is NOT affected by the service state of the endpoints on the gateway πŸ™Œ.

As mentioned in section 2.1, the NotifiedEntityList ("RED/NL") parameter may be used with any command where a NotifiedEntity parameter is allowed. However, the "RED/N" parameter SHOULD only be used with the endpoint configuration command 🫢.

The "RED/N" parameter does not have a default value, and the auditing behaviour for auditing the "NotifiedEntity" is unchanged from that specified in [2], no matter how the "NotifiedEntity" was set (i.e., there is no specific audit associated with the "RED/N" parameter, so the "RED/N" parameter cannot be audited) πŸ“‹.

2.4. Reset Extension Parameter πŸ”₯

Another EndpointConfiguration parameter ("RED/R") lets the Call Agent reset one or more endpoints. The ABNF syntax for the parameter line is as follows:

"RED/R:" 0*WSP "reset"

This resets and re-initializes the specified endpoints (i.e., any connections on the endpoint will be deleted, and the endpoint will be returned to its clean default state without any active signals) ✨.

Example:

EPCF 1200 mg@gw1.whatever.net MGCP 1.0
RED/EL: ds/e1-3/[1-30]
RED/MP: TFTTTTTFFFTTTTTFFFFTFFTTFTTTFF
RED/EL: ds/e1-5/[1-30]
RED/MP: TFFFFFTFFFTTFTTFFFFTFFFTFTTTTT
RED/R: reset

In this case, the particular endpoints marked "T" by the EndpointMap parameter in the E1 spans ds/e1-3 and ds/e1-5 are reset πŸŽ€.

The "RED/R" parameter MUST NOT be used with any command other than the endpoint configuration command. There is no default value for the parameter, so it is unaffected when omitted. There is no specific audit behaviour associated with this parameter, i.e., it cannot be audited πŸ™ˆ.

2.5. Return Codes 🌈

The following package-specific return codes are defined for the "RED" package:

 Code   Text                     Explanation

  800    EndpointMap              Either the EndpointMap parameters
         Out of Range             are outside the range specified
                                  by the EndpointList parameter, or
                                  the EndpointList Parameter was
                                  not included when an EndpointMap
                                  parameter was included.

  801    Incorrect Usage          Incorrect usage of parameters,
         Of Parameters            such as EndpointList parameter,
                                  used where the endpoint name was
                                  not the virtual endpoint name
                                  corresponding to the gateway.

3. IANA Considerations πŸ“š

The MGCP package title "Redirect and Reset" with the name "RED" and version number 0 has been registered with IANA, as indicated in Appendix C.1 in [2] πŸ“.

4. Security Considerations πŸ”

Okay bestie, this one is SERIOUS 😭 Security matters a LOT here.

Section 5 of the base MGCP specification [2] discusses security requirements for the base protocol that apply equally to the package defined in this document. Use of a security protocol that provides per message authentication and integrity services, such as IPsec (RFC 2401 [3], RFC 2406 [4]), is REQUIRED in order to ensure that requests and responses are obtained from authenticated sources and that messages have not been modified. Without these services, gateways and Call Agents are open to attacks ⚠️.

For example, an attacker could masquerade as a Call Agent and start a denial of service attack by resetting endpoints that were involved in valid calls πŸ’€. Another attack using the package described in this document could involve redirecting endpoints to the attacker so that it acts as the Call Agent for those endpoints 😱.

5. Normative References πŸ“–

[1]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
     Levels", BCP 14, RFC 2119, March 1997.

[2]  Andreasen, F. and B. Foster, "Media Gateway Control Protocol
     (MGCP) Version 1.0", RFC 3435, January 2003.

[3]  Kent, S. and R. Atkinson, "Security Architecture for the
     Internet Protocol", RFC 2401, November 1998.

[4]  Kent, S. and R. Atkinson, "IP Encapsulating Security Payload
     (ESP)", RFC 2406, November 1998.

Authors' Addresses πŸ¦‹

Flemming Andreasen
Cisco Systems
499 Thornall Street, 8th Floor
Edison, NJ 08837

EMail: fandreas@cisco.com


Bill Foster
Cisco Systems

EMail: bfoster@cisco.com
Copyright (C) The Internet Society (2005).

This document is subject to the rights, licenses and restrictions
contained in BCP 78, and at www.rfc-editor.org, and except as set
forth therein, the authors retain all their rights.

This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property 🧚

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the ISOC's procedures with respect to rights in ISOC Documents can be found in BCP 78 and BCP 79.

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

Acknowledgement πŸ’œ

Funding for the RFC Editor function is currently provided by the Internet Society.

πŸ“¦ where this page comes from