Network Working Group P. Saint-Andre Internet-Draft XMPP Standards Foundation Intended status: Informational January 4, 2008 Expires: July 7, 2008 Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Media Sessions draft-saintandre-sip-xmpp-media-00 Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on July 7, 2008. Copyright Notice Copyright (C) The IETF Trust (2008). Abstract This document defines a bi-directional protocol mapping for use by gateways that enable the exchange of media signalling messages between systems that implement the Jingle extensions to the Extensible Messaging and Presence Protocol (XMPP) and those that implement the Session Initiation Protocol (SIP). Saint-Andre Expires July 7, 2008 [Page 1] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Jingle to SIP . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2. Syntax Mappings . . . . . . . . . . . . . . . . . . . . . 4 2.3. Sample Scenarios . . . . . . . . . . . . . . . . . . . . . 8 3. SIP to Jingle . . . . . . . . . . . . . . . . . . . . . . . . 14 4. Security Considerations . . . . . . . . . . . . . . . . . . . 14 5. References . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1. Normative References . . . . . . . . . . . . . . . . . . . 15 5.2. Informative References . . . . . . . . . . . . . . . . . . 16 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 16 Intellectual Property and Copyright Statements . . . . . . . . . . 17 Saint-Andre Expires July 7, 2008 [Page 2] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 1. Introduction The Session Initiation Protocol [SIP] is a widely-deployed technology for the management of media sessions (such as voice calls) over the Internet. SIP itself provides a signalling channel (typically via the User Datagram Protocol [UDP]), over which two or more parties can exchange messages for the purpose of negotiating a media session that uses a dedicated media channel such as the Real-time Transport Protocol [RTP]. The Extensible Messaging and Presence Protocol [XMPP] also provides a signalling channel, typically via the Transmission Control Protocol [TCP]. Given the significant differences between XMPP and SIP, it is difficult to combine the two technologies in a single user agent. Therefore, developers wishing to add media session capabilities to XMPP clients have defined an XMPP-specific negotiation protocol called Jingle [JINGLE]. However, Jingle has been designed to easily map to SIP for communication through gateways or other transformation mechanisms. Therefore, consistent with existing specifications for mapping between SIP and XMPP (see [SIP-XMPP] and other specifications in that "series"), this document describes a bi-directional protocol mapping for use by gateways that enable the exchange of media signalling messages between systems that implement SIP and those that implement the XMPP Jingle extensions. Note: The capitalized key words "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 [TERMS]. 2. Jingle to SIP 2.1. Overview As mentioned, Jingle was designed in part to enable straightforward protocol mapping between XMPP and SIP. However, given the significantly different technology assumptions underlying XMPP and SIP, Jingle is naturally different from SIP in several important respects: o Base SIP messages and headers use a plaintext format similar in some ways to the Hypertext Transport Protocol [HTTP], whereas Jingle messages are pure XML. Mappings between SIP headers and Jingle message syntax are provided below. Saint-Andre Expires July 7, 2008 [Page 3] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 o The SIP payloads defining session semantics use the Session Description Protocol [SDP], whereas the equivalent Jingle payloads are defined as XML child elements of the Jingle element. However, the Jingle specifications defining such child elements specify mappings to SDP for all Jingle syntax, making the mapping relatively straightforward. o The SIP signalling channel is transported over UDP, whereas the signalling channel for Jingle is XMPP over TCP. Mapping between the transport layers typically happens within a gateway using techniques below the application level, and therefore is not addressed in this specification. 2.2. Syntax Mappings 2.2.1. Generic Jingle Syntax Jingle is designed in a modular fashion, so that session description data is generally carried in a payload within the generic Jingle elements, i.e., the element and its child. The following example illustrates this structure, where the XMPP stanza is a request to initiate an audio session using RTP over a raw UDP transport. Saint-Andre Expires July 7, 2008 [Page 4] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 In the foregoing example, the syntax and semantics of the and elements are defined in [JINGLE], the syntax and semantics of the element are defined in [JINGLE-AUDIO], and the syntax and semantics of the element are defined in [JINGLE-UDP]. Other elements are defined in specifications for the appropriate application types (see for example [JINGLE-VIDEO]) and other elements are defined in the specifications for appropriate transport methods (see for example [JINGLE-ICE], which defines an XMPP profile of [ICE]). At the core Jingle layer, the following mappings are defined. Saint-Andre Expires July 7, 2008 [Page 5] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 +--------------------------------+--------------------------------+ | Jingle | SIP | +--------------------------------+--------------------------------+ | 'action' | [ see next table ] | +--------------------------------+--------------------------------+ | 'initiator' | [ no mapping ] | +--------------------------------+--------------------------------+ | 'responder' | [ no mapping ] | +--------------------------------+--------------------------------+ | 'sid' | local-part of Call-ID | +--------------------------------+--------------------------------+ | local-part of 'initiator' | in SDP o= line | +--------------------------------+--------------------------------+ | 'creator' | [ no mapping ] | +--------------------------------+--------------------------------+ | 'name' | [ no mapping ] | +--------------------------------+--------------------------------+ | 'profile' | in SDP m= line | +--------------------------------+--------------------------------+ | 'senders' value of | a= line of sendrecv, recvonly, | | both, initiator, or responder | or sendonly | +--------------------------------+--------------------------------+ The 'action' attribute of the element has nine allowable values. In general they should be mapped as shown in the following table, with some exceptions as described herein. Saint-Andre Expires July 7, 2008 [Page 6] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 +-------------------+-----------------+ | Jingle Action | SIP Method | +-------------------+-----------------+ | content-accept | INVITE response | | | (1xx) | +-------------------+-----------------+ | content-add | INVITE request | +-------------------+-----------------+ | content-modify | INVITE request | +-------------------+-----------------+ | content-remove | INVITE request | +-------------------+-----------------+ | session-accept | INVITE response | | | (1xx or 2xx) | +-------------------+-----------------+ | session-info | [varies] | +-------------------+-----------------+ | session-initiate | INVITE request | +-------------------+-----------------+ | session-terminate | BYE | +-------------------+-----------------+ | transport-info | [varies] | +-------------------+-----------------+ 2.2.2. Audio Application Format A Jingle application format for audio exchange via RTP is specified in [JINGLE-AUDIO]. This application format effectively maps to the "RTP/AVP" profile specified in [RTP-AVP], where the media type is "audio" and the specific mappings to SDP syntax are provided in [JINGLE-AUDIO]. 2.2.3. Video Application Format A Jingle application format for video exchange via RTP is specified in [JINGLE-VIDEO]. This application format effectively maps to the "RTP/AVP" profile specified in [RTP-AVP], where the media type is "audio" and the specific mappings to SDP syntax are provided in [JINGLE-VIDEO]. 2.2.4. Raw UDP Transport Method A basic Jingle transport method for exchanging media over UDP is specified in [JINGLE-UDP]. This transport method involves the negotiation of an IP address and port only, and does not provide NAT traversal. The Jingle 'ip' attribute maps to the connection-address parameter of the SDP c= line and the 'port' attribute maps to the port parameter of the SDP m= line. Saint-Andre Expires July 7, 2008 [Page 7] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 2.2.5. ICE-UDP Transport Method A more advanced Jingle transport method for exchanging media over UDP is specified in [JINGLE-ICE]. Under ideal conditions this transport method provides NAT traversal by following the Interactive Connectivity Exchange methodology specified in [ICE]. The relevant SDP mappings are provided in [JINGLE-ICE]. 2.3. Sample Scenarios The following sections provide sample scenarios (or "call flows") that illustrate the principles of interworking from Jingle to SIP. These scenarios are not exhaustive. 2.3.1. Basic Voice Chat The protocol flow for a basic voice chat for which an XMPP user (juliet@example.com) is the iniator and a SIP user (romeo@example.net) is the responder. The voice chat is consummated through a gateway. To simplify the example, the transport method negotiated is "raw user datagram protocol" as specified in [JINGLE-UDP]. Saint-Andre Expires July 7, 2008 [Page 8] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 INITIATOR ...XMPP... GATEWAY ...SIP... RESPONDER | | | | session-initiate | | |----------------------->| | | IQ-result (ack) | | |<-----------------------| | | | INVITE | | |---------------------->| | | 180 Ringing | | |<----------------------| | session-info (ringing) | | |<-----------------------| | | IQ-result (ack) | | |----------------------->| | | | 200 OK | | |<----------------------| | session-accept | | |<-----------------------| | | IQ-result (ack) | | |----------------------->| | | | ACK | | |---------------------->| | MEDIA SESSION | |<==============================================>| | | BYE | | |<----------------------| | session-terminate | | |<-----------------------| | | IQ-result (ack) | | |----------------------->| | | | 200 OK | | |---------------------->| | | | The packet flow is as follows. First the XMPP user sends a Jingle session-initiation request to the SIP user. Saint-Andre Expires July 7, 2008 [Page 9] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 The gateway returns an XMPP IQ-result to the initiator on behalf of the responder. The gateway transforms the Jingle session-initiate action into a SIP INVITE. Saint-Andre Expires July 7, 2008 [Page 10] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 INVITE sip:romeo@example.net SIP/2.0 Via: SIP/2.0/TCP client.example.com:5060;branch=z9hG4bK74bf9 Max-Forwards: 70 From: Juliet Capulet ;tag=t3hr0zny To: Romeo Montague Call-ID: 3848276298220188511@example.com CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 184 v=0 o=alice 2890844526 2890844526 IN IP4 client.example.com s=- c=IN IP4 192.0.2.101 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:96 SPEEX/16000 a=rtpmap:97 SPEEX/8000 a=rtpmap:18 G729 The responder returns a SIP 180 Ringing message. SIP/2.0 180 Ringing Via: SIP/2.0/TCP client.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 From: Juliet Capulet ;tag=t3hr0zny To: Romeo Montague ;tag=v3rsch1kk3l1jk Call-ID: 3848276298220188511@example.com CSeq: 1 INVITE Contact: Content-Length: 0 The gateway transforms the ringing message into XMPP syntax. The initiator returns an IQ-result acknowledging receipt of the Saint-Andre Expires July 7, 2008 [Page 11] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 ringing message, which is used only by the gateway and not transformed into SIP syntax. The responder sends a SIP 200 OK to the initiator. SIP/2.0 200 OK Via: SIP/2.0/TCP client.example.com:5060;branch=z9hG4bK74bf9 ;received=192.0.2.101 From: Juliet Capulet ;tag=t3hr0zny To: Romeo Montague ;tag=v3rsch1kk3l1jk Call-ID: 3848276298220188511@example.com CSeq: 1 INVITE Contact: Content-Type: application/sdp Content-Length: 147 v=0 o=romeo 2890844527 2890844527 IN IP4 client.example.net s=- c=IN IP4 192.0.2.201 t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:97 SPEEX/8000 a=rtpmap:18 G729/8000 The gateway transforms the 200 OK into a Jingle session-accept action. Saint-Andre Expires July 7, 2008 [Page 12] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 If the payload types and transport candidate can be successfully used by both parties, then the initiator acknowledges the session-accept action. The parties now begin to exchange media. In this case they would exchange audio using the Speex codec at a clockrate of 8000 since that is the highest-priority codec for the responder (as determined by the XML order of the children). The parties may continue the session as long as desired. Eventually, one of the parties (in this case the responder) terminates the session. Saint-Andre Expires July 7, 2008 [Page 13] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 BYE sip:juliet@client.example.com SIP/2.0 Via: SIP/2.0/TCP client.example.net:5060;branch=z9hG4bKnashds7 Max-Forwards: 70 From: Romeo Montague ;tag=8321234356 To: Juliet Capulet ;tag=9fxced76sl Call-ID: 3848276298220188511@example.com CSeq: 1 BYE Content-Length: 0 The gateway transforms the SIP BYE into XMPP syntax. The initiator returns an IQ-result acknowledging receipt of the session termination, which is used only by the gateway and not transformed into SIP syntax. 3. SIP to Jingle To follow. 4. Security Considerations Detailed security considerations for session management are given for SIP in [SIP] and for XMPP in [JINGLE] (see also [XMPP]). 5. References Saint-Andre Expires July 7, 2008 [Page 14] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 5.1. Normative References [ICE] Rosenberg, J., "Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols", draft-ietf-mmusic-ice-19 (work in progress), October 2007. [JINGLE] Ludwig, S., Beda, J., Saint-Andre, P., McQueen, R., Egan, S., and J. Hildebrand, "Jingle", XSF XEP 0166, June 2007. [JINGLE-AUDIO] Ludwig, S., Saint-Andre, P., Egan, S., and R. McQueen, "Jingle Audio via RTP", XSF XEP 0167, November 2007. [JINGLE-ICE] Beda, J., Ludwig, S., Saint-Andre, P., Hildebrand, J., and S. Egan, "Jingle ICE-UDP Transport Method", XSF XEP 0176, November 2007. [JINGLE-UDP] Beda, J., Saint-Andre, P., Ludwig, S., Hildebrand, J., and S. Egan, "Jingle Raw UDP Transport", XSF XEP 0177, November 2007. [JINGLE-VIDEO] Saint-Andre, P. and M. Chen, "Jingle Video via RTP", XSF XEP 0180, November 2007. [RTP-AVP] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and Video Conferences with Minimal Control", STD 65, RFC 3551, July 2003. [SDP] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session Description Protocol", RFC 4566, July 2006. [SIP] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002. [SIP-XMPP] Saint-Andre, P., Houri, A., and J. Hildebrand, "Interworking between the Session Initiation Protocol (SIP) and the Extensible Messaging and Presence Protocol (XMPP): Core", draft-saintandre-sip-xmpp-core-00 (work in progress), January 2008. [TERMS] Bradner, S., "Key words for use in RFCs to Indicate Saint-Andre Expires July 7, 2008 [Page 15] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 Requirement Levels", BCP 14, RFC 2119, March 1997. [XMPP] Saint-Andre, P., "Extensible Messaging and Presence Protocol (XMPP): Core", RFC 3920, October 2004. 5.2. Informative References [HTTP] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. [RTP] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, July 2003. [TCP] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981. [UDP] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980. Author's Address Peter Saint-Andre XMPP Standards Foundation P.O. Box 1641 Denver, CO 80201 USA Email: stpeter@jabber.org URI: https://stpeter.im/ Saint-Andre Expires July 7, 2008 [Page 16] Internet-Draft SIP-XMPP Interworking: Media Sessions January 2008 Full Copyright Statement Copyright (C) The IETF Trust (2008). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Acknowledgment Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA). Saint-Andre Expires July 7, 2008 [Page 17]