« Previous - Version 5/12 (diff) - Next » - Current version
Adrian Georgescu, 01/10/2009 11:40 am


xcap_rls_services

To use this script you must to have a valid [wiki:SipConfiguration 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:
Retrieving current RLS services from https://xcap.sipthor.net/xcap-root/
Managing service URI sip:

Buddies:

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>

Buddy sip: has been added

Buddies:


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>

Buddy sip: has been added

Buddies:



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:

<rls-services xmlns:rl="urn:ietf:params:xml:ns:resource-lists" xmlns="urn:ietf:params:xml:ns:rls-services">
<service uri="sip:">
<list>
<rl:entry uri="sip:"/>
<rl:entry uri="sip:"/>
<rl:entry uri="sip:"/>
</list>
<packages>
<package>presence</package>
</packages>
</service>
</rls-services>

Buddies:



Press (a) to add or (r) to remove a buddy. (s) will show the RLS services xml. (d) will delete the currently selected service.

}}}