Xcap pres rules » History » Revision 4
Revision 3 (Adrian Georgescu, 10/26/2008 06:26 PM) → Revision 4/12 (Adrian Georgescu, 11/06/2008 02:47 PM)
= == xcap_pres_rules = == To use this script you must to have a valid [wiki:configuration_file configuration file]. == === Description == === {{{ adigeo@ag-imac3:~/work/pypjua/scripts$./xcap_pres_rules.py -h Usage: xcap_pres_rules.py [options] This example script will use the specified SIP account to manage presence rules via XCAP. The program will quit when CTRL+D is pressed. 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. -n DISPLAY_NAME, --display-name=DISPLAY_NAME Display name to use for 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 pres-rules document for authorizing subscriptions to presence. }}} == Example == {{{ xcapag-oxygen:~ adigeo$ xcap_pres_rules Accounts available: 'alice', 'ew', 'gert', 'mrg', 'tf', 'umts', 'unet', default Using default account: 31208005169@ag-projects.com Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/ Allowed watchers: 2233350608@sip2sip.info 31208005163@ag-projects.com 31208005166@ag-projects.com 31208005167@ag-projects.com adi@umts.ro alice@example.com 317105169@eurovoice.ro bob@example.com Blocked watchers: test1@merge.net.nl Polite-blocked watchers: Press (a) to allow, (d) to deny, (p) to politely block a new watcher or (r) to remove a watcher from the rules. (s) will show the presence rules xml. a watcher> abc@example.com Watcher sip:abc@example.com is now authorized }}}