SIMPLE (instant messaging protocol)
# SIMPLE (instant messaging protocol)

SIMPLE, the Session Initiation Protocol for Instant Messaging and Presence Leveraging Extensions, is an instant messaging (IM) and presence protocol suite based on Session Initiation Protocol (SIP) managed by the Internet Engineering Task Force.

## Purpose

SIMPLE applies SIP to the problems of:

* registering for presence information and receiving notifications when such events occur, for example when a user logs in or comes back from lunch;
* sending short messages, analogous to SMS or two-way paging;
* managing a session of real-time messages between two or more participants.

Implementations of the SIMPLE based protocols can be found in SIP Softphones and also in SIP Hardphones.

## Technical description

### Presence

The SIMPLE presence specifications can be broken up into:

* The core protocol machinery. This provides the actual SIP extensions for subscriptions, notifications and publications. RFC 6665 defines the SUBSCRIBE and NOTIFY methods. SUBSCRIBE allows users to subscribe to an event on a server, the server responds with NOTIFY whenever the event occurs. RFC 3856 defines how to make use of SUBSCRIBE/NOTIFY for presence. Two models are defined: an end-to-end model in which each User Agent handles presence subscriptions itself; and a centralized model. The latter introduces the concept of a presence server; all subscriptions are handled by this server. The message PUBLISH (RFC 3903) allows User Agents to inform the presence server about their subscription states.
* Presence documents. The presence information is coded in XML documents, that are carried in the bodies of the respective SIP messages. RFC 3863 and RFC 4479 describe this procedure, RFC 4480 (RPID), RFC 4481, RFC 4482 (CPID) and various drafts describe contents and formats of the presence documents.
* Privacy, policy and provisioning. If the centralized model is used, the User Agents need a way to define who may subscribe to which amount of their presence information. RFC 4745 and RFC 5025 define a framework for authorization policies controlling access to application-specific data. The XCAP (RFC 4825), carried by HTTP, allows User Agents to communicate their presence rules to a XCAP server, which rules the information exposed by the presence server. RFC 3857 and RFC 3858 define a subscription event "watcher info". User Agents may subscribe to this event to be informed who is subscribing to their presence information.

### IM

SIP defines two modes of instant messaging:

* The Page Mode makes use of the SIP method MESSAGE, as defined in RFC 3428. This mode establishes no sessions.
* The Session Mode. The Message Session Relay Protocol (RFC 4975, RFC 4976) is a text-based protocol for exchanging arbitrarily-sized content between users, at any time. An MSRP session is set up by exchanging certain information, such as an MSRP URI, within SIP and SDP signalling.
