From d0b5f468b712c6a0605fe3d40f1922fb783b40e7 Mon Sep 17 00:00:00 2001 From: Peter Saint-Andre Date: Wed, 4 Jun 2008 21:47:14 +0000 Subject: [PATCH] 0.20 git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1910 4b5297f7-1745-476d-ba37-a9c6900126ab --- xep-0167.xml | 305 +++++++++++++++++++++++++++------------------------ 1 file changed, 164 insertions(+), 141 deletions(-) diff --git a/xep-0167.xml b/xep-0167.xml index 93821a8d..4d2dc115 100644 --- a/xep-0167.xml +++ b/xep-0167.xml @@ -6,8 +6,8 @@
- Jingle Audio via RTP - This specification defines a Jingle application type for negotiating a voice chat or other audio session. The application type uses the Real-time Transport Protocol (RTP) for the underlying media exchange and provides a straightforward mapping to Session Description Protocol (SDP) for interworking with SIP media endpoints. + Jingle RTP Sessions + This specification defines a Jingle application type for negotiating a session that uses the Real-time Transport Protocol (RTP) to exchange media such as voice or video. The application type includes a straightforward mapping to Session Description Protocol (SDP) for interworking with SIP media endpoints. &LEGALNOTICE; 0167 Proposed @@ -25,6 +25,12 @@ &stpeter; &seanegan; &robmcqueen; + + 0.20 + 2008-06-04 + psa +

In accordance with list consensus, generalized to cover all RTP media, not just audio; corrected text regarding payload types sent by responder in order to match SDP approach.

+
0.19 2008-05-28 @@ -160,39 +166,39 @@
-

&xep0166; can be used to initiate and negotiate a wide range of peer-to-peer sessions. One session type of interest is audio chat. This document specifies an application format for negotiating Jingle audio sessions, where the media is exchanged over the Realtime Transport Protocol (RTP; see &rfc3550;).

+

&xep0166; can be used to initiate and negotiate a wide range of peer-to-peer sessions. One session type of interest is media such as voice or video. This document specifies an application format for negotiating Jingle media sessions, where the media is exchanged over the Realtime Transport Protocol (RTP; see &rfc3550;).

The Jingle application format defined herein is designed to meet the following requirements:

    -
  1. Enable negotiation of parameters necessary for audio chat over Realtime Transport Protocol (RTP).
  2. +
  3. Enable negotiation of parameters necessary for media sessions using the Realtime Transport Protocol (RTP).
  4. Map these parameters to Session Description Protocol (SDP; see &rfc4566;) to enable interoperability.
  5. -
  6. Define informational messages related to audio chat (e.g., ringing, on hold, on mute).
  7. +
  8. Define informational messages related to typical RTP uses such as audio chat and video chat (e.g., ringing, on hold, on mute).
-

In accordance with Section 8 of XEP-0166, this document specifies the following information related to the Jingle Audio via RTP application type:

+

In accordance with Section 8 of XEP-0166, this document specifies the following information related to the Jingle RTP application type:

    -
  1. The application format negotiation process is defined in the Negotiating a Jingle Audio Session section of this document.

  2. +
  3. The application format negotiation process is defined in the Negotiating a Jingle RTP Session section of this document.

  4. The semantics of the &DESCRIPTION; element are defined in the Application Format section of this document.

  5. A mapping of Jingle semantics to the Session Description Protocol is provided in the Mapping to Session Description Protocol section of this document.

  6. -
  7. A Jingle audio session SHOULD use a lossy transport method such as &xep0177; or the "ice-udp" method specified in &xep0176;, but MAY use a reliable transport such as "ice-tcp" if a low-bandwidth codec is employed.

  8. +
  9. A Jingle RTP session SHOULD use a lossy transport method such as &xep0177; or the "ice-udp" method specified in &xep0176;, but MAY use a reliable transport such as "ice-tcp" if a low-bandwidth codec is employed.

  10. Content is to be sent and received as follows:

      -
    • For lossy transports, outbound audio content shall be encoded into RTP packets and each packet shall be sent individually over the transport. Each inbound packet received over the transport is an RTP packet.

    • -
    • For reliable transports, outbound audio content shall be encoded into RTP packets and each packet data shall be sent in succession over the transport. Incoming data received over the transport shall be processed as a stream of RTP packets, where each RTP packet boundary marks the location of the next packet.

    • +
    • For lossy transports, outbound content shall be encoded into RTP packets and each packet shall be sent individually over the transport. Each inbound packet received over the transport is an RTP packet.

    • +
    • For reliable transports, outbound content shall be encoded into RTP packets and each packet data shall be sent in succession over the transport. Incoming data received over the transport shall be processed as a stream of RTP packets, where each RTP packet boundary marks the location of the next packet.

-

A Jingle audio session is described by a content type that contains one application format and one transport method. The application format consists of one or more encodings contained within a wrapper <description/> element qualified by the 'urn:xmpp:tmp:jingle:apps:audio-rtp' namespace &NSNOTE;. In the language of RFC 4566 each encoding is a payload-type; therefore, each <payload-type/> element specifies an encoding that can be used for the audio stream, as illustrated in the following example.

- +

A Jingle RTP session is described by a content type that contains one application format and one transport method. The application format consists of one or more encodings contained within a wrapper <description/> element qualified by the 'urn:xmpp:tmp:jingle:apps:rtp' namespace &NSNOTE;. In the language of RFC 4566 each encoding is a payload-type; therefore, each <payload-type/> element specifies an encoding that can be used for the RTP stream, as illustrated in the following example.

+ @@ -206,6 +212,7 @@ ]]>

The &DESCRIPTION; element is intended to be a child of a &CONTENT; element as specified in XEP-0166.

+

The &DESCRIPTION; element MUST possess a 'media' attribute that specifies the media type, such as "audio" or "video".

The &DESCRIPTION; element SHOULD possess a 'profile' attribute that specifies the profile of RTP in use as would be encapsulated in SDP (e.g., "RTP/AVP" or "UDP/TLS/RTP/SAVP"). If not included, the default value of "RTP/AVP" MUST be assumed.

The encodings SHOULD be provided in order of preference by placing the most-preferred &PAYLOADTYPE; element as the first child of the &DESCRIPTION; element (etc.).

The allowable attributes of the &PAYLOADTYPE; element are as follows:

@@ -242,7 +249,7 @@ name - The appropriate subtype of the audio MIME type + The appropriate subtype of the MIME type string RECOMMENDED for static payload types, REQUIRED for dynamic payload types @@ -253,7 +260,7 @@ OPTIONAL -

In Jingle Audio, the encodings are used in the context of RTP. The most common encodings for the Audio/Video Profile (AVP) of RTP are listed in &rfc3551; (these "static" types are reserved from payload ID 0 through payload ID 95), although other encodings are allowed (these "dynamic" types use payload IDs 96 to 127) in accordance with the dynamic assignment rules described in Section 3 of RFC 3551. The payload IDs are represented in the 'id' attribute.

+

In Jingle RTP, the encodings are used in the context of RTP. The most common encodings for the Audio/Video Profile (AVP) of RTP are listed in &rfc3551; (these "static" types are reserved from payload ID 0 through payload ID 95), although other encodings are allowed (these "dynamic" types use payload IDs 96 to 127) in accordance with the dynamic assignment rules described in Section 3 of RFC 3551. The payload IDs are represented in the 'id' attribute.

Each <payload-type/> element MAY contain one or more child elements that specify particular parameters related to the payload. For example, as described in &rtpspeex;, the "cng", "mode", and "vbr" parameters may be specified in relation to usage of the Speex See <http://www.speex.org/>. codec. Where such parameters are encoded via the "fmtp" SDP attribute, they shall be represented in Jingle via the following format:

@@ -261,22 +268,41 @@

Note: The parameter names are effectively guaranteed to be unique, since &IANA; maintains a registry of SDP parameters (see <http://www.iana.org/assignments/sdp-parameters>).

- -

When the initiator sends a session-initiate stanza to the responder, the &DESCRIPTION; element includes all of the payload types that the initiator can send and/or receive for Jingle audio, each one encapsulated in a separate &PAYLOADTYPE; element (the rules specified in &rfc3264; SHOULD be followed regarding inclusion of payload types).

+ +

In general, the process for negotiating a Jingle RTP session is as follows:

+ | + | ack | + |<----------------------------| + | [transport negotiation] | + |<--------------------------->| + | session-accept | + |<----------------------------| + | ack | + |---------------------------->| + | AUDIO (RTP) | + |<===========================>| + | | + ]]> +

When the initiator sends a session-initiate stanza to the responder, the &DESCRIPTION; element includes all of the payload types that the initiator can send and/or receive for Jingle RTP, each one encapsulated in a separate &PAYLOADTYPE; element (the rules specified in &rfc3264; SHOULD be followed regarding inclusion of payload types).

action='session-initiate' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - - + + + @@ -289,43 +315,12 @@

If there is no error, the responder acknowledges the session initiation request.

]]> -

If the responder wishes to accept the session, it MUST send a content-accept action to the initiator, which SHOULD include a list of the payload types that it can send and/or receive. The list that the responder sends MAY include any payload types (not a subset of the payload types sent by the initiator) but SHOULD retain the ID numbers specified by the initiator. The order of the &PAYLOADTYPE; elements indicates the responder's preferences, with the most-preferred types first.

- - - action='content-accept' - initiator='romeo@montague.net/orchard' - sid='a73sjjvkla37jfea'> - - - - - - - - - - - - - - - ]]> -

The initiator acknowledges the content-accept action:

- - ]]> -

After successful transport negotiation (not shown here), the responder then accepts the session:

+

After successful transport negotiation (not shown here), the responder accepts the session by sending a session-accept action to the initiator. The session-accept SHOULD include a subset of the payload types sent by the initiator, i.e., a list of the offered payload types that the responder can send and/or receive. The list that the responder sends SHOULD retain the ID numbers specified by the initiator. The order of the &PAYLOADTYPE; elements indicates the responder's preferences, with the most-preferred types first.

+

In the following example, we imagine that the responder supports Speex at clockrate of 8000 but not 16000, G729, and PCMU but not PMCA. Therefore the responder returns only two payload types.

- - + + - - - - - ]]> +

The initiator and responder would then exchange media using any of the codecs that meet the following criteria:

+
    +
  • If the directionality is "sendonly" then the initiator may use any codec that it can send and the responder can receive.
  • +
  • If the directionality is "recvonly" then the responder may use any codec that it can send and the initiator can receive.
  • +
  • If the directionality is "sendrecv" then the parties may use any codec that both parties can send and receive.
  • +
-

The SDP media type for Jingle Audio via RTP is "audio" (see Section 8.2.1 of RFC 4566).

+

The SDP media type for Jingle RTP is "audio" (see Section 8.2.1 of RFC 4566) for audio media, "video" (see Section 8.2.1 of RFC 4566) for video media, etc.

If the payload type is static (payload-type IDs 0 through 95 inclusive), it MUST be mapped to a media field defined in RFC 4566. The generic format for the media field is as follows:

]]> -

In the context of Jingle audio sessions, the <media> is "audio", the <port> is the preferred port for such communications (which may be determined dynamically), the <transport> is whatever profile is negotiated via the 'profile' attribute of the &CONTENT; element in the Jingle negotiation (e.g., "RTP/AVP"), and the <fmt list> is the payload-type ID.

+

In the context of Jingle audio sessions, the <media> is "audio" or "video" or some other media type, the <port> is the preferred port for such communications (which may be determined dynamically), the <transport> is whatever profile is negotiated via the 'profile' attribute of the &CONTENT; element in the Jingle negotiation (e.g., "RTP/AVP"), and the <fmt list> is the payload-type ID.

For example, consider the following static payload-type:

@@ -398,24 +394,41 @@ m=audio 9999 RTP/AVP 96 a=rtpmap:96 speex/16000 ]]>

As noted, if additional parameters are to be specified, they shall be represented as attributes of the <parameter/> child of the &PAYLOADTYPE; element, as in the following example.

- ]]>

That Jingle-formatted information would be mapped to SDP as follows:

- +

The formatting is similar for video parameters, as shown in the following example.

+ + + + + + + + ]]> +

That Jingle-formatted information would be mapped to SDP as follows:

+
-

Informational messages may be sent by either party within the context of Jingle to communicate the status of a Jingle audio session, device, or principal. The informational message MUST be an IQ-set containing a &JINGLE; element of type "session-info", where the informational message is a payload element qualified by the 'urn:xmpp:tmp:jingle:apps:audio-rtp:info' namespace; the following payload elements are defined: A <trying/> element (equivalent to the SIP 100 Trying response code) is not necessary, since each session-level action is acknowledged via XMPP IQ semantics.

+

Informational messages may be sent by either party within the context of Jingle to communicate the status of a Jingle RTP session, device, or principal. The informational message MUST be an IQ-set containing a &JINGLE; element of type "session-info", where the informational message is a payload element qualified by the 'urn:xmpp:tmp:jingle:apps:rtp:info' namespace; the following payload elements are defined: A <trying/> element (equivalent to the SIP 100 Trying response code) is not necessary, since each session-level action is acknowledged via XMPP IQ semantics.

@@ -431,7 +444,7 @@ a=fmtp:96 vbr=on;cng=on - + @@ -450,7 +463,7 @@ a=fmtp:96 vbr=on;cng=on action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -463,7 +476,7 @@ a=fmtp:96 vbr=on;cng=on action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -476,7 +489,7 @@ a=fmtp:96 vbr=on;cng=on action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -489,7 +502,7 @@ a=fmtp:96 vbr=on;cng=on action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -497,7 +510,7 @@ a=fmtp:96 vbr=on;cng=on -

If an entity supports Jingle audio exchanges via RTP, it MUST advertise that fact by returning a feature of "urn:xmpp:tmp:jingle:apps:audio-rtp" &NSNOTE; in response to &xep0030; information requests.

+

If an entity supports Jingle RTP session, it MUST advertise that fact by returning a feature of "urn:xmpp:tmp:jingle:apps:rtp" &NSNOTE; in response to &xep0030; information requests.

... - + ... @@ -523,7 +536,7 @@ a=fmtp:96 vbr=on;cng=on
-

The following sections show a number of Jingle audio scenarios, in relative order of complexity.

+

The following sections show a number of Jingle RTP scenarios, in relative order of complexity.

In this scenario, Romeo initiates a voice chat with Juliet but she is otherwise engaged.

The session flow is as follows:

@@ -555,8 +568,8 @@ Romeo Juliet action='session-initiate' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> - - + + @@ -583,7 +596,7 @@ Romeo Juliet action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -658,8 +671,8 @@ Romeo Juliet action='session-initiate' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> - - + + @@ -686,7 +699,7 @@ Romeo Juliet action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -707,15 +720,10 @@ Romeo Juliet initiator='romeo@montague.lit/orchard' responder='juliet@capulet.lit/balcony' sid='a73sjjvkla37jfea'> - - + + - - - - - - - + + @@ -845,8 +853,8 @@ Romeo Juliet - - + + @@ -876,7 +884,7 @@ Romeo Juliet action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -896,7 +904,7 @@ Romeo Juliet action='content-remove' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -918,15 +926,10 @@ Romeo Juliet initiator='romeo@montague.lit/orchard' responder='juliet@capulet.lit/balcony' sid='a73sjjvkla37jfea'> - - + + - - - - - - + ]]> @@ -987,7 +990,7 @@ Romeo Juliet action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -1008,8 +1011,8 @@ Romeo Juliet action='content-add' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> - - + + @@ -1039,15 +1042,14 @@ Romeo Juliet action='content-accept' initiator='romeo@montague.lit/orchard' sid='a73sjjvkla37jfea'> - - + + - @@ -1061,7 +1063,7 @@ Romeo Juliet to='romeo@montague.lit/orchard' type='result'/> ]]> -

The media session proceeds. Now they would exchange both audio and video, where the audio is exchanged the Speex codec at a clockrate of 8000 and the video is exchanged using the Theora codec with a height of 720 pixels, a width of 1280 pixels, and so on.

+

The media session proceeds. Now they would exchange both audio and video, where the audio is exchanged via the Speex codec at a clockrate of 8000 and the video is exchanged using the Theora codec with a height of 720 pixels, a width of 1280 pixels, and so on.

The parties may continue the session as long as desired.

Eventually, one of the parties terminates the session.

- - + + @@ -1156,7 +1158,7 @@ Romeo Juliet action='session-info' initiator='romeo@montague.net/orchard' sid='a73sjjvkla37jfea'> - + ]]> @@ -1177,15 +1179,10 @@ Romeo Juliet initiator='romeo@montague.lit/orchard' responder='juliet@capulet.lit/balcony' sid='a73sjjvkla37jfea'> - - + + - - - - - - - -

For the sake of interoperability with a wide variety of free and open-source implementations as well as deployment of patent-free technologies, support for the Speex codec is RECOMMENDED.

+ + + +

For the sake of interoperability with a wide variety of free and open-source voice systems as well as deployment of patent-free technologies, support for the Speex codec is RECOMMENDED.

+
+ +

For the sake of interoperability with the public switched telephone network (PSTN) and most VoIP providers, support for the Pulse Code Modulation (PCM) codec defined in &ITU; recommendation G.711 is RECOMMENDED, including both the μ-law ("U-law") and A-law versions widely deployed in North America and Japan and in the rest of the world respectively.

+
- -

For the sake of interoperability with the public switched telephone network (PSTN) and most VoIP providers, support for the Pulse Code Modulation (PCM) codec defined in &ITU; recommendation G.711 is RECOMMENDED, including both the μ-law ("U-law") and A-law versions widely deployed in North America and Japan and in the rest of the world respectively.

+ +

If it is necessary to send Dual Tone Multi-Frequency (DTMF) tones in the content of audio exchanges, it is RECOMMENDED to use the XML format specified &xep0181;. However, an implementation MAY also support native RTP methods, specifically the "audio/telephone-event" and "audio/tone" media types.

+
+ +

When the Jingle RTP content type is accepted via a session-accept action, both initiator and responder SHOULD start listening for audio as defined by the negotiated transport method and audio application format. For interoperability with telephony systems, after the responder acknowledges the session initiation request, the responder SHOULD send a "ringing" message and both parties SHOULD play any audio received.

- -

If it is necessary to send Dual Tone Multi-Frequency (DTMF) tones, it is REQUIRED to use the XML format specified &xep0181;.

-
- -

When the Jingle Audio content type is accepted via a content-accept action, both initiator and responder SHOULD start listening for audio as defined by the negotiated transport method and audio application format. For interoperability with telephony systems, after the responder acknowledges the session initiation request, the responder SHOULD send a "ringing" message and both parties SHOULD play any audio received.

+ + +

Support for the Theora codec is RECOMMENDED.

+
@@ -1273,24 +1277,40 @@ Romeo Juliet

Until this specification advances to a status of Draft, its associated namespaces shall be:

    -
  • urn:xmpp:tmp:jingle:apps:audio-rtp
  • -
  • urn:xmpp:tmp:jingle:apps:audio-rtp:errors
  • -
  • urn:xmpp:tmp:jingle:apps:audio-rtp-info
  • +
  • urn:xmpp:tmp:jingle:apps:rtp
  • +
  • urn:xmpp:tmp:jingle:apps:rtp:errors
  • +
  • urn:xmpp:tmp:jingle:apps:rtp-info

Upon advancement of this specification, the ®ISTRAR; shall issue permanent namespaces in accordance with the process defined in Section 4 of &xep0053;.

The following namespaces are requested, and are thought to be unique per the XMPP Registrar's requirements:

    -
  • urn:xmpp:jingle:app:audio-rtp
  • -
  • urn:xmpp:jingle:app:audio-rtp:errors
  • -
  • urn:xmpp:jingle:app:audio-rtp:info
  • +
  • urn:xmpp:jingle:app:rtp
  • +
  • urn:xmpp:jingle:app:rtp:errors
  • +
  • urn:xmpp:jingle:app:rtp:info
+ +

For each RTP media type that an entity supports, it MUST advertise support for the "urn:xmpp:tmp:jingle:apps:rtp#[media]" feature, where the string "[media]" is replaced by the appropriate media type such as "audio" or "video".

+

The initial registry submission is as follows.

+ + urn:xmpp:tmp:jingle:apps:rtp#audio + Signals support for audio sessions via RTP + XEP-0167 + + + urn:xmpp:tmp:jingle:apps:rtp#video + Signals support for video sessions via RTP + XEP-0167 + + ]]> +
-

The XMPP Registrar shall include "audio-rtp" in its registry of Jingle application formats. The registry submission is as follows:

+

The XMPP Registrar shall include "rtp" in its registry of Jingle application formats. The registry submission is as follows:

- audio-rtp - Jingle sessions that support audio exchange via the Real-time Transport Protocol + rtp + Jingle sessions that support media exchange via the Real-time Transport Protocol lossy XEP-0167 @@ -1305,8 +1325,8 @@ Romeo Juliet @@ -1358,8 +1378,8 @@ Romeo Juliet @@ -1377,4 +1397,7 @@ Romeo Juliet ]]>
+ +

Thanks to Milton Chen, Diana Cionoiu, Olivier Crête, Tim Julien, Steffen Larsen, Robert McQueen, Mike Ruprecht, and Paul Witty for their feedback.

+
Element
<mute/>The principal is temporarily stopping audio output but continues to accept audio input.The principal is temporarily stopping media output but continues to accept media input.
<ringing/>