git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@1716 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
Peter Saint-Andre 2008-02-29 19:20:14 +00:00
parent f24fccb993
commit 6f256ab13a
1 changed files with 71 additions and 26 deletions

View File

@ -27,6 +27,12 @@
&stpeter; &stpeter;
&hildjj; &hildjj;
&seanegan; &seanegan;
<revision>
<version>0.16</version>
<date>2008-02-29</date>
<initials>psa</initials>
<remark><p>Changed content-modify to content-replace per XEP-0166.</p></remark>
</revision>
<revision> <revision>
<version>0.15</version> <version>0.15</version>
<date>2008-01-06</date> <date>2008-01-06</date>
@ -185,7 +191,7 @@ INITIATOR RESPONDER
|<-----------------------------------| |<-----------------------------------|
| STUN Binding Result | | STUN Binding Result |
|----------------------------------->| |----------------------------------->|
| Jingle content-modify | | Jingle content-replace |
|----------------------------------->| |----------------------------------->|
| Jingle ack (XMPP IQ-result) | | Jingle ack (XMPP IQ-result) |
|<-----------------------------------| |<-----------------------------------|
@ -523,19 +529,19 @@ INITIATOR NAT RESPONDER
<section2 topic='Acceptance of Successful Candidate' anchor='protocol-acceptance'> <section2 topic='Acceptance of Successful Candidate' anchor='protocol-acceptance'>
<p>If, based on STUN connectivity checks, the parties determine that they will be able to exchange media between a given pair of local candidates and remote candidates (i.e., the pair is "nominated" and ICE processing is "completed"), the parties shall proceed as follows:</p> <p>If, based on STUN connectivity checks, the parties determine that they will be able to exchange media between a given pair of local candidates and remote candidates (i.e., the pair is "nominated" and ICE processing is "completed"), the parties shall proceed as follows:</p>
<ol> <ol>
<li>The initiator sends a Jingle content-modify action to the responder.</li> <li>The initiator sends a Jingle content-replace action to the responder.</li>
<li>The responder acknowledges receipt of the content-modify.</li> <li>The responder acknowledges receipt of the content-replace.</li>
<li>The responder sends a Jingle content-accept or session-accept action to the initiator.</li> <li>The responder sends a Jingle session-accept action to the initiator.</li>
<li>The initiator acknowledges receipt of the content-accept.</li> <li>The initiator acknowledges receipt of the session-accept.</li>
</ol> </ol>
<p>First the initiator sends a Jingle content-modify action to the responder. The content-modify MUST contain information about the nominated pair, including the "rem-addr" and "rem-port" attributes (which specify the IP address and port for the responder's end of the pair, which is a "remote address" according to the initiator). This enables both parties to explicitly agree to both ends of the connection pair (i.e., the local address+port and the remote address+port).</p> <p>First the initiator sends a Jingle content-replace action to the responder. The content-replace MUST contain information about the nominated pair, including the "rem-addr" and "rem-port" attributes (which specify the IP address and port for the responder's end of the pair, which is a "remote address" according to the initiator). This enables both parties to explicitly agree to both ends of the connection pair (i.e., the local address+port and the remote address+port).</p>
<example caption="Initiator requests content-modify"><![CDATA[ <example caption="Initiator requests content-replace"><![CDATA[
<iq from='romeo@montague.lit/orchard' <iq from='romeo@montague.lit/orchard'
id='mod1' id='rep1'
to='juliet@capulet.lit/balcony' to='juliet@capulet.lit/balcony'
type='set'> type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle' <jingle xmlns='urn:xmpp:tmp:jingle'
action='content-modify' action='content-replace'
initiator='romeo@montague.lit/orchard' initiator='romeo@montague.lit/orchard'
sid='a73sjjvkla37jfea'> sid='a73sjjvkla37jfea'>
<content creator='initiator' name='this-is-the-audio-content' profile='RTP/AVP'> <content creator='initiator' name='this-is-the-audio-content' profile='RTP/AVP'>
@ -563,14 +569,14 @@ INITIATOR NAT RESPONDER
</jingle> </jingle>
</iq> </iq>
]]></example> ]]></example>
<p>The responder then acknowledges the content-modify action.</p> <p>The responder then acknowledges the content-replace action.</p>
<example caption="Responder acknowledges content-modify"><![CDATA[ <example caption="Responder acknowledges content-replace"><![CDATA[
<iq from='juliet@capulet.lit/balcony' <iq from='juliet@capulet.lit/balcony'
id='mod1' id='rep1'
to='romeo@montague.lit/orchard' to='romeo@montague.lit/orchard'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>The responder then sends a &JINGLE; element with an action of 'content-accept' (or 'session-accept') to the initiator, specifying the candidate that succeeded.</p> <p>The responder then sends a session-accept action to the initiator, specifying the candidate that succeeded.</p>
<example caption="Responder definitively accepts the successful candidate"><![CDATA[ <example caption="Responder definitively accepts the successful candidate"><![CDATA[
<iq from='juliet@capulet.com/balcony' <iq from='juliet@capulet.com/balcony'
id='accept1' id='accept1'
@ -606,7 +612,7 @@ INITIATOR NAT RESPONDER
</jingle> </jingle>
</iq> </iq>
]]></example> ]]></example>
<p>The &JINGLE; element in the content-accept or session-accept stanza SHOULD possess a 'responder' attribute that explicitly specifies the full JID of the responding entity. If the 'responder' attribute is provided, all future commmunications SHOULD be sent to the JID provided in the 'responder' attribute.</p> <p>The &JINGLE; element in the session-accept stanza SHOULD possess a 'responder' attribute that explicitly specifies the full JID of the responding entity. If the 'responder' attribute is provided, all future commmunications SHOULD be sent to the JID provided in the 'responder' attribute.</p>
<p>Since according to the connectivity checks the initiator can also send data over that candidate, it acknowledges the responder's acceptance:</p> <p>Since according to the connectivity checks the initiator can also send data over that candidate, it acknowledges the responder's acceptance:</p>
<example caption="Initiator acknowledges acceptance of successful candidate"><![CDATA[ <example caption="Initiator acknowledges acceptance of successful candidate"><![CDATA[
<iq from='romeo@montague.net/orchard' <iq from='romeo@montague.net/orchard'
@ -629,15 +635,15 @@ INITIATOR NAT RESPONDER
<p>If the responder cannot find a suitable candidate transport or it receives a &notacceptable; error from the initiator in response to its acceptance of a suitable transport, it SHOULD terminate the session as described in Section 6.8 of <cite>XEP-0166</cite>.</p> <p>If the responder cannot find a suitable candidate transport or it receives a &notacceptable; error from the initiator in response to its acceptance of a suitable transport, it SHOULD terminate the session as described in Section 6.8 of <cite>XEP-0166</cite>.</p>
</section2> </section2>
<section2 topic='Modifying an Existing Candidate' anchor='protocol-modify'> <section2 topic='Modifying an Existing Candidate' anchor='protocol-modify'>
<p>The creator of a content type MAY modify an existing, in-use candidate at any time during the session, for example to change the IP address or port. This is done by sending a content-modify action with the changed candidate information, where the value of the 'generation' is incremented to specify that the candidate information is a modification to an existing candidate.</p> <p>The creator of a content type MAY modify an existing, in-use candidate at any time during the session, for example to change the IP address or port. This is done by sending a content-replace action with the changed candidate information, where the value of the 'generation' is incremented to specify that the candidate information is a modification to an existing candidate.</p>
<p>An example follows (change to IP address and port).</p> <p>An example follows (change to IP address and port).</p>
<example caption="Initiator modifies the in-use candidate"><![CDATA[ <example caption="Initiator modifies the in-use candidate"><![CDATA[
<iq from='romeo@montague.net/orchard' <iq from='romeo@montague.net/orchard'
id='modify1' id='rep2'
to='juliet@capulet.com/balcony' to='juliet@capulet.com/balcony'
type='set'> type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle' <jingle xmlns='urn:xmpp:tmp:jingle'
action='content-modify' action='content-replace'
initiator='romeo@montague.net/orchard' initiator='romeo@montague.net/orchard'
sid='a73sjjvkla37jfea'> sid='a73sjjvkla37jfea'>
<content creator='initiator' name='this-is-the-audio-content' profile='RTP/AVP'> <content creator='initiator' name='this-is-the-audio-content' profile='RTP/AVP'>
@ -659,14 +665,14 @@ INITIATOR NAT RESPONDER
</iq> </iq>
]]></example> ]]></example>
<p>The recipient then acknowledges receipt.</p> <p>The recipient then acknowledges receipt.</p>
<example caption="Recipient acknowledges content-modify"><![CDATA[ <example caption="Recipient acknowledges content-replace"><![CDATA[
<iq from='juliet@capulet.com/balcony' <iq from='juliet@capulet.com/balcony'
id='modify1' id='rep2'
to='romeo@montague.net/orchard' to='romeo@montague.net/orchard'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>If the modification is acceptable, the recipient then sends a content-accept action.</p> <p>If the content-replace is acceptable, the recipient then sends a content-accept action.</p>
<example caption="Responder definitively accepts the modified candidate"><![CDATA[ <example caption="Responder definitively accepts the replaced candidate"><![CDATA[
<iq from='juliet@capulet.com/balcony' <iq from='juliet@capulet.com/balcony'
id='accept2' id='accept2'
to='romeo@montague.net/orchard' to='romeo@montague.net/orchard'
@ -698,7 +704,7 @@ INITIATOR NAT RESPONDER
</iq> </iq>
]]></example> ]]></example>
<p>The initiator then acknowledges the responder's acceptance:</p> <p>The initiator then acknowledges the responder's acceptance:</p>
<example caption="Initiator acknowledges content-accept"><![CDATA[ <example caption="Initiator acknowledges content acceptance"><![CDATA[
<iq from='romeo@montague.net/orchard' <iq from='romeo@montague.net/orchard'
id='accept2' id='accept2'
to='juliet@capulet.com/balcony' to='juliet@capulet.com/balcony'
@ -742,8 +748,47 @@ INITIATOR NAT RESPONDER
to='romeo@montague.net/orchard' to='romeo@montague.net/orchard'
type='result'/> type='result'/>
]]></example> ]]></example>
<p>The receiving party SHOULD check the newly-offered candidate for connectivity, as above. If the candidate is acceptable, the receiving party shall send a content-accept action.</p> <p>The parties SHOULD check the newly-offered candidate for connectivity, as described previously. If the parties determine that media can flow over the candidate, the initiating party shall send a content-replace action to the responder.</p>
<example caption="Responder definitively accepts the new candidate"><![CDATA[ <example caption="Initiator sends content-replace"><![CDATA[
<iq from='romeo@montague.net/orchard'
id='rep3'
to='juliet@capulet.com/balcony'
type='set'>
<jingle xmlns='urn:xmpp:tmp:jingle'
action='content-replace'
initiator='romeo@montague.net/orchard'
responder='juliet@capulet.com/balcony'
sid='a73sjjvkla37jfea'>
<content creator='initiator' name='this-is-the-audio-content'>
<description xmlns='urn:xmpp:tmp:jingle:apps:audio-rtp' profile='RTP/AVP'>
[ ... ]
</description>
<transport xmlns='urn:xmpp:tmp:jingle:transports:ice-tcp'>
<candidate component='1'
foundation='1'
generation='0'
ip='10.0.1.2'
network='0'
port='9001'
priority='21149780477'
protocol='udp'
pwd='asd88fgpdd777uzjYhagZg'
type='host'
ufrag='8hhy'/>
</transport>
</content>
</jingle>
</iq>
]]></example>
<p>The responder then acknowledges the replaced content definition.</p>
<example caption="Responder acknowledges content-replace"><![CDATA[
<iq from='juliet@capulet.com/balcony'
id='rep3'
to='romeo@montague.net/orchard'
type='result'/>
]]></example>
<p>The responder then accepts the replaced content definition.</p>
<example caption="Responder definitively accepts the replaced content definition"><![CDATA[
<iq from='juliet@capulet.com/balcony' <iq from='juliet@capulet.com/balcony'
id='accept3' id='accept3'
to='romeo@montague.net/orchard' to='romeo@montague.net/orchard'
@ -774,8 +819,8 @@ INITIATOR NAT RESPONDER
</jingle> </jingle>
</iq> </iq>
]]></example> ]]></example>
<p>The other party then acknowledges the content-accept.</p> <p>The initiator then acknowledges content acceptance.</p>
<example caption="Initiator acknowledges content-accept"><![CDATA[ <example caption="Initiator acknowledges content acceptance"><![CDATA[
<iq from='romeo@montague.net/orchard' <iq from='romeo@montague.net/orchard'
id='accept3' id='accept3'
to='juliet@capulet.com/balcony' to='juliet@capulet.com/balcony'