Project

General

Profile

Sip subscribe winfo » History » Version 20

Adrian Georgescu, 01/24/2010 03:39 PM

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