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