XCAP RLS services » History » Version 6
Adrian Georgescu, 02/23/2009 03:44 PM
1 | 2 | Adrian Georgescu | == xcap_rls_services == |
---|---|---|---|
2 | |||
3 | 6 | Adrian Georgescu | [[TOC(SipTesting*, sip_*, xcap*,depth=2)]] |
4 | |||
5 | 5 | Adrian Georgescu | To use this script you must to have a valid [wiki:SipConfiguration configuration file]. |
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 | adigeo@ag-oxygen:~$xcap_rls_services -h |
||
15 | 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 | -a NAME, --account-name=NAME |
||
26 | The account name from which to read account settings. |
||
27 | Corresponds to section Account_NAME in the |
||
28 | configuration file. If not supplied, the section |
||
29 | Account will be read. |
||
30 | --sip-address=SIP_ADDRESS |
||
31 | SIP address of the user in the form user@domain |
||
32 | -p PASSWORD, --password=PASSWORD |
||
33 | Password to use to authenticate the local account. |
||
34 | This overrides the setting from the config file. |
||
35 | -x XCAP_ROOT, --xcap-root=XCAP_ROOT |
||
36 | The XCAP root to use to access the rls-services |
||
37 | document to manage. |
||
38 | -s, --show-xml Show the RLS services XML whenever it is changed and |
||
39 | at start-up. |
||
40 | }}} |
||
41 | 4 | Adrian Georgescu | |
42 | === Example === |
||
43 | {{{ |
||
44 | adigeo@ag-imac3:~$xcap_rls_services |
||
45 | Accounts available: 'alice', 'bob', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'umts_test', 'unet', 'unet_test', default |
||
46 | Using default account: 31208005169@ag-projects.com |
||
47 | Retrieving current RLS services from https://xcap.sipthor.net/xcap-root/ |
||
48 | Managing service URI sip:31208005169-buddies@ag-projects.com |
||
49 | |||
50 | Buddies: |
||
51 | adi@umts.ro |
||
52 | Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service. |
||
53 | new buddy> alice@example.com |
||
54 | |||
55 | Buddy sip:alice@example.com has been added |
||
56 | |||
57 | Buddies: |
||
58 | adi@umts.ro |
||
59 | alice@example.com |
||
60 | 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 | new buddy> bob@example.com |
||
62 | |||
63 | Buddy sip:bob@example.com has been added |
||
64 | |||
65 | Buddies: |
||
66 | adi@umts.ro |
||
67 | alice@example.com |
||
68 | bob@example.com |
||
69 | Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service. |
||
70 | RLS services document: |
||
71 | <?xml version='1.0' encoding='UTF-8'?> |
||
72 | <rls-services xmlns:rl="urn:ietf:params:xml:ns:resource-lists" xmlns="urn:ietf:params:xml:ns:rls-services"> |
||
73 | <service uri="sip:31208005169-buddies@ag-projects.com"> |
||
74 | <list> |
||
75 | <rl:entry uri="sip:adi@umts.ro"/> |
||
76 | <rl:entry uri="sip:alice@example.com"/> |
||
77 | <rl:entry uri="sip:bob@example.com"/> |
||
78 | </list> |
||
79 | <packages> |
||
80 | <package>presence</package> |
||
81 | </packages> |
||
82 | </service> |
||
83 | </rls-services> |
||
84 | |||
85 | |||
86 | Buddies: |
||
87 | adi@umts.ro |
||
88 | alice@example.com |
||
89 | bob@example.com |
||
90 | Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service. |
||
91 | |||
92 | }}} |