Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 7866

Session Recording Protocol

Pages: 45
Proposed Standard
Errata
Part 1 of 2 – Pages 1 to 20
None   None   Next

Top   ToC   RFC7866 - Page 1
Internet Engineering Task Force (IETF)                        L. Portman
Request for Comments: 7866                                  NICE Systems
Category: Standards Track                                    H. Lum, Ed.
ISSN: 2070-1721                                                  Genesys
                                                                C. Eckel
                                                                   Cisco
                                                             A. Johnston
                                        Illinois Institute of Technology
                                                               A. Hutton
                                                                   Unify
                                                                May 2016


                       Session Recording Protocol

Abstract

This document specifies the use of the Session Initiation Protocol (SIP), the Session Description Protocol (SDP), and the Real-time Transport Protocol (RTP) for delivering real-time media and metadata from a Communication Session (CS) to a recording device. The Session Recording Protocol specifies the use of SIP, SDP, and RTP to establish a Recording Session (RS) between the Session Recording Client (SRC), which is on the path of the CS, and a Session Recording Server (SRS) at the recording device. This document considers only active recording, where the SRC purposefully streams media to an SRS and all participating user agents (UAs) are notified of the recording. Passive recording, where a recording device detects media directly from the network (e.g., using port-mirroring techniques), is outside the scope of this document. In addition, lawful intercept is outside the scope of this document. 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 http://www.rfc-editor.org/info/rfc7866.
Top   ToC   RFC7866 - Page 2
Copyright Notice

   Copyright (c) 2016 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, 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 ....................................................4 2. Terminology .....................................................4 3. Definitions .....................................................4 4. Scope ...........................................................4 5. Overview of Operations ..........................................5 5.1. Delivering Recorded Media ..................................5 5.2. Delivering Recording Metadata ..............................8 5.3. Receiving Recording Indications and Providing Recording Preferences ................................................9 6. SIP Handling ...................................................11 6.1. Procedures at the SRC .....................................11 6.1.1. Initiating a Recording Session .....................11 6.1.2. SIP Extensions for Recording Indications and Preferences ....................................12 6.2. Procedures at the SRS .....................................12 6.3. Procedures for Recording-Aware User Agents ................12 7. SDP Handling ...................................................13 7.1. Procedures at the SRC .....................................13 7.1.1. SDP Handling in the RS .............................13 7.1.1.1. Handling Media Stream Updates .............14 7.1.2. Recording Indication in the CS .....................15 7.1.3. Recording Preference in the CS .....................16 7.2. Procedures at the SRS .....................................16 7.3. Procedures for Recording-Aware User Agents ................18 7.3.1. Recording Indication ...............................18 7.3.2. Recording Preference ...............................19 8. RTP Handling ...................................................20 8.1. RTP Mechanisms ............................................20 8.1.1. RTCP ...............................................20 8.1.2. RTP Profile ........................................21 8.1.3. SSRC ...............................................21
Top   ToC   RFC7866 - Page 3
           8.1.4. CSRC ...............................................22
           8.1.5. SDES ...............................................22
                  8.1.5.1. CNAME .....................................22
           8.1.6. Keepalive ..........................................22
           8.1.7. RTCP Feedback Messages .............................23
                  8.1.7.1. Full Intra Request ........................23
                  8.1.7.2. Picture Loss Indication ...................23
                  8.1.7.3. Temporary Maximum Media Stream Bit
                           Rate Request ..............................24
           8.1.8. Symmetric RTP/RTCP for Sending and Receiving .......24
      8.2. Roles .....................................................25
           8.2.1. SRC Acting as an RTP Translator ....................26
                  8.2.1.1. Forwarding Translator .....................26
                  8.2.1.2. Transcoding Translator ....................26
           8.2.2. SRC Acting as an RTP Mixer .........................27
           8.2.3. SRC Acting as an RTP Endpoint ......................28
      8.3. RTP Session Usage by SRC ..................................28
           8.3.1. SRC Using Multiple m-lines .........................28
           8.3.2. SRC Using Mixing ...................................29
      8.4. RTP Session Usage by SRS ..................................30
   9. Metadata .......................................................31
      9.1. Procedures at the SRC .....................................31
      9.2. Procedures at the SRS .....................................33
   10. Persistent Recording ..........................................35
   11. IANA Considerations ...........................................36
      11.1. Registration of Option Tags ..............................36
           11.1.1. "siprec" Option Tag ...............................36
           11.1.2. "record-aware" Option Tag .........................36
      11.2. Registration of Media Feature Tags .......................36
           11.2.1. Feature Tag for the SRC ...........................36
           11.2.2. Feature Tag for the SRS ...........................37
      11.3. New Content-Disposition Parameter Registrations ..........37
      11.4. SDP Attributes ...........................................38
           11.4.1. "record" SDP Attribute ............................38
           11.4.2. "recordpref" SDP Attribute ........................38
   12. Security Considerations .......................................39
      12.1. Authentication and Authorization .........................39
      12.2. RTP Handling .............................................40
      12.3. Metadata .................................................41
      12.4. Storage and Playback .....................................41
   13. References ....................................................41
      13.1. Normative References .....................................41
      13.2. Informative References ...................................42
   Acknowledgements ..................................................44
   Authors' Addresses ................................................45
Top   ToC   RFC7866 - Page 4

1. Introduction

This document specifies the mechanism to record a Communication Session (CS) by delivering real-time media and metadata from the CS to a recording device. In accordance with the architecture [RFC7245], the Session Recording Protocol specifies the use of SIP, the Session Description Protocol (SDP), and RTP to establish a Recording Session (RS) between the Session Recording Client (SRC), which is on the path of the CS, and a Session Recording Server (SRS) at the recording device. SIP is also used to deliver metadata to the recording device, as specified in [RFC7865]. Metadata is information that describes recorded media and the CS to which they relate. The Session Recording Protocol intends to satisfy the SIP-based Media Recording (SIPREC) requirements listed in [RFC6341]. In addition to the Session Recording Protocol, this document specifies extensions for user agents (UAs) that are participants in a CS to receive recording indications and to provide preferences for recording. This document considers only active recording, where the SRC purposefully streams media to an SRS and all participating UAs are notified of the recording. Passive recording, where a recording device detects media directly from the network (e.g., using port-mirroring techniques), is outside the scope of this document. In addition, lawful intercept is outside the scope of this document, in accordance with [RFC2804].

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

3. Definitions

This document refers to the core definitions provided in the architecture document [RFC7245]. Section 8 uses the definitions provided in "RTP: A Transport Protocol for Real-Time Applications" [RFC3550].

4. Scope

The scope of the Session Recording Protocol includes the establishment of the RSs and the reporting of the metadata. The scope also includes extensions supported by UAs participating in the CS, such as an indication of recording. The UAs need not be recording aware in order to participate in a CS being recorded.
Top   ToC   RFC7866 - Page 5
   The items in the following list, which is not exhaustive, do not
   represent the protocol itself and are considered out of scope for the
   Session Recording Protocol:

   o  Delivering recorded media in real time as the CS media

   o  Specifications of criteria to select a specific CS to be recorded
      or triggers to record a certain CS in the future

   o  Recording policies that determine whether the CS should be
      recorded and whether parts of the CS are to be recorded

   o  Retention policies that determine how long a recording is stored

   o  Searching and accessing the recorded media and metadata

   o  Policies governing how CS users are made aware of recording

   o  Delivering additional RS metadata through a non-SIP mechanism

5. Overview of Operations

This section is informative and provides a description of recording operations. Section 6 describes the SIP communication in an RS between an SRC and an SRS, as well as the procedures for recording-aware UAs participating in a CS. Section 7 describes SDP handling in an RS, and the procedures for recording indications and recording preferences. Section 8 describes RTP handling in an RS. Section 9 describes the mechanism to deliver recording metadata from the SRC to the SRS. As mentioned in the architecture document [RFC7245], there are a number of types of call flows based on the location of the SRC. The sample call flows discussed in Section 5.1 provide a quick overview of the operations between the SRC and the SRS.

5.1. Delivering Recorded Media

When a SIP Back-to-Back User Agent (B2BUA) with SRC functionality routes a call from UA A to UA B, the SRC has access to the media path between the UAs. When the SRC is aware that it should be recording the conversation, the SRC can cause the B2BUA to relay the media between UA A and UA B. The SRC then establishes the RS with the SRS and sends replicated media towards the SRS.
Top   ToC   RFC7866 - Page 6
   An endpoint may also have SRC functionality, where the endpoint
   itself establishes the RS to the SRS.  Since the endpoint has access
   to the media in the CS, the endpoint can send replicated media
   towards the SRS.

   The example call flows in Figures 1 and 2 show an SRC establishing an
   RS towards an SRS.  Figure 1 illustrates UA A acting as the SRC.
   Figure 2 illustrates a B2BUA acting as the SRC.  Note that the SRC
   can choose when to establish the RS independent of the CS, even
   though the example call flows suggest that the SRC is establishing
   the RS (message (5) in Figure 2) after the CS is established.

            UA A/SRC               UA B                    SRS
             |(1) CS INVITE          |                      |
             |---------------------->|                      |
             |           (2) 200 OK  |                      |
             |<----------------------|                      |
             |                       |                      |
             |(3) RS INVITE with SDP |                      |
             |--------------------------------------------->|
             |                       |  (4) 200 OK with SDP |
             |<---------------------------------------------|
             |(5) CS RTP             |                      |
             |======================>|                      |
             |<======================|                      |
             |(6) RS RTP             |                      |
             |=============================================>|
             |=============================================>|
             |                       |                      |
             |(7) CS BYE             |                      |
             |---------------------->|                      |
             |(8) RS BYE             |                      |
             |--------------------------------------------->|
             |                       |                      |

            Figure 1: Basic Recording Call Flow with UA as SRC
Top   ToC   RFC7866 - Page 7
     UA A           SRC                    UA B                    SRS
      |(1) CS INVITE |                       |                      |
      |------------->|                       |                      |
      |              |(2) CS INVITE          |                      |
      |              |---------------------->|                      |
      |              |           (3) 200 OK  |                      |
      |              |<----------------------|                      |
      |   (4) 200 OK |                       |                      |
      |<-------------|                       |                      |
      |              |(5) RS INVITE with SDP |                      |
      |              |--------------------------------------------->|
      |              |                       |  (6) 200 OK with SDP |
      |              |<---------------------------------------------|
      |(7) CS RTP    |                       |                      |
      |=============>|======================>|                      |
      |<=============|<======================|                      |
      |              |(8) RS RTP             |                      |
      |              |=============================================>|
      |              |=============================================>|
      |(9) CS BYE    |                       |                      |
      |------------->|                       |                      |
      |              |(10) CS BYE            |                      |
      |              |---------------------->|                      |
      |              |(11) RS BYE            |                      |
      |              |--------------------------------------------->|
      |              |                       |                      |

           Figure 2: Basic Recording Call Flow with B2BUA as SRC

   The call flow shown in Figure 2 can also apply to the case of a
   centralized conference with a mixer.  For clarity, ACKs to INVITEs
   and 200 OKs to BYEs are not shown.  The conference focus can provide
   the SRC functionality, since the conference focus has access to all
   the media from each conference participant.  When a recording is
   requested, the SRC delivers the metadata and the media streams to the
   SRS.  Since the conference focus has access to a mixer, the SRC may
   choose to mix the media streams from all participants as a single
   mixed media stream towards the SRS.

   An SRC can use a single RS to record multiple CSs.  Every time the
   SRC wants to record a new call, the SRC updates the RS with a new SDP
   offer to add new recorded streams to the RS and to correspondingly
   also update the metadata for the new call.

   An SRS can also establish an RS to an SRC, although it is beyond the
   scope of this document to define how an SRS would specify which calls
   to record.
Top   ToC   RFC7866 - Page 8

5.2. Delivering Recording Metadata

The SRC is responsible for the delivery of metadata to the SRS. The SRC may provide an initial metadata snapshot about recorded media streams in the initial INVITE content in the RS. Subsequent metadata updates can be represented as a stream of events in UPDATE [RFC3311] or re-INVITE requests sent by the SRC. These metadata updates are normally incremental updates to the initial metadata snapshot to optimize on the size of updates. However, the SRC may also decide to send a new metadata snapshot at any time. Metadata is transported in the body of INVITE or UPDATE messages. Certain metadata, such as the attributes of the recorded media stream, is located in the SDP of the RS. The SRS has the ability to send a request to the SRC to ask for a new metadata snapshot update from the SRC. This can happen when the SRS fails to understand the current stream of incremental updates for whatever reason -- for example, when the SRS loses the current state due to internal failure. The SRS may optionally attach a reason along with the snapshot request. This request allows both the SRC and the SRS to synchronize the states with a new metadata snapshot so that further incremental metadata updates will be based on the latest metadata snapshot. Similar to the metadata content, the metadata snapshot request is transported as content in UPDATE or INVITE messages sent by the SRS in the RS.
Top   ToC   RFC7866 - Page 9
          SRC                                                   SRS
           |                                                     |
           |(1) INVITE (metadata snapshot 1)                     |
           |---------------------------------------------------->|
           |                                          (2) 200 OK |
           |<----------------------------------------------------|
           |(3) ACK                                              |
           |---------------------------------------------------->|
           |(4) RTP                                              |
           |====================================================>|
           |====================================================>|
           |(5) UPDATE (metadata update 1)                       |
           |---------------------------------------------------->|
           |                                          (6) 200 OK |
           |<----------------------------------------------------|
           |(7) UPDATE (metadata update 2)                       |
           |---------------------------------------------------->|
           |                                          (8) 200 OK |
           |<----------------------------------------------------|
           |              (9) UPDATE (metadata snapshot request) |
           |<----------------------------------------------------|
           |                                        (10) 200 OK  |
           |---------------------------------------------------->|
           |      (11) INVITE (metadata snapshot 2 + SDP offer)  |
           |---------------------------------------------------->|
           |                            (12) 200 OK (SDP answer) |
           |<----------------------------------------------------|
           | (13) UPDATE (metadata update 1 based on snapshot 2) |
           |---------------------------------------------------->|
           |                                         (14) 200 OK |
           |<----------------------------------------------------|

               Figure 3: Delivering Metadata via SIP UPDATE

5.3. Receiving Recording Indications and Providing Recording Preferences

The SRC is responsible for providing recording indications to the participants in the CS. A recording-aware UA supports receiving recording indications via the SDP "a=record" attribute, and it can specify a recording preference in the CS by including the SDP "a=recordpref" attribute. The recording attribute is a declaration by the SRC in the CS to indicate whether recording is taking place. The recording preference attribute is a declaration by the recording- aware UA in the CS to indicate its recording preference. A UA that does not want to be recorded may still be notified that recording is occurring, for a number of reasons (e.g., it was not capable of
Top   ToC   RFC7866 - Page 10
   indicating its preference, its preference was ignored).  If this
   occurs, the UA's only mechanism to avoid being recorded is to
   terminate its participation in the session.

   To illustrate how the attributes are used, if UA A is initiating a
   call to UA B and UA A is also an SRC that is performing the
   recording, then UA A provides the recording indication in the SDP
   offer with a=record:on.  Since UA A is the SRC, UA A receives the
   recording indication from the SRC directly.  When UA B receives the
   SDP offer, UA B will see that recording is happening on the other
   endpoint of this session.  Since UA B is not an SRC and does not
   provide any recording preference, the SDP answer does not contain
   a=record or a=recordpref.

        UA A                                                   UA B
        (SRC)                                                   |
          |                                                     |
          |                [SRC recording starts]               |
          |(1) INVITE (SDP offer + a=record:on)                 |
          |---------------------------------------------------->|
          |                             (2) 200 OK (SDP answer) |
          |<----------------------------------------------------|
          |(3) ACK                                              |
          |---------------------------------------------------->|
          |(4) RTP                                              |
          |<===================================================>|
          |                                                     |
          |   [UA B wants to set preference to no recording]    |
          |           (5) INVITE (SDP offer + a=recordpref:off) |
          |<----------------------------------------------------|
          |   [SRC honors the preference and stops recording]   |
          |(6) 200 OK (SDP answer + a=record:off)               |
          |---------------------------------------------------->|
          |                                             (7) ACK |
          |<----------------------------------------------------|

          Figure 4: Recording Indication and Recording Preference

   After the call is established and recording is in progress, UA B
   later decides to change the recording preference to no recording and
   sends a re-INVITE with the "a=recordpref" attribute.  It is up to the
   SRC to honor the preference, and in this case the SRC decides to stop
   the recording and updates the recording indication in the SDP answer.
Top   ToC   RFC7866 - Page 11
   Note that UA B could have explicitly indicated a recording preference
   in (2), the 200 OK for the original INVITE.  Indicating a preference
   of no recording in an initial INVITE or an initial response to an
   INVITE may reduce the chance of a user being recorded in the
   first place.

6. SIP Handling

6.1. Procedures at the SRC

6.1.1. Initiating a Recording Session

An RS is a SIP session with specific extensions applied, and these extensions are listed in the procedures below for the SRC and the SRS. When an SRC or an SRS receives a SIP session that is not an RS, it is up to the SRC or the SRS to determine what to do with the SIP session. The SRC can initiate an RS by sending a SIP INVITE request to the SRS. The SRC and the SRS are identified in the From and To headers, respectively. The SRC MUST include the "+sip.src" feature tag in the Contact URI, defined in this specification as an extension to [RFC3840], for all RSs. An SRS uses the presence of the "+sip.src" feature tag in dialog creating and modifying requests and responses to confirm that the dialog being created is for the purpose of an RS. In addition, when an SRC sends a REGISTER request to a registrar, the SRC MAY include the "+sip.src" feature tag to indicate that it is an SRC. Since SIP Caller Preferences extensions are optional to implement for routing proxies, there is no guarantee that an RS will be routed to an SRC or SRS. A new option tag, "siprec", is introduced. As per [RFC3261], only an SRC or an SRS can accept this option tag in an RS. An SRC MUST include the "siprec" option tag in the Require header when initiating an RS so that UAs that do not support the Session Recording Protocol extensions will simply reject the INVITE request with a 420 (Bad Extension) response. When an SRC receives a new INVITE, the SRC MUST only consider the SIP session as an RS when both the "+sip.srs" feature tag and the "siprec" option tag are included in the INVITE request.
Top   ToC   RFC7866 - Page 12

6.1.2. SIP Extensions for Recording Indications and Preferences

For the CS, the SRC MUST provide recording indications to all participants in the CS. A participant UA in a CS can indicate that it is recording aware by providing the "record-aware" option tag, and the SRC MUST provide recording indications in the new SDP "a=record" attribute described in Section 7 below. In the absence of the "record-aware" option tag -- meaning that the participant UA is not recording aware -- an SRC MUST provide recording indications through other means, such as playing a tone in-band or having a signed participant contract in place. An SRC in the CS may also indicate itself as a session recording client by including the "+sip.src" feature tag. A recording-aware participant can learn that an SRC is in the CS and can set the recording preference for the CS with the new SDP "a=recordpref" attribute described in Section 7.

6.2. Procedures at the SRS

When an SRS receives a new INVITE, the SRS MUST only consider the SIP session as an RS when both the "+sip.src" feature tag and the "siprec" option tag are included in the INVITE request. The SRS can initiate an RS by sending a SIP INVITE request to the SRC. The SRS and the SRC are identified in the From and To headers, respectively. The SRS MUST include the "+sip.srs" feature tag in the Contact URI, as per [RFC3840], for all RSs. An SRC uses the presence of this feature tag in dialog creation and modification requests and responses to confirm that the dialog being created is for the purpose of an RS (REQ-030 in [RFC6341]). In addition, when an SRS sends a REGISTER request to a registrar, the SRS SHOULD include the "+sip.srs" feature tag to indicate that it is an SRS. An SRS MUST include the "siprec" option tag in the Require header as per [RFC3261] when initiating an RS so that UAs that do not support the Session Recording Protocol extensions will simply reject the INVITE request with a 420 (Bad Extension) response.

6.3. Procedures for Recording-Aware User Agents

A recording-aware UA is a participant in the CS that supports the SIP and SDP extensions for receiving recording indications and for requesting recording preferences for the call. A recording-aware UA MUST indicate that it can accept the reporting of recording indications provided by the SRC with a new "record-aware" option tag
Top   ToC   RFC7866 - Page 13
   when initiating or establishing a CS; this means including the
   "record-aware" option tag in the Supported header in the initial
   INVITE request or response.

   A recording-aware UA MUST provide a recording indication to the end
   user through an appropriate user interface, indicating whether
   recording is on, off, or paused for each medium.  Appropriate user
   interfaces may include real-time notification or previously
   established agreements that use of the device is subject to
   recording.  Some UAs that are automatons (e.g., Interactive Voice
   Response (IVR), media server, Public Switched Telephone Network
   (PSTN) gateway) may not have a user interface to render a recording
   indication.  When such a UA indicates recording awareness, the UA
   SHOULD render the recording indication through other means, such as
   passing an in-band tone on the PSTN gateway, putting the recording
   indication in a log file, or raising an application event in a
   VoiceXML dialog.  These UAs MAY also choose not to indicate recording
   awareness, thereby relying on whatever mechanism an SRC chooses to
   indicate recording, such as playing a tone in-band.

7. SDP Handling

7.1. Procedures at the SRC

The SRC and SRS follow the SDP offer/answer model described in [RFC3264]. The procedures for the SRC and SRS describe the conventions used in an RS.

7.1.1. SDP Handling in the RS

Since the SRC does not expect to receive media from the SRS, the SRC typically sets each media stream of the SDP offer to only send media, by qualifying them with the "a=sendonly" attribute, according to the procedures in [RFC3264]. The SRC sends recorded streams of participants to the SRS, and the SRC MUST provide a "label" attribute ("a=label"), as per [RFC4574], on each media stream in order to identify the recorded stream with the rest of the metadata. The "a=label" attribute identifies each recorded media stream, and the label name is mapped to the Media Stream Reference in the metadata as per [RFC7865]. The scope of the "a=label" attribute only applies to the SDP and metadata conveyed in the bodies of the SIP request or response that the label appeared in. Note that a recorded stream is distinct from a CS stream; the metadata provides a list of participants that contribute to each recorded stream.
Top   ToC   RFC7866 - Page 14
   Figure 5 shows an example SDP offer from an SRC with both audio and
   video recorded streams.  Note that this example contains unfolded
   lines longer than 72 characters; these lines are captured between
   <allOneLine> tags.

       v=0
       o=SRC 2890844526 2890844526 IN IP4 198.51.100.1
       s=-
       c=IN IP4 198.51.100.1
       t=0 0
       m=audio 12240 RTP/AVP 0 4 8
       a=sendonly
       a=label:1
       m=video 22456 RTP/AVP 98
       a=rtpmap:98 H264/90000
       <allOneLine>
       a=fmtp:98 profile-level-id=42A01E;
                 sprop-parameter-sets=Z0IACpZTBYmI,aMljiA==
       </allOneLine>
       a=sendonly
       a=label:2
       m=audio 12242 RTP/AVP 0 4 8
       a=sendonly
       a=label:3
       m=video 22458 RTP/AVP 98
       a=rtpmap:98 H264/90000
       <allOneLine>
       a=fmtp:98 profile-level-id=42A01E;
                 sprop-parameter-sets=Z0IACpZTBYmI,aMljiA==
       </allOneLine>
       a=sendonly
       a=label:4

     Figure 5: Sample SDP Offer from SRC with Audio and Video Streams

7.1.1.1. Handling Media Stream Updates
Over the lifetime of an RS, the SRC can add and remove recorded streams to and from the RS for various reasons -- for example, when a CS stream is added to or removed from the CS, or when a CS is created or terminated if an RS handles multiple CSs. To remove a recorded stream from the RS, the SRC sends a new SDP offer where the port of the media stream to be removed is set to zero, according to the procedures in [RFC3264]. To add a recorded stream to the RS, the SRC sends a new SDP offer by adding a new media stream description or by reusing an old media stream that had been previously disabled, according to the procedures in [RFC3264].
Top   ToC   RFC7866 - Page 15
   The SRC can temporarily discontinue streaming and collection of
   recorded media from the SRC to the SRS for reasons such as masking
   the recording.  In this case, the SRC sends a new SDP offer and sets
   the media stream to inactive (a=inactive) for each recorded stream to
   be paused, as per the procedures in [RFC3264].  To resume streaming
   and collection of recorded media, the SRC sends a new SDP offer and
   sets the media stream to sendonly (a=sendonly).  Note that a CS may
   itself change the media stream direction by updating the SDP -- for
   example, by setting a=inactive for SDP hold.  Media stream direction
   changes in the CS are conveyed in the metadata by the SRC.  When a CS
   media stream is changed to or from inactive, the effect on the
   corresponding RS media stream is governed by SRC policy.  The SRC MAY
   have a local policy to pause an RS media stream when the
   corresponding CS media stream is inactive, or it MAY leave the RS
   media stream as sendonly.

7.1.2. Recording Indication in the CS

While there are existing mechanisms for providing an indication that a CS is being recorded, these mechanisms are usually delivered on the CS media streams, such as playing an in-band tone or an announcement to the participants. A new "record" SDP attribute is introduced to allow the SRC to indicate recording state to a recording-aware UA in a CS. The "record" SDP attribute appears at the media level or session level in either an SDP offer or answer. When the attribute is applied at the session level, the indication applies to all media streams in the SDP. When the attribute is applied at the media level, the indication applies to that one media stream only, and that overrides the indication if also set at the session level. Whenever the recording indication needs to change, such as termination of recording, the SRC MUST initiate a re-INVITE or UPDATE to update the SDP "a=record" attribute. The following is the ABNF [RFC5234] of the "record" attribute: attribute =/ record-attr ; attribute defined in RFC 4566 record-attr = "record:" indication indication = "on" / "off" / "paused" on: Recording is in progress. off: No recording is in progress. paused: Recording is in progress but media is paused.
Top   ToC   RFC7866 - Page 16

7.1.3. Recording Preference in the CS

When the SRC receives the "a=recordpref" SDP in an SDP offer or answer, the SRC chooses to honor the preference to record based on local policy at the SRC. If the SRC makes a change in recording state, the SRC MUST report the new recording state in the "a=record" attribute in the SDP answer or in a subsequent SDP offer.

7.2. Procedures at the SRS

Typically, the SRS only receives RTP streams from the SRC; therefore, the SDP offer/answer from the SRS normally sets each media stream to receive media, by setting them with the "a=recvonly" attribute, according to the procedures of [RFC3264]. When the SRS is not ready to receive a recorded stream, the SRS sets the media stream as inactive in the SDP offer or answer by setting it with an "a=inactive" attribute, according to the procedures of [RFC3264]. When the SRS is ready to receive recorded streams, the SRS sends a new SDP offer and sets the media streams with an "a=recvonly" attribute.
Top   ToC   RFC7866 - Page 17
   Figure 6 shows an example of an SDP answer from the SRS for the SDP
   offer from Figure 5.  Note that this example contains unfolded lines
   longer than 72 characters; these lines are captured between
   <allOneLine> tags.

       v=0
       o=SRS 0 0 IN IP4 198.51.100.20
       s=-
       c=IN IP4 198.51.100.20
       t=0 0
       m=audio 10000 RTP/AVP 0
       a=recvonly
       a=label:1
       m=video 10002 RTP/AVP 98
       a=rtpmap:98 H264/90000
       <allOneLine>
       a=fmtp:98 profile-level-id=42A01E;
                 sprop-parameter-sets=Z0IACpZTBYmI,aMljiA==
       </allOneLine>
       a=recvonly
       a=label:2
       m=audio 10004 RTP/AVP 0
       a=recvonly
       a=label:3
       m=video 10006 RTP/AVP 98
       a=rtpmap:98 H264/90000
       <allOneLine>
       a=fmtp:98 profile-level-id=42A01E;
                 sprop-parameter-sets=Z0IACpZTBYmI,aMljiA==
       </allOneLine>
       a=recvonly
       a=label:4

     Figure 6: Sample SDP Answer from SRS with Audio and Video Streams

   Over the lifetime of an RS, the SRS can remove recorded streams from
   the RS for various reasons.  To remove a recorded stream from the RS,
   the SRS sends a new SDP offer where the port of the media stream to
   be removed is set to zero, according to the procedures in [RFC3264].

   The SRS MUST NOT add recorded streams in the RS when the SRS sends a
   new SDP offer.  Similarly, when the SRS starts an RS, the SRS MUST
   initiate the INVITE without an SDP offer to let the SRC generate the
   SDP offer with the streams to be recorded.
Top   ToC   RFC7866 - Page 18
   The sequence diagram in Figure 7 shows an example where the SRS is
   initially not ready to receive recorded streams and later updates the
   RS when the SRS is ready to record.

     SRC                                                   SRS
      |                                                     |
      |(1) INVITE (SDP offer)                               |
      |---------------------------------------------------->|
      |                                           [not ready to record]
      |                        (2) 200 OK with SDP inactive |
      |<----------------------------------------------------|
      |(3) ACK                                              |
      |---------------------------------------------------->|
      |                      ...                            |
      |                                             [ready to record]
      |                     (4) re-INVITE with SDP recvonly |
      |<----------------------------------------------------|
      |(5) 200 OK with SDP sendonly                         |
      |---------------------------------------------------->|
      |                                             (6) ACK |
      |<----------------------------------------------------|
      |(7) RTP                                              |
      |====================================================>|
      |                      ...                            |
      |(8) BYE                                              |
      |---------------------------------------------------->|
      |                                             (9) OK  |
      |<----------------------------------------------------|

             Figure 7: SRS Responding to Offer with a=inactive

7.3. Procedures for Recording-Aware User Agents

7.3.1. Recording Indication

When a recording-aware UA receives an SDP offer or answer that includes the "a=record" attribute, the UA provides to the end user an indication as to whether the recording is on, off, or paused for each medium, based on the most recently received "a=record" SDP attribute for that medium. When a CS is traversed through multiple UAs such as a B2BUA or a conference focus, each UA involved in the CS that is aware that the CS is being recorded MUST provide the recording indication through the "a=record" attribute to all other parties in the CS.
Top   ToC   RFC7866 - Page 19
   It is possible that more than one SRC is in the call path of the same
   CS, but the recording indication attribute does not provide any hint
   as to which SRC or how many SRCs are recording.  An endpoint knows
   only that the call is being recorded.  Furthermore, this attribute is
   not used as a request for a specific SRC to start or stop recording.

7.3.2. Recording Preference

A participant in a CS MAY set the recording preference in the CS to be recorded or not recorded at session establishment or during the session. A new "recordpref" SDP attribute is introduced, and the participant in the CS may set this recording preference attribute in any SDP offer/answer at session establishment time or during the session. The SRC is not required to honor the recording preference from a participant, based on local policies at the SRC, and the participant can learn the recording indication through the "a=record" SDP attribute as described in Section 7.3.1. The SDP "a=recordpref" attribute can appear at the media level or session level and can appear in an SDP offer or answer. When the attribute is applied at the session level, the recording preference applies to all media streams in the SDP. When the attribute is applied at the media level, the recording preference applies to that one media stream only, and that overrides the recording preference if also set at the session level. The UA can change the recording preference by changing the "a=recordpref" attribute in a subsequent SDP offer or answer. The absence of the "a=recordpref" attribute in the SDP indicates that the UA has no recording preference. The following is the ABNF of the "recordpref" attribute: attribute =/ recordpref-attr ; attribute defined in RFC 4566 recordpref-attr = "a=recordpref:" pref pref = "on" / "off" / "pause" / "nopreference" on: Sets the preference to record if it has not already been started. If the recording is currently paused, the preference is to resume recording. off: Sets the preference for no recording. If recording has already been started, then the preference is to stop the recording.
Top   ToC   RFC7866 - Page 20
   pause:  If the recording is currently in progress, sets the
           preference to pause the recording.

   nopreference:
           Indicates that the UA has no preference regarding recording.



(page 20 continued on part 2)

Next Section