Internet Draft Hisham Khartabil draft-khartabil-cpim-cimd2-mapping- 00.txt Category: Informational Tarek El Diab Hotsip February 2002 CPIM to CIMD2 Mapping STATUS OF THIS MEMO This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. 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 a 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. Copyright Notice Copyright (C) The Internet Society (2001). All Rights Reserved. Abstract Messaging is the fastest growing means of communication in the world. Mobile telephony and SMS have also been growing at an enormous rate, eventually bound to edge out traditional telephony systems in volumes and importance. Presence and Instant Messaging have become the cornerstones of modern communication. Mobile Presence integrates the concepts of presence over fixed and wireless networks for a wide variety of terminals. This memo introduces protocol mapping between CPIM [1], an IETF presence and messaging protocol, and CIMD2 [2], an SMS protocol. This brings the Presence and Instant Messaging service to the mobile user. Khartabil [Page 1] Internet Draft CPIM to CIMD2 Mapping February 2002 1.0 Introduction Until today, presence updates can only be done through accessing a PC or a PDA. The problem arises when a person needs to update his/her presence information whilst they are in a public place, on a street or any other place where there is no access to a PC. Also, PDA are very expensive and are very scarce in the market today. The average user on the street needing to update the presence information does not have means of doing so. This memo introduces protocol mapping between CPIM [1], an IETF presence and messaging protocol, and CIMD2 [2], an SMS protocol, through some Gateway. This brings the Presence and Instant Messaging service to the mobile user. CPIM complaint client users want to send IMÆs to Mobile phones (GSM numbers) and the Mobile users need to be able to send replies back to the CPIM complaint client user by pushing just the REPLY button in their mobile phone. Therefore the IMs (SMSs) need to be sent between two legitimate GSM numbers. 2.0 Definitions and Acronyms CPIM: A Common Profile for Instant Messaging. From-header: The CPIM message From header. To-header: The CPIM message To header. Message-content: The message body content of a CPIM message. CIMD2: Computer Interface to Message Distribution protocol. Destination Address: ID=021: Address code recipient for the short message. It is a CIMD2 field identifying the mobile phone number of the SMS recipient. Originating Address: ID=023: Originator Address code for the short message. It is a CIMD2 field identifying the mobile phone number of the SMS recipient. User Data: ID=033: Numeric/Alphanumeric message. Message Packet Number: Number used to identify the message. This number can have the value of odd numbers from 001 to 255 for messages submitted to SMSC or even numbers from 000 to 254 for messages delivered to Application. 3.0 CPIM-Side Originated Instant Message An example below shows a CPIM message, according to [4]: Khartabil [Page 2] Internet Draft CPIM to CIMD2 Mapping February 2002 m: Content-type: Message/CPIM s: h: From: Hisham Khartabil h: To: Tarek Eldiab h: Date: 2001-12-13T13:40:00-08:00 s: e: Content-type: text/plain; charset=utf-8 e: Content-ID: 1234567890@hotsip.com e: e: Here is the text of my message. The relevant parts from the CPIM message are the From-header, To- header and the Message-content. The following CIMD2 message example shows the result of the mapping from the above CPIM message: 03:003021:+358400067890023:+358400012345033:This is a message More generic: zz:NNNPPP:parameter1QQQ:parameter2RRR:parameter3 where: zz is the message packet type. NNN is the message packet number. CS is the Checksum value. 3.1 From-header mapping There are two options here: An ENUM [3] lookup is performed on the URL in the From-header. This lookup returns a phone number that is to be used. This phone number is stored in the CIMD2 Originator Address parameter. The second option is assigning a temporary number to the CIMD2 Originator Address, this helps the gateway map any replies by the recipient to the original message. 3.2 To-header mapping An ENUM [3] lookup is performed on the URL in the To-header. This lookup returns a phone number that is to be used. This phone number is stored in the CIMD2 Destination Address parameter. If a phone number is already in the user-name portion of the im URL, this number can be used as the Destination Address. 3.3 Message-content mapping Khartabil [Page 3] Internet Draft CPIM to CIMD2 Mapping February 2002 The CPIM Message-content is encoded according to [2] then copied directly into the CIMD2 User Data parameter if the CPIM Message- content length is smaller than 160 characters. When the CPIM message Message-content is greater than 160 characters, there needs to be multiple CIMD2 messages sent out. This is due to the limitations of the GSM SMS. The multiple CIMD2 messages will have the same Originator and Destination AddressÆs, but the message packet number value would increment for every message with the different Message-content. For example, if a message with content-length 430 is being sent from: Hisham Khartabil to: tarek eldiab who is on a GSM phone connected to a CIMD2 enabled SMSC, then that message needs to be mapped to a CIMD2 message(s). The first 160 characters will be in the first mapped CIMD2 message with an Originator Address value of Hisham's GSM number and Destination Address value of TarekÆs GSM number. The message packet number value of, say, 037 is assigned. The second mapped CIMD2 message will have the same Originator and Destination address values of the first message, with the message content from 161 to 320. The message packet number value will be 039. The final mapped UCP message will have the same Originator and Destination address values with the last characters 321 to 430 with a message packet number value of 041. 4.0 CIMD2-side Originated Instant Message (SMS) 4.1 Originator Address mapping The CIMD2 Originator Address field will be in the form of a mobile phone number. This is made into a CPIM From-header by: - Either attaching the host name at the end of the number, and by adding the string ôim:ö in front of the number, or - Performing an ENUM lookup on the number and retrieving the im address of the originator. 4.2 Destination Address mapping The CIMD2 Destination Address field will be in the form of a mobile phone number. This is made into a CPIM To-header by: - Either attaching the host name at the end of the number, and by adding the string ôim:ö in front of the number, or - Performing an ENUM lookup on the number and retrieving the im address of the intended recipient. 4.3 User Data mapping The message content of the CIMD2 message stored in the User Data field is converted into ASCII, UTF-8 or any other desired character set. It is then copied into the CPIM message-content field. Khartabil [Page 4] Internet Draft CPIM to CIMD2 Mapping February 2002 5.0 CPIM-Side Originated NOTIFY The from-header and to-header mapping are exactly as defined in section 3.1 and 3.2 respectively. This section will only talk about the message-content mapping. According to [5], a CPIM NOTIFY looks like this: m: Content-type: Message/CPIM s: h: From: Tarek Eldiab h: To: Hisham Khartabil h: Date: 2001-12-13T13:40:00-08:00 s: e: Content-type: application/cpim-pidf+xml e: Content-ID: 1234567890@hotsip.com e: Content-Length: .. . open tel:09012345678 Call me please! Short-message is build from 3 components of the pidf mime body: presentity id, value and note. The final SMS could look like: "tarek.eldiab@hotsip.com (open, Call me please!)" Or to save some SMS characters, you could represent is as follows: "tarek eldiab (+, Call me please!)". 6.0 CIMD2-Side Originated NOTIFY The Originating Address and Destination Address mapping are exactly as defined in section 4.1 and 4.2 respectively. This section will only talk about the Short-message mapping. The short-message could look like "hisham.khartabil@hotsip.com (closed, sleeping)" or "Hisham (-, sleeping)" Building this is easy: - tuple id is mobile-phone - presentity id is found like the from-header (by ENUM lookup), or by just copying the from-header - value is closed (the - signed means closed) - contact is the originator's mobile phone number as a tel-url - note is also copied from the SMS itself. Khartabil [Page 5] Internet Draft CPIM to CIMD2 Mapping February 2002 The final presence document would look like: closed tel:0407654321 sleeping 7.0 Open issues 8.0 Acknowledgments 9.0 References [1] D. Crocker et al., "A Common Profile for Instant Messaging(CPIM)", draft-ietf-impp-cpim-01.txt, Work in Progress. (Temporarily Expired) [2] "CIMD Interface Specification : Reference Document", Nokia Networks Oy. [3] P. Falstrom, E.164 number and DNS, RFC 2916 (Sep 2000) [4] D. Atkins, G. Klyne, "Common Presence and Instant Messaging Message Format", draft-ietf-impp-cpim-msgfmt-04.txt, Work in Progress. [5] H. Sugano, S. Fujimoto et al., "CPIM Presence Information Data Format", draft-ietf-impp-cpim-pidf-01.txt, Work in Progress. Khartabil [Page 6]