Sip subscribe winfo

Version 21 (Tijmen de Mes, 04/19/2012 09:24 pm)

1 20 Adrian Georgescu
h2. sip-subscribe-winfo
2 19 Adrian Georgescu
3 1 Adrian Georgescu
4 1 Adrian Georgescu
5 1 Adrian Georgescu
6 20 Adrian Georgescu
> This script is available in _sipclients_ package that must be installed separately from SIP SIMPLe client SDK package.
7 20 Adrian Georgescu
8 20 Adrian Georgescu
9 20 Adrian Georgescu
h3. Description
10 20 Adrian Georgescu
11 1 Adrian Georgescu
12 21 Tijmen de Mes
!SIMPLE-Winfo.png!
13 20 Adrian Georgescu
14 6 Adrian Georgescu
Watchers are defined as entities that request (i.e., subscribe to)
15 6 Adrian Georgescu
information about a resource, using the SIP event framework, RFC 3265. There
16 6 Adrian Georgescu
is fairly complex state associated with these subscriptions.  This state
17 6 Adrian Georgescu
includes the identity of the subscriber, the state of the subscription, and 
18 6 Adrian Georgescu
so on. The union of the state for all subscriptions to a particular resource
19 6 Adrian Georgescu
is called the watcher information for that resource.  This state is dynamic,
20 6 Adrian Georgescu
changing as subscribers come and go.  As a result, it is possible, and
21 6 Adrian Georgescu
indeed useful, to subscribe to the watcher information for a particular
22 6 Adrian Georgescu
resource. An important application of this is the ability for a user to find
23 6 Adrian Georgescu
out the set of subscribers to their presentity. This would allow the user to
24 1 Adrian Georgescu
provide an authorization decision for the subscription.
25 6 Adrian Georgescu
26 6 Adrian Georgescu
This script implements SUBSCRIBE for the watcher info event package and
27 1 Adrian Georgescu
manipulation of the pres-rules document that holds the presence policy of
28 2 Adrian Georgescu
the subscribing user.
29 2 Adrian Georgescu
30 20 Adrian Georgescu
<pre>
31 19 Adrian Georgescu
adigeo@ag-imac3:~$sip-subscribe-winfo -h
32 19 Adrian Georgescu
Usage: sip-subscribe-winfo [options] [target-user@target-domain.com]
33 1 Adrian Georgescu
34 17 Adrian Georgescu
This script displays the current presence rules, SUBSCRIBEs to the
35 17 Adrian Georgescu
presence.winfo event of itself and prompts the user to update the presence
36 17 Adrian Georgescu
rules document when a new watcher is in 'pending'/'waiting' state. The program
37 1 Adrian Georgescu
will un-SUBSCRIBE and quit when CTRL+D is pressed.
38 17 Adrian Georgescu
39 1 Adrian Georgescu
Options:
40 1 Adrian Georgescu
  -h, --help            show this help message and exit
41 1 Adrian Georgescu
  -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME
42 1 Adrian Georgescu
                        The name of the account to use.
43 1 Adrian Georgescu
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
44 17 Adrian Georgescu
                        messages (disabled by default).
45 1 Adrian Georgescu
  -j, --trace-pjsip     Print PJSIP logging output (disabled by default).
46 20 Adrian Georgescu
</pre>
47 1 Adrian Georgescu
48 1 Adrian Georgescu
49 20 Adrian Georgescu
h3. Example
50 20 Adrian Georgescu
51 20 Adrian Georgescu
52 20 Adrian Georgescu
<pre>
53 19 Adrian Georgescu
adigeo@ag-imac3:~/work/pypjua$sip-subscribe-winfo
54 1 Adrian Georgescu
Accounts available: 'alice', 'bob', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
55 1 Adrian Georgescu
Using default account: 31208005169@ag-projects.com
56 1 Adrian Georgescu
Resolved DNS SRV record "_sip._udp.ag-projects.com" --> proxy.sipthor.net:5060
57 1 Adrian Georgescu
Resolved DNS A record "proxy.sipthor.net" --> 85.17.186.7, 81.23.228.150, 81.23.228.129
58 1 Adrian Georgescu
Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/
59 1 Adrian Georgescu
Allowed list:
60 1 Adrian Georgescu
	sip:2233350608@sip2sip.info
61 1 Adrian Georgescu
	sip:31208005163@ag-projects.com
62 1 Adrian Georgescu
	sip:31208005166@ag-projects.com
63 1 Adrian Georgescu
	sip:31208005167@ag-projects.com
64 1 Adrian Georgescu
	sip:adi@umts.ro
65 1 Adrian Georgescu
	sip:alice@example.com
66 1 Adrian Georgescu
	sip:ruud@umts.ro
67 1 Adrian Georgescu
	sip:317105169@eurovoice.ro
68 1 Adrian Georgescu
Blocked list:
69 1 Adrian Georgescu
Polite-blocked list:
70 1 Adrian Georgescu
Subscribing to "31208005169@ag-projects.com" for the presence.winfo event, at 81.23.228.129:5060
71 1 Adrian Georgescu
Received NOTIFY:
72 1 Adrian Georgescu
----
73 1 Adrian Georgescu
Active watchers:
74 1 Adrian Georgescu
Terminated watchers:
75 1 Adrian Georgescu
Pending watchers:
76 1 Adrian Georgescu
  sip:bob@example.com
77 1 Adrian Georgescu
Waiting watchers:
78 1 Adrian Georgescu
----
79 1 Adrian Georgescu
pending watcher sip:bob@example.com wants to subscribe to your presence information. Press (a) to allow, (d) to deny, (p) to polite block:
80 1 Adrian Georgescu
Watcher sip:bob@example.com is now allowed
81 1 Adrian Georgescu
82 20 Adrian Georgescu
</pre>