« Previous - Version 2/21 (diff) - Next » - Current version
Adrian Georgescu, 10/26/2008 11:17 am


To use this script you must to have a valid [wiki:configuration_file configuration file].

=== Description ===

Source code: [source:scripts/sip_subscribe_winfo.py scripts/sip_subscribe_winfo.py]

adigeo@ag-imac3:~$sip_subscribe_winfo -h
Usage: sip_subscribe_winfo [options]

This example script will use the specified SIP account to SUBSCRIBE to the
presence.winfo event of itself and request action to be taken when a new
watcher is in 'pending'/'waiting' state. The program will un-SUBSCRIBE and
quit when CTRL+D is pressed.

-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 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.
-e EXPIRES, --expires=EXPIRES
"Expires" value to set in SUBSCRIBE. Default is 300
-o IP[:PORT], --outbound-proxy=IP[:PORT]
Outbound SIP proxy to use. By default a lookup of the
domain is performed based on SRV and A records. 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.
-s, --trace-sip Dump the raw contents of incoming and outgoing SIP
messages (disabled by default).
-l, --log-pjsip Print PJSIP logging output (disabled by default).

=== Example ===

Accounts available: 'alice', 'bob', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
Using default account:
Resolved DNS SRV record "_sip._udp.ag-projects.com" --> proxy.sipthor.net:5060
Resolved DNS A record "proxy.sipthor.net" -->,,
Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/
Allowed list:
Blocked list:
Polite-blocked list:
Subscribing to "" for the presence.winfo event, at
Received NOTIFY:
Active watchers:
Terminated watchers:
Pending watchers:
Waiting watchers:
pending watcher sip: wants to subscribe to your presence information. Press (a) to allow, (d) to deny, (p) to polite block:
Watcher sip: is now allowed


SIMPLE-Winfo.png (40.2 kB) Tijmen de Mes, 04/19/2012 09:24 pm