Presence is a complex issue and the mechanisms used internally by Blink may not necessarily work with your own SIP server. These mechanisms are described below.
= Live Service =
Create a free SIP account in Blink provided by http://sip2sip.info to have all Presence features mentioned operational.
= Server Compatibility =
Presence is a complex issue and the mechanisms used internally by Blink may not necessarily work under any SIP server environment. This document was written to provide a better understanding of these mechanisms. Presence require proper infrastructure that many SIP service providers simply lack today, so do not complain to us when Presence does not work with your SIP service provider.
OpenSIPS 1.9.0 and OpenXCAP 2.1.0 server software has been tested and is 100% compatible with Blink.
= Design Principles =
Blink should work with any SIP and XCAP servers that supports all related SIP SIMPLE standards, but only a subset of them are being used. They are described below:
* Blink relies on a Presence Agent collocated with the SIP Registrar that supports PUBLISH method, RLS subscriptions and XCAP storage
* Blink uses only TCP or TLS transports for signaling, Presence Agent must use TCP/TLS
* Presence Agent must support RLS subscriptions and [[http://tools.ietf.org/html/rfc4662| RLMI notifications]]
* Presence Agent must support handling of presence rules using `org.openmobilealliance.pres-rules` XCAP document
* Presence Agent must support external references from `rls-services` to `resource-lists` XCAP documents
* Presence Agent must support external references from `rls-services` to `org.openmobilealliance.pres-rules` XCAP document
* Presence Agent must support `presence` and `presence.winfo` event packages
* Presence Agent may support `xcap-diff` event package for XCAP documents replication between clients
* SIP Registrar may support GRUU
* XCAP server must support `rls-services`, `resource-lists`, `xcap-caps`, `org.openmobilealliance.pres-content`, `org.openmobilealliance.pres-rules`,
`org.openmobilealliance.xcap-directory`
* XCAP server may support serving the user icon from `org.openmobilealliance.pres-content` document
* XCAP server may support pidf-manipulation for offline status
Blink presence payload is based on [[https://tools.ietf.org/html/rfc4480 | RPID schema]] with its extensions for [[https://tools.ietf.org/html/rfc5196| media capabilities]] and [[https://tools.ietf.org/html/rfc4480 | person inrmation]]
In the GUI, presence has been indicated as 'Availability'.
== Standards ==
Blink presence functionality should interoperate without any issues with any other SIP client or SIP server implementing presence as far as the SIP signaling is concerned (PUBLISH, SUBSCRIBE and NOTFY methods). Blink functionality would however not interoperate for contacts storage level with other SIP clients under the same account due to the freedom allowed by the standards in modeling the data used for contacts storage. Blink will preserve contacts related information that it did not create itself in XCAP documents. Unfortunately, we have not found other clients that behave in the same way. Sharing the same XCAP documents with other SIP clients is therefore strongly discouraged.
"List of implemented standards":http://sipsimpleclient.org/projects/sipsimpleclient/wiki/SipFeatures#Presence
= Contacts Storage =
Contacts are stored on the XCAP server in the [[XCAP-samples#Resource-lists|resource-lists]] document under a proprietary name space to avoid conflicts with other end-points that might use the same document as there is no common standard way for how to store a rich address book on a server. This means that different SIP user agents from different vendors cannot read or modify this data in a deterministic way. The contacts in the address-book document are then used by [[XCAP-samples#RLS-services|rls-services]] and [[XCAP-samples#Presence-rules|pres-rules]] XCAP documents standardized by OMA. Each contacts have two presence related properties that can changed in Edit Contact Panel Subscriptions section:
* Subscribe to Contact's Availability Information
* Allow Contact to see my Availability Information
If a SIP URI part of the Contact is labelled as XMPP, when using a SIP2SIP.info account, new session requests will be automatically forwarded to the XMPP domain using the built-in SIP to XMPP gateway provided by SIP2SIP service.
== Subscribe To Presence ==
Using SIP SUBSCRIBE for RLS, Bink subscribes to the SIP addresses stored in rls-services document user+presence@domain service URI uploaded on the XCAP server by contacts management actions in the GUI (add/update/delete contacts).
= Policy Management =
Policy is used to express user preference about whether somebody that subscribed to our presence information is entitled to receive such information or not.
Using SUBSCRIBE for presence.winfo event package, Blink keeps track of watchers subscribed to our presence.
* New watchers that subscribed to our presence are rendered in the 'New Contact Requests' group that is rendered on top of the contacts list
* Right clicking on a new request entry, provides a contextual menu to block or add the contacts to the contacts list
* Dragging the request entry to an existing contact will merge the address of the request entry with the destination contact
* Blocked contacts are displayed in the Blocked group
* Active watchers are shown in system menu Blink -> Subscribers for My Availability
= Published Presence =
Blink user can publish a status and a note. Sometimes, Blink itself can change the status automatically, in situations when we do not perform any computer activity for a longer period or we start a phone call.
Presence status can be changed manually from the main GUI window and Status menu. Last combination of Presence state and note are saved in the history build at the end of the menu.
Status and note are automatically synchronized between multiple Blink instances under the same account.
Using PUBLISH method for the presence event package, the following information is published in a [[XCAP-samples#PIDF|PIDF]] document by Blink:
* Basic Status: Open or closed
* Extended Status: Blink uses a proprietary extension for indicating the extented status compatible with XMPP end-points
* Location: Location is based on CIPID map extension. Location can be disabled per account in Presence section of account preferences. Location is available only for accounts provided by sip2sip.info account. The format is a string Country/City.
* Homepage: A home page can be entered in Presence section of account preferences. Homepage is based on CIPID homepage extension
* Note: Presence note can be typed in the text area right to own icon in the main GUI window. Note is attached to the service
* Icon: User own icon is uploaded to XCAP server using OMA pres-content application, replicated among multiple Blink instances and location of icon storage URL on XCAP server is published in the PIDF
* Offline Presence: In status menu, one can change its presence state and also an offline state when Blink is offline. This is done using pidf-manipulation XCAP application, if supported by the XCAP server
* Media Capabilities: Type of media supported by the end-point
* Device Information: The following information is published: Hostname, Time offset, Idle status and GRUU contact address
== Presence Notifications ==
Presence information received from the SIP URIs as RLMI notifications from the RLS server is used to update each contact in the contacts list with:
* Status icon bar indicating away, busy, extended-away or available status
* Presence note is rendered on second line, multiple notes and pending authorizations are rotated every 10 seconds
* Icon is fetched from the icon URL published by the user
* User icon is retrieved and updated when necessary from URL advertised by user
Selecting Show Presence Information menu item from contextual contact menu show a panel with detailed information, not all information may have been rendered in the GUI.
= Sessions =
* When subscribed to Presence, if information is received, the contextual menu of each contact is updated with the possibility of starting a session to a specific device if the remote server and device uses GRUU.