1.2.3 Presence
Presence service is a framework that manages presence information about the users. It accepts, stores and distributes presence documents.
The implementation represents the centralized model in which all subscriptions, sent via the SUBSCRIBE message, are handled by the server. The message PUBLISH (RFC 3903) allows endpoints to inform the presence server about their subscription states.
Information about watchers and publishers is stored in the voipswitch database. The implementation of how the list of watched resources is maintained on the client can use one of three options:
- Store the list of observed resources locally
- Retrieve the list from the database (this is how the VUP works)
- Subscribe to the resource list (RLMI) and let the server ask the Resource List Server to get the list of resources – this method is used in the RCS softphones
The server uses SIP SIMPLE presence specifications which 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 subscribing to an event on a server, the server responds with NOTIFY whenever the event comes up. RFC 3856 defines further how to make use of SUBSCRIBE/NOTIFY for presence.
- 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. The documents are stored in voipswitch.presence_publications
Privacy policy. The rules of who can be subscribed to a given presentity is stored in the voipswitch.presence_policy table.