XCAP RLS services

Version 9 (Adrian Georgescu, 04/13/2009 10:55 am)

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