XEP-0179: Jingle IAX Transport Method

Abstract
This document defines a Jingle transport method that results in using the Inter-Asterisk eXchange protocol (IAX) for the final communication.
Authors
  • Antonio F. Cano
  • Peter Saint-Andre
Copyright
© 2006 – 2006 XMPP Standards Foundation. SEE LEGAL NOTICES.
Status

Deferred

WARNING: This document has been automatically Deferred after 12 months of inactivity in its previous Experimental state. Implementation of the protocol described herein is not recommended for production systems. However, exploratory implementations are encouraged to resume the standards process.
Type
Standards Track
Version
0.2 (2006-03-23)
Document Lifecycle
  1. Experimental
  2. Deferred
  3. Proposed
  4. Stable
  5. Final

1. Introduction

Jingle (XEP-0166) [1] 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 [2] 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. [3] 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.

2. Requirements

The Jingle transport description defined herein is designed to meet the following requirements:

  1. Enable negotiation of parameters necessary for take in contact both IAX peers.
  2. Make it relatively easy to implement support in standard Jabber/XMPP clients.
  3. 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.

3. Protocol Description

3.1 Transport Initiation

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 Jingle (XEP-0166) [1]. 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.

Example 1. Initiation Example, sended by Romeo
    <iq to='juliet@capulet.com/balcony'
      from='romeo@montague.net/orchard'
      id='jingle1'
      type='set'>
      <jingle xmlns='http://jabber.org/protocol/jingle'
            action='session-initiate'
            initiator='romeo@montague.net/orchard'
            sid='a73sjjvkla37jfea'>
        <description ...>
        <transport xmlns='http://jabber.org/protocol/jingle/transport/iax' version='2'/>
    </jingle>
    </iq>

3.2 Target Entity Response

As described in Jingle (XEP-0166) [1], to provisionally accept the session initiation request, the target entity returns an IQ-result:

Example 2. Target Entity Provisionally Accepts the Session Request
<iq type='result' from='juliet@capulet.com/balcony' to='romeo@montague.net/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:

  1. 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.
  2. User -- the user needed to log into the Asterisk PBX. This is OPTIONAL.
  3. Password -- the password needed to log the User into the Asterisk PBX. This is OPTIONAL.
  4. 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.

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:

  1. Name -- the name of the candidate MUST be local, public or vpn.
  2. IP -- the IP where the candidate is located.
  3. Port -- the port where the candidate is listening.

To discover this public IP address we need a third party and SHOULD make discovery via RFC 3489 [4], which will be an address on the outside of the firewall or NAT.

Example 3. Target Entity Accepts the IAX Transport Method
    <iq to='romeo@montague.net/orchard'
        from='juliet@capulet.com/balcony'
        id='jingle1'
        type='set'>
      <jingle xmlns='http://jabber.org/protocol/jingle'
            action='transport-accept'
            initiator='juliet@capulet.com/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>

3.3 Informational Messages

The syntax and semantics informational message payloads specific to the IAX transport method will be defined in a future version of this specification.

4. Implementation Notes

4.1 Ports

The port is returned by the IAX library stack initialization process. [5] 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.

4.2 Caller Identification

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.

4.3 Asterisk PBX

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:

  1. 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.

  2. 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).

4.4 DTMF

If it is necessary to send Dual Tone Multi-Frequency (DTMF) tones, it is RECOMMENDED to use the IAX-native methods specified in draft-ietf-guy-iax. The XML format specified Jingle DTMF (XEP-0181) [6] MAY be used only as a fallback.

5. Security Considerations

To follow.

6. IANA Considerations

This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [7].

7. XMPP Registrar Considerations

7.1 Protocol Namespaces

The XMPP Registrar [8] shall include 'http://jabber.org/protocol/jingle/transport/iax' and 'http://jabber.org/protocol/jingle/info/iax' in its registry of protocol namespaces.

7.2 Jingle IAX Transport Description

The XMPP 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>XEP-0179</doc>
</transport>

Appendices

Appendix A: Document Information

Series
XEP
Number
0179
Publisher
XMPP Standards Foundation
Status
Deferred
Type
Standards Track
Version
0.2
Last Updated
2006-03-23
Approving Body
XMPP Council
Dependencies
XMPP Core, XEP-0166
Supersedes
None
Superseded By
None
Short Name
jingle-iax
Source Control
HTML

This document in other formats: XML  PDF

Appendix B: Author Information

Antonio F. Cano
Email
antoniofcano@grupoikusnet.com
JabberID
antoniofcano@jabber.org
Peter Saint-Andre
Email
stpeter@stpeter.im
JabberID
stpeter@jabber.org
URI
https://stpeter.im/

Copyright

This XMPP Extension Protocol is copyright © 1999 – 2024 by the XMPP Standards Foundation (XSF).

Permissions

Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.

Disclaimer of Warranty

## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##

Limitation of Liability

In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.

IPR Conformance

This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).

Visual Presentation

The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.

Appendix D: Relation to XMPP

The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards 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 document 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.

Appendix E: Discussion Venue

The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.

Discussion on other xmpp.org discussion lists might also be appropriate; see <https://xmpp.org/community/> for a complete list.

Errata can be sent to <editor@xmpp.org>.

Appendix F: Requirements Conformance

The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".

Appendix G: Notes

1. XEP-0166: Jingle <https://xmpp.org/extensions/xep-0166.html>.

2. IAX: Inter-Asterisk eXchange Version 2 <http://tools.ietf.org/html/draft-ietf-guy-iax>. Work in progress.

3. IAX is a binary protocol; this design choice was made for bandwidth efficiency.

4. RFC 3489: STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs) <http://tools.ietf.org/html/rfc3489>.

5. Among IAX library implementations, IAXclient is recommended since it is easy to use, stable, multiplatform, and used in most IAX implementations.

6. XEP-0181: Jingle DTMF <https://xmpp.org/extensions/xep-0181.html>.

7. 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/>.

8. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <https://xmpp.org/registrar/>.

Appendix H: Revision History

Note: Older versions of this specification might be available at https://xmpp.org/extensions/attic/

  1. Version 0.2 (2006-03-23)

    Recommended use of IAX-native methods for DTMF.

    psa
  2. Version 0.1 (2006-03-09)

    Initial version.

    psa
  3. Version 0.0.4 (2006-03-02)

    Synced with last revision of Jingle and Raw UDP transport. Review some descriptions and modify some names like location for candidate

    afc
  4. Version 0.0.3 (2006-02-26)

    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
  5. Version 0.0.2 (2006-02-24)

    Some fixes and take care of Asterisk PBX entity.

    afc
  6. Version 0.0.1 (2006-02-23)

    First draft.

    afc

Appendix I: Bib(La)TeX Entry

@report{cano2006jingle-iax,
  title = {Jingle IAX Transport Method},
  author = {Cano, Antonio F. and Saint-Andre, Peter},
  type = {XEP},
  number = {0179},
  version = {0.2},
  institution = {XMPP Standards Foundation},
  url = {https://xmpp.org/extensions/xep-0179.html},
  date = {2006-02-23/2006-03-23},
}

END