RFC 8373

Negotiating Human Language in Real-Time Communications

๐Ÿ“… published May 2018, from ietf

RFC 8373: Negotiating Human Language in Real-Time Communications ๐ŸŽ€

Okay bestie, this is RFC 8373 from the IETF (Internet Engineering Task Force) ๐ŸŒˆ

  • Author: R. Gellens, Core Technology Consulting ๐Ÿ’…
  • Category: Standards Track โœจ
  • Date: May 2018
  • ISSN: 2070-1721
  • Obsoletes / Updates: the title block doesn't list any, so this one doesn't obsolete or update anything ๐Ÿงš

Abstract โœจ

Okay so people have all kinds of human (aka natural) language needs, skills, and preferences when it comes to spoken, written, and signed languages ๐Ÿซถ This doc defines new Session Description Protocol (SDP) media-level attributes so that when two people set up a live call, the caller's language and media needs can get matched up with what the called party can actually do. The way that works is they negotiate, which means they communicate and match ๐Ÿ’–

This is especially huge for emergency calls, because a call can be handled by a call taker who can actually talk to the user, or a translator or relay operator can get bridged in during setup ๐Ÿ˜ญ But it also works for non-emergency calls, like calling a company call center ๐Ÿ“ž

This doc describes the need and a solution that uses the new SDP media attributes ๐Ÿฆ‹

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 got public review and was approved for publication by the Internet Engineering Steering Group (IESG). If you want more info on Internet Standards, check out Section 2 of RFC 7841 ๐Ÿ‘‘

For the current status, any errata, and how to give feedback on this doc, go to https://www.rfc-editor.org/info/rfc8373 ๐Ÿ”ฅ

Copyright (c) 2018 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 (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please read these carefully, because they describe your rights and restrictions for this doc ๐Ÿ™ˆ Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License.

Table of Contents ๐Ÿ“

1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
  1.1.  Applicability . . . . . . . . . . . . . . . . . . . . . .   4
2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
3.  Desired Semantics . . . . . . . . . . . . . . . . . . . . . .   5
4.  The Existing 'lang' Attribute . . . . . . . . . . . . . . . .   5
5.  Solution  . . . . . . . . . . . . . . . . . . . . . . . . . .   5
  5.1.  The 'hlang-send' and 'hlang-recv' Attributes  . . . . . .   5
  5.2.  No Language in Common . . . . . . . . . . . . . . . . . .   7
  5.3.  Usage Notes . . . . . . . . . . . . . . . . . . . . . . .   7
  5.4.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .   8
6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  10
  6.1.  att-field Subregistry of SDP Parameters . . . . . . . . .  10
  6.2.  Warning Codes Subregistry of SIP Parameters . . . . . . .  11
7.  Security Considerations . . . . . . . . . . . . . . . . . . .  11
8.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .  11
9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  12
  9.1.  Normative References  . . . . . . . . . . . . . . . . . .  12
  9.2.  Informative References  . . . . . . . . . . . . . . . . .  12
Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  13
Contributors  . . . . . . . . . . . . . . . . . . . . . . . . . .  13
Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .  13

1. Introduction ๐ŸŒท

A language everyone can understand is so helpful for talking to each other, honestly ๐Ÿ’– This doc is about negotiating human language and media modality (spoken, signed, or written) in real-time communications. There's a companion doc, [RFC8255], that handles language selection in email ๐Ÿ“ง

Unless the caller and callee already know each other, or there's context or out-of-band info that tells you the language(s) and media modalities, spoken, signed, or written languages need to get negotiated based on what the caller needs and what the callee can do ๐Ÿซถ This applies to both emergency and non-emergency calls. An example of a non-emergency call is a caller contacting a company call center. An emergency call usually means a caller reaching a Public Safety Answering Point (PSAP) ๐Ÿšจ In either case, it's super helpful for the caller to say which signed, written, and/or spoken languages they prefer, and for the callee to say what it's capable of. That way the call can go ahead using the languages and media forms that both sides support โœจ

Okay so there are a bunch of reasons it makes sense to use a per-stream negotiation mechanism called the Session Description Protocol (SDP), including being able to set up multiple streams with different media (voice, text, and/or video) ๐Ÿฆ‹ Using SDP [RFC4566] means the solution in this doc can apply to all interactive communications negotiated with SDP, for both emergency and non-emergency situations ๐Ÿ’…

Treating language as another SDP attribute that gets negotiated alongside the other parts of a media stream means you can accommodate a range of users' needs and the called party's facilities ๐Ÿงš For example, some users can speak several languages but still have a preference. Some called parties support some of those languages in-house but need a translation service for others, or they might only have a few call takers who can use certain languages. Another example is a user who can speak but is deaf or hard of hearing, and who wants a voice stream to send spoken language plus a text stream to receive written language ๐Ÿ™ˆ Making language a media attribute lets standard session negotiation handle all of this, by giving the endpoints the info and mechanism they need to make good decisions ๐Ÿ‘‘

We use the term "negotiation" here instead of "indication" because human language (spoken/written/signed) can be negotiated the same way as media (audio/text/video) and codecs ๐ŸŽ€ Say a user is calling an airline reservation center. The user might be able to use a set of languages, maybe with preferences for one or a few, while the reservation center supports a fixed set of languages. Negotiation should select the user's most preferred language that the call center supports. Both sides should also know which language got negotiated ๐Ÿ’œ

In the offer/answer model used here, the offer contains a set of languages per media (and direction) that the offerer can use, and the answer contains one language per media (and direction) that the answerer will support ๐ŸŒˆ Supporting languages and/or modalities can take extra steps, like bridging in external translation or relay resources, or having the call handled by an agent who speaks a requested language and/or can use a requested modality โญ The answer shows the media and languages the answerer is committing to support (possibly after those extra steps have been taken). This model also gives both ends the knowledge of what got negotiated ๐Ÿฆ‹ Heads up: the additional steps needed to support the indicated languages or modalities may or may not be in place in time for any early media ๐Ÿ˜ญ

Since this is a protocol mechanism, the user equipment (UE) client needs to know the user's preferred languages. This doc doesn't cover how clients figure that out, but reasonable techniques could include a configuration mechanism with a default of the language of the user interface ๐Ÿ’… In some cases, a UE client could tie language and media preferences together, like a preference for a video stream using a signed language and/or a text or audio stream using a written/spoken language ๐Ÿซถ

This doc doesn't address user interface (UI) issues, like if or how a UE client tells a user the result of the language and media negotiation ๐Ÿ™ˆ

1.1. Applicability ๐ŸŒธ

In this doc, it's assumed that the negotiating endpoints have already been determined, so a per-stream negotiation based on SDP can go ahead ๐Ÿ’–

When setting up interactive communication sessions, signaling messages need to be routed to the appropriate endpoint(s). This doc doesn't tackle the problem of language-based routing ๐Ÿงš

2. Terminology ๐Ÿ’œ

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. ๐ŸŽ€

3. Desired Semantics โœจ

Okay so the dream solution is a media attribute (preferably per direction) that can be used in an offer to indicate the preferred language(s) of each (direction of a) media stream, and in an answer to indicate the accepted language. When an offer includes multiple languages for a media stream, they get listed in order of preference, most preferred first ๐Ÿ‘‘

Heads up: negotiating multiple simultaneous languages within one media stream is out of scope for this doc ๐Ÿ™ˆ

4. The Existing 'lang' Attribute ๐Ÿฆ‹

RFC 4566 [RFC4566] specifies an attribute 'lang' that's kind of similar to what's needed here, but it isn't specific or flexible enough for this doc's needs ๐Ÿ˜ญ Also, 'lang' isn't mentioned in [RFC3264], and there are no known implementations in SIP. Plus, it's useful to be able to specify language per direction (sending and receiving). So this document defines two new attributes ๐Ÿ’…

5. Solution ๐ŸŒˆ

An SDP attribute (per direction) seems like the natural choice for negotiating the human language of an interactive media stream, using the language tags of [BCP47] ๐Ÿงš


To be continued in part 2 ๐Ÿ’–

5.1. The hlang-send and hlang-recv Attributes ๐Ÿ’–

Okay bestie, so this doc gives us two media-level attributes: hlang-send and hlang-recv (they're registered over in Section 6 ๐ŸŽ€). Both start with hlang, short for "human language" ๐ŸŒธ. They're how two parties agree on which human language gets used in each direction of each interactive media stream. Not every stream has to get used, btw โœจ. They can show up on media streams in both offers and answers.

In an offer, the hlang-send value is a list of one or more language(s) the offerer is willing to use when sending on that media, and the hlang-recv value is a list of one or more language(s) the offerer is willing to use when receiving on it. The list goes in preference order, so the first one is the most preferred ๐Ÿ‘‘.

When a media is meant for interactive communication in only one direction, either hlang-send or hlang-recv MAY be omitted. The example is a user in France who has trouble speaking but can hear, and who wants to receive French over audio and send French over text ๐Ÿ‡ซ๐Ÿ‡ท. The media can still be useful in both directions, though. When a media isn't really about language at all (like a video or audio stream that's just for background), both SHOULD be omitted. Otherwise, both SHOULD have the same value.

Heads up: specifying different languages for each direction (instead of the same, or basically the same, language in different modalities) can make it really hard to finish the call ๐Ÿ˜ญ. Like, asking to send audio in Hungarian and receive audio in Portuguese? Good luck with that.

In an answer, hlang-send is the language the answerer will send if using the media for language (which in most cases is one of the languages in the offer's hlang-recv). hlang-recv is the language the answerer expects to receive if using the media for language (which in most cases is one of the languages in the offer's hlang-send).

Now the syntax rules, which are important ๐Ÿง. In an offer, each value MUST be a list of one or more language tags per [BCP47], separated by white space. In an answer, each value MUST be one language tag per [BCP47]. [BCP47] describes the mechanisms for matching language tags. Also, Section 4.1 of RFC 5646 [BCP47] advises to "tag content wisely" and not include unnecessary subtags. Be wise, be minimal ๐Ÿซถ.

When placing an emergency call, and in any other case where the language can't be inferred from context, each OFFERed media stream primarily intended for human language communication SHOULD specify the hlang-send and/or hlang-recv attributes for the direction(s) intended for interactive communication ๐Ÿšจ.

Clients acting on behalf of end users are expected to set one or both of the hlang-send and hlang-recv attributes on each OFFERed media stream primarily intended for human communication when placing an outgoing session. When receiving incoming calls, they're expected to either ignore the attributes or take them into consideration, based on local configuration and capabilities. Systems acting on behalf of call centers and PSAPs are expected to take the attributes into account when processing inbound calls ๐Ÿ“ž.

One more thing: media and language negotiation might end up accepting more media streams than the users actually need (for example, if more preferred and less preferred combinations of media and language all get accepted). This is not a problem ๐Ÿ’….

5.2. No Language in Common ๐Ÿ™…โ€โ™€๏ธ

A question that comes up when negotiating language is whether the call proceeds or fails if the callee doesn't support any of the languages the caller asked for. This document does not mandate either behavior, so that's up to the implementation.

When a call is rejected because there's no language in common, the SIP response has SIP response code 488 (Not Acceptable Here) or 606 (Not Acceptable) [RFC3261]. It also has a Warning header field [RFC3261] with a warning code of 308, and warning text saying that there are no mutually supported languages. The warning text SHOULD also list the supported languages and media, so the caller knows what would've worked ๐Ÿฅบ.

Example:

Warning:  308 proxy.example.com  "Incompatible language
   specification: Requested languages not supported.  Supported
   languages are: es, en; supported media are: audio, text."

5.3. Usage Notes ๐Ÿ“

A sign-language tag with a video media stream is read as an indication for sign language in the video stream. A non-sign-language tag with a text media stream is read as an indication for written language in the text stream. A non-sign-language tag with an audio media stream is read as an indication for spoken language in the audio stream. Easy peasy ๐Ÿฆ‹.

This document does not define any other use for language tags in video media (such as how to indicate visible captions in the video stream).

This document does not define the use of sign-language tags in text or audio media.

In the IANA registry for language subtags per [BCP47], a language subtag with a Type field of "extlang" combined with a Prefix field value of "sgn" indicates a sign-language tag. If that "sgn" prefix is absent, it's a non-sign-language tag ๐ŸคŸ.

This document does not define the use of language tags in media other than interactive streams of audio, video, and text (such as "message" or "application"). Such use could be supported by future work or by application agreement ๐Ÿ”ฎ.

5.4. Examples ๐ŸŽ€

Here are some examples. For clarity, only the most directly relevant parts of the SDP block are shown.

An offer or answer indicating spoken English both ways:

   m=audio 49170 RTP/AVP 0
   a=hlang-send:en
   a=hlang-recv:en

An offer indicating American Sign Language both ways:

   m=video 51372 RTP/AVP 31 32
   a=hlang-send:ase
   a=hlang-recv:ase

An offer requesting spoken Spanish both ways (most preferred), spoken Basque both ways (second preference), or spoken English both ways (third preference):

   m=audio 49250 RTP/AVP 20
   a=hlang-send:es eu en
   a=hlang-recv:es eu en

An answer to the above offer indicating spoken Spanish both ways:

   m=audio 49250 RTP/AVP 20
   a=hlang-send:es
   a=hlang-recv:es

An alternative answer to the above offer indicating spoken Italian both ways (as the callee does not support any of the requested languages but chose to proceed with the call):

   m=audio 49250 RTP/AVP 20
   a=hlang-send:it
   a=hlang-recv:it

An offer or answer indicating written Greek both ways:

   m=text 45020 RTP/AVP 103 104
   a=hlang-send:gr
   a=hlang-recv:gr

An offer requesting the following media streams: video for the caller to send using Argentine Sign Language, text for the caller to send using written Spanish (most preferred) or written Portuguese, and audio for the caller to receive spoken Spanish (most preferred) or spoken Portuguese:

   m=video 51372 RTP/AVP 31 32
   a=hlang-send:aed

   m=text 45020 RTP/AVP 103 104
   a=hlang-send:sp pt

   m=audio 49250 RTP/AVP 20
   a=hlang-recv:sp pt

An answer for the above offer, indicating text in which the callee will receive written Spanish and audio in which the callee will send spoken Spanish. (The answering party has no video capability):

   m=video 0 RTP/AVP 31 32
   m=text 45020 RTP/AVP 103 104
   a=hlang-recv:sp

   m=audio 49250 RTP/AVP 20
   a=hlang-send:sp

An offer requesting the following media streams: text for the caller to send using written English (most preferred) or written Spanish, audio for the caller to receive spoken English (most preferred) or spoken Spanish, and supplemental video:

   m=text 45020 RTP/AVP 103 104
   a=hlang-send:en sp

   m=audio 49250 RTP/AVP 20
   a=hlang-recv:en sp

   m=video 51372 RTP/AVP 31 32

An answer for the above offer, indicating text in which the callee will receive written Spanish, audio in which the callee will send spoken Spanish, and supplemental video:

   m=text 45020 RTP/AVP 103 104
   a=hlang-recv:sp

   m=audio 49250 RTP/AVP 20
   a=hlang-send:sp

   m=video 51372 RTP/AVP 31 32

Note that, even though the examples show the same (or essentially the same) language being used in both directions (even when the modality differs), there is no requirement that this be the case. However, in practice, doing so is likely to increase the chances of successful matching ๐Ÿ’œ.

6. IANA Considerations ๐ŸŒˆ

6.1. att-field Subregistry of SDP Parameters

The syntax in this section uses ABNF per RFC 5234 [RFC5234].

IANA has added two entries to the "att-field (media level only)" subregistry of the "Session Description Protocol (SDP) Parameters" registry.

The first entry is for hlang-recv:

   Attribute Name:          hlang-recv
   Long-Form English Name:  human language receive
   Contact Name:            Randall Gellens
   Contact Email Address:   rg+ietf@coretechnologyconsulting.com
   Attribute Value:         hlang-value
   Attribute Syntax:
      hlang-value =  hlang-offv / hlang-ansv
         ; hlang-offv used in offers
         ; hlang-ansv used in answers
      hlang-offv  =  Language-Tag *( SP Language-Tag )
         ; Language-Tag as defined in [BCP47]
      SP          =  1*" " ; one or more space (%x20) characters
      hlang-ansv  =  Language-Tag
   Attribute Semantics:     Described in Section 5.1 of RFC 8373
   Usage Level:             media
   Mux Category:            NORMAL
   Charset Dependent:       No
   Purpose:                 See Section 5.1 of RFC 8373
   O/A Procedures:          See Section 5.1 of RFC 8373
   Reference:               RFC 8373

The second entry is for hlang-send:

   Attribute Name:          hlang-send
   Long-Form English Name:  human language send
   Contact Name:            Randall Gellens
   Contact Email Address:   rg+ietf@coretechnologyconsulting.com
   Attribute Value:         hlang-value
   Attribute Syntax:
      hlang-value =  hlang-offv / hlang-ansv
   Attribute Semantics:     Described in Section 5.1 of RFC 8373
   Usage Level:             media
   Mux Category:            NORMAL
   Charset Dependent:       No
   Purpose:                 See Section 5.1 of RFC 8373
   O/A Procedures:          See Section 5.1 of RFC 8373
   Reference:               RFC 8373

6.2. Warning Codes Subregistry of SIP Parameters

IANA has added the value 308 to the "Warning Codes (warn-codes)" subregistry of the "Session Initiation Protocol (SIP) Parameters" registry. (The value lies within the range allocated for indicating problems with keywords in the session description.) The reference is to this document. The warn text is:

"Incompatible language specification: Requested languages not supported.  Supported languages are [list of supported languages]; supported media are: [list of supported media]."

7. Security Considerations ๐Ÿšจ

The Security Considerations of [BCP47] apply here. An attacker with the ability to modify signaling could prevent a call from succeeding by altering any of several crucial elements, including the hlang-send or hlang-recv values. RFC 5069 [RFC5069] discusses such threats. Use of TLS or IPsec can protect against such threats ๐Ÿ”.

Emergency calls are of particular concern. RFC 6881 [RFC6881], which is specific to emergency calls, mandates use of TLS or IPsec (in ED-57/SP-30). This is not a drill, bestie ๐Ÿ˜ฑ.

8. Privacy Considerations ๐Ÿ™ˆ

Language and media information can suggest a user's nationality, background, abilities, disabilities, etc. So be mindful of what you're sharing ๐Ÿซฃ.

9. References ๐Ÿ“š

9.1. Normative References ๐Ÿ“š

Okay bestie, these are the docs the spec leans on, so they're required reading ๐Ÿค“๐Ÿ’–

[BCP47]    Phillips, A., Ed. and M. Davis, Ed., "Matching of Language
           Tags", BCP 47, RFC 4647, DOI 10.17487/RFC4647, September
           2006.

           Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying
           Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646,
           September 2009.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <https://www.rfc-editor.org/info/rfc2119>.

[RFC3261]  Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
           A., Peterson, J., Sparks, R., Handley, M., and E.
           Schooler, "SIP: Session Initiation Protocol", RFC 3261,
           DOI 10.17487/RFC3261, June 2002,
           <https://www.rfc-editor.org/info/rfc3261>.

[RFC4566]  Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
           Description Protocol", RFC 4566, DOI 10.17487/RFC4566,
           July 2006, <https://www.rfc-editor.org/info/rfc4566>.

[RFC5234]  Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
           Specifications: ABNF", STD 68, RFC 5234,
           DOI 10.17487/RFC5234, January 2008,
           <https://www.rfc-editor.org/info/rfc5234>.

[RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
           2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
           May 2017, <https://www.rfc-editor.org/info/rfc8174>.

9.2. Informative References ๐Ÿง 

These ones are the extra-credit reading, the "ooh tell me more" stuff ๐Ÿฆ‹

[RFC3264]  Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model
           with Session Description Protocol (SDP)", RFC 3264,
           DOI 10.17487/RFC3264, June 2002,
           <https://www.rfc-editor.org/info/rfc3264>.

[RFC5069]  Taylor, T., Ed., Tschofenig, H., Schulzrinne, H., and M.
           Shanmugam, "Security Threats and Requirements for
           Emergency Call Marking and Mapping", RFC 5069,
           DOI 10.17487/RFC5069, January 2008,
           <https://www.rfc-editor.org/info/rfc5069>.

[RFC6881]  Rosen, B. and J. Polk, "Best Current Practice for
           Communications Services in Support of Emergency Calling",
           BCP 181, RFC 6881, DOI 10.17487/RFC6881, March 2013,
           <https://www.rfc-editor.org/info/rfc6881>.

[RFC8255]  Tomkinson, N. and N. Borenstein, "Multiple Language
           Content Type", RFC 8255, DOI 10.17487/RFC8255, October
           2017, <https://www.rfc-editor.org/info/rfc8255>.

Acknowledgements ๐Ÿซถ

Huge, huge thank-you hugs to everyone who showed up with reviews, corrections, suggestions, and both email and in-person discussions ๐Ÿ’…โœจ Bernard Aboba, Harald Alvestrand, Flemming Andreasen, Francois Audet, Eric Burger, Keith Drage, Doug Ewell, Christian Groves, Andrew Hutton, Hadriel Kaplan, Ari Keranen, John Klensin, Mirja Kuhlewind, Paul Kyzivat, John Levine, Alexey Melnikov, Addison Phillips, James Polk, Eric Rescorla, Pete Resnick, Alvaro Retana, Natasha Rooney, Brian Rosen, Peter Saint-Andre, and Dale Worley, you are all absolutely iconic ๐Ÿ‘‘๐ŸŒˆ

Contributors ๐ŸŽ€

Gunnar Hellstrom deserves a special shoutout ๐Ÿ“ฃ for his reviews and for helping out along the way ๐Ÿ’œ literally a legend.

Author's Address ๐Ÿฆ‹

Randall Gellens
Core Technology Consulting

Email: rg+ietf@coretechnologyconsulting.com
URI:   http://www.coretechnologyconsulting.com
๐Ÿ“ฆ where this page comes from