No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0179.xml 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Jingle IAX Transport Method</title>
  10. <abstract>This document defines a Jingle transport method that results in using the Inter-Asterisk eXchange protocol (IAX) for the final communication.</abstract>
  11. &LEGALNOTICE;
  12. <number>0179</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XEP-0166</spec>
  20. </dependencies>
  21. <supersedes/>
  22. <supersededby/>
  23. <shortname>jingle-iax</shortname>
  24. <author>
  25. <firstname>Antonio F.</firstname>
  26. <surname>Cano</surname>
  27. <email>antoniofcano@grupoikusnet.com</email>
  28. <jid>antoniofcano@jabber.org</jid>
  29. </author>
  30. &stpeter;
  31. <revision>
  32. <version>0.2</version>
  33. <date>2006-03-23</date>
  34. <initials>psa</initials>
  35. <remark><p>Recommended use of IAX-native methods for DTMF.</p></remark>
  36. </revision>
  37. <revision>
  38. <version>0.1</version>
  39. <date>2006-03-09</date>
  40. <initials>psa</initials>
  41. <remark><p>Initial version.</p></remark>
  42. </revision>
  43. <revision>
  44. <version>0.0.4</version>
  45. <date>2006-03-02</date>
  46. <initials>afc</initials>
  47. <remark><p>Synced with last revision of Jingle and Raw UDP transport. Review some descriptions and modify some names like location for candidate</p></remark>
  48. </revision>
  49. <revision>
  50. <version>0.0.3</version>
  51. <date>2006-02-26</date>
  52. <initials>afc</initials>
  53. <remark><p>Modify the initiate proccess, Rome tell to Juliet the transport to use and she answer with the transport information needed to be contacted. Added to transport the remoteTransport an localTransport data.</p></remark>
  54. </revision>
  55. <revision>
  56. <version>0.0.2</version>
  57. <date>2006-02-24</date>
  58. <initials>afc</initials>
  59. <remark><p>Some fixes and take care of Asterisk PBX entity.</p></remark>
  60. </revision>
  61. <revision>
  62. <version>0.0.1</version>
  63. <date>2006-02-23</date>
  64. <initials>afc</initials>
  65. <remark><p>First draft.</p></remark>
  66. </revision>
  67. </header>
  68. <section1 topic='Introduction' anchor='intro'>
  69. <p>&xep0166; defines a framework for negotiating and managing out-of-band multimedia sessions over XMPP. In order to provide a flexible framework, the base Jingle specification defines neither data transport methods nor media (session) types, leaving that up to separate specifications. The current document defines a transport method for establishing and managing &iax; sessions between XMPP entities.</p>
  70. <p>IAX is a peer-to-peer media and signaling protocol, where the endpoints maintain state machines. With respect to media, sequencing and timing information is included into IAX frames, without the use of Real-Time Transport Protocol (RTP) for the media. <note>IAX is a binary protocol; this design choice was made for bandwidth efficiency.</note> The IAX protocol handles the signaling and, when the call is accepted by both peers, the media passes between the two hosts. With this approach, IAX doesn't suffer from NAT traversal problems associated with others protocols like SIP or other related protocols.</p>
  71. </section1>
  72. <section1 topic='Requirements' anchor='reqs'>
  73. <p>The Jingle transport description defined herein is designed to meet the following requirements:</p>
  74. <ol>
  75. <li>Enable negotiation of parameters necessary for take in contact both IAX peers.</li>
  76. <li>Make it relatively easy to implement support in standard Jabber/XMPP clients.</li>
  77. <li>Where communication with non-XMPP entities is needed, push as much complexity as possible onto server-side gateways between the XMPP network and the non-XMPP network.</li>
  78. </ol>
  79. </section1>
  80. <section1 topic='Protocol Description' anchor='protocol'>
  81. <section2 topic='Transport Initiation' anchor='protocol-initiate'>
  82. <p>In order for the initiating entity in a Jingle exchange to start the negotiation, it MUST send a Jingle "session-initiate" stanza as described in <cite>XEP-0166</cite>. This stanza MUST include at least one transport method. If the initiating entity wishes to negotiate the IAX transport, it MUST include an empty &TRANSPORT; child element qualified by the 'http://jabber.org/protocol/jingle/transport/iax' namespace.</p>
  83. <example caption="Initiation Example, sended by Romeo"><![CDATA[
  84. <iq to='juliet@capulet.com/balcony'
  85. from='romeo@montague.net/orchard'
  86. id='jingle1'
  87. type='set'>
  88. <jingle xmlns='http://jabber.org/protocol/jingle'
  89. action='session-initiate'
  90. initiator='romeo@montague.net/orchard'
  91. sid='a73sjjvkla37jfea'>
  92. <description ...>
  93. <transport xmlns='http://jabber.org/protocol/jingle/transport/iax' version='2'/>
  94. </jingle>
  95. </iq>
  96. ]]></example>
  97. </section2>
  98. <section2 topic='Target Entity Response' anchor='protocol-response'>
  99. <p>As described in <cite>XEP-0166</cite>, to provisionally accept the session initiation request, the target entity returns an IQ-result:</p>
  100. <example caption="Target Entity Provisionally Accepts the Session Request"><![CDATA[
  101. <iq type='result' from='juliet@capulet.com/balcony' to='romeo@montague.net/orchard' id='jingle1'/>
  102. ]]></example>
  103. <p>To accept the IAX transport method, the target entity MUST send a &JINGLE; element with an action of 'transport-accept', specifying the transport method desired.</p>
  104. <p>This &TRANSPORT; element MUST include two &CANDIDATE; element per channel, whose 'ip' and 'port' attributes specify the IP address and port number of the candidate that the initiator has reason to believe will be most likely to succeed for that channel. The two candidates are the local and remote one. NAT type doesn't matter because the IAX protocol by itself addresses the problem of NAT traversal. We differentiate the two candidates with name attribute.</p>
  105. <p>The transport attributes are:</p>
  106. <ol>
  107. <li>Version -- this is the protocol version we want to use by (currently 1 or 2, perhaps other versions in the future). This information is provided as an attribute of the transport.</li>
  108. <li>User -- the user needed to log into the Asterisk PBX. This is OPTIONAL.</li>
  109. <li>Password -- the password needed to log the User into the Asterisk PBX. This is OPTIONAL.</li>
  110. <li>Secure -- describes the encryption method, this is OPTIONAL because at the moment there is one implementation of AES128 in Asterisk but not in the protocol, this could change in the future.</li>
  111. </ol>
  112. <p>User and Password are OPTIONAL and needed in the case we want to call an extension that is behind an Asterisk PBX. The Asterisk PBX has to be properly configured to accept this kind of call.</p>
  113. <p>When we get the answer, it is time to see if the media that we want to start is supported by both peers. If so the IAX session is initialized by the protocol stack.</p>
  114. <p>The candidate attributes are:</p>
  115. <ol>
  116. <li>Name -- the name of the candidate MUST be local, public or vpn.</li>
  117. <li>IP -- the IP where the candidate is located.</li>
  118. <li>Port -- the port where the candidate is listening.</li>
  119. </ol>
  120. <p>To discover this public IP address we need a third party and SHOULD make discovery via &rfc3489;, which will be an address on the outside of the firewall or NAT.</p>
  121. <example caption="Target Entity Accepts the IAX Transport Method"><![CDATA[
  122. <iq to='romeo@montague.net/orchard'
  123. from='juliet@capulet.com/balcony'
  124. id='jingle1'
  125. type='set'>
  126. <jingle xmlns='http://jabber.org/protocol/jingle'
  127. action='transport-accept'
  128. initiator='juliet@capulet.com/balcony'
  129. sid='a73sjjvkla37jfea'>
  130. <transport xmlns='http://jabber.org/protocol/jingle/transport/iax'
  131. version='2'
  132. secure='aes128'
  133. user='some-Asterisk-Username'
  134. password='some-Asterisk-Password'>
  135. <candidate name='local' ip='some-Local-IP-address-here' port='some-Local-Port-here'/>
  136. <candidate name='public' ip='some-Remote-IP-address-here' port='some-Remote-Port-here'/>
  137. </transport>
  138. </jingle>
  139. </iq>
  140. ]]></example>
  141. </section2>
  142. <section2 topic='Informational Messages' anchor='protocol-info'>
  143. <p>The syntax and semantics informational message payloads specific to the IAX transport method will be defined in a future version of this specification.</p>
  144. </section2>
  145. </section1>
  146. <section1 topic='Implementation Notes' anchor='impl'>
  147. <section2 topic='Ports' anchor='impl-ports'>
  148. <p>The port is returned by the IAX library stack initialization process. <note>Among IAX library implementations, <link url='http://iaxclient.sourceforge.net/'>IAXclient</link> is recommended since it is easy to use, stable, multiplatform, and used in most IAX implementations.</note> By default the port is 4569 UDP but if there is more than one IAX entity in the same box this port could be different.</p>
  149. </section2>
  150. <section2 topic='Caller Identification' anchor='impl-id'>
  151. <p>Once the Jingle negotiation has been completed and the IAX stack has control, the initiating entity has to set his callerID information (cidname to Jingle and cidnum to JabberID) before dialing to a contact. If the initator's client has to show the contact's information, this comes from the initiator attribute of the returned IQ.</p>
  152. </section2>
  153. <section2 topic='Asterisk PBX' anchor='impl-pbx'>
  154. <p>IAX is a native protocol of the Asterisk PBX. When using the IAX protocol we could easily connect with an Asterisk PBX. There are two scenarios:</p>
  155. <ol>
  156. <li><p>We want to reach an internal extension directly (or go to PSTN line through Asterisk). in that case we need a user and password with rights into the PBX and setup into the Jabber client (the Jabber client will act like a softphone). This information has to be given for the final user to the entity. The idea in this scenario isn't so clear because if the jabber client acts like a softphone and we need to call an extension, we coudl just dial the extension without using Jingle.</p></li>
  157. <li><p>The Asterisk PBX accept incoming calls from IAX. In that case just call the Asterisk like other peer and the Asterisk MUST be properly configured for accepting the 'anonymous' (not an internal user of the PBX) incoming call.</p></li>
  158. </ol>
  159. <p>In both cases, the Asterisk PBX has to be logged into the Jabber network and implement the Jingle extension like a channel (Asterisk terminology).</p>
  160. </section2>
  161. <section2 topic='DTMF' anchor='impl-DTMF'>
  162. <p>If it is necessary to send Dual Tone Multi-Frequency (DTMF) tones, it is RECOMMENDED to use the IAX-native methods specified in <cite>draft-ietf-guy-iax</cite>. The XML format specified &xep0181; MAY be used only as a fallback.</p>
  163. </section2>
  164. </section1>
  165. <section1 topic='Security Considerations' anchor='security'>
  166. <p>To follow.</p>
  167. </section1>
  168. <section1 topic='IANA Considerations' anchor='iana'>
  169. <p>This document requires no interaction with &IANA;.</p>
  170. </section1>
  171. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  172. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  173. <p>The &REGISTRAR; shall include 'http://jabber.org/protocol/jingle/transport/iax' and 'http://jabber.org/protocol/jingle/info/iax' in its registry of protocol namespaces.</p>
  174. </section2>
  175. <section2 topic='Jingle IAX Transport Description' anchor='registrar-transport'>
  176. <p>The XMPP Registrar shall include the name "iax" in its registry of Jingle transport descriptions. The registration is as follows:</p>
  177. <code><![CDATA[
  178. <transport>
  179. <name>iax</name>
  180. <desc>Jingle IAX sessions.</desc>
  181. <doc>XEP-0179</doc>
  182. </transport>
  183. ]]></code>
  184. </section2>
  185. </section1>
  186. </xep>