<p>Sometimes it is desirable or necessary to switch from instant messaging (IM) to another real-time communications medium, such as a telephone conversation conducted over the traditional public switched telephone network (PSTN) or more recent Voice over Internet Protocol (VoIP) applications. In order to facilitate switching from IM to telephony or some other medium, a user needs to advertise the address(es) at which they can be reached. There are several possible ways to do this:</p>
<li><p>Publish the reachability address(es) in the user's vCard (see &xep0054;); this is convenient, but is not very dynamic (e.g., reachability addresses might change when the user moves to a new conference room in an office building).</p></li>
<li><p>Publish the user's reachability status (but not addresses) as a feature bundle within &xep0115; information; this is somewhat dynamic (subscribers can be informed when reachability information is available) but requires every interested subscriber to perform service discovery in order to determine the reachability address(es).</p></li>
<li><p>Send the reachability address(es) within a &PRESENCE; stanza; this option is described in the <linkurl='#transport-presence'>Presence Broadcast</link> section of this document and is consistent with Section 5.1.2 of &rfc3921; since reachability is one aspect of a user's availability for communication.</p></li>
<li><p>Send reachability address(es) to the appropriate &xep0163; node; this option is described in the <linkurl='#transport-pep'>PEP Transport</link> section of this document but may not be available at all service providers.</p></li>
<li>Enable clients to dynamically publish reachability addresses.</li>
<li>Minimize network traffic.</li>
</ul>
</section1>
<section1topic='Data Format'anchor='format'>
<p>The following is an example of the basic data format for reachability addresses:</p>
<examplecaption="Basic Data Format for Reachability Addresses"><![CDATA[
<reachxmlns='http://jabber.org/protocol/reach'>
<addruri='tel:+1-303-555-1212'/>
<addruri='sip:romeo@sipspeare.lit'/>
</reach>
]]></example>
<p>When publishing reachability addresses, the <reach/> element MUST contain at least one <addr/> element. Each <addr/> element MUST possess a 'uri' attribute, whose value MUST be the Uniform Resource Identifier (&rfc3986;) or Internationalized Resource Identifier (&rfc3987;) of an alternate communications method for reaching the user.</p>
<p>The <addr/> element MAY contain one or more <desc/> children whose XML character data is a natural-language description of the address; this element SHOULD possess an 'xml:lang' attribute whose value is a language tag that conforms to &rfc4646; (although the default language MAY be specified at the stanza level; see Section 9.1.5 of &rfc3920;). In order to preserve bandwidth, the <desc/> element SHOULD NOT be included when sending reachbility data via presence broadcast, but MAY be included when using personal eventing.</p>
<p>In order to broadcast reachability addresses in presence information, a user's client includes the <reach/> element in the &PRESENCE; stanza it sends to its server:</p>
<examplecaption="User's Client Includes Reachability Addresses in Presence Broadcast"><![CDATA[
<presencefrom='romeo@montague.net'>
<reachxmlns='http://jabber.org/protocol/reach'>
<addruri='tel:+1-303-555-1212'/>
<addruri='sip:romeo@sipspeare.lit'/>
</reach>
</presence>
]]></example>
<p>The user's server then broadcasts that presence stanza to all entities who are subscribed to the user's presence:</p>
<examplecaption="User's Server Broadcasts Presence Information"><![CDATA[
<p>In order to publish reachability via the publish-subscribe transport, an entity MUST first create the appropriate node as explained in <cite>XEP-0060</cite>. Here we assume that the node already exists.</p>
<p>If a client supports the reachability addresses protocol described herein, it SHOULD include a &xep0030; feature of 'http://jabber.org/protocol/reach' in its replies to disco#info requests:</p>
<p>To preserve network bandwidth, the sender SHOULD NOT include the <desc/> element unless that information is deemed necessary to enable communication.</p>
<p>A recipient SHOULD attempt communications with reachability addresses in the order that the <addr/> elements appear within the <reach/> element.</p>
<p>If included, the <desc/> element SHOULD possess an 'xml:lang' attribute specifying the language of the human-readable descriptive text for a particular address.</p>
<p>This document introduces no security considerations above and beyond those described in RFC 3920, RFC 3921, and (for the personal eventing transport) XEP-0163.</p>