DesignBuddyList » History » Version 49
Adrian Georgescu, 10/23/2009 07:11 AM
1 | 27 | Adrian Georgescu | = Presence blueprint = |
---|---|---|---|
2 | 2 | Adrian Georgescu | |
3 | [[TOC(Design*, depth=1)]] |
||
4 | 1 | Adrian Georgescu | |
5 | 46 | Adrian Georgescu | This is a high level representation of a mechanism that maintains a '''Contacts list''' that can be used by a GUI. It implements a combination of SIP SIMPLE standards related to presence event package, storage and policy. |
6 | 14 | Adrian Georgescu | |
7 | 1 | Adrian Georgescu | * Account |
8 | 41 | Adrian Georgescu | * Contacts |
9 | 44 | Adrian Georgescu | * Watcher list |
10 | 1 | Adrian Georgescu | * Presence rules |
11 | * Icon exchange |
||
12 | 41 | Adrian Georgescu | * Preferences |
13 | 1 | Adrian Georgescu | |
14 | 49 | Adrian Georgescu | == Design principles == |
15 | |||
16 | [[Image(BuddyList-Aggregation.png)]] |
||
17 | |||
18 | The client maintains a Contacts list that is a contacted list of resource-lists documents stored on multiple XCAP servers. A Contact is stored on exactly one XCAP server to provide atomic transaction. |
||
19 | |||
20 | |||
21 | 48 | Adrian Georgescu | == Prerequisites == |
22 | 1 | Adrian Georgescu | |
23 | 48 | Adrian Georgescu | 1. Support in OpenXCAP for icon application, http://openxcap.org/ticket/100 |
24 | 1. Support in OpenXCAP for xcap-directory application, http://openxcap.org/ticket/101 |
||
25 | 1. OpenSIPS xcap-diff module to perform refresh_watchers() |
||
26 | 1. OpenSIPS dialog-info module to use XCAP document dialog-rules for authorization |
||
27 | 1. OpenSIPS dialog-info module to sent notify for dialog-info.winfo Event |
||
28 | 1. OpenXCAP to perform PUBLISH for xcap-diff when any xcap doc changes |
||
29 | 1. Implement caps payload type in client (device capabilities) |
||
30 | 1. Implement dialog-info event package in client |
||
31 | 47 | Adrian Georgescu | |
32 | 48 | Adrian Georgescu | == Account == |
33 | 1 | Adrian Georgescu | |
34 | 48 | Adrian Georgescu | On boot if presence enabled |
35 | |||
36 | 1 | Adrian Georgescu | * If '''account.presence.xcap_root''' is not defined, locate XCAP root by doing a DNS TXT lookup for xcap.example.com |
37 | * GET XCAP application xcap-caps |
||
38 | * GET the default filename for all applications supported in xcap-caps and cache them locally |
||
39 | 48 | Adrian Georgescu | * Initialize own '''presentity''' |
40 | * Initialize '''watchers list''' for Event presence |
||
41 | * Initialize '''watchers list''' for Event dialog-info |
||
42 | * If '''pidf-manipulation''' application is supported by XCAP server, update the '''presentity''' with the PIDF stored on the XCAP server |
||
43 | * Compose and send PUBLISH for '''Event: presence''' |
||
44 | 1 | Adrian Georgescu | * Initialize '''Contacts''' using the content of the XCAP document '''resource-lists''' |
45 | 48 | Adrian Georgescu | * If '''account.presence.subscribe_xcap_diff''' is Enabled, SUBSCRIBE for '''Event: xcap-diff''' |
46 | 1 | Adrian Georgescu | |
47 | 48 | Adrian Georgescu | While running |
48 | 1 | Adrian Georgescu | |
49 | * Refresh the XCAP server location based on DNS TTL |
||
50 | * Reload XCAP documents based on '''xcap-diff''' NOTIFYs |
||
51 | 47 | Adrian Georgescu | |
52 | 1 | Adrian Georgescu | == Contacts == |
53 | |||
54 | 48 | Adrian Georgescu | Contains is a list of contacts displayed in a GUI. For some contacts we SUBSCRIBE for '''Event: presence''' and '''Event: dialog-info'''. 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. |
55 | 47 | Adrian Georgescu | |
56 | Additional, one can store full names and other attributes for each contact by using extensions to PIDF for contact information. |
||
57 | |||
58 | 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'''. |
||
59 | 41 | Adrian Georgescu | |
60 | * The contacts list is stored in the main '''resource-lists''' XCAP document '''index''' |
||
61 | 48 | Adrian Georgescu | * Maintain a '''presentity''' attribute with what is received in the Notify for presence for each contact |
62 | * Maintain a '''dialog-info''' attribute with what is received in the Notify for dialog-info event for each contact |
||
63 | * 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''' |
||
64 | 47 | Adrian Georgescu | * On contacts list change, PUT resource-lists and rls-services documents on the XCAP server |
65 | 15 | Adrian Georgescu | |
66 | 28 | Adrian Georgescu | 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 |
67 | 1 | Adrian Georgescu | |
68 | == Watcher lists == |
||
69 | |||
70 | 48 | Adrian Georgescu | * Built based on the body of NOTIFY for '''Event=presence.winfo'''. |
71 | * Built based on the body of NOTIFY for '''Event=dialog-info.winfo'''. |
||
72 | 1 | Adrian Georgescu | |
73 | 9 | Adrian Georgescu | == Presence rules == |
74 | 1 | Adrian Georgescu | |
75 | 35 | Adrian Georgescu | * Based on NOTIFY for event '''watcher.info''' we update the policy |
76 | 1 | Adrian Georgescu | * PUT '''pres-rules''' document on the XCAP server and cache locally |
77 | 35 | Adrian Georgescu | |
78 | 36 | Adrian Georgescu | == Icon exhange == |
79 | 35 | Adrian Georgescu | |
80 | 33 | Adrian Georgescu | There is how OMA has specified such XCAP application: |
81 | 9 | Adrian Georgescu | |
82 | 26 | Adrian Georgescu | '"Presence Content XDM Specification'" |
83 | 32 | Adrian Georgescu | |
84 | http://www.openmobilealliance.org/technical/release_program/docs/PresenceSIMPLE/V2_0-20081223-C/OMA-TS-Presence_SIMPLE_Content_XDM-V1_0-20081223-C.pdf |
||
85 | 1 | Adrian Georgescu | |
86 | Publishing end-point, on boot: |
||
87 | 26 | Adrian Georgescu | |
88 | 32 | Adrian Georgescu | 1. HTTP GET for xcap-directory and locate previously uploaded icon (e.g. ABC) |
89 | 1 | Adrian Georgescu | 1. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/ABC |
90 | |||
91 | 48 | Adrian Georgescu | Publishing end-point, on icon change: |
92 | 1 | Adrian Georgescu | |
93 | 1. Generate a new random filename: XYZ |
||
94 | 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 |
95 | 1 | Adrian Georgescu | 1. HTTP PUT to xcap server |
96 | 32 | Adrian Georgescu | 1. Update <icon> element of pidf and PUBLISH new pidf |
97 | 9 | Adrian Georgescu | 1. HTTP DELETE any previous icon file ABC |
98 | 1 | Adrian Georgescu | |
99 | 32 | Adrian Georgescu | Subscribing end-point: |
100 | 9 | Adrian Georgescu | |
101 | 1. Parse <icon> element of pidf received in Notify |
||
102 | 41 | Adrian Georgescu | 2. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ |
103 | 3. Cache picture until next NOTIFY with diferent <icon> element is received |
||
104 | |||
105 | == Preferences == |
||
106 | 1 | Adrian Georgescu | |
107 | 48 | Adrian Georgescu | Manage the '''pres-rules''' and '''dialog-rules''' policy documents on XCAP server |
108 |