XCAP RLS services

Version 4 (Adrian Georgescu, 11/30/2008 09:03 am) → Version 5/12 (Adrian Georgescu, 01/10/2009 11:40 am)

== xcap_rls_services ==

To use this script you must to have a valid [wiki:SipConfiguration [wiki:configuration_file configuration file].

=== Description ===

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.

Source code: [source:scripts/xcap_rls_services.py scripts/xcap_rls_services.py]

{{{
adigeo@ag-oxygen:~$xcap_rls_services -h
Usage: xcap_rls_services [options] [service URI]

This example script will use the specified SIP account to manage rls services
via XCAP. The program will quit when CTRL+D is pressed. You can specify the
service URI as an argument (if domain name is not specified, the user's domain
name will be used). If it is not specified, it defaults to username-
buddies@domain.

Options:
-h, --help show this help message and exit
-a NAME, --account-name=NAME
The account name from which to read account settings.
Corresponds to section Account_NAME in the
configuration file. If not supplied, the section
Account will be read.
--sip-address=SIP_ADDRESS
SIP address of the user in the form user@domain
-p PASSWORD, --password=PASSWORD
Password to use to authenticate the local account.
This overrides the setting from the config file.
-x XCAP_ROOT, --xcap-root=XCAP_ROOT
The XCAP root to use to access the rls-services
document to manage.
-s, --show-xml Show the RLS services XML whenever it is changed and
at start-up.
}}}

=== Example ===
{{{
adigeo@ag-imac3:~$xcap_rls_services
Accounts available: 'alice', 'bob', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'umts_test', 'unet', 'unet_test', default
Using default account: 31208005169@ag-projects.com
Retrieving current RLS services from https://xcap.sipthor.net/xcap-root/
Managing service URI sip:31208005169-buddies@ag-projects.com

Buddies:
adi@umts.ro
Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service.
new buddy> alice@example.com

Buddy sip:alice@example.com has been added

Buddies:
adi@umts.ro
alice@example.com
Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service.
new buddy> bob@example.com

Buddy sip:bob@example.com has been added

Buddies:
adi@umts.ro
alice@example.com
bob@example.com
Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service.
RLS services document:
<?xml version='1.0' encoding='UTF-8'?>
<rls-services xmlns:rl="urn:ietf:params:xml:ns:resource-lists" xmlns="urn:ietf:params:xml:ns:rls-services">
<service uri="sip:31208005169-buddies@ag-projects.com">
<list>
<rl:entry uri="sip:adi@umts.ro"/>
<rl:entry uri="sip:alice@example.com"/>
<rl:entry uri="sip:bob@example.com"/>
</list>
<packages>
<package>presence</package>
</packages>
</service>
</rls-services>

Buddies:
adi@umts.ro
alice@example.com
bob@example.com
Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service.

}}}