RFC 4117 INFORMATIONAL SIP · TRANSCODING · ACCESSIBILITY

SIP Transcoding via 3pcc: Transcoding Services Invocation in the Session Initiation Protocol (SIP) Using Third Party Call Control (3pcc)

How a SIP call gets a transcoding service put in the middle of it, so both ends can still talk.

On rfc-editor.org ↗
PUBLISHED
June 2005
AUTHORS
G. Camarillo, E. Burger, H. Schulzrinne, A. van Wijk
STREAM
IETF
DOCUMENT TYPE
Informational RFC
SESSIONS FOR ONE TRANSCODER
2, A-T and T-B
MEDIA STREAMS IN THE CALLEE EXAMPLE
4, that is two bi-directional streams
SESSIONS FOR PARALLEL TRANSCODERS
4: A-T1, T1-B, B-T2 and T2-A
DOI
10.17487/RFC4117
ERRATA
Reported errata

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                       G. Camarillo
Request for Comments: 4117                                      Ericsson
Category: Informational                                        E. Burger
                                                              Brooktrout
                                                          H. Schulzrinne
                                                     Columbia University
                                                             A. van Wijk
                                                                 Viataal
                                                               June 2005


                  Transcoding Services Invocation in
                 the Session Initiation Protocol (SIP)
                 Using Third Party Call Control (3pcc)

Status of This Memo

   This memo provides information for the Internet community.  It does
   not specify an Internet standard of any kind.  Distribution of this
   memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2005).

Abstract

   This document describes how to invoke transcoding services using
   Session Initiation Protocol (SIP) and third party call control.  This
   way of invocation meets the requirements for SIP regarding
   transcoding services invocation to support deaf, hard of hearing and
   speech-impaired individuals.

Table of Contents

   1. Introduction ....................................................2
   2. General Overview ................................................2
   3. Third Party Call Control Flows ..................................2
      3.1. Terminology ................................................3
      3.2. Callee's Invocation ........................................3
      3.3. Caller's Invocation ........................................8
      3.4. Receiving the Original Stream ..............................8
      3.5. Transcoding Services in Parallel ..........................10
      3.6. Multiple Transcoding Services in Series ...................14
   4. Security Considerations ........................................16
   5. Normative References ...........................................17
   6. Informative References .........................................17

1.  Introduction

   The framework for transcoding with SIP [4] describes how two SIP [1]
   UAs (User Agents) can discover incompatibilities that prevent them
   from establishing a session (e.g., lack of support for a common codec
   or common media type).  When such incompatibilities are found, the
   UAs need to invoke transcoding services to successfully establish the
   session.  3pcc (third party call control) [2] is one way to perform
   such invocation.

2.  General Overview

   In the 3pcc model for transcoding invocation, a transcoding server
   that provides a particular transcoding service (e.g., speech-to-text)
   is identified by a URI.  A UA that wishes to invoke that service
   sends an INVITE request to that URI establishing a number of media
   streams.  The way the transcoder manipulates and manages the contents
   of those media streams (e.g., the text received over the text stream
   is transformed into speech and sent over the audio stream) is service
   specific.

   All the call flows in this document use SDP.  The same call flows
   could be used with another session description protocol that provides
   similar session description capabilities.

3.  Third Party Call Control Flows

   Given two UAs (A and B) and a transcoding server (T), the invocation
   of a transcoding service consists of establishing two sessions; A-T
   and T-B.  How these sessions are established depends on which party,
   the caller (A) or the callee (B), invokes the transcoding services.
   Section 3.2 deals with callee invocation and Section 3.3 deals with
   caller invocation.

   In all our 3pcc flows we have followed the general principle that a
   200 (OK) response from the transcoding service has to be received
   before contacting the callee.  This tries to ensure that the
   transcoding service will be available when the callee accepts the
   session.

   Still, the transcoding service does not know the exact type of
   transcoding it will be performing until the callee accepts the
   session.  So, there is always the chance of failing to provide
   transcoding services after the callee has accepted the session.  A
   system with more stringent requirements could use preconditions to
   avoid this situation.  When preconditions are used, the callee is not
   alerted until everything is ready for the session.

3.1.  Terminology

   All the flows in this document follow the naming convention below:

   SDP A:     A session description generated by A.  It contains, among
              other things, the transport address/es (IP address and
              port number) where A wants to receive media for each
              particular stream.

   SDP B:     A session description generated by B.  It contains, among
              other things, the transport address/es where B wants to
              receive media for each particular stream.

   SDP A+B:   A session description that contains, among other things,
              the transport address/es where A wants to receive media
              and the transport address/es where B wants to receive
              media.

   SDP TA:    A session description generated by T and intended for A.
              It contains, among other things, the transport address/es
              where T wants to receive media from A.

   SDP TB:    A session description generated by T and intended for B.
              It contains, among other things, the transport address/es
              where T wants to receive media from B.

   SDP TA+TB: A session description generated by T that contains, among
              other things, the transport address/es where T wants to
              receive media from A and the transport address/es where T
              wants to receive media from B.

3.2.  Callee's Invocation

   In this scenario, B receives an INVITE from A, and B decides to
   introduce T in the session.  Figure 1 shows the call flow for this
   scenario.

   In Figure 1, A can both hear and speak, and B is a deaf user with a
   speech impairment.  A proposes to establish a session that consists
   of an audio stream (1).  B wants to send and receive only text, so it
   invokes a transcoding service T that will perform both speech-to-text
   and text-to-speech conversions (2).  The session descriptions of
   Figure 1 are partially shown below.

      A                            T                            B

      |                            |                            |
      |--------------------(1) INVITE SDP A-------------------->|
      |                            |                            |
      |                            |<---(2) INVITE SDP A+B------|
      |                            |                            |
      |                            |---(3) 200 OK SDP TA+TB---->|
      |                            |                            |
      |                            |<---------(4) ACK-----------|
      |                            |                            |
      |<-------------------(5) 200 OK SDP TA--------------------|
      |                            |                            |
      |------------------------(6) ACK------------------------->|
      |                            |                            |
      | ************************** | ************************** |
      |*          MEDIA           *|*          MEDIA           *|
      | ************************** | ************************** |
      |                            |                            |

          Figure 1: Callee's Invocation of a Transcoding Service

   (1) INVITE SDP A

           m=audio 20000 RTP/AVP 0
           c=IN IP4 A.example.com

   (2) INVITE SDP A+B

           m=audio 20000 RTP/AVP 0
           c=IN IP4 A.example.com
           m=text 40000 RTP/AVP 96
           c=IN IP4 B.example.com
           a=rtpmap:96 t140/1000

   (3) 200 OK SDP TA+TB

           m=audio 30000 RTP/AVP 0
           c=IN IP4 T.example.com
           m=text 30002 RTP/AVP 96
           c=IN IP4 T.example.com
           a=rtpmap:96 t140/1000

   (5) 200 OK SDP TA

           m=audio 30000 RTP/AVP 0
           c=IN IP4 T.example.com

   Four media streams (i.e., two bi-directional streams) have been
   established at this point:

        1.  Audio from A to T.example.com:30000

        2.  Text from T to B.example.com:40000

        3.  Text from B to T.example.com:30002

        4.  Audio from T to A.example.com:20000

   When either A or B decides to terminate the session, it sends a BYE
   indicating that the session is over.

   If the first INVITE (1) received by B is empty (no session
   description), the call flow is slightly different.  Figure 2 shows
   the messages involved.

   B may have different reasons for invoking T before knowing A's
   session description.  B may want to hide its lack of native
   capabilities, and therefore wants to return a session description
   with all the codecs that B supports, plus all the codecs that T
   supports.  Or T may provide recording services (besides transcoding),
   and B wants T to record the conversation, regardless of whether
   transcoding is needed.

   This scenario (Figure 2) is a bit more complex than the previous one.
   In INVITE (2), B still does not have SDP A, so it cannot provide T
   with that information.  When B finally receives SDP A in (6), it has
   to send it to T.  B sends an empty INVITE to T (7) and gets a 200 OK
   with SDP TA+TB (8).  In general, this SDP TA+TB can be different than
   the one sent in (3).  That is why B needs to send the updated SDP TA
   to A in (9).  A then sends a possibly updated SDP A (10) and B sends
   it to T in (12).  On the other hand, if T happens to return the same
   SDP TA+TB in (8) as in (3), B can skip messages (9), (10), and (11).
   So, implementors of transcoding services are encouraged to return the
   same session description in (8) as in (3) in this type of scenario.
   The session descriptions of this flow are shown below:

      A                            T                            B

      |                            |                            |
      |----------------------(1) INVITE------------------------>|
      |                            |                            |
      |                            |<-----(2) INVITE SDP B------|
      |                            |                            |
      |                            |---(3) 200 OK SDP TA+TB---->|
      |                            |                            |
      |                            |<---------(4) ACK-----------|
      |                            |                            |
      |<-------------------(5) 200 OK SDP TA--------------------|
      |                            |                            |
      |-----------------------(6) ACK SDP A-------------------->|
      |                            |                            |
      |                            |<-------(7) INVITE----------|
      |                            |                            |
      |                            |---(8) 200 OK SDP TA+TB---->|
      |                            |                            |
      |<-----------------(9) INVITE SDP TA----------------------|
      |                            |                            |
      |------------------(10) 200 OK SDP A--------------------->|
      |                            |                            |
      |<-----------------------(11) ACK-------------------------|
      |                            |                            |
      |                            |<-----(12) ACK SDP A+B------|
      |                            |                            |
      | ************************** | ************************** |
      |*          MEDIA           *|*          MEDIA           *|
      | ************************** | ************************** |

      Figure 2: Callee's invocation after initial INVITE without SDP

   (2) INVITE SDP A+B

           m=audio 20000 RTP/AVP 0
           c=IN IP4 0.0.0.0
           m=text 40000 RTP/AVP 96
           c=IN IP4 B.example.com
           a=rtpmap:96 t140/1000

   (3) 200 OK SDP TA+TB

           m=audio 30000 RTP/AVP 0
           c=IN IP4 T.example.com
           m=text 30002 RTP/AVP 96
           c=IN IP4 T.example.com
           a=rtpmap:96 t140/1000

   (5) 200 OK SDP TA

           m=audio 30000 RTP/AVP 0
           c=IN IP4 T.example.com

   (6) ACK SDP A

           m=audio 20000 RTP/AVP 0
           c=IN IP4 A.example.com

   (8) 200 OK SDP TA+TB

           m=audio 30004 RTP/AVP 0
           c=IN IP4 T.example.com
           m=text 30006 RTP/AVP 96
           c=IN IP4 T.example.com
           a=rtpmap:96 t140/1000

   (9) INVITE SDP TA

           m=audio 30004 RTP/AVP 0
           c=IN IP4 T.example.com

   (10) 200 OK SDP A

           m=audio 20002 RTP/AVP 0
           c=IN IP4 A.example.com

   (12) ACK SDP A+B

           m=audio 20002 RTP/AVP 0
           c=IN IP4 A.example.com
           m=text 40000 RTP/AVP 96
           c=IN IP4 B.example.com
           a=rtpmap:96 t140/1000

   Four media streams (i.e., two bi-directional streams) have been
   established at this point:

        1.  Audio from A to T.example.com:30004

        2.  Text from T to B.example.com:40000

        3.  Text from B to T.example.com:30006

        4.  Audio from T to A.example.com:20002

3.3.  Caller's Invocation

   In this scenario, A wishes to establish a session with B using a
   transcoding service.  A uses 3pcc to set up the session between T and
   B.  The call flow we provide here is slightly different than the ones
   in [2].  In [2], the controller establishes a session between two
   user agents, which are the ones deciding the characteristics of the
   streams.  Here, A wants to establish a session between T and B, but A
   wants to decide how many and which types of streams are established.
   That is why A sends its session description in the first INVITE (1)
   to T, as opposed to the media-less initial INVITE recommended by [2].
   Figure 3 shows the call flow for this scenario.

   We do not include the session descriptions of this flow, since they
   are very similar to those in Figure 2.  In this flow, if T returns
   the same SDP TA+TB in (8) as in (2), messages (9), (10), and (11) can
   be skipped.

3.4.  Receiving the Original Stream

   Sometimes, as pointed out in the requirements for SIP in support of
   deaf, hard of hearing, and speech-impaired individuals [5], a user
   wants to receive both the original stream (e.g., audio) and the
   transcoded stream (e.g., the output of the speech-to-text
   conversion).  There are various possible solutions for this problem.
   One solution consists of using the SDP group attribute with Flow
   Identification (FID) semantics [3].  FID allows requesting that a
   stream is sent to two different transport addresses in parallel, as
   shown below:

      A                            T                            B

      |                            |                            |
      |-------(1) INVITE SDP A---->|                            |
      |                            |                            |
      |<----(2) 200 OK SDP TA+TB---|                            |
      |                            |                            |
      |----------(3) ACK---------->|                            |
      |                            |                            |
      |--------------------(4) INVITE SDP TA------------------->|
      |                            |                            |
      |<--------------------(5) 200 OK SDP B--------------------|
      |                            |                            |
      |-------------------------(6) ACK------------------------>|
      |                            |                            |
      |--------(7) INVITE--------->|                            |
      |                            |                            |
      |<---(8) 200 OK SDP TA+TB  --|                            |
      |                            |                            |
      |--------------------(9) INVITE SDP TA------------------->|
      |                            |                            |
      |<-------------------(10) 200 OK SDP B--------------------|
      |                            |                            |
      |-------------------------(11) ACK----------------------->|
      |                            |                            |
      |------(12) ACK SDP A+B----->|                            |
      |                            |                            |
      | ************************** | ************************** |
      |*          MEDIA           *|*          MEDIA           *|
      | ************************** | ************************** |
      |                            |                            |

          Figure 3: Caller's invocation of a transcoding service

           a=group:FID 1 2
           m=audio 20000 RTP/AVP 0
           c=IN IP4 A.example.com
           a=mid:1
           m=audio 30000 RTP/AVP 0
           c=IN IP4 T.example.com
           a=mid:2

   The problem with this solution is that the majority of the SIP user
   agents do not support FID.  Moreover, only a small fraction of the
   few UAs that support FID, also support sending simultaneous copies of
   the same media stream at the same time.  In addition, FID forces both
   copies of the stream to use the same codec.

   Therefore, we recommend that T (instead of a user agent) replicates
   the media stream.  The transcoder T receiving the following session
   description performs speech-to-text and text-to-speech conversions
   between the first audio stream and the text stream.  In addition, T
   copies the first audio stream to the second audio stream and sends it
   to A.

           m=audio 40000 RTP/AVP 0
           c=IN IP4 B.example.com
           m=audio 20000 RTP/AVP 0
           c=IN IP4 A.example.com
           a=recvonly
           m=text 20002 RTP/AVP 96
           c=IN IP4 A.example.com
           a=rtpmap:96 t140/1000

3.5.  Transcoding Services in Parallel

   Transcoding services sometimes consist of human relays (e.g., a
   person performing speech-to-text and text-to-speech conversions for a
   session).  If the same person is involved in both conversions (i.e.,
   from A to B and from B to A), he or she has access to all of the
   conversation.  In order to provide some degree of privacy, sometimes
   two different persons are allocated to do the job (i.e., one person
   handles A->B and the other B->A).  This type of disposition is also
   useful for automated transcoding services, where one machine converts
   text to synthetic speech (text-to-speech) and another performs voice
   recognition (speech-to-text).

   The scenario described above involves four different sessions: A-T1,
   T1-B, B-T2 and T2-A.  Figure 4 shows the call flow where A invokes T1
   and T2.

   Note this example uses unidirectional media streams (i.e., sendonly
   or recvonly) to clearly identify which transcoder handles media in
   which direction.  Nevertheless, nothing precludes the use of
   bidirectional streams in this scenario.  They could be used, for
   example, by a human relay to ask for clarifications (e.g., I did not
   get that, could you repeat, please?) to the party he or she is
   receiving media from.

   (1) INVITE SDP AT1

           m=text 20000 RTP/AVP 96
           c=IN IP4 A.example.com
           a=rtpmap:96 t140/1000
           a=sendonly
           m=audio 20000 RTP/AVP 0
           c=IN IP4 0.0.0.0
           a=recvonly

   (2) INVITE SDP AT2

           m=text 20002 RTP/AVP 96
           c=IN IP4 A.example.com
           a=rtpmap:96 t140/1000
           a=recvonly
           m=audio 20000 RTP/AVP 0
           c=IN IP4 0.0.0.0
           a=sendonly

   (3) 200 OK SDP T1A+T1B

           m=text 30000 RTP/AVP 96
           c=IN IP4 T1.example.com
           a=rtpmap:96 t140/1000
           a=recvonly
           m=audio 30002 RTP/AVP 0
           c=IN IP4 T1.example.com
           a=sendonly

   (5) 200 OK SDP T2A+T2B

           m=text 40000 RTP/AVP 96
           c=IN IP4 T2.example.com
           a=rtpmap:96 t140/1000
           a=sendonly
           m=audio 40002 RTP/AVP 0
           c=IN IP4 T2.example.com
           a=recvonly

   (7) INVITE SDP T1B+T2B

           m=audio 30002 RTP/AVP 0
           c=IN IP4 T1.example.com
           a=sendonly
           m=audio 40002 RTP/AVP 0
           c=IN IP4 T2.example.com
           a=recvonly

     A                          T1                     T2            B

     |                          |                      |             |
     |----(1) INVITE SDP AT1--->|                      |             |
     |                          |                      |             |
     |----------------(2) INVITE SDP AT2-------------->|             |
     |                          |                      |             |
     |<-(3) 200 OK SDP T1A+T1B--|                      |             |
     |                          |                      |             |
     |---------(4) ACK--------->|                      |             |
     |                          |                      |             |
     |<---------------(5) 200 OK SDP T2A+T2B-----------|             |
     |                          |                      |             |
     |----------------------(6) ACK------------------->|             |
     |                          |                      |             |
     |-----------------------(7) INVITE SDP T1B+T2B----------------->|
     |                          |                      |             |
     |<----------------------(8) 200 OK SDP BT1+BT2------------------|
     |                          |                      |             |
     |------(9) INVITE--------->|                      |             |
     |                          |                      |             |
     |-------------------(10) INVITE------------------>|             |
     |                          |                      |             |
     |<-(11) 200 OK SDP T1A+T1B-|                      |             |
     |                          |                      |             |
     |<------------(12) 200 OK SDP T2A+T2B-------------|             |
     |                          |                      |             |
     |------------------(13) INVITE SDP T1B+T2B--------------------->|
     |                          |                      |             |
     |<-----------------(14) 200 OK SDP BT1+BT2----------------------|
     |                          |                      |             |
     |--------------------------(15) ACK---------------------------->|
     |                          |                      |             |
     |---(16) ACK SDP AT1+BT1-->|                      |             |
     |                          |                      |             |
     |------------(17) ACK SDP AT2+BT2---------------->|             |
     |                          |                      |             |
     | ************************ | ********************************** |
     |*          MEDIA         *|*               MEDIA              *|
     | ************************ | ********************************** |
     |                          |                      |             |
     | ***********************************************   ***********
     |*                      MEDIA                    *|*   MEDIA   *|
     | *********************************************** | *********** |
     |                          |                      |             |

                Figure 4: Transcoding services in parallel

   (8) 200 OK SDP BT1+BT2

           m=audio 50000 RTP/AVP 0
           c=IN IP4 B.example.com
           a=recvonly
           m=audio 50002 RTP/AVP 0
           c=IN IP4 B.example.com
           a=sendonly

   (11) 200 OK SDP T1A+T1B

           m=text 30000 RTP/AVP 96
           c=IN IP4 T1.example.com
           a=rtpmap:96 t140/1000
           a=recvonly
           m=audio 30002 RTP/AVP 0
           c=IN IP4 T1.example.com
           a=sendonly

   (12) 200 OK SDP T2A+T2B

           m=text 40000 RTP/AVP 96
           c=IN IP4 T2.example.com
           a=rtpmap:96 t140/1000
           a=sendonly
           m=audio 40002 RTP/AVP 0
           c=IN IP4 T2.example.com
           a=recvonly

   Since T1 have returned the same SDP in (11) as in (3), and T2 has
   returned the same SDP in (12) as in (5), messages (13), (14) and (15)
   can be skipped.

   (16) ACK SDP AT1+BT1

           m=text 20000 RTP/AVP 96
           c=IN IP4 A.example.com
           a=rtpmap:96 t140/1000
           a=sendonly
           m=audio 50000 RTP/AVP 0
           c=IN IP4 B.example.com
           a=recvonly

   (17) ACK SDP AT2+BT2

           m=text 20002 RTP/AVP 96
           c=IN IP4 A.example.com
           a=rtpmap:96 t140/1000
           a=recvonly
           m=audio 50002 RTP/AVP 0
           c=IN IP4 B.example.com
           a=sendonly

   Four media streams have been established at this point:

        1.  Text from A to T1.example.com:30000

        2.  Audio from T1 to B.example.com:50000

        3.  Audio from B to T2.example.com:40002

        4.  Text from T2 to A.example.com:20002

   Note that B, the user agent server, needs to support two media
   streams: sendonly and recvonly.  At present, some user agents,
   although they support a single sendrecv media stream, do not support
   a different media line per direction.  Implementers are encouraged to
   build support for this feature.

3.6.  Multiple Transcoding Services in Series

   In a distributed environment, a complex transcoding service (e.g.,
   English text to Spanish speech) is often provided by several servers.
   For example, one server performs English text to Spanish text
   translation, and its output is fed into a server that performs text-
   to-speech conversion.  The flow in Figure 5 shows how A invokes T1
   and T2.

     A                           T1                    T2            B

     |                           |                     |             |
     |----(1) INVITE SDP A-----> |                     |             |
     |                           |                     |             |
     |<-(2) 200 OK SDP T1A+T1T2- |                     |             |
     |                           |                     |             |
     |----------(3) ACK--------> |                     |             |
     |                           |                     |             |
     |-----------(4) INVITE SDP T1T2------------------>|             |
     |                           |                     |             |
     |<-----------(5) 200 OK SDP T2T1+T2B--------------|             |
     |                           |                     |             |
     |---------------------(6) ACK-------------------->|             |
     |                           |                     |             |
     |---------------------------(7) INVITE SDP T2B----------------->|
     |                           |                     |             |
     |<--------------------------(8) 200 OK SDP B--------------------|
     |                           |                     |             |
     |--------------------------------(9) ACK----------------------->|
     |                           |                     |             |
     |---(10) INVITE-----------> |                     |             |
     |                           |                     |             |
     |------------------(11) INVITE------------------->|             |
     |                           |                     |             |
     |<-(12) 200 OK SDP T1A+T1T2-|                     |             |
     |                           |                     |             |
     |<-------------(13) 200 OK SDP T2T1+T2B-----------|             |
     |                           |                     |             |
     |---(14) ACK SDP T1T2+B---> |                     |             |
     |                           |                     |             |
     |-----------------------(15) INVITE SDP T2B-------------------->|
     |                           |                     |             |
     |<----------------------(16) 200 OK SDP B-----------------------|
     |                           |                     |             |
     |----------------(17) ACK SDP T1T2+B------------->|             |
     |                           |                     |             |
     |----------------------------(18) ACK-------------------------->|
     |                           |                     |             |
     | ************************* | *******************   *********** |
     |*         MEDIA           *|*       MEDIA       *|*   MEDIA   *|
     | ************************* | ******************* | *********** |
     |                           |                     |             |

                 Figure 5: Transcoding services in serial

4.  Security Considerations

   RFC 3725 [2] discusses security considerations which relate to the
   use of third party call control in SIP.  These considerations apply
   to this document, since it describes how to use third party call
   control to invoke transcoding service.

   In particular, RFC 3725 states that end-to-end media security is
   based on the exchange of keying material within SDP and depends on
   the controller behaving properly.  That is, the controller should not
   try to disable the security mechanisms offered by the other parties.
   As a result, it is trivially possible for the controller to insert
   itself as an intermediary on the media exchange, if it should so
   desire.

   In this document, the controller is the UA invoking the transcoder,
   and there is a media session established using third party call
   control between the remote UA and the transcoder.  Consequently, the
   attack described in RFC 3725 does not constitute a threat because the
   controller is the UA invoking the transcoding service and it has
   access to the media anyway by definition.  So, it seems unlikely that
   a UA would attempt to launch an attack against its own session by
   disabling security between the transcoder and the remote UA.

   Regarding end-to-end media security from the UAs' point of view, the
   transcoder needs access to the media in order to perform its
   function.  So, by definition, the transcoder behaves as a man in the
   middle.  UAs that do not want a particular transcoder to have access
   to all the media exchanged between them can use a different
   transcoder for each direction.  In addition, UAs can use different
   transcoders for different media types.

5.  Normative References

   [1]  Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A.,
        Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP:
        Session Initiation Protocol", RFC 3261, June 2002.

   [2]  Rosenberg, J., Peterson, J., Schulzrinne, H., and G. Camarillo,
        "Best Current Practices for Third Party Call Control (3pcc) in
        the Session Initiation Protocol (SIP)", BCP 85, RFC 3725, April
        2004.

   [3]  Camarillo, G., Eriksson, G., Holler, J., and H. Schulzrinne,
        "Grouping of Media Lines in the Session Description Protocol
        (SDP)", RFC 3388, December 2002.

6.  Informative References

   [4]  Camarillo, G., "Framework for transcoding with the session
        initiation protocol", August 2003, Work in Progress.

   [5]  Charlton, N., Gasson, M., Gybels, G., Spanner, M., and A. van
        Wijk, "User Requirements for the Session Initiation Protocol
        (SIP) in Support of Deaf, Hard of Hearing and Speech-impaired
        Individuals", RFC 3351, August 2002.

Authors' Addresses

   Gonzalo Camarillo
   Ericsson
   Advanced Signalling Research Lab.
   FIN-02420 Jorvas
   Finland

   EMail:  Gonzalo.Camarillo@ericsson.com


   Eric Burger
   Brooktrout Technology, Inc.
   18 Keewaydin Way
   Salem, NH 03079
   USA

   EMail:  eburger@brooktrout.com


   Henning Schulzrinne
   Dept. of Computer Science
   Columbia University
   1214 Amsterdam Avenue, MC 0401
   New York, NY 10027
   USA

   EMail:  schulzrinne@cs.columbia.edu


   Arnoud van Wijk
   Viataal
   Research & Development
   Afdeling RDS
   Theerestraat 42
   5271 GD Sint-Michielsgestel
   The Netherlands

   EMail:  a.vwijk@viataal.nl

Full Copyright Statement

   Copyright (C) The Internet Society (2005).

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

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

Intellectual Property

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

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

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

Acknowledgement

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

ISO Plain Language

On this page
PROBLEMTwo SIP endpoints that cannot understand each other, for example one that only speaks text and one that only speaks audio, need a transcoding service, and the signalling to bring it in had not been worked out.
MECHANISMThe memo shows the third party call control model in use: the transcoder is identified by a URI, one endpoint invites it, and the two sessions it sets up are negotiated with SDP, in several different arrangements.
WHAT IT DELIVERSIt is an Informational memo that gives message flows rather than a new protocol, and it notes that the transcoder has to see the media in the clear, so it behaves as a man in the middle by definition.

§1Why Transcoding Needs Its Own Signalling

The framework for transcoding with SIP describes how two SIP user agents can discover incompatibilities that prevent them from establishing a session, for example a lack of support for a common codec or a common media type. When such incompatibilities are found, the user agents need to invoke transcoding services to successfully establish the session. Third party call control, or 3pcc, is one way to perform such invocation.

The memo is careful about the limits of its own scope. It describes how to invoke transcoding services, not how the transcoding itself works: the way the transcoder manipulates and manages the contents of the media streams is service specific. All the call flows use SDP, and the same call flows could be used with another session description protocol that provides similar capabilities.

When two programs cannot understand each other's media, something has to sit between them and translate. The translation itself is not standardized, and this memo does not standardize it. What it standardizes is the set of messages that put the translator in place.

§2The General Model

In the 3pcc model for transcoding invocation, a transcoding server that provides a particular transcoding service, for example speech-to-text, is identified by a URI. A user agent that wishes to invoke that service sends an INVITE request to that URI, establishing a number of media streams.

Given two user agents, A and B, and a transcoding server T, the invocation of a transcoding service consists of establishing two sessions, A-T and T-B. How these sessions are established depends on which party, the caller A or the callee B, invokes the transcoding service. The memo follows a general principle in all its flows: a 200 OK response from the transcoding service has to be received before contacting the callee, which tries to ensure that the transcoding service will be available when the callee accepts the session.

The memo also notes a limit of the approach. The transcoding service does not know the exact type of transcoding it will be performing until the callee accepts the session, so there is always a chance of failing to provide transcoding services after the callee has accepted. A system with more stringent requirements could use preconditions to avoid this, in which case the callee is not alerted until everything is ready for the session.

The flows use a naming convention for the session descriptions. SDP A is a session description generated by A, containing among other things the transport address or addresses, an IP address and a port number, where A wants to receive media for each particular stream. SDP B is the same from B. SDP A+B is a session description that contains the addresses where A wants to receive media and the addresses where B wants to receive media. SDP TA is a session description generated by T and intended for A, containing the addresses where T wants to receive media from A, and SDP TB is the same for B. SDP TA+TB is generated by T and contains the addresses where T wants to receive media from A and from B.

The transcoder is just another server with an address of its own, and it is added to the call by being invited. Two sessions then exist where there was one. The rule the memo keeps is that the transcoder must say yes before the other party is contacted, so that the call does not fall apart after it has been accepted.

THE SESSION DESCRIPTIONS FROM THE CALLEE'S INVOCATION
SDP in the flow of Figure 1
(1) INVITE SDP A

       m=audio 20000 RTP/AVP 0
       c=IN IP4 A.example.com

(2) INVITE SDP A+B

       m=audio 20000 RTP/AVP 0
       c=IN IP4 A.example.com
       m=text 40000 RTP/AVP 96
       c=IN IP4 B.example.com
       a=rtpmap:96 t140/1000

(3) 200 OK SDP TA+TB

       m=audio 30000 RTP/AVP 0
       c=IN IP4 T.example.com
       m=text 30002 RTP/AVP 96
       c=IN IP4 T.example.com
       a=rtpmap:96 t140/1000

(5) 200 OK SDP TA

       m=audio 30000 RTP/AVP 0
       c=IN IP4 T.example.com

§3.2The Callee Invokes the Transcoder

In this scenario B receives an INVITE from A and decides to introduce T into the session. In the example, A can both hear and speak, and B is a deaf user with a speech impairment. A proposes to establish a session that consists of an audio stream. B wants to send and receive only text, so it invokes a transcoding service T that will perform both speech-to-text and text-to-speech conversions.

The flow is as follows. A sends an INVITE with SDP A, offering one audio stream at A's own address. B, instead of answering A directly, sends an INVITE with SDP A+B to the transcoder, describing both the audio stream at A and a text stream at B. The transcoder answers with 200 OK and SDP TA+TB, giving the addresses it will use for both directions, and B acknowledges. The transcoder then sends 200 OK with SDP TA back to A, and A acknowledges.

At that point four media streams have been established, that is two bi-directional streams: audio from A to T.example.com on port 30000, text from T to B.example.com on port 40000, text from B to T.example.com on port 30002, and audio from T to A.example.com on port 20000. When either A or B decides to terminate the session, it sends a BYE indicating that the session is over.

If the first INVITE received by B is empty, that is it carries no session description, the call flow is slightly different. B may have different reasons for invoking T before knowing A's session description: B may want to hide its lack of native capabilities, and therefore wants to return a session description with all the codecs that B supports, plus all the codecs that T supports, or T may provide recording services besides transcoding and B wants T to record the conversation whether or not transcoding is needed. In this case B still does not have SDP A when it sends INVITE to T, so it cannot pass that information on. When B finally receives SDP A, it has to send it to T, which means B sends an empty INVITE to T and gets a 200 OK with SDP TA+TB. In general that SDP TA+TB can be different from the one sent earlier, which is why B has to send the updated SDP TA to A, A sends a possibly updated SDP A back, and B sends that to T. On the other hand, if T happens to return the same SDP TA+TB, B can skip three of those messages. Implementors of transcoding services are therefore encouraged to return the same session description in the second answer as in the first in this type of scenario.

The deaf user, on receiving the call, invites the transcoder instead of answering the caller. The transcoder tells both sides where to send their media, and after that the call runs as two separate sessions with the translator in the middle. If the caller did not say what it could do, the description has to be passed along afterwards, and the transcoder is asked twice.

THE CALLEE'S INVOCATION OF A TRANSCODER, FROM RFC 4117
A, the callerT, the transcoderB, the callee
  1. INVITE SDP AA proposes a session that consists of one audio stream.
  2. INVITE SDP A+BB wants to send and receive only text, so it invites a transcoder that will do both speech-to-text and text-to-speech conversions.
  3. 200 OK SDP TA+TBThe transcoder answers with the addresses it will use to receive media from A and from B.
  4. ACK
  5. 200 OK SDP TAThe transcoder passes the answer back to A, with the addresses it will use for the audio stream.
  6. ACKA acknowledges, and the four media streams are established.

§3.3Other Ways of Invoking and of Receiving the Original Stream

Caller's invocation. In this scenario A wishes to establish a session with B using a transcoding service, and uses 3pcc to set up the session between T and B. The flow provided is slightly different from the ones in the 3pcc best current practices, because in that document the controller establishes a session between two user agents, which are the ones deciding the characteristics of the streams. Here, A wants to establish a session between T and B, but A wants to decide how many and which types of streams are established. That is why A sends its session description in the first INVITE to T, as opposed to the media-less initial INVITE recommended there. The memo does not give the session descriptions for this flow, since they are very similar to those in the earlier figure, and notes that if T returns the same SDP TA+TB as before, three of the messages can be skipped.

Receiving the original stream. Sometimes a user wants to receive both the original stream, for example audio, and the transcoded stream, for example the output of the speech-to-text conversion. One solution is to use the SDP group attribute with Flow Identification semantics, which allows a stream to be sent to two different transport addresses in parallel. The problem with that solution is that the majority of SIP user agents do not support Flow Identification, that only a small fraction of the few user agents that do support it also support sending simultaneous copies of the same media stream at the same time, and that Flow Identification forces both copies of the stream to use the same codec.

The memo therefore recommends that the transcoder, rather than a user agent, replicates the media stream. A transcoder receiving a session description with an audio stream for B, an audio stream for A marked as receive-only, and a text stream for A performs speech-to-text and text-to-speech conversions between the first audio stream and the text stream, and in addition copies the first audio stream to the second audio stream and sends it to A.

The caller can also be the one who brings the translator in, and then it gets to decide how many media streams the call has. A deaf user who wants to hear the original audio as well as read the text is better served if the translator makes the copy, because most phones cannot handle receiving one stream twice.

§3.5Parallel and Series Transcoders

Transcoding services in parallel. Transcoding services sometimes consist of human relays, for example a person performing speech-to-text and text-to-speech conversions for a session. If the same person is involved in both conversions, that is from A to B and from B to A, they have access to all of the conversation. To provide some degree of privacy, two different people are sometimes allocated to do the job, one handling A to B and the other B to A. This disposition is also useful for automated transcoding services, where one machine converts text to synthetic speech and another performs voice recognition. The scenario involves four different sessions: A-T1, T1-B, B-T2 and T2-A. A invokes T1 and T2, and the flow has A invite each transcoder in turn, then send one combined INVITE to B describing both directions, and B answers with a single session description for both. Four media streams are then established: text from A to T1, audio from T1 to B, audio from B to T2, and text from T2 to A. The memo notes that B, the user agent server, needs to support two media streams, one sendonly and one recvonly, and that some user agents, although they support a single sendrecv media stream, do not support a different media line per direction. Implementers are encouraged to build support for this feature.

Multiple transcoding services in series. In a distributed environment, a complex transcoding service, for example English text to Spanish speech, is often provided by several servers. One server performs English text to Spanish text translation, and its output is fed into a server that performs text-to-speech conversion. The flow shows A invoking T1 and T2, with the chain running A to T1, T1 to T2, and T2 to B, and the session descriptions naming the pair of streams at each hop.

Two arrangements cover most needs. In parallel, two different translators handle the two directions, so neither sees the whole conversation. In series, the output of one translator is the input of the next, which is how a document gets translated and then turned into speech.

TWO TRANSCODERS IN PARALLEL AND TWO IN SERIES
AspectIn parallelIn series
What it is forSplitting a conversion across two services, for privacy, or one machine for text-to-speech and another for speech-to-textChaining conversions, for example English text translated to Spanish text and then turned into speech
The sessions4: A-T1, T1-B, B-T2 and T2-A3: A-T1, T1-T2 and T2-B
What each side hearsEach transcoder only handles one directionThe output of one transcoder is the input of the next
The streams established4: text from A to T1, audio from T1 to B, audio from B to T2, and text from T2 to AOne stream per hop

§4Security Considerations

RFC 3725 discusses the security considerations that relate to the use of third party call control in SIP, and those considerations apply here, because this document describes how to use 3pcc to invoke a transcoding service.

In particular, RFC 3725 states that end-to-end media security is based on the exchange of keying material within SDP and depends on the controller behaving properly: the controller should not try to disable the security mechanisms offered by the other parties. As a result it is trivially possible for the controller to insert itself as an intermediary on the media exchange if it should so desire. In this document the controller is the user agent invoking the transcoder, and there is a media session established using 3pcc between the remote user agent and the transcoder. The attack described in RFC 3725 therefore does not constitute a threat, because the controller is the user agent invoking the transcoding service and it has access to the media anyway by definition. It seems unlikely that a user agent would attempt to launch an attack against its own session by disabling security between the transcoder and the remote user agent.

Regarding end-to-end media security from the user agents' point of view, the transcoder needs access to the media in order to perform its function, so by definition the transcoder behaves as a man in the middle. User agents that do not want a particular transcoder to have access to all the media exchanged between them can use a different transcoder for each direction, and can also use different transcoders for different media types.

Someone who can see both ends of a call could stop the encryption. Here the party doing the signalling is the caller itself, and it already has the media, so there is nothing to steal by doing that. The real point is that the translator has to see the media unencrypted, so anyone worried about that should use a different translator for each direction.

§7References