DesignBuddyList
Version 24 (Adrian Georgescu, 07/13/2009 06:08 pm)
1 | 2 | Adrian Georgescu | = Buddy list = |
---|---|---|---|
2 | 2 | Adrian Georgescu | |
3 | 2 | Adrian Georgescu | [[TOC(Design*, depth=1)]] |
4 | 1 | Adrian Georgescu | |
5 | 23 | Adrian Georgescu | This is a high level class that can be used to manage a buddy list driven interface of a SIP client graphical user interface. It implements a combination of SIP SIMPLE standards related to presence event package, its storage and policy. |
6 | 14 | Adrian Georgescu | |
7 | 1 | Adrian Georgescu | * Account |
8 | 1 | Adrian Georgescu | * Address-book |
9 | 1 | Adrian Georgescu | * Buddy list |
10 | 13 | Adrian Georgescu | * Presence watcher list |
11 | 1 | Adrian Georgescu | * Presence rules |
12 | 15 | Adrian Georgescu | * Dialog watcher list |
13 | 1 | Adrian Georgescu | * Dialog rules |
14 | 15 | Adrian Georgescu | * Icon exchange |
15 | 1 | Adrian Georgescu | |
16 | 1 | Adrian Georgescu | == Account == |
17 | 1 | Adrian Georgescu | |
18 | 22 | Adrian Georgescu | This is the same entity that Registers and does other operations in behalf of a SIP account. |
19 | 22 | Adrian Georgescu | |
20 | 17 | Adrian Georgescu | On boot |
21 | 17 | Adrian Georgescu | |
22 | 21 | Adrian Georgescu | * Locate XCAP server by doing DNS TXT lookup for xcap.example.com |
23 | 19 | Adrian Georgescu | * GET documents xcap-caps, pres-rules, resource-lists, pidf-manipulation, rls-services, dialog-rules, icon, xcap-directory from XCAP server |
24 | 20 | Adrian Georgescu | * Cache documents |
25 | 1 | Adrian Georgescu | * Send Subscribe for event presence.info |
26 | 1 | Adrian Georgescu | * Send Subscribe for event dialog.info |
27 | 18 | Adrian Georgescu | * Send Subscribe for event message-summary |
28 | 18 | Adrian Georgescu | * Retrieve curent icon image from the xcap server icon auid |
29 | 18 | Adrian Georgescu | * Build presentity based on pidf-manipulation document, if present |
30 | 18 | Adrian Georgescu | * Send Publish for event presence |
31 | 18 | Adrian Georgescu | * If rls-services present in xcap-caps, enable RLS and send Subscribe for event presence with Supported=eventlist |
32 | 24 | Adrian Georgescu | * account.presence.subscribe_rls_services must be normalized when set to '''auto''' |
33 | 1 | Adrian Georgescu | |
34 | 17 | Adrian Georgescu | While running |
35 | 1 | Adrian Georgescu | |
36 | 19 | Adrian Georgescu | * Refresh XCAP server location based on DNS time to live |
37 | 17 | Adrian Georgescu | * Refresh Publish for event presence |
38 | 17 | Adrian Georgescu | * Refresh subscription to presence.info |
39 | 17 | Adrian Georgescu | * Refresh subscription to dialog.info |
40 | 17 | Adrian Georgescu | * Refresh subscription to message-summary |
41 | 17 | Adrian Georgescu | * Maintain a '''Presentity''' attribute received in Notify for each buddy |
42 | 17 | Adrian Georgescu | |
43 | 1 | Adrian Georgescu | == Address book == |
44 | 14 | Adrian Georgescu | |
45 | 14 | Adrian Georgescu | Use the OS standard address book |
46 | 14 | Adrian Georgescu | |
47 | 1 | Adrian Georgescu | == Buddy list == |
48 | 1 | Adrian Georgescu | |
49 | 17 | Adrian Georgescu | Contains list of buddies. The buddylist is indexed by the SIP URI. Additional, one can store full names and other attributes. Based on NOTIFY for event=presence each buddy has a '''Presentity''' attribute that contains published information. GUI displays parts of it. |
50 | 1 | Adrian Georgescu | |
51 | 20 | Adrian Georgescu | * The buddy list is stored in the main resource-lists XCAP document '''index''' |
52 | 1 | Adrian Georgescu | * If '''account.presence.subscribe_rls_services''' is true, a RLS document that contains a list of discrete SIP URIs we subscribe to is PUT on the server under SIP URI account-buddies@domain. Then a Subscribe is sent with Supported: eventlist for this SIP URI. |
53 | 20 | Adrian Georgescu | * On change, PUT resource-lists and rls-services documents on the XCAP server and cache locally |
54 | 13 | Adrian Georgescu | |
55 | 13 | Adrian Georgescu | == Presence watcher lists == |
56 | 1 | Adrian Georgescu | |
57 | 1 | Adrian Georgescu | Built based on the body of NOTIFY for event=presence.winfo. |
58 | 1 | Adrian Georgescu | |
59 | 1 | Adrian Georgescu | == Presence rules == |
60 | 1 | Adrian Georgescu | |
61 | 20 | Adrian Georgescu | * Based on NOTIFY for event watcher.info we update the policy |
62 | 20 | Adrian Georgescu | * PUT pres-rules document on the XCAP server and cache locally |
63 | 15 | Adrian Georgescu | |
64 | 15 | Adrian Georgescu | == Dialog watcher lists == |
65 | 15 | Adrian Georgescu | |
66 | 15 | Adrian Georgescu | Built based on the body of NOTIFY for event=dialog.winfo. To be built in OpenSIPS. |
67 | 12 | Adrian Georgescu | |
68 | 12 | Adrian Georgescu | == Dialog rules == |
69 | 15 | Adrian Georgescu | |
70 | 4 | Adrian Georgescu | Based on NOTIFY for event dialog.info we update the policy and PUT dialog-rules document on the XCAP server. To be built in OpenXCAP server. |
71 | 15 | Adrian Georgescu | |
72 | 4 | Adrian Georgescu | == Icon exhange == |
73 | 11 | Adrian Georgescu | |
74 | 11 | Adrian Georgescu | Support in OpenXCAP server is necessary, see http://openxcap.org/ticket/100 |
75 | 9 | Adrian Georgescu | |
76 | 1 | Adrian Georgescu | Publishing end-point, on change: |
77 | 9 | Adrian Georgescu | |
78 | 9 | Adrian Georgescu | 1. Generate a random filename: XYZ |
79 | 9 | Adrian Georgescu | 1. Build URL http://xcap.example.com/xcap-root/icon/users/sip:alice@example.com/XYZ.png |
80 | 9 | Adrian Georgescu | 1. HTTP PUT to xcap server |
81 | 9 | Adrian Georgescu | 1. Update <icon> element of pidf and PUBLISH new pidf |
82 | 9 | Adrian Georgescu | 1. HTTP GET for xcap-directory and locate previously uploaded icons |
83 | 1 | Adrian Georgescu | 1. HTTP DELETE any previous icon files |
84 | 9 | Adrian Georgescu | |
85 | 1 | Adrian Georgescu | On reboot: |
86 | 9 | Adrian Georgescu | |
87 | 9 | Adrian Georgescu | 1. HTTP GET for xcap-directory and locate previously uploaded icon (e.g. XYZ) |
88 | 1 | Adrian Georgescu | 1. HTTP GET http://xcap.example.com/xcap-root/icon/users/sip:alice@example.com/XYZ.png |
89 | 9 | Adrian Georgescu | |
90 | 9 | Adrian Georgescu | Subscribing end-point: |
91 | 9 | Adrian Georgescu | |
92 | 9 | Adrian Georgescu | 1. Parse <icon> element of pidf received in Notify |
93 | 9 | Adrian Georgescu | 2. HTTP GET http://xcap.example.com/xcap-root/icon/users/sip:alice@example.com/XYZ.png |
94 | 1 | Adrian Georgescu | 3. Cache picture and check periodically |