This document defines a Jingle transport method that results in using the Inter-Asterisk eXchange protocol (IAX) for the final communication.
WARNING: This Standards-Track JEP is Experimental. Publication as a Jabber Enhancement Proposal does not imply approval of this proposal by the Jabber Software Foundation. Implementation of the protocol described herein is encouraged in exploratory implementations, but production systems should not deploy implementations of this protocol until it advances to a status of Draft.
Type: Standards Track
Last Updated: 2006-03-09
JIG: Standards JIG
Approving Body: Jabber Council
Dependencies: XMPP Core, JEP-0166
Superseded By: None
Short Name: jingle-iax
Wiki Page: <http://wiki.jabber.org/index.php/Jingle IAX Transport Method (JEP-0179)>
The preferred venue for discussion of this document is the Standards-JIG discussion list: <http://mail.jabber.org/mailman/listinfo/standards-jig>.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the Jabber Software Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this JEP has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Jingle  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.
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.  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.
The Jingle transport description defined herein is designed to meet the following requirements:
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 JEP-0166. 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.
<iq email@example.com/balcony' firstname.lastname@example.org/orchard' id='jingle1' type='set'> <jingle xmlns='http://jabber.org/protocol/jingle' action='session-initiate' email@example.com/orchard' sid='a73sjjvkla37jfea'> <description ...> <transport xmlns='http://jabber.org/protocol/jingle/transport/iax' version='2'/> </jingle> </iq>
As described in JEP-0166, to provisionally accept the session initiation request, the target entity returns an IQ-result:
<iq type='result' firstname.lastname@example.org/balcony' email@example.com/orchard' id='jingle1'/>
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.
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.
The transport attributes are:
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.
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.
The candidate attributes are:
To discover this public IP address we need a third party and SHOULD make discovery via RFC 3489 , which will be an address on the outside of the firewall or NAT.
<iq firstname.lastname@example.org/orchard' email@example.com/balcony' id='jingle1' type='result'> <jingle xmlns='http://jabber.org/protocol/jingle' action='transport-accept' firstname.lastname@example.org/balcony' sid='a73sjjvkla37jfea'> <transport xmlns='http://jabber.org/protocol/jingle/transport/iax' version='2' secure='aes128' user='some-Asterisk-Username' password='some-Asterisk-Password'> <candidate name='local' ip='some-Local-IP-address-here' port='some-Local-Port-here'/> <candidate name='public' ip='some-Remote-IP-address-here' port='some-Remote-Port-here'/> </transport> </jingle> </iq>
The syntax and semantics informational message payloads specific to the IAX transport method will be defined in a future version of this specification.
Port is returned by the IAX library stack initialization process. By default the port is 4569 UDP but if we have more than one IAX entity in the same box this port could be different.
For IAX library implementations it is RECOMMENDED to use IAXclient , because is an easy to use library, stable (used in most of IAX implementations) and multiplatform.
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.
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:
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.
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.
In both cases, the Asterisk PBX has to be logged into the Jabber network and implement the Jingle extension like a channel (Asterisk terminology).
This JEP requires no interaction with the Internet Assigned Numbers Authority (IANA) .
The Jabber Registrar  shall include 'http://jabber.org/protocol/jingle/transport/iax' and 'http://jabber.org/protocol/jingle/info/iax' in its registry of protocol namespaces.
The Jabber Registrar shall include the name "iax" in its registry of Jingle transport descriptions. The registration is as follows:
<transport> <name>iax</name> <desc>Jingle IAX sessions.</desc> <doc>XXXX</doc> </transport>
2. IAX: Inter-Asterisk eXchange Version 2 <http://www.ietf.org/internet-drafts/draft-ietf-guy-iax-01.txt>. Work in progress.
3. IAX is a binary protocol; this design choice was made for bandwidth efficiency.
6. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
7. The Jabber Registrar maintains a list of reserved Jabber protocol namespaces as well as registries of parameters used in the context of protocols approved by the Jabber Software Foundation. For further information, see <http://www.jabber.org/registrar/>.
Initial JEP version.(psa)
Synced with last revision of Jingle and Raw UDP transport. Review some descriptions and modify some names like location for candidate(afc)
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.(afc)
Some fixes and take care of Asterisk PBX entity.(afc)