A way of sending near real-time text S. Kumlien using SIP Message nWise AB 3 2011 Safe text character by character Abstract This document describes a private Session Initiation Protocol (SIP) [RFC3261] header (P-header), used to achieve near real-time sending of text using SIP Message requests along with its applicability. Text formating is specified in ITU-T Recommendation T.140. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 2. Overall applicability . . . . . . . . . . . . . . . . . . . . . 2 3. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 5. Sending SIP Messages . . . . . . . . . . . . . . . . . . . . . 3 6. Protection against Loss of Data . . . . . . . . . . . . . . . . 3 7. SIP Private Header . . . . . . . . . . . . . . . . . . . . . . 3 7.1. The P-Safe-Text header . . . . . . . . . . . . . . . . . . 3 7.1.1. P-Safe-Text Header Syntax . . . . . . . . . . . . . . . 3 8. Content Type . . . . . . . . . . . . . . . . . . . . . . . . . 3 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 3 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 4 10.1. Normative References . . . . . . . . . . . . . . . . . . . 4 10.2. Informative References . . . . . . . . . . . . . . . . . . 4 Appendix A. SIP examples . . . . . . . . . . . . . . . . . . . . . 4 A.1. Example of SIP Invite Request containing a P-Safe-Text header . . . . . . . . . . . . . . . . . . . . . . . . . . 4 A.2. Example of SIP 200 OK Response to an Invite Request, containing a P-Safe-Text header . . . . . . . . . . . . . . 4 A.3. Example of SIP Message Request with Content-Type-Header set to 'text/plain' . . . . . . . . . . 5 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . . 5 Appendix C. Open Issues . . . . . . . . . . . . . . . . . . . . . 5 Kumlien [Page 1] Safe text character by character 3 2011 1. Introduction This memo defines a way to get near real-time (character-by- character) chat functionality using SIP MESSAGE [RFC3428] requests. The purpose is to present the text typed by the sender as soon as possible on the device used by the receiver. The method is typically implemented in the UAC by sending a MESSAGE request as soon as possible after the detection of user input. The difference from the standard behaviour is that the UAC doesn't wait for the user to hit the return key before sending, instead every typed character is (possibly) sent individually. The P-Header defined in this document is used to facilitate a simple negotiation procedure were the UAC and UAS signals it's support for this method of sending text. 2. Overall applicability The SIP extensions specified in this document make no assumptions regarding the surrounding environment except a SIP compliant UAC and UAS. A UAS not implementing the mechanism described in this document can safely ignore the P-Header described. 3. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 4. Overview This document describes a way to address the requirement to let characters appear in near real-time as they are typed, not as a block of text after it is written (as they do in a typical IM or SMS application). The preferred way to implement real-time text in a SIP environment is to send text using RTP as described in RFC 4103 [RFC4103] (see Real-time text task force [1] for more information). For one or several reasons this approach might not be suitable for all environments. The reason could be anything from technical difficulties to requirements regarding interception of the text sent. This document describes a private extension header used to mimic this behaviour using plain SIP Message requests. The obvious drawback of this method is it's chattiness and it's obvious advantage is it's simplicity. Since this method uses the SIP signaling path instead of the speech path, to transfer text it also achieves a higher degree of reliability. Kumlien [Page 2] Safe text character by character 3 2011 5. Sending SIP Messages The UAC MUST send SIP MESSAGE requests in an established SIP dialog to ensure that the sent messages gets delivered to the correct UAS. 6. Protection against Loss of Data The UAC MUST never send more than 4 SIP MESSAGE requests per second. The UAC SHOULD wait for a SIP Response before sending the next SIP MESSAGE to avoid congestion. 7. SIP Private Header 7.1. The P-Safe-Text header The purpose of the P-Safe-Text header field is to provide an indication from a SIP UAC that it supports this way of sending text near real-time. If used the header MUST be present in the SIP INVITE request. It is also used for a SIP UAS to confirm the support for sending text this way. If used, this header field MUST occur in a final 200 OK Response. To detect missing characters this header SHOULD contain a sequence number and be present in every SIP MESSAGE Request sent. 7.1.1. P-Safe-Text Header Syntax The syntax of the P-Safe-Text header is described as an augmented Backus-Naur Form (BNF) [RFC4234]: P-Safe-Text = "P-Safe-Text" 8. Content Type A SIP UAC utilizing the Safe text character by character way of sending a SIP Message Request MUST specify the Content Type Header to use media type 'text' and media sub type 'plain'. A SIP UAS receiving a SIP Message Request with this content type SHOULD treat the text as entered character-by-character and SHOULD NOT add a trailing CR-LF to the text. 9. IANA Considerations This memo includes no request to IANA. 10. References Kumlien [Page 3] Safe text character by character 3 2011 10.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3261] 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. [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 4234, October 2005. [RFC3428] Campbell, B., Rosenberg, J., Schulzrinne, H., Huitema, C., and D. Gurle, "Session Initiation Protocol (SIP) Extension for Instant Messaging", RFC 3428, December 2002. [ITU.T140.1998] "Protocol for Multimedia Application Text Conversation", ITU-T Recommendation T.140, February 1998. 10.2. Informative References [RFC3410] Case, J., Mundy, R., Partain, D., and B. Stewart, "Introduction and Applicability Statements for Internet-Standard Management Framework", RFC 3410, December 2002. [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, June 1999. [RFC4103] Hellstrom, G. and P. Jones, "RTP Payload for Text Conversation", RFC 4103, June 2005. URIs [1] Appendix A. SIP examples A.1. Example of SIP Invite Request containing a P-Safe-Text header A.2. Example of SIP 200 OK Response to an Invite Request, containing a P-Safe-Text header Kumlien [Page 4] Safe text character by character 3 2011 A.3. Example of SIP Message Request with Content-Type-Header set to 'text/plain' Appendix B. Change Log Appendix C. Open Issues 1. Should we allow mixing of normal/safe text character by character Message requests in the same session? If not, what action should a UAS take? 2. Is there a need to specify a value for the headers? Author's Address Svante Kumlien nWise AB Oesteroegatan 1 164 40 Kista Sweden Phone: +46-8-12 00 26 00 EMail: info@nwise.se Kumlien [Page 5]