Project

General

Profile

Xcap pres rules » History » Version 3

Adrian Georgescu, 10/26/2008 06:26 PM

1 1 Adrian Georgescu
== xcap_pres_rules ==
2
3
To use this script you must to have a valid [wiki:configuration_file configuration file].
4
5
=== Description ===
6
7
{{{
8
adigeo@ag-imac3:~/work/pypjua/scripts$./xcap_pres_rules.py -h
9
Usage: xcap_pres_rules.py [options]
10
11
This example script will use the specified SIP account to manage presence
12
rules via XCAP. The program will quit when CTRL+D is pressed.
13
14
Options:
15
  -h, --help            show this help message and exit
16
  -a NAME, --account-name=NAME
17
                        The account name from which to read account settings.
18
                        Corresponds to section Account_NAME in the
19
                        configuration file. If not supplied, the section
20
                        Account will be read.
21
  --sip-address=SIP_ADDRESS
22
                        SIP address of the user in the form user@domain
23
  -p PASSWORD, --password=PASSWORD
24
                        Password to use to authenticate the local account.
25
                        This overrides the setting from the config file.
26
  -n DISPLAY_NAME, --display-name=DISPLAY_NAME
27
                        Display name to use for the local account. This
28
                        overrides the setting from the config file.
29
  -x XCAP_ROOT, --xcap-root=XCAP_ROOT
30
                        The XCAP root to use to access the pres-rules document
31
                        for authorizing subscriptions to presence.
32
}}}
33 2 Adrian Georgescu
34
== Example ==
35
36
{{{
37
xcapag-oxygen:~ adigeo$ xcap_pres_rules 
38
Accounts available: 'alice', 'ew', 'gert', 'mrg', 'tf', 'umts', 'unet', default
39
Using default account: 31208005169@ag-projects.com
40
Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/
41
Allowed watchers:
42
	2233350608@sip2sip.info
43
	31208005163@ag-projects.com
44
	31208005166@ag-projects.com
45
	31208005167@ag-projects.com
46
	adi@umts.ro
47
	alice@example.com
48
	317105169@eurovoice.ro
49
	bob@example.com
50
Blocked watchers:
51
	test1@merge.net.nl
52
Polite-blocked watchers:
53 3 Adrian Georgescu
Press (a) to allow, (d) to deny, (p) to politely block a new watcher or (r) to remove a watcher from the rules. 
54
(s) will show the presence rules xml.
55 2 Adrian Georgescu
a
56
watcher> abc@example.com
57
Watcher sip:abc@example.com is now authorized
58
}}}