Presence

Version 55 (Adrian Georgescu, 09/21/2012 01:08 pm)

1 1 Adrian Georgescu
h1. Presence
2 1 Adrian Georgescu
3 47 Adrian Georgescu
This functionality will be available in upcoming Blink Pro 2.0 and Blink Lite 2.0 for MacOSX and also on Blink-Qt for Window and Linux.
4 44 Adrian Georgescu
5 15 Adrian Georgescu
h2. Design Principles
6 15 Adrian Georgescu
7 55 Adrian Georgescu
Blink should work with any SIP and XCAP servers that supports all related SIP SIMPLE standards, but only a subset of them are used. They are described below:
8 55 Adrian Georgescu
9 1 Adrian Georgescu
 * Blink uses only TCP or TLS transports for signaling
10 38 Adrian Georgescu
 * Blink presence payload is based on "RPID schema":http://tools.ietf.org/html/rfc4480
11 43 Adrian Georgescu
 * Blink relies on a Presence Agent collocated with the SIP Registrar that supports PUBLISH method and XCAP storage
12 40 Adrian Georgescu
 * Presence Agent must support handling of presence rules using org.openmobilealliance.pres-rules XCAP document
13 40 Adrian Georgescu
 * Presence Agent must support external references from rls-services to resource-lists
14 40 Adrian Georgescu
 * Presence Agent must support external references from rls-services to  org.openmobilealliance.pres-rules
15 40 Adrian Georgescu
 * Presence Agent must support presence and presence.winfo event packages
16 43 Adrian Georgescu
 * Presence Agent may support xcap-diff event package for XCAP documents replication between clients
17 42 Adrian Georgescu
 * Presence Agent must support RLS subscriptions and "RLMI notifications":http://tools.ietf.org/html/rfc4662
18 45 Adrian Georgescu
 * SIP Registrar may support GRUU
19 53 Adrian Georgescu
 * XCAP server may support serving the user icon from org.openmobilealliance.pres-content document
20 40 Adrian Georgescu
 * XCAP server must support the following XCAP applications: rls-services, resource-lists, xcap-caps, org.openmobilealliance.pres-content, org.openmobilealliance.pres-rules, org.openmobilealliance.xcap-directory
21 40 Adrian Georgescu
 * XCAP server may support pidf-manipulation for offline status
22 28 Adrian Georgescu
23 29 Adrian Georgescu
24 25 Adrian Georgescu
h3. Standards
25 25 Adrian Georgescu
26 25 Adrian Georgescu
http://sipsimpleclient.com/projects/sipsimpleclient/wiki/SipFeatures#Presence
27 18 Adrian Georgescu
28 1 Adrian Georgescu
h3. Disclaimer
29 19 Adrian Georgescu
30 29 Adrian Georgescu
There is no guaranty Blink Presence functionality would interoperate with other SIP clients due to the freedom allowed by the standards in modeling the data used for contacts storage.
31 27 Adrian Georgescu
32 1 Adrian Georgescu
h3. Interoperability
33 1 Adrian Georgescu
34 21 Adrian Georgescu
Presence is a complex issue and the mechanisms used internally by Blink may not necessarily work under your own server environment. If you want to troubleshot when things do not work as expected, first use the built-in Blink accounts that are designed to work with SIP2SIP domain. As protocol traces for signaling and storage are logged to file, you can easily access such debug information and analyze Blink behavior.
35 1 Adrian Georgescu
36 32 Adrian Georgescu
We can provide support, if you encounter interoperability issues with any the following products and services against which Blink has been fully tested:
37 1 Adrian Georgescu
38 1 Adrian Georgescu
 * SIP2SIP.info (a public free SIP service)
39 33 Adrian Georgescu
 * Interoperability with XMPP domains (using SylkServer SIP/XMPP gateway)
40 1 Adrian Georgescu
 * OpenSIPS/OpenXCAP combination (server software you can run on your premisses)
41 48 Adrian Georgescu
42 48 Adrian Georgescu
There is nothing that should prevent Blink interoperate with any other SIP end-points as far as SIP signaling is concerned (PUBLISH, SUBSCRIBE and NOTIFY methods). Blink will preserve contacts related information it did not create 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 as is guaranteed to cause failures.
43 27 Adrian Georgescu
44 27 Adrian Georgescu
You can also enable one SIP2SIP account in your Blink instance to perform presence and contact storage operations while using your preferred SIP provider to make phone calls.
45 18 Adrian Georgescu
46 15 Adrian Georgescu
h3. Support
47 15 Adrian Georgescu
48 34 Adrian Georgescu
As presence require proper infrastructure that many SIP service providers simply lack today, do not complain to us when Presence does not work with your SIP service provider.
49 15 Adrian Georgescu
50 15 Adrian Georgescu
h2. Contacts
51 24 Adrian Georgescu
52 34 Adrian Georgescu
Contacts are stored on the XCAP server in the 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 are then used by standard OMA rls-services and pres-rules XCAP documents. Contacts have two Presence related properties that can changed in Edit Contact Panel Subscriptions section:
53 1 Adrian Georgescu
54 1 Adrian Georgescu
 * Subscribe to Contact's Presence Information
55 8 Adrian Georgescu
 * Allow Contact to see my Presence Information
56 34 Adrian Georgescu
 * If an URI part of the contact is labelled as XMPP, when using a SIP2SIP.info account the session request will be forwarded to an XMPP gateway.
57 1 Adrian Georgescu
58 4 Adrian Georgescu
h2. Watcher Information
59 4 Adrian Georgescu
60 13 Adrian Georgescu
Using SUBSCRIBE for presence.winfo event package, Blink keeps track of presence watchers and their status.
61 6 Adrian Georgescu
 
62 4 Adrian Georgescu
 * Contacts that have subscribed to our presence are rendered in the 'New Contact Requests' group that is rendered on top of the contacts list. Right click or dragging the contact can be used to allow or deny the request. Blocked contacts are displayed in the Blocked group.
63 4 Adrian Georgescu
 * Active watchers are shown in Status -> People Watching  My Presence Activity menu
64 4 Adrian Georgescu
65 6 Adrian Georgescu
h2. Published Presence
66 1 Adrian Georgescu
67 13 Adrian Georgescu
Using PUBLISH method for presence event package, the following information is published by Blink:
68 1 Adrian Georgescu
69 7 Adrian Georgescu
h3. Basic Status
70 7 Adrian Georgescu
71 7 Adrian Georgescu
Open or closed.
72 7 Adrian Georgescu
73 14 Adrian Georgescu
h3. Extended Status
74 7 Adrian Georgescu
75 14 Adrian Georgescu
Blink uses a proprietary extension for indicating the extented status compatible with XMPP end-points. 
76 7 Adrian Georgescu
77 6 Adrian Georgescu
h3. Location
78 1 Adrian Georgescu
79 6 Adrian Georgescu
Location is based on CIPID map extension. Location can be disabled per account in Presence section of account preferences.
80 6 Adrian Georgescu
81 6 Adrian Georgescu
h3. Homepage
82 6 Adrian Georgescu
83 6 Adrian Georgescu
A home page can be entered in Presence section of account preferences. Homepage is based on CIPID homepage extension.
84 1 Adrian Georgescu
85 3 Adrian Georgescu
h3. Note
86 6 Adrian Georgescu
87 14 Adrian Georgescu
Presence note can be typed in the text area right to own icon in the main GUI window. Note is attached to the service.
88 5 Adrian Georgescu
89 5 Adrian Georgescu
h3. Status
90 1 Adrian Georgescu
91 7 Adrian Georgescu
Presence status can be changed 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. 
92 1 Adrian Georgescu
93 5 Adrian Georgescu
h3. Icon
94 1 Adrian Georgescu
95 1 Adrian Georgescu
User icon is uploaded to XCAP server using OMA pres-content application, replicated among multiple Blink instances and location of icons storage URL on XCAP server is published in PIDF.
96 1 Adrian Georgescu
97 1 Adrian Georgescu
h3. Offline Presence
98 1 Adrian Georgescu
99 1 Adrian Georgescu
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.
100 1 Adrian Georgescu
101 1 Adrian Georgescu
h3. Media Capabilities
102 1 Adrian Georgescu
103 1 Adrian Georgescu
Type of media supported by the end-point.
104 1 Adrian Georgescu
105 1 Adrian Georgescu
h3. Device Information
106 1 Adrian Georgescu
107 1 Adrian Georgescu
The following information is published:
108 1 Adrian Georgescu
109 1 Adrian Georgescu
 * Hostname
110 1 Adrian Georgescu
 * Time offset
111 9 Adrian Georgescu
 * Idle status
112 1 Adrian Georgescu
 * GRUU contact address
113 8 Adrian Georgescu
114 52 Adrian Georgescu
h3. Payload Example
115 46 Adrian Georgescu
116 46 Adrian Georgescu
<pre>
117 46 Adrian Georgescu
Content-Type: application/pidf+xml
118 46 Adrian Georgescu
119 46 Adrian Georgescu
<?xml version="1.0"?>
120 50 Adrian Georgescu
<presence xmlns="urn:ietf:params:xml:ns:pidf" entity="sip:ag@test.sip2sip.info">
121 50 Adrian Georgescu
  <tuple xmlns="urn:ietf:params:xml:ns:pidf" xmlns:agp-pidf="urn:ag-projects:xml:ns:pidf" xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" xmlns:caps="urn:ietf:params:xml:ns:pidf:caps" xmlns:agp-caps="urn:ag-projects:xml:ns:pidf:caps" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" id="SID-f4649f87-1aa3-44ec-ab49-d0464528d706">
122 50 Adrian Georgescu
    <status>
123 50 Adrian Georgescu
      <basic>open</basic>
124 50 Adrian Georgescu
      <agp-pidf:extended>away</agp-pidf:extended>
125 50 Adrian Georgescu
    </status>
126 50 Adrian Georgescu
    <c:display-name>Adrian Georgescu</c:display-name>
127 50 Adrian Georgescu
    <c:map>Netherlands/Haarlem</c:map>
128 50 Adrian Georgescu
    <c:icon>https%3A//xcap.test.sipthor.net/xcap-root/org.openmobilealliance.pres-content/users/sip%3Aag%40test.sip2sip.info/oma_status-icon/index</c:icon>
129 50 Adrian Georgescu
    <c:homepage>http%3A//georgescu.info</c:homepage>
130 50 Adrian Georgescu
    <agp-pidf:device-info id="f4649f87-1aa3-44ec-ab49-d0464528d706">
131 50 Adrian Georgescu
      <agp-pidf:description>imac3-2</agp-pidf:description>
132 50 Adrian Georgescu
      <agp-pidf:user-agent>Blink Pro 2.0.0 (MacOSX)</agp-pidf:user-agent>
133 50 Adrian Georgescu
      <agp-pidf:time-offset>120</agp-pidf:time-offset>
134 50 Adrian Georgescu
    </agp-pidf:device-info>
135 50 Adrian Georgescu
    <caps:servcaps>
136 50 Adrian Georgescu
      <caps:audio>true</caps:audio>
137 50 Adrian Georgescu
      <caps:message>true</caps:message>
138 50 Adrian Georgescu
      <caps:text>true</caps:text>
139 50 Adrian Georgescu
      <agp-caps:file-transfer>true</agp-caps:file-transfer>
140 50 Adrian Georgescu
      <agp-caps:screen-sharing>true</agp-caps:screen-sharing>
141 50 Adrian Georgescu
    </caps:servcaps>
142 50 Adrian Georgescu
    <rpid:user-input idle-threshold="600">active</rpid:user-input>
143 50 Adrian Georgescu
    <dm:deviceID>f4649f87-1aa3-44ec-ab49-d0464528d706</dm:deviceID>
144 50 Adrian Georgescu
    <contact>sip%3Aag%40test.sip2sip.info</contact>
145 50 Adrian Georgescu
    <note/>
146 50 Adrian Georgescu
    <timestamp>2012-09-21T12:53:57.802353+02:00</timestamp>
147 50 Adrian Georgescu
  </tuple>
148 50 Adrian Georgescu
  <dm:person xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" id="PID-5c82e1b170c9aa1a670c4388052657f2">
149 50 Adrian Georgescu
    <rpid:time-offset>120</rpid:time-offset>
150 50 Adrian Georgescu
    <dm:timestamp>2012-09-21T12:53:57.802353+02:00</dm:timestamp>
151 50 Adrian Georgescu
  </dm:person>
152 50 Adrian Georgescu
  <dm:device xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" id="DID-f4649f87-1aa3-44ec-ab49-d0464528d706">
153 50 Adrian Georgescu
    <dm:deviceID>f4649f87-1aa3-44ec-ab49-d0464528d706</dm:deviceID>
154 50 Adrian Georgescu
    <dm:note>Blink Pro 2.0.0 (MacOSX) at imac3-2</dm:note>
155 50 Adrian Georgescu
    <dm:timestamp>2012-09-21T12:53:57.802353+02:00</dm:timestamp>
156 50 Adrian Georgescu
  </dm:device>
157 50 Adrian Georgescu
</presence>
158 46 Adrian Georgescu
</pre>
159 46 Adrian Georgescu
160 10 Adrian Georgescu
h2. Subscribe To Presence
161 3 Adrian Georgescu
162 8 Adrian Georgescu
Using SIP SUBSCRIBE for RLS, Bink subscribes to the SIP addresses stored in rls-services document uploaded on the XCAP server by contacts management actions in the GUI (add/update/delete contacts).
163 1 Adrian Georgescu
 
164 10 Adrian Georgescu
h3. Presence Notifications
165 10 Adrian Georgescu
166 6 Adrian Georgescu
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:
167 1 Adrian Georgescu
168 53 Adrian Georgescu
 * Icon is fetched from the icon URL published by the user
169 1 Adrian Georgescu
 * Status icon overlaid on botton right of user icon, indicating away, busy, extended-away or available
170 1 Adrian Georgescu
 * Rectangular presence indicator on right side of the tile to provide a quick overview about availability
171 1 Adrian Georgescu
 * Presence note is rendered on second line, multiple notes and pending authorizations are rotated every 10 seconds
172 1 Adrian Georgescu
 * User icon is retrieved and updated when necessary from URL advertised by user 
173 2 Adrian Georgescu
174 2 Adrian Georgescu
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.
175 1 Adrian Georgescu
176 1 Adrian Georgescu
h2. Sessions
177 1 Adrian Georgescu
178 49 Adrian Georgescu
 * 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.