XCAP RLS services » History » Version 8
Adrian Georgescu, 03/31/2009 03:10 PM
1 | 2 | Adrian Georgescu | == xcap_rls_services == |
---|---|---|---|
2 | |||
3 | 6 | Adrian Georgescu | [[TOC(SipTesting*, sip_*, xcap*,depth=2)]] |
4 | |||
5 | 7 | Adrian Georgescu | To use this script you must to have a valid [wiki:SipSettingsAPI configuration]. |
6 | 2 | Adrian Georgescu | |
7 | === Description === |
||
8 | |||
9 | 3 | Adrian Georgescu | This script adds and removed buddies in the RLS services XCAP document. Can be used to prepare the buddy list prior to execute [source:scripts/sip_subscribe_rls.py scripts/sip_subscribe_rls.py] script. |
10 | 2 | Adrian Georgescu | |
11 | Source code: [source:scripts/xcap_rls_services.py scripts/xcap_rls_services.py] |
||
12 | |||
13 | {{{ |
||
14 | 8 | Adrian Georgescu | adigeo@ag-imac3:~$xcap_rls_services -h |
15 | 2 | Adrian Georgescu | Usage: xcap_rls_services [options] [service URI] |
16 | |||
17 | This example script will use the specified SIP account to manage rls services |
||
18 | via XCAP. The program will quit when CTRL+D is pressed. You can specify the |
||
19 | service URI as an argument (if domain name is not specified, the user's domain |
||
20 | name will be used). If it is not specified, it defaults to username- |
||
21 | buddies@domain. |
||
22 | |||
23 | Options: |
||
24 | -h, --help show this help message and exit |
||
25 | 8 | Adrian Georgescu | -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME |
26 | The name of the account to use. |
||
27 | -s, --show-xml Show the presence rules XML whenever it is changed and |
||
28 | 2 | Adrian Georgescu | at start-up. |
29 | 8 | Adrian Georgescu | |
30 | 1 | }}} |
|
31 | 4 | Adrian Georgescu | |
32 | === Example === |
||
33 | {{{ |
||
34 | 8 | Adrian Georgescu | adigeo@ag-imac3:~$xcap_rls_services |
35 | 4 | Adrian Georgescu | Retrieving current RLS services from https://xcap.sipthor.net/xcap-root/ |
36 | Managing service URI sip:31208005169-buddies@ag-projects.com |
||
37 | |||
38 | Buddies: |
||
39 | adi@umts.ro |
||
40 | 8 | Adrian Georgescu | alice@ag-projects.com |
41 | 4 | Adrian Georgescu | Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service. |
42 | RLS services document: |
||
43 | <?xml version='1.0' encoding='UTF-8'?> |
||
44 | <rls-services xmlns:rl="urn:ietf:params:xml:ns:resource-lists" xmlns="urn:ietf:params:xml:ns:rls-services"> |
||
45 | <service uri="sip:31208005169-buddies@ag-projects.com"> |
||
46 | <list> |
||
47 | <rl:entry uri="sip:adi@umts.ro"/> |
||
48 | 8 | Adrian Georgescu | <rl:entry uri="sip:alice@ag-projects.com"/> |
49 | 4 | Adrian Georgescu | </list> |
50 | <packages> |
||
51 | <package>presence</package> |
||
52 | </packages> |
||
53 | </service> |
||
54 | </rls-services> |
||
55 | |||
56 | |||
57 | Buddies: |
||
58 | adi@umts.ro |
||
59 | 8 | Adrian Georgescu | alice@ag-projects.com |
60 | 4 | Adrian Georgescu | Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service. |
61 | 8 | Adrian Georgescu | |
62 | 4 | Adrian Georgescu | |
63 | }}} |