RFC 8373 PROPOSED STANDARD REAL-TIME · SDP · ACCESSIBILITY

Human language in RTC: Negotiating Human Language in Real-Time Communications

How a caller and a called party agree on spoken, written or signed language while a call is being set up.

On rfc-editor.org ↗
PUBLISHED
May 2018
AUTHORS
R. Gellens
STREAM
IETF
UPDATED BY
RFC 8865 — T.140 over WebRTC
NEW ATTRIBUTES
hlang-send and hlang-recv (media level)
OFFER VALUE
One or more language tags, in preference order
ANSWER VALUE
One language tag
SIP REJECTION CODES
488 or 606
SIP WARNING CODE
308
DOI
10.17487/RFC8373
ERRATA
Reported errata

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Internet Engineering Task Force (IETF)                        R. Gellens
Request for Comments: 8373                    Core Technology Consulting
Category: Standards Track                                       May 2018
ISSN: 2070-1721


         Negotiating Human Language in Real-Time Communications

Abstract

   Users have various human (i.e., natural) language needs, abilities,
   and preferences regarding spoken, written, and signed languages.
   This document defines new Session Description Protocol (SDP) media-
   level attributes so that when establishing interactive communication
   sessions ("calls"), it is possible to negotiate (i.e., communicate
   and match) the caller's language and media needs with the
   capabilities of the called party.  This is especially important for
   emergency calls, because it allows for a call to be handled by a call
   taker capable of communicating with the user or for a translator or
   relay operator to be bridged into the call during setup.  However,
   this also applies to non-emergency calls (for example, calls to a
   company call center).

   This document describes the need as well as a solution that uses 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 has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   https://www.rfc-editor.org/info/rfc8373.

Copyright Notice

   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 review these documents
   carefully, as 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  . . . . . . . . . . . . . . . . . . . . . . . .   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 mutually comprehensible language is helpful for human
   communication.  This document addresses the negotiation of human
   language and media modality (spoken, signed, or written) in real-time
   communications.  A companion document [RFC8255] addresses language
   selection in email.

   Unless the caller and callee know each other or there is contextual
   or out-of-band information from which the language(s) and media
   modalities can be determined, there is a need for spoken, signed, or
   written languages to be negotiated based on the caller's needs and
   the callee's capabilities.  This need applies to both emergency and
   non-emergency calls.  An example of a non-emergency call is when a
   caller contacts a company call center; an emergency call typically
   involves a caller contacting a Public Safety Answering Point (PSAP).
   In such scenarios, it is helpful for the caller to be able to
   indicate preferred signed, written, and/or spoken languages and for
   the callee to be able to indicate its capabilities; this allows the
   call to proceed using the language(s) and media forms supported by
   both.

   For various reasons, including the ability to establish multiple
   streams using different media (i.e., voice, text, and/or video), it
   makes sense to use a per-stream negotiation mechanism known as the
   Session Description Protocol (SDP).  Utilizing SDP [RFC4566] enables
   the solution described in this document to be applied to all
   interactive communications negotiated using SDP, in emergency as well
   as non-emergency scenarios.

   By treating language as another SDP attribute that is negotiated
   along with other aspects of a media stream, it becomes possible to
   accommodate a range of users' needs and called-party facilities.  For
   example, some users may be able to speak several languages but have a
   preference.  Some called parties may support some of those languages
   internally but require the use of a translation service for others,
   or they may have a limited number of call takers able to use certain
   languages.  Another example would be a user who is able to speak but
   is deaf or hard of hearing and desires a voice stream to send spoken
   language plus a text stream to receive written language.  Making
   language a media attribute allows standard session negotiation to
   handle this by providing the information and mechanism for the
   endpoints to make appropriate decisions.

   The term "negotiation" is used here rather than "indication" because
   human language (spoken/written/signed) can be negotiated in the same
   manner as media (audio/text/video) and codecs.  For example, if we
   think of a user calling an airline reservation center, the user may
   be able to use a set of languages, perhaps with preferences for one
   or a few, while the airline reservation center may support a fixed
   set of languages.  Negotiation should select the user's most
   preferred language that is supported by the call center.  Both sides
   should be aware of which language was negotiated.

   In the offer/answer model used here, the offer contains a set of
   languages per media (and direction) that the offerer is capable of
   using, and the answer contains one language per media (and direction)
   that the answerer will support.  Supporting languages and/or
   modalities can require taking extra steps, such as bridging external
   translation or relay resources into the call or having a call handled
   by an agent who speaks a requested language and/or has the ability to
   use a requested modality.  The answer indicates the media and
   languages that the answerer is committing to support (possibly after
   additional steps have been taken).  This model also provides
   knowledge so both ends know what has been negotiated.  Note that
   additional steps required 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; while this document
   does not address how clients determine this, 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, such as a preference for a video
   stream using a signed language and/or a text or audio stream using a
   written/spoken language.

   This document does not address user interface (UI) issues, such as if
   or how a UE client informs a user about the result of language and
   media negotiation.

1.1.  Applicability

   Within this document, it is assumed that the negotiating endpoints
   have already been determined so that a per-stream negotiation based
   on SDP can proceed.

   When setting up interactive communication sessions, it is necessary
   to route signaling messages to the appropriate endpoint(s).  This
   document does not address 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

   The desired solution is a media attribute (preferably per direction)
   that may be used within an offer to indicate the preferred
   language(s) of each (direction of a) media stream and within an
   answer to indicate the accepted language.  When multiple languages
   are included for a media stream within an offer, the languages are
   listed in order of preference (most preferred first).

   Note that negotiating multiple simultaneous languages within a media
   stream is out of scope of this document.

4.  The Existing 'lang' Attribute

   RFC 4566 [RFC4566] specifies an attribute 'lang' that is similar to
   what is needed here but is not sufficiently specific or flexible for
   the needs of this document.  In addition, 'lang' is not mentioned in
   [RFC3264], and there are no known implementations in SIP.  Further,
   it is useful to be able to specify language per direction (sending
   and receiving).  This document therefore defines two new attributes.

5.  Solution

   An SDP attribute (per direction) seems the natural choice to
   negotiate human language of an interactive media stream, using the
   language tags of [BCP47].

5.1.  The 'hlang-send' and 'hlang-recv' Attributes

   This document defines two media-level attributes: 'hlang-send' and
   'hlang-recv' (registered in Section 6).  Both start with 'hlang',
   short for "human language".  These attributes are used to negotiate
   which human language is selected for use in (each direction of) each
   interactive media stream.  (Note that not all streams will
   necessarily be used.)  Each can appear for media streams in 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 using the
   media, and the 'hlang-recv' value is a list of one or more
   language(s) the offerer is willing to use when receiving using the
   media.  The list of languages is in preference order (first is most
   preferred).  When a media is intended for interactive communication
   in only one direction (e.g., a user in France with difficulty
   speaking but able to hear who indicates a desire to receive French
   using audio and send French using text), either 'hlang-send' or
   'hlang-recv' MAY be omitted.  Note that the media can still be useful
   in both directions.  When a media is not primarily intended for
   language (for example, a video or audio stream intended for
   background only), both SHOULD be omitted.  Otherwise, both SHOULD
   have the same value.  Note that specifying different languages for
   each direction (as opposed to the same, or essentially the same,
   language in different modalities) can make it difficult to complete
   the call (e.g., specifying a desire to send audio in Hungarian and
   receive audio in Portuguese).

   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'), and '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').

   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 mechanisms for
   matching language tags.  Note that Section 4.1 of RFC 5646 [BCP47]
   advises to "tag content wisely" and not include unnecessary subtags.

   When placing an emergency call, and in any other case where the
   language cannot 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, and either ignore or take into consideration the
   attributes when receiving incoming calls, 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.

   Note that media and language negotiation might result in more media
   streams being accepted than are needed by the users (e.g., if more
   preferred and less preferred combinations of media and language are
   all accepted).  This is not a problem.

5.2.  No Language in Common

   A consideration regarding the ability to negotiate language is
   whether the call proceeds or fails if the callee does not support any
   of the languages requested by the caller.  This document does not
   mandate either behavior.

   When a call is rejected due to lack of any language in common, the
   SIP response has SIP response code 488 (Not Acceptable Here) or 606
   (Not Acceptable) [RFC3261] and a Warning header field [RFC3261] with
   a warning code of 308 and warning text indicating that there are no
   mutually supported languages; the warning text SHOULD also contain
   the supported languages and media.

   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 interpreted as an
   indication for sign language in the video stream.  A non-sign-
   language tag with a text media stream is interpreted as an indication
   for written language in the text stream.  A non-sign-language tag
   with an audio media stream is interpreted as an indication for spoken
   language in the audio stream.

   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 "extlang" combined with a Prefix field value
   "sgn" indicates a sign-language tag.  The absence of such "sgn"
   prefix indicates 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

   Some examples are shown below.  For clarity, only the most directly
   relevant portions 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).

8.  Privacy Considerations

   Language and media information can suggest a user's nationality,
   background, abilities, disabilities, etc.

9.  References

9.1.  Normative References

   [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

   [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

   Many thanks to 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 for
   their reviews, corrections, suggestions, and participation in email
   and in-person discussions.

Contributors

   Gunnar Hellstrom deserves special mention for his reviews and
   assistance.

Author's Address

   Randall Gellens
   Core Technology Consulting

   Email: rg+ietf@coretechnologyconsulting.com
   URI:   http://www.coretechnologyconsulting.com

ISO Plain Language

On this page
PROBLEMWhen someone starts a call, for example to a call center or an emergency service, nothing in the signaling says which spoken, written or signed language they need, so the call may reach someone who cannot communicate with them.
MECHANISMTwo new media-level SDP attributes, 'hlang-send' and 'hlang-recv', carry language tags in the offer in order of preference, and the answer picks one language per direction.
WHY IT MATTERSLanguage is negotiated like any other property of a media stream, so a call can be handled by a suitable call taker or a translator or relay can be bridged in during setup. The RFC has since been updated by RFC 8865.

§1Why a Call Should Agree on a Language

A mutually comprehensible language is helpful for human communication. This document addresses the negotiation of human language and media modality, spoken, signed or written, in real-time communications. A companion document, RFC 8255, addresses language selection in email.

Unless the caller and callee know each other, or there is contextual or out-of-band information from which the languages and media modalities can be determined, the languages and modalities have to be negotiated from the caller's needs and the callee's capabilities. This applies to emergency and non-emergency calls alike. A non-emergency example is a caller contacting a company call center; an emergency call typically involves a caller contacting a Public Safety Answering Point (PSAP). In both cases it helps for the caller to indicate the preferred signed, written and spoken languages, and for the callee to indicate its capabilities, so that the call can proceed in the languages and media forms that both support.

The RFC uses the Session Description Protocol (SDP) for this, for various reasons, including the ability to establish multiple streams using different media such as voice, text and video. Treating language as another SDP attribute that is negotiated along with the other aspects of a media stream lets a range of user needs and called-party facilities be accommodated. Some users can speak several languages but have a preference. Some called parties support some of those languages internally but need a translation service for others, or have a limited number of call takers who can use certain languages. A user who can speak but is deaf or hard of hearing may want a voice stream to send spoken language plus a text stream to receive written language.

Two people who do not share a language cannot talk to each other. The signalling for a call has to carry the caller's language needs and the called party's language support, so that the call reaches someone who can understand. The same applies to sign language and to written language, and to emergency calls as much as to ordinary ones.

§3What the Mechanism Should Do

The desired solution is a media attribute, preferably per direction, used in an offer to indicate the preferred languages of each direction of a media stream, and used in an answer to indicate the accepted language. When an offer carries several languages for a media stream, they are listed in order of preference, most preferred first.

Negotiating several simultaneous languages within one media stream is out of scope for this document.

In the offer and 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. The answer states the media and languages that the answerer is committing to support, possibly after extra steps such as bridging an external translation or relay resource into the call, or having the call handled by an agent who speaks the requested language or can use the requested modality. Both sides therefore know what was negotiated. The extra steps needed to support an indicated language or modality may or may not be in place in time for any early media.

The offer lists every language the caller can use, in order of preference. The answer names exactly one language per direction and media stream, which is what the other side will actually use. Answering in a language may need extra work, such as bringing in a translator, and the answer is a statement of intent to support it.

A caller and a call centre agree on a language (illustrative, not from the RFC)
CallerCall centre
  1. Offer: hlang-send:es eu enThe caller lists the languages it can use, most preferred first.
  2. Answer: hlang-send:esThe call centre picks one language and commits to use it.
  3. Answer: 488 with warning 308If no language matches, the call can be refused with the supported languages named in the warning.

§4Why Not the Existing lang Attribute

RFC 4566 specifies a lang attribute that is similar to what is needed here, but it is not sufficiently specific or flexible for the needs of this document. The attribute is not mentioned in RFC 3264, and there are no known implementations in SIP. It is also useful to be able to specify a language per direction, for sending and for receiving.

This document therefore defines two new attributes, hlang-send and hlang-recv, both starting with hlang, short for human language.

SDP already has a lang attribute, but it does not say enough, it was never wired into the offer and answer model, and no one implemented it. It also cannot say one language for sending and another for receiving, so two new attributes are defined.

§5.1The hlang-send and hlang-recv Attributes

Both attributes are media-level attributes and can appear in offers and answers. In an offer, the hlang-send value is a list of one or more languages the offerer is willing to use when sending with that media, and the hlang-recv value is a list of one or more languages the offerer is willing to use when receiving. The list is in preference order, first is most preferred. When a media is intended for interactive communication in only one direction, either attribute may be omitted, and the media can still be useful in both directions. When a media is not primarily intended for language, for example a video or audio stream for background only, both should be omitted. Otherwise both should have the same value. Specifying different languages for each direction can make the call difficult to complete, for example wanting to send audio in Hungarian and receive audio in Portuguese.

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

In an offer, each value must be a list of one or more language tags per BCP 47, separated by whitespace. In an answer, each value must be one language tag per BCP 47. BCP 47 describes the mechanisms for matching language tags, and Section 4.1 of RFC 5646 advises tagging content wisely and not including unnecessary subtags.

When an emergency call is placed, and in any other case where the language cannot be inferred from context, each offered media stream primarily intended for human language communication should specify the attributes for the directions intended for interactive communication. Clients acting for end users are expected to set one or both attributes on each offered media stream primarily intended for human communication when placing an outgoing session, and either to ignore or to take the attributes into account when receiving incoming calls, based on local configuration and capabilities. Systems acting for call centers and PSAPs are expected to take the attributes into account when processing inbound calls.

Each media stream carries its own language values, one for what is sent and one for what is received. In the offer the value is a list, most wanted first. In the answer it is a single tag. For a stream used in one direction only, the other attribute can be left out, and for a stream that carries no language at all, both should be left out.

What the two attributes carry in an offer and in an answer
AspectIn an offerIn an answer
Value THIS RFCOne or more language tags, in preference orderExactly one language tag
hlang-send THIS RFCLanguages the offerer will sendThe language the answerer will send
hlang-recv THIS RFCLanguages the offerer will receiveThe language the answerer expects to receive
Missing valueOne attribute may be left out for a one-way media streamNot applicable

§5.2When There Is No Language in Common

The RFC does not mandate either behaviour for the case where the callee supports none of the languages the caller asked for. It is up to the implementation whether the call proceeds or fails.

When a call is rejected because there is no language in common, the SIP response has the response code 488 (Not Acceptable Here) or 606 (Not Acceptable), and a Warning header field with a warning code of 308. The warning text indicates that there are no mutually supported languages, and should also contain the supported languages and media. The RFC gives this example:

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

The RFC leaves it open whether a call with no common language should go ahead or be refused. If it is refused, the refusal carries SIP code 488 or 606 and a warning that says which languages and media the other side does support, so the caller can try again.

§5.3How a Language Tag Maps to a Media Stream

A sign-language tag with a video media stream is read as an indication of sign language in the video stream. A non-sign-language tag with a text media stream is read as an indication of written language in the text stream. A non-sign-language tag with an audio media stream is read as an indication of spoken language in the audio stream.

The RFC defines no other use for language tags in video media, such as how to indicate visible captions in the video stream, and it does not define the use of sign-language tags in text or audio media. It also does not define the use of language tags in media other than interactive streams of audio, video and text, such as message or application; that could be supported by later work or by agreement between the applications.

In the IANA registry for language subtags, a language subtag with a Type field of extlang combined with a Prefix field value of sgn indicates a sign-language tag. The absence of that sgn prefix indicates a non-sign-language tag.

The media stream says what kind of language it carries: video carries sign language, text carries written language and audio carries spoken language. A tag is a sign-language tag when it has the sgn prefix in the IANA language subtag registry.

What a language tag means for each media stream
  • VideoA sign-language tag means sign language in the video stream.
  • TextA non-sign-language tag means written language in the text stream.
  • AudioA non-sign-language tag means spoken language in the audio stream.

§5.4Worked Examples

The RFC gives several examples of the relevant SDP lines. Spoken English in both directions:

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

American Sign Language in both directions:

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

An offer asking for spoken Spanish first, spoken Basque second and spoken English third:

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

The answer picking Spanish in both directions:

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

An alternative answer in which the callee supports none of the requested languages but chooses to proceed, using Italian:

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

A richer offer asks for three streams: video for the caller to send using Argentine Sign Language, text for the caller to send using written Spanish or written Portuguese, and audio for the caller to receive spoken Spanish 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

The answer to that offer keeps the text and audio streams and declines the video, because 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

The RFC notes that even though the examples use the same language in both directions, that is not required, though in practice it makes a successful match more likely.

The examples show the same two attributes in use for a single language, for a preference list, and for a call that uses three media streams at once: video for sign language, text for writing and audio for speech. The answer can decline a stream it cannot support, by setting its port to zero.

An offer with a preference list and the answer that picks one
SDP offer and answer
m=audio 49250 RTP/AVP 20
a=hlang-send:es eu en
a=hlang-recv:es eu en

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

§7Security Considerations

The security considerations of BCP 47 apply here. An attacker able to modify the signalling could prevent a call from succeeding by altering crucial elements, including the hlang-send and hlang-recv values. RFC 5069 discusses such threats. The use of TLS or IPsec can protect against them.

Emergency calls are of particular concern. RFC 6881, which is specific to emergency calls, mandates the use of TLS or IPsec.

Changing the language values in the signalling can break a call, so the signalling has to be protected. TLS or IPsec do that, and emergency calls must use one of them.

§9References