git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@2262 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-09-25 16:22:09 +00:00
parent 5deb147140
commit c74e0b3987
1 changed files with 223 additions and 38 deletions

View File

@ -28,14 +28,14 @@
&diana;
<revision>
<version>0.24</version>
<date>2008-09-24</date>
<date>2008-09-25</date>
<initials>psa/dc</initials>
<remark>
<ul>
<li>Defined handling of early media.</li>
<li>Defined handling of early media, including mappings to RFC 3959 and RFC 3960 using the newly-defined 'disposition' attribute for the &lt;content/&gt; element in XEP-0166.</li>
<li>Clarified handling of SRTP negotiation.</li>
<li>Defined invalid-crypto error condition.</li>
<li>Changed DTMF text to prefer native RTP methods and not recommend sending of DTMF in the XMPP signalling channel.</li>
<li>More fully specified invalid-crypto error condition.</li>
<li>Changed DTMF text to prefer native RTP methods and not recommend sending of DTMF in the XMPP signalling channel, per XEP-0181.</li>
<li>Modified namespaces to incorporate namespace versioning.</li>
<li>Cleaned up XML schemas.</li>
</ul>
@ -470,39 +470,18 @@ delivery-method=inline; configuration=somebase16string;
</section1>
<section1 topic='Early Media' anchor='earlymedia'>
<p>The term "early media" refers to media that is exchanged before a responder has definitively accepted a session request generated by an initiator. Early media is typically used to send ringing tones and announcements, either via audio streams or Dual Tone Multi-Frequency (DTMF) events.</p>
<p>In Jingle, the exchange of early media is established through use of the "content-add" action. The session flow is as follows.</p>
<code><![CDATA[
Romeo Juliet
| |
| session-initiate |
| (audio definition) |
|---------------------------->|
| ack |
|<----------------------------|
| session-info (ringing) |
|<----------------------------|
| ack |
|---------------------------->|
| content-add |
| (early media) |
|<----------------------------|
| ack |
|---------------------------->|
| EARLY MEDIA (RTP) |
|<===========================>|
| session-accept |
|<----------------------------|
| ack |
|---------------------------->|
| AUDIO (RTP) |
|<===========================>|
| session-terminate |
|<----------------------------|
| ack |
|---------------------------->|
| |
]]></code>
<p>The term "early media" refers to media that is exchanged before a responder has definitively accepted a session request generated by an initiator. Early media is typically used to send ringing tones and announcements, using either audio streams or Dual Tone Multi-Frequency (DTMF) events.</p>
<p>In Jingle, the exchange of early media is established through use of the "content-add" action. In order to match the usage specified in &rfc3959; and &rfc3960;, when adding a content definition for early media the value of the &CONTENT; element's 'disposition' attribute MUST be "early-session" for mapping to a SIP Content-Disposition header value of "early-session" (if necessary). This enables endpoints or intermediate gateways to apply the application server model described in <cite>RFC3960</cite>.</p>
<p>An entity that generates a content-add for early media SHOULD specify the same codecs for both session media and early media (however, it is possible that the entity generating early media does not generate session media, for example in the case of an intermediate gateway or application server; in this case the entity MUST use one of the codecs advertised by the initiator).</p>
<p>Upon receiving a content-add action specifying the use of early media, the initiator's client SHOULD acknowledge the content-add and then send a content-accept to the sender. When the responder subsequently sends a session-accept action, the acceptance MUST NOT be construued to include the content definition whose disposition is "early-session".</p>
<p>In handling early media and deciding whether to generate local ringing or play early media received from the responder or an intermediate gateway, the initiator's client SHOULD proceed as follows:</p>
<ol>
<li>If no ringing notification is received via a session-info event containing a &lt;ringing/&gt; condition, do not generate local ringing.</li>
<li>If a ringing notification is received and no early media is received, generate local ringing.</li>
<li>If a ringing notification is received but early media is received, play the early media and do not generate local media.</li>
<li>Once the responder has accepted the session and the session (as opposed to early session) media has begun to flow, stop local ringing or stop playing early media.</li>
</ol>
<p>For examples of early media, see the <link url='#scenarios-earlymedia'>Jingle Audio via RTP with Early Media</link> section of this document.</p>
</section1>
<section1 topic='Negotiation of SRTP' anchor='srtp'>
@ -643,7 +622,9 @@ Romeo Juliet
</section1>
<section1 topic='Scenarios' anchor='scenarios'>
<p>The following sections show a number of Jingle RTP scenarios, roughly in order of complexity.</p>
<p>The following sections show a number of Jingle RTP scenarios, roughly in order of increasing complexity.</p>
<section2 topic='Responder is Busy' anchor='scenarios-busy'>
<p>In this scenario, Romeo initiates a voice chat with Juliet but she is otherwise engaged.</p>
<p>The session flow is as follows:</p>
@ -737,6 +718,7 @@ Romeo Juliet
type='result'/>
]]></example>
</section2>
<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>
@ -887,6 +869,7 @@ Romeo Juliet
type='result'/>
]]></example>
</section2>
<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>
@ -894,6 +877,7 @@ Romeo Juliet
Romeo Juliet
| |
| session-initiate |
| (with keying material) |
|---------------------------->|
| ack |
|<----------------------------|
@ -1066,6 +1050,207 @@ Romeo Juliet
type='result'/>
]]></example>
</section2>
<section2 topic='Jingle Audio via RTP with Early Media' anchor='scenarios-earlymedia'>
<p>In this scenario, Romeo initiates a voice chat with Juliet using a transport method of ICE-UDP. There is a gateway between Romeo and Juliet, and the gateway functions as an application server by returning early media to Romeo (perhaps some late medieval hold music or an old-fashioned IVR interaction). To simplify the flow, we have left out any ringing notifications generated by Juliet.</p>
<p>The session flow is as follows.</p>
<code><![CDATA[
Romeo Gateway Juliet
| | |
| session-initiate | |
| (audio definition) | |
|------------------------>| session-initiate |
| ack |------------------------>|
|<------------------------| |
| content-add | ack |
| (early media) x<------------------------|
|<------------------------| |
| ack | |
|------------------------>| |
| content-accept | |
|------------------------>| |
| ack | |
|<------------------------| |
| EARLY MEDIA (RTP) | |
|<=======================>| |
| | session-accept |
| |<------------------------|
| session-accept | |
|<------------------------| |
| ack | |
|------------------------>| ack |
| |------------------------>|
| AUDIO (RTP) |
|<=================================================>|
| | session-terminate |
| |<------------------------|
| session-terminate | |
|<------------------------| |
| ack | |
|------------------------>| ack |
| |------------------------>|
| | |
]]></code>
<p>The protocol flow is as follows, showing only the stanzas sent between Romeo and the gateway (acting on Juliet's behalf).</p>
<example caption="Initiator sends session-initiate"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='jingle1'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='session-initiate'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:jingle:apps:rtp:0' 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'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:0'/>
</content>
</jingle>
</iq>
]]></example>
<example caption="Responder acknowledges session-initiate"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>Now the gateway sends a content-add action to Romeo while waiting for Juliet to pay attention to her telephony interface.</p>
<example caption="Gateway sends content-add on behalf of responder"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='add1'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='content-add'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='responder'
disposition='early-session'
name='hold music'>
<description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
<payload-type id='18' name='G729'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:raw-udp:0'>
<candidate ip='10.1.1.104' port='13540' generation='0'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>Romeo then acknowledges the content-add action and immediately also sends a content-accept.</p>
<example caption="Initiator acknowledges content-add"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='add1'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<example caption="Initiator accepts new content definition"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept1'
to='juliet@capulet.lit/balcony'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='content-accept'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<content creator='responder'
disposition='early-session'
name='hold music'>
<description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
<payload-type id='18' name='G729'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:raw-udp:0'>
<candidate ip='10.1.1.104' port='13540' generation='0'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>The gateway then acknowledges the acceptance on behalf of Juliet.</p>
<example caption="Gateway acknowledges content-accept"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
to='romeo@montague.lit/orchard'
type='result'/>
]]></example>
<p>Now the gateway sends early media to Romeo.</p>
<p>Eventually, the responder sends a session-accept.</p>
<example caption="Responder sends session-accept"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='accept1'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='session-accept'
initiator='romeo@montague.lit/orchard'
responder='juliet@capulet.lit/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='voice'>
<description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
<payload-type id='97' name='speex' clockrate='8000'/>
<payload-type id='18' name='G729'/>
</description>
<transport xmlns='urn:xmpp:jingle:transports:ice-udp:0'>
<candidate component='1'
foundation='1'
generation='0'
ip='192.0.2.3'
network='1'
port='45664'
priority='1694498815'
protocol='udp'
pwd='asd88fgpdd777uzjYhagZg'
rel-addr='10.0.1.1'
rel-port='8998'
rem-addr='192.0.2.1'
rem-port='3478'
type='srflx'
ufrag='8hhy'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<example caption="Initiator acknowledges session-accept"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='accept1'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
<p>The endpoints now begin to exchange session media; as a result, Romeo and the gateway terminate the exchange of early media.</p>
<p>The endpoints can continue the session as long as desired.</p>
<p>Eventually, one of the endpoints terminates the session.</p>
<example caption="Responder terminates the session"><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='term1'
to='romeo@montague.lit/orchard'
type='set'>
<jingle xmlns='urn:xmpp:jingle:0'
action='session-terminate'
initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'>
<reason>
<no-error/>
<text>Sorry, gotta go!</text>
</reason>
</jingle>
</iq>
]]></example>
<p>The other party then acknowledges termination of the session:</p>
<example caption="Initiator acknowledges termination"><![CDATA[
<iq from='romeo@montague.lit/orchard'
id='term1'
to='juliet@capulet.lit/balcony'
type='result'/>
]]></example>
</section2>
<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>