RFC 7403

A Media-Based Traceroute Function for the Session Initiation Protocol (SIP)

πŸ“… published November 2014, from ietf

RFC 7403: A Media-Based Traceroute Function for SIP πŸ“žβœ¨

Okay bestie, this one is RFC 7403 πŸŽ€. It's a Standards Track document by H. Kaplan from Oracle, published November 2014 (ISSN 2070-1721). Its header lists no Obsoletes or Updates entries, so it doesn't replace or change any older RFC πŸ¦‹.


Abstract πŸ’œ

SIP already has hop-by-hop traceroute for messages, using the Max-Forwards header field to map out the reachability path of requests to a target πŸ—ΊοΈ. There's also a separate media-loopback mechanism that makes test calls where the media gets looped right back to the sender πŸ”. This document combines the two into traceroute-style test calls that check the media path when SIP sessions go through media-relaying back-to-back user agents (B2BUAs) 🫢.


Status of This Memo πŸ“‹

This is an Internet Standards Track document.

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). More info on Internet Standards is in Section 2 of RFC 5741.

Info about the current status of this document, any errata, and how to send feedback is at http://www.rfc-editor.org/info/rfc7403.


Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, since they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and are provided without warranty as described in the Simplified BSD License. πŸ“œ


Table of Contents πŸ—‚οΈ

1. Introduction ....................................................2
2. Terminology .....................................................3
3. The SIP Traceroute Mechanism ....................................4
   3.1. Processing a Received Max-Forwards Header Field ............4
   3.2. Answering the INVITE .......................................5
4. Security Considerations .........................................5
5. Normative References ............................................6
Acknowledgments ....................................................7
Author's Address....................................................7

1. Introduction 🌸

In lots of deployments, the media for SIP-created sessions doesn't go directly from the originating User Agent Client (UAC) to the answering User Agent Server (UAS) πŸ™ˆ. A lot of the time, SIP B2BUAs in the signaling path also wedge themselves into the media plane by changing the Session Description Protocol (SDP). They do this to inject things like rich ringtones or music-on-hold, or to relay media for stuff like transcoding, IPv4-IPv6 conversion, NAT traversal, Secure Realtime Transport Protocol (SRTP) termination, media steering, and so on πŸ’….

As more SIP domains get deployed and interconnected, the odds of a SIP session crossing a media-plane B2BUA go up, and so does the number of B2BUAs any one session might go through πŸ“ˆ. In other words, a SIP session can cross any number of B2BUAs, both in the signaling plane and in the media plane 🌈.

When something fails or degrades in the media plane, it's really hard to tell where in the media path it happened 😭. To make SIP sessions and media crossing those B2BUAs easier to manage and troubleshoot, it would be super useful to test the media path step by step as it reaches each B2BUA. The best part is that the source User Agent (UA) alone controls the test πŸ”₯. A mechanism for media-loopback test sessions is already defined in [RFC6849], but it can't be used directly to test B2BUAs. That's because B2BUAs usually don't have an Address of Record (AOR) to target, and you can't know ahead of time which B2BUAs a given session will go through πŸ™ƒ.

For example, say calls from Alice to Bob have media problems πŸ“ž. Alice wants to test the media path to each B2BUA on the way to Bob, one at a time, to figure out which segment is the problem πŸ•΅οΈβ€β™€οΈ. She can't target the B2BUAs directly for each test call. She doesn't know which URIs to use to reach them, and using those URIs wouldn't guarantee the same media path as a call to Bob πŸ’€. A better solution is to make a test call aimed at Bob, but with a SIP traceroute-style mechanism that makes the call end at the B2BUAs. That way she can run test sessions on the media path to each downstream B2BUA 🧚.

This document defines how that mechanism works. It uses the mechanism in [RFC6849] together with the Max-Forwards SIP header field, so a SIP UA can make multiple test calls, each one reaching a B2BUA further downstream πŸ¦‹. Each B2BUA on the path that supports the mechanism in [RFC6849] answers the media-loopback call. That means the originating SIP UA can test the media path up to that B2BUA πŸŽ€.


2. Terminology πŸ“–

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 [RFC2119].

Here are the terms you need:

  • B2BUA: a SIP Back-to-Back User Agent, which is the logical combination of a User Agent Server (UAS) and User Agent Client (UAC) πŸ”—.
  • UAS: a SIP User Agent Server πŸ–₯️.
  • UAC: a SIP User Agent Client πŸ“±.
  • Traceroute: a mechanism to trace a path of hops from an originator to a destination πŸ›€οΈ. For IP, this is typically done using the Time To Live (TTL) field of the IP header, starting at the value 1 and incrementing by 1 as each IP hop responds with an ICMP error. For SIP, this can be done using the Max-Forwards header field, starting with the value 0, in a similar fashion to the TTL field ✨.

It is assumed the reader is already familiar with media-loopback [RFC6849] πŸ’….


3. The SIP Traceroute Mechanism πŸ—ΊοΈ

The Max-Forwards header field can already be used to make a simple SIP-request traceroute 🧭. You start by generating a SIP request with a Max-Forwards value of 0, get a 483 Too Many Hops response from the next hop, and then increase the value for each following SIP request. That way you reach SIP devices further and further downstream, getting a 483 from each one πŸ’–.

The mechanism in this document uses that Max-Forwards-style traceroute to do media-loopback testing πŸ”. To run a SIP media-plane traceroute, the originating UAC (Alice) generates a SIP INVITE to a target AOR (Bob) with a Max-Forwards header field value of 0 and SDP based on [RFC6849] πŸŽ€. The SIP next hop will either reject the request with a 483 Too Many Hops response or, if the next hop is a B2BUA that supports this mechanism and allows this kind of testing from the requesting UAC, the B2BUA answers the INVITE to set up the dialog and create a media-loopback session πŸ™Œ.

The originating UAC can then end the media-loopback session and send another INVITE to the same target AOR, this time with a Max-Forwards header field value of 1. That one reaches the second SIP next hop, and so on πŸ¦‹.

A SIP Reason header field cause value of '483' (as defined in [RFC3326]) is included in the 200 answer from each B2BUA that answers the INVITE, until the INVITE reaches the final UAS (Bob). Bob's UAS doesn't use the Reason cause value (see Section 3.2 for details) 🫢.

With this mechanism, a SIP UAC can test the path from itself to each successive B2BUA on the way to a target 🌸. This could also be handy for setting up a permanent test call between an Enterprise and a Service Provider across a SIP Trunk, for example, or for automated measurement systems that test the media path between domains, and so on 🧚.


3.1. Processing a Received Max-Forwards Header Field πŸ”

As currently defined in [RFC3261], the UAS half of a B2BUA doesn't technically need to inspect the Max-Forwards header field value for received requests. Only Proxies do πŸ™ƒ. [RFC7332] updated this behavior, so a compliant B2BUA needs to inspect the value to prevent loops, and also copy and decrement the value as if it were a Proxy πŸ”„. This document also requires that behavior for the mechanism to work. So a B2BUA supporting the traceroute mechanism defined in this document MUST also comply with [RFC7332] πŸ”₯.


3.2. Answering the INVITE πŸŽ€

If a SIP B2BUA receives a dialog-creating INVITE request with a Max-Forwards header value of 0, with SDP for media-loopback based on [RFC6849], and the B2BUA's policies allow it to answer such a request, then it's answered as if the original target of the request were the local SIP B2BUA πŸͺž. The normal SIP procedures apply, along with [RFC6849], as if the request had been aimed at the local B2BUA device as the intended destination all along πŸ’–.

In the 200 response for the INVITE, the B2BUA MUST also add a Reason header, per [RFC3326], with a protocol field value of "SIP", a cause field value of "483", and a reason-text value of "Traceroute Response" 🏷️. The Reason header tells the UAC that the request is being answered because it hit a Max-Forwards of 0, not because it reached the final UAS πŸ•΅οΈβ€β™€οΈ. When the ultimate target UAS answers a loopback-based INVITE with a Max-Forwards greater than or equal to 0, the Reason header isn't added to the response, so the UAC knows the traceroute is complete πŸπŸ‘‘.

If a B2BUA receives an INVITE with media-loopback SDP and a Max-Forwards header field value of 0, as defined in this document, and it does not accept the session (for example, because of local policy), then it SHOULD respond with a 483 Too Many Hops response, per the normal rules of [RFC3261], the same way it did before πŸ™ˆ. In other words, in that case it acts exactly like it would if it didn't support this document's new behavior 😌.

4. Security Considerations ✨

okay bestie, security is literally the most serious part of this whole RFC, so let's get into it πŸ”’πŸ’…

There are security implications for the mechanism defined in this document. Answering media-loopback calls in a B2BUA eats up resources on the B2BUA, plus network bandwidth in between, and that means it opens up a vector for denial-of-service (DoS) attacks 😭. So B2BUAs SHOULD provide configuration options to control who can make such test calls, how many concurrent calls can be established and maintained, and how long calls can continue. Entities that deploy B2BUAs SHOULD set these options to values that reduce the DoS risk to an acceptable level. For example, a B2BUA might perform digest-challenge authentication with specific credentials for such calls, or it might only allow specific sources to make such calls at a specific time. Such policies are typically vendor specific based on local policies and deployment usage scenarios, and they cannot be explicitly defined in this document 🫢.

The security considerations of [RFC6849] also apply to this document. Since B2BUAs are not end-user devices, there is no human user to monitor the loopback session activity on the B2BUA as recommended in [RFC6849]. Instead, B2BUAs SHOULD log such events or provide some form of administrative notification πŸ™ˆβœ¨.

5. Normative References πŸ“š

Acknowledgments πŸŽ€

The general concept of performing media-loopback on a hop-by-hop basis using a decrementing header traceroute-style approach came out of discussions several years ago, between the author, Kaynam Hedayat, Nagarjuna Venna, and Patrick MeLampy. Other people that have contributed to the topic over the years since then: Brett Tate, Paul Kyzivat, Peter Dawes, Zaid Ally, Dianna Stiller, Jon Boone, and several others whom I have lost the names of since πŸ₯ΉπŸ’–.

Author's Address πŸ¦‹

Hadriel Kaplan Oracle EMail: hadrielk@yahoo.com

πŸ“¦ where this page comes from