1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2112 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-08-01 03:47:45 +00:00
parent 66fd54e33e
commit e905816570

View File

@ -10,7 +10,7 @@
<abstract>This specification defines a Jingle application type for negotiating one or more sessions that use 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.</abstract>
&LEGALNOTICE;
<number>0167</number>
<status>Proposed</status>
<status>Experimental</status>
<type>Standards Track</type>
<sig>Standards</sig>
<approver>Council</approver>
@ -25,6 +25,12 @@
&stpeter;
&seanegan;
&robmcqueen;
<revision>
<version>0.23</version>
<date>2008-07-31</date>
<initials>ram/psa</initials>
<remark><p>Removed profile attribute; modified secure session establishment to align with SRTP usage.</p></remark>
</revision>
<revision>
<version>0.22</version>
<date>2008-06-09</date>
@ -226,7 +232,6 @@
]]></example>
<p>The &DESCRIPTION; element is intended to be a child of a &CONTENT; element as specified in <cite>XEP-0166</cite>.</p>
<p>The &DESCRIPTION; element MUST possess a 'media' attribute that specifies the media type, such as "audio" or "video".</p>
<p>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.</p>
<p>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.).</p>
<p>The allowable attributes of the &PAYLOADTYPE; element are as follows:</p>
<table caption='Payload-Type Attributes'>
@ -312,7 +317,7 @@ Initiator Responder
initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='96' name='speex' clockrate='16000'/>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
@ -328,10 +333,10 @@ Initiator Responder
<p>Upon receiving the session-initiate stanza, the responder determines whether it can proceed with the negotiation. The general Jingle error cases are specified in <cite>XEP-0166</cite> and illustrated in the <link url='#scenarios'>Scenarios</link> section of this document.</p>
<p>If there is no error, the responder acknowledges the session initiation request.</p>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<iq from='juliet@capulet.com/balcony'
id='jingle1'
to='romeo@montague.net/orchard'
type='result'/>
<iq from='juliet@capulet.com/balcony'
id='jingle1'
to='romeo@montague.net/orchard'
type='result'/>
]]></example>
<p>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.</p>
<p>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.</p>
@ -346,7 +351,7 @@ Initiator Responder
responder='juliet@capulet.com/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
</description>
@ -369,10 +374,10 @@ Initiator Responder
]]></example>
<p>And the initiator acknowledges session acceptance:</p>
<example caption="Initiator acknowledges session acceptance"><![CDATA[
<iq from='romeo@montague.net/orchard'
id='accept1'
to='juliet@capulet.com/balcony'
type='result'/>
<iq from='romeo@montague.net/orchard'
id='accept1'
to='juliet@capulet.com/balcony'
type='result'/>
]]></example>
<p>The initiator and responder would then exchange media using any of the codecs that meet the following criteria:</p>
<ul>
@ -388,7 +393,7 @@ Initiator Responder
<code><![CDATA[
m=<media> <port> <transport> <fmt list>
]]></code>
<p>In the context of Jingle audio sessions, the &lt;media&gt; is "audio" or "video" or some other media type, the &lt;port&gt; is the preferred port for such communications (which may be determined dynamically), the &lt;transport&gt; is whatever profile is negotiated via the 'profile' attribute of the &CONTENT; element in the Jingle negotiation (e.g., "RTP/AVP"), and the &lt;fmt list&gt; is the payload-type ID.</p>
<p>In the context of Jingle audio sessions, the &lt;media&gt; is "audio" or "video" or some other media type, the &lt;port&gt; is the preferred port for such communications (which may be determined dynamically), and the &lt;fmt list&gt; is the payload-type ID.</p>
<p>For example, consider the following static payload-type:</p>
<example caption="Jingle format for static payload-type"><![CDATA[
<payload-type id="13" name="CN"/>
@ -440,6 +445,32 @@ delivery-method=inline; configuration=somebase16string;
]]></example>
</section1>
<section1 topic='Negotiation of SRTP' anchor='srtp'>
<p>&rfc3711; defines the Secure Real-time Transport Protocol, and &rfc4568; defines the SDP "crypto" attribute for signalling and negotiating the use of SRTP in the context of offer-answer protocols such as SIP. To enable the use of SRTP and gatewaying to non-XMPP technologies that make use of the "crypto" SDP attribute, we define a corresponding &lt;crypto/&gt; element qualified by the 'urn:xmpp:tmp:jingle:apps:rtp' namespace.</p>
<p>If the initiator wishes to use SRTP, the session-initiate MUST include at least one &lt;crypto/&gt; element and MAY multiple instances of the element. The &lt;crypto/&gt; element MUST be a child of the &lt;description/&gt; element.</p>
<p>The XML attributes of the &lt;crypto/&gt; element are as follows:</p>
<ul>
<li>crypto-suite -- this maps to the SDP "crypto-suite" parameter and has the same semantics (i.e., it is an identifier that describes the encryption and authentication algorithms).</li>
<li>key-params -- this maps to the SDP "key-params" parameter and has the same semantics (i.e., it provides one or more sets of keying material for the crypto-suite in question).</li>
<li>session-params -- this maps to the SDP "session-params" parameter and has the same semantics (i.e., it provides transport-specific parameters for SRTP negotiation).</li>
<li>tag -- this maps to the SDP "tag" parameter and has the same semantics (i.e., it is a decimal number used as an identifier for a particular crypto element).</li>
</ul>
<p>An example follows.</p>
<example caption="The crypto element"><![CDATA[
<crypto
crypto-suite='AES_CM_128_HMAC_SHA1_80'
key-params='inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|220|1:32'
session-params='KDR=1;UNENCRYPTED_SRTCP'
tag='1'/>
]]></example>
<p>The mapping to SDP is as follows.</p>
<example caption="SDP mapping of the crypto element"><![CDATA[
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|2^20|1:32
]]></example>
<p>When the responder receives a session-initiate action containing one or more instances of the &lt;crypto/&gt; element, it MUST either accept one of the &lt;crypto/&gt; elements or reject the offer by sending a session-terminate action with a reason of &lt;invalid-crypto/&gt;.</p>
</section1>
<section1 topic='Informational Messages' anchor='info'>
<section2 topic='Format' anchor='info-format'>
<p>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: <note>A &lt;trying/&gt; element (equivalent to the SIP 100 Trying response code) is not necessary, since each session-level action is acknowledged via XMPP IQ semantics.</note></p>
@ -583,7 +614,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='96' name='speex' clockrate='16000'/>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
@ -630,7 +661,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<reason>
<condition><busy/></condition>
<busy/>
<text>No time to chat right now!</text>
</reason>
</jingle>
@ -644,7 +675,7 @@ Romeo Juliet
type='result'/>
]]></example>
</section2>
<section2 topic='Jingle Audio via RTP/AVP, Negotiated with ICE-UDP' anchor='scenarios-voicechat'>
<section2 topic='Jingle Audio via RTP, Negotiated with ICE-UDP' anchor='scenarios-voicechat'>
<p>In this scenario, Romeo initiates a voice chat with Juliet using a transport method of ICE-UDP. The parties also exchange informational messages.</p>
<p>The session flow is as follows:</p>
<code><![CDATA[
@ -662,7 +693,7 @@ Romeo Juliet
| (with acks) |
|<--------------------------->|
| STUN connectivity checks |
|<--------------------------->|
|<===========================>|
| session-accept |
|<----------------------------|
| ack |
@ -686,7 +717,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='96' name='speex' clockrate='16000'/>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
@ -735,7 +766,7 @@ Romeo Juliet
responder='juliet@capulet.lit/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
</description>
@ -780,7 +811,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<reason>
<condition><no-error/></condition>
<no-error/>
<text>Sorry, gotta go!</text>
</reason>
</jingle>
@ -794,7 +825,7 @@ Romeo Juliet
type='result'/>
]]></example>
</section2>
<section2 topic='Jingle Audio and Video via RTP/AVP, Negotiated with ICE-UDP' anchor='scenarios-audiovideo'>
<section2 topic='Jingle Audio and Video via RTP, Negotiated with ICE-UDP' anchor='scenarios-audiovideo'>
<p>In this scenario, Romeo initiates a combined audio and video chat with Juliet using a transport method of ICE-UDP. Juliet at first refuses the video portion, then later offers to add video, which Romeo accepts. The parties also exchange various informational messages</p>
<p>The session flow is as follows:</p>
<code><![CDATA[
@ -816,7 +847,7 @@ Romeo Juliet
| (with acks) |
|<--------------------------->|
| STUN connectivity checks |
|<--------------------------->|
|<===========================>|
| session-accept |
|<----------------------------|
| ack |
@ -858,7 +889,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='96' name='speex' clockrate='16000'/>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
@ -868,7 +899,7 @@ Romeo Juliet
<transport xmlns='urn:xmpp:tmp:jingle:transports:ice-udp'/>
</content>
<content creator='initiator' name='webcam'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='video' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='video'>
<payload-type id='98' name='theora' clockrate='90000' height='720' width='1280'>
<parameter name='delivery-method' value='inline'/>
<parameter name='configuration' value='somebase16string'/>
@ -941,7 +972,7 @@ Romeo Juliet
responder='juliet@capulet.lit/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
</description>
@ -1026,7 +1057,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='responder' name='webcam'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='video' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='video'>
<payload-type id='98' name='theora' height='720' width='1280'>
<parameter name='delivery-method' value='inline'/>
<parameter name='configuration' value='somebase16string'/>
@ -1057,7 +1088,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='responder' name='webcam'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='video' profile='RTP/AVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='video'>
<payload-type id='98' name='theora' height='720' width='1280'>
<parameter name='delivery-method' value='inline'/>
<parameter name='configuration' value='somebase16string'/>
@ -1090,7 +1121,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<reason>
<condition><busy/></condition>
<busy/>
<text>I&apos;m outta here!</text>
</reason>
</jingle>
@ -1103,8 +1134,8 @@ Romeo Juliet
type='result'/>
]]></example>
</section2>
<section2 topic='Secure Jingle Audio via UDP/TLS/RTP/SAVP, Negotiated with ICE-UDP' anchor='scenarios-secure'>
<p>In this scenario, Romeo initiates a voice chat with Juliet using a secure transport as specified in &sdpdtls; (via a profile of "UDP/TLS/RTP/SAVP").</p>
<section2 topic='Jingle Audio via SRTP, Negotiated with ICE-UDP' anchor='scenarios-srtp'>
<p>In this scenario, Romeo initiates a secure voice chat with Juliet using a transport method of ICE-UDP. The parties also exchange informational messages.</p>
<p>The session flow is as follows:</p>
<code><![CDATA[
Romeo Juliet
@ -1121,7 +1152,7 @@ Romeo Juliet
| (with acks) |
|<--------------------------->|
| STUN connectivity checks |
|<--------------------------->|
|<===========================>|
| session-accept |
|<----------------------------|
| ack |
@ -1145,21 +1176,26 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='UDP/TLS/RTP/SAVP'/>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='96' name='speex' clockrate='16000'/>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
<payload-type id='103' name='L16' clockrate='16000' channels='2'/>
<payload-type id='98' name='x-ISAC' clockrate='8000'/>
<crypto
crypto-suite='AES_CM_128_HMAC_SHA1_80'
key-params='inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|220|1:32'
session-params='KDR=1;UNENCRYPTED_SRTCP'
tag='1'/>
</description>
<transport xmlns='urn:xmpp:tmp:jingle:transports:ice-udp'/>
</content>
</jingle>
</iq>
]]></example>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<example caption="Responder sends provisional acceptance"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='jingle1'
id='accept1'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
@ -1194,9 +1230,14 @@ Romeo Juliet
responder='juliet@capulet.lit/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio' profile='UDP/TLS/RTP/SAVP'>
<description xmlns='urn:xmpp:tmp:jingle:apps:rtp' media='audio'>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
<crypto
crypto-suite='AES_CM_128_HMAC_SHA1_80'
key-params='inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|220|1:32'
session-params='KDR=1;UNENCRYPTED_SRTCP'
tag='1'/>
</description>
<transport xmlns='urn:xmpp:tmp:jingle:transports:ice-udp'>
<candidate component='1'
@ -1229,7 +1270,7 @@ Romeo Juliet
<p>The parties now begin to exchange media. In this case they would exchange audio using the Speex codec at a clockrate of 8000 since that is the highest-priority codec for the responder (as determined by the XML order of the &PAYLOADTYPE; children).</p>
<p>The parties may continue the session as long as desired.</p>
<p>Eventually, one of the parties terminates the session.</p>
<example caption="Responder terminates the session"><![CDATA[
<example caption="Responder terminates the session"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='term1'
to='romeo@montague.lit/orchard'
@ -1239,7 +1280,7 @@ Romeo Juliet
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<reason>
<condition><no-error/></condition>
<no-error/>
<text>Sorry, gotta go!</text>
</reason>
</jingle>
@ -1280,7 +1321,7 @@ Romeo Juliet
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method and media being exchanged; for example, in the case of UDP, that would include Datagram Transport Layer Security (DTLS) as specified in &rfc4347;. The work-in-progress <cite>draft-fishl-mmusic-sdp-dtls</cite> defines such methods for the Session Description Protocol; the relevant RTP profile (e.g., "UDP/TLS/RTP/SAVP" for transporting the RTP stream over DTLS with UDP) shall be specified as the value of the &CONTENT; element's 'profile' attribute.</p>
<p>In order to secure the data stream, implementations SHOULD use encryption methods appropriate to the transport method and media being exchanged. Such encryption methods are out of scope for this specification.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
@ -1345,37 +1386,42 @@ Romeo Juliet
<xs:element name='description'>
<xs:complexType>
<xs:sequence minOccurs='0' maxOccurs='unbounded'/>
<xs:element ref='payload-type'/>
<xs:sequence>
<xs:element name='payload-type'
type='payloadElementType'
minOccurs='0'
maxOccurs='unbounded'/>
<xs:element name='crypto'
type='cryptoElementType'
minOccurs='0'
maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute name='profile' use='optional' type='xs:string' default='RTP/AVP'/>
</xs:complexType>
</xs:element>
<xs:element name='payload-type'>
<xs:complexType>
<xs:sequence minOccurs='0' maxOccurs='unbounded'>
<xs:element ref='parameter'/>
</xs:sequence>
<xs:attribute name='channels' type='xs:byte' use='optional' default='1'/>
<xs:attribute name='clockrate' type='xs:short' use='optional'/>
<xs:attribute name='id' type='xs:unsignedByte' use='required'/>
<xs:attribute name='maxptime' type='xs:short' use='optional'/>
<xs:attribute name='name' type='xs:string' use='optional'/>
<xs:attribute name='ptime' type='xs:short' use='optional'/>
</xs:complexType>
</xs:element>
<xs:complexType name='payloadElementType'>
<xs:sequence>
<xs:element name='parameter'
type='parameterElementType'
minOccurs='0'
maxOccurs='unbounded'/>
</xs:sequence>
<xs:attribute name='channels' type='xs:byte' use='optional' default='1'/>
<xs:attribute name='clockrate' type='xs:short' use='optional'/>
<xs:attribute name='id' type='xs:unsignedByte' use='required'/>
<xs:attribute name='maxptime' type='xs:short' use='optional'/>
<xs:attribute name='name' type='xs:string' use='optional'/>
<xs:attribute name='ptime' type='xs:short' use='optional'/>
</xs:complexType>
<xs:element name='parameter'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='empty'>
<xs:attribute name='name' type='xs:string' use='required'/>
<xs:attribute name='value' type='xs:string' use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:complexType name='parameterElementType'>
<xs:simpleContent>
<xs:extension base='empty'>
<xs:attribute name='name' type='xs:string' use='required'/>
<xs:attribute name='value' type='xs:string' use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
@ -1431,6 +1477,6 @@ Romeo Juliet
</section2>
</section1>
<section1 topic='Acknowledgements' anchor='ack'>
<p>Thanks to Milton Chen, Diana Cionoiu, Olivier Cr&#234;te, Tim Julien, Steffen Larsen, Robert McQueen, Jeff Muller, Mike Ruprecht, and Paul Witty for their feedback.</p>
<p>Thanks to Milton Chen, Diana Cionoiu, Olivier Cr&#234;te, Tim Julien, Steffen Larsen, Jeff Muller, Mike Ruprecht, and Paul Witty for their feedback.</p>
</section1>
</xep>