DesignBuddyList » History » Version 56
Adrian Georgescu, 01/28/2010 12:46 PM
1 | 27 | Adrian Georgescu | = Presence blueprint = |
---|---|---|---|
2 | 2 | Adrian Georgescu | |
3 | 55 | Adrian Georgescu | [[TOC(DesignBuddyList, depth=2)]] |
4 | 1 | Adrian Georgescu | |
5 | 41 | Adrian Georgescu | This is a high level representation of a mechanism that maintains a '''Contacts list''' and handles subscriptions, publications and notifications that can be used by a GUI. It implements a combination of SIP SIMPLE standards related to presence event package, storage and policy. |
6 | 1 | Adrian Georgescu | |
7 | 53 | Adrian Georgescu | == Storage == |
8 | 1 | Adrian Georgescu | |
9 | 54 | Adrian Georgescu | The client maintains a '''Contacts list''' that is a concatenated list of resource-lists stored on multiple XCAP servers. A Contact is stored on exactly one XCAP server to provide atomic transaction. When a Contact is added/modified/deleted the corespondent remote XCAP storage is accessed. The remote storage is set per Contact in the Add/Edit Contact dialog. |
10 | 50 | Adrian Georgescu | |
11 | 1 | Adrian Georgescu | [[Image(BuddyList-Aggregation.png)]] |
12 | |||
13 | 49 | Adrian Georgescu | == Prerequisites == |
14 | |||
15 | 50 | Adrian Georgescu | To implement full presence support the following functionality must be available in the servers side. |
16 | |||
17 | 53 | Adrian Georgescu | 1. ~~Support in OpenXCAP for '''icon''' application, http://openxcap.org/ticket/100~~ |
18 | 1. ~~Support in OpenXCAP for '''xcap-directory''' application, http://openxcap.org/ticket/101~~ |
||
19 | 1 | Adrian Georgescu | 1. OpenSIPS '''xcap-diff''' module to perform refresh_watchers() |
20 | 53 | Adrian Georgescu | 1. ~~OpenSIPS '''dialog-info''' module to use XCAP document dialog-rules for authorization~~ |
21 | 50 | Adrian Georgescu | 1. OpenSIPS '''dialog-info''' module to sent notify for dialog-info.winfo Event |
22 | 1. OpenXCAP to perform PUBLISH for xcap-diff when any xcap doc changes |
||
23 | 53 | Adrian Georgescu | 1. ~~Implement caps payload type in client (device capabilities)~~ |
24 | 1. ~~Implement dialog-info event package in client~~ |
||
25 | 1. Replace OpenXCAP mi command for xcap-diff with a SIP PUBLISH |
||
26 | 47 | Adrian Georgescu | |
27 | 1 | Adrian Georgescu | == Account == |
28 | |||
29 | 54 | Adrian Georgescu | On boot: |
30 | 1 | Adrian Georgescu | |
31 | 54 | Adrian Georgescu | If account.xcap is enabled |
32 | |||
33 | 1 | Adrian Georgescu | * If '''account.xcap.xcap_root''' is not defined, locate XCAP root by doing a DNS TXT lookup for xcap.example.com |
34 | * GET XCAP application xcap-caps |
||
35 | * GET the default filename for all applications supported in xcap-caps and cache them locally |
||
36 | 54 | Adrian Georgescu | * If '''account.xcap.subscribe_xcap_diff''' is enabled, SUBSCRIBE for '''Event: xcap-diff''' |
37 | |||
38 | If account.presence.enable_publish is enabled |
||
39 | |||
40 | * If '''pidf-manipulation''' application is supported by XCAP server, update the '''presentity''' with the PIDF stored on the XCAP server |
||
41 | 1 | Adrian Georgescu | * Initialize own '''presentity''' |
42 | 54 | Adrian Georgescu | |
43 | If account.presence.subscribe_winfo is enabled |
||
44 | |||
45 | 1 | Adrian Georgescu | * Initialize '''watchers list''' for Event presence |
46 | 54 | Adrian Georgescu | * Send Subscribe for ''presence.winfo'' |
47 | 1 | Adrian Georgescu | |
48 | 54 | Adrian Georgescu | If account.presence.resource_lists is enabled |
49 | |||
50 | * Initialize the '''Contact List''' by using the content of the XCAP document '''resource-lists''' |
||
51 | |||
52 | 1 | Adrian Georgescu | While running |
53 | |||
54 | * Refresh the XCAP server location based on DNS TTL |
||
55 | 48 | Adrian Georgescu | * Reload XCAP documents based on '''xcap-diff''' NOTIFYs |
56 | 47 | Adrian Georgescu | |
57 | 54 | Adrian Georgescu | == Contacts List == |
58 | 48 | Adrian Georgescu | |
59 | 54 | Adrian Georgescu | The ''Contacts List'' contains is a list of contacts displayed by the GUI. For some contacts we SUBSCRIBE for '''Event: presence'''. The list is indexed by a unique SIP URI, a random SIP URI must be generated for contacts that do not have a SIP URI and we must mark the contacts that we want to subscribe to. |
60 | 15 | Adrian Georgescu | |
61 | 54 | Adrian Georgescu | Additional, one can store full names and other attributes for each contact by using extensions to PIDF for contact information (cipid extension). |
62 | 1 | Adrian Georgescu | |
63 | Based on received NOTIFY messages for Event=presence, each contact has a '''presentity''' attribute that contains its own published information. The GUI can display attributes of each '''presentity'''. |
||
64 | |||
65 | * The contacts list is stored in the main '''resource-lists''' XCAP document '''index''' |
||
66 | * Maintain a '''presentity''' attribute with what is received in the Notify for presence for each contact |
||
67 | * If '''account.presence.subscribe_rls_services''' is True, a RLS document that contains a list of discrete SIP URIs we subscribe to and PUT it on the server under SIP URI account-buddies@domain. Then a Subscribe is sent with Supported: eventlist for this SIP URI. /otherwise send SUBSCRIBVE to each contact for '''Event: presence''' |
||
68 | * On contacts list change, PUT resource-lists and rls-services documents on the XCAP server |
||
69 | |||
70 | A contact has properties related to his device capabilities (e.g. can_chat, can_share, can_talk, can_video). This is conveyed via '''presence caps''' and updates the preferences set by the local user |
||
71 | |||
72 | 56 | Adrian Georgescu | == Policy == |
73 | 53 | Adrian Georgescu | |
74 | 56 | Adrian Georgescu | * Based on NOTIFYs for event '''presence.winfo''' we alert the user about new watchers and we update the policy stored in the pres-rules XCAP document |
75 | 54 | Adrian Georgescu | * PUT '''pres-rules''' document on the XCAP server and cache it locally |
76 | 53 | Adrian Georgescu | |
77 | 1 | Adrian Georgescu | Transformations are required to support the following functionality: |
78 | 54 | Adrian Georgescu | |
79 | 1 | Adrian Georgescu | 1. First degree watchers - access to entire PIDF |
80 | 35 | Adrian Georgescu | 1. Second degree watchers - access to subset of PIDF |
81 | 54 | Adrian Georgescu | 1. Third degree watchers - access to basic presence online/offline |
82 | 32 | Adrian Georgescu | |
83 | 56 | Adrian Georgescu | == Icon == |
84 | 1 | Adrian Georgescu | |
85 | 56 | Adrian Georgescu | There is how OMA has specified such XCAP application [http://www.openmobilealliance.org/technical/release_program/docs/PresenceSIMPLE/V2_0-20081223-C/OMA-TS-Presence_SIMPLE_Content_XDM-V1_0-20081223-C.pdf Presence Content XDM Specification] |
86 | 1 | Adrian Georgescu | |
87 | Publishing end-point, on boot: |
||
88 | 9 | Adrian Georgescu | |
89 | 1 | Adrian Georgescu | 1. HTTP GET for xcap-directory and locate previously uploaded icon (e.g. ABC) |
90 | 1. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/ABC |
||
91 | 32 | Adrian Georgescu | |
92 | 9 | Adrian Georgescu | Publishing end-point, on icon change: |
93 | 1 | Adrian Georgescu | |
94 | 32 | Adrian Georgescu | 1. Generate a new random filename: XYZ |
95 | 9 | Adrian Georgescu | 1. Build URL http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ |
96 | 1. HTTP PUT to xcap server |
||
97 | 41 | Adrian Georgescu | 1. Update <icon> element of pidf and PUBLISH new pidf |
98 | 1. HTTP DELETE any previous icon file ABC |
||
99 | |||
100 | 1 | Adrian Georgescu | Subscribing end-point: |
101 | 48 | Adrian Georgescu | |
102 | 56 | Adrian Georgescu | 1. Parse <icon> element of pidf cipid extension received in Notify |
103 | 1 | Adrian Georgescu | 2. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ |
104 | 3. Cache picture until next NOTIFY with diferent <icon> element is received |
||
105 | |||
106 |