Internet Draft Hisham Khartabil draft-khartabil-cpim-smpp-mapping- 00.txt Category: Informational Tarek El Diab Hotsip January 2002 CPIM to SMPP 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 (2002). 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 SMPP [2], an SMS protocol. This brings the Presence and Instant Messaging service to the mobile user. Khartabil [Page 1] Internet Draft CPIM to UCP/EMI Mapping January 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 SMPP [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. SMPP: Short Message Peer to Peer protocol. Destination-addr: Destination address of the short message. For mobile terminated messages, this is the SME address of the target subscriber. Source-addr: Address of SME (Short Message Entity)which originated the message. This is the source address of the short message submitted. Short-message: Numeric/Alphanumeric message. Sequence-No.: Transaction Reference Number. This number can have the value of 0-2147483647. Validity-period: Modified Validity Period. SM: System Message. 3.0 CPIM-Side Originated Instant Message Khartabil [Page 2] Internet Draft CPIM to UCP/EMI Mapping January 2002 An example below shows a CPIM message, according to [4]: m: Content-type: Message/CPIM s: h: From: Hisham Khartabil h: To: Tarek El Diab h: Date: 2001-12-23T14: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 SMPP message example shows the result of the mapping from the above CPIM message: 00 00 00 37 00 00 00 04 00 00 00 00 00 00 00 01 00 01 00 01 01 33 35 38 30 30 36 37 38 39 30 00 01 01 33 35 38 30 30 30 31 32 33 34 35 00 00 00 00 00 00 00 00 00 00 00 More generic: Header = 32 bytes 00 00 00 37 = Command-Length 00 00 00 04 = Command-ID 00 00 00 00 = Command-Status 00 00 00 01 = Sequence-No. Message-Body : Contains source and destination address and message amongst other parameters 00 01 00 01 01 33 35 38 30 30 36 37 38 39 30 00 01 01 33 35 38 30 30 30 31 32 33 34 35 00 00 00 00 00 00 00 00 00 00 00 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 SMPP's Source-addr header. The second option is assigning a temporary number to the SMPP Source-addr, 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 SMPP's Destination-addr header. Khartabil [Page 3] Internet Draft CPIM to UCP/EMI Mapping January 2002 If a phone number is already in the user-name portion of the im URL, this number can be used as the Destination-addr number. 3.3 Message-content mapping The CPIM Message-content is encoded according to [2] then copied directly into the SMPP's Short-message header 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 SMPP messages sent out. This is due to the limitations of the GSM SMS. The multiple SMPP messages will have the same Source-addr and Destination-addr, but the Sequence-No. 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 El Diab who is on a GSM phone connected to a SMPP enabled SMSC, then that message needs to be mapped to a SMPP message(s). The first 160 characters will be in the first mapped SMPP message with an Source-addr value of Hisham's GSM number, Destination-addr value of TarekÆs GSM number. The Sequence-No. value of, say, 37 is assigned. The second mapped SMPP message will have the same Source-addr and Destination-addr values of the first message, with the message content from 161 to 320. The Sequence-No. value will be 38. The final mapped SMPP message will have the same Source-addr and Destination-addr values with the last characters 321 to 430 with a Sequence-No. value of 39. 4.0 SMPP-side Originated Instant Message (SMS) 4.1 Source-addr mapping The SMPP Source-addr 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 intended recipient. 4.2 Destination-addr mapping The SMPP Destination-addr 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 Short-message mapping Khartabil [Page 4] Internet Draft CPIM to UCP/EMI Mapping January 2002 The message content of the SMPP message stored in the Short-message field is converted into ASCII, UTF-8 or any other desired character set. It is then copied into the CPIM message-content field. 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 UCP-Side Originated NOTIFY The Source-addr and Destiantion-addr 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 Khartabil [Page 5] Internet Draft CPIM to UCP/EMI Mapping January 2002 - 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. The final presence document would look like: closed tel:0407654321 sleeping 6.0 Open issues 7.0 Acknowledgments 8.0 References [1] D. Crocker et al., "Common Presence and Instant Messaging(CPIM)", draft-ietf-impp-cpim-02.txt, Work in Progress. [2] "Short Message Peer to Peer Protocol Specification v3.4" SMPP Forum. October 1999. [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]