Xcap pres rules

Version 9 (Adrian Georgescu, 03/31/2009 03:09 pm)

1 5 Adrian Georgescu
== xcap_pres_rules ==
2 1 Adrian Georgescu
3 7 Adrian Georgescu
[[TOC(SipTesting*, sip_*, xcap*,depth=2)]]
4 7 Adrian Georgescu
5 8 Adrian Georgescu
To use this script you must to have a valid [wiki:SipSettingsAPI configuration].
6 1 Adrian Georgescu
7 5 Adrian Georgescu
=== Description ===
8 1 Adrian Georgescu
9 1 Adrian Georgescu
{{{
10 9 Adrian Georgescu
adigeo@ag-imac3:~$xcap_pres_rules -h
11 9 Adrian Georgescu
Usage: xcap_pres_rules [options]
12 1 Adrian Georgescu
13 1 Adrian Georgescu
This example script will use the specified SIP account to manage presence
14 1 Adrian Georgescu
rules via XCAP. The program will quit when CTRL+D is pressed.
15 1 Adrian Georgescu
16 1 Adrian Georgescu
Options:
17 1 Adrian Georgescu
  -h, --help            show this help message and exit
18 9 Adrian Georgescu
  -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME
19 9 Adrian Georgescu
                        The name of the account to use.
20 9 Adrian Georgescu
  -s, --show-xml        Show the presence rules XML whenever it is changed and
21 9 Adrian Georgescu
                        at start-up.
22 5 Adrian Georgescu
}}}
23 2 Adrian Georgescu
24 2 Adrian Georgescu
=== Example ===
25 5 Adrian Georgescu
26 2 Adrian Georgescu
{{{
27 9 Adrian Georgescu
adigeo@ag-imac3:~$xcap_pres_rules
28 2 Adrian Georgescu
Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/
29 2 Adrian Georgescu
Allowed watchers:
30 2 Adrian Georgescu
	2233350608@sip2sip.info
31 2 Adrian Georgescu
	31208005163@ag-projects.com
32 2 Adrian Georgescu
	31208005166@ag-projects.com
33 2 Adrian Georgescu
	31208005167@ag-projects.com
34 2 Adrian Georgescu
	adi@umts.ro
35 2 Adrian Georgescu
	alice@example.com
36 2 Adrian Georgescu
	317105169@eurovoice.ro
37 2 Adrian Georgescu
	bob@example.com
38 2 Adrian Georgescu
Blocked watchers:
39 2 Adrian Georgescu
	test1@merge.net.nl
40 2 Adrian Georgescu
Polite-blocked watchers:
41 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. 
42 3 Adrian Georgescu
(s) will show the presence rules xml.
43 2 Adrian Georgescu
a
44 2 Adrian Georgescu
watcher> abc@example.com
45 2 Adrian Georgescu
Watcher sip:abc@example.com is now authorized
46 2 Adrian Georgescu
}}}