Project

General

Profile

Sip subscribe winfo » History » 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
5
6 20 Adrian Georgescu
> This script is available in _sipclients_ package that must be installed separately from SIP SIMPLe client SDK package.
7
8
9
h3. Description
10
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
information about a resource, using the SIP event framework, RFC 3265. There
16
is fairly complex state associated with these subscriptions.  This state
17
includes the identity of the subscriber, the state of the subscription, and 
18
so on. The union of the state for all subscriptions to a particular resource
19
is called the watcher information for that resource.  This state is dynamic,
20
changing as subscribers come and go.  As a result, it is possible, and
21
indeed useful, to subscribe to the watcher information for a particular
22
resource. An important application of this is the ability for a user to find
23
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
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
30 20 Adrian Georgescu
<pre>
31 19 Adrian Georgescu
adigeo@ag-imac3:~$sip-subscribe-winfo -h
32
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
presence.winfo event of itself and prompts the user to update the presence
36
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
  -h, --help            show this help message and exit
41
  -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME
42
                        The name of the account to use.
43
  -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
49 20 Adrian Georgescu
h3. Example
50
51
52
<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
Using default account: 31208005169@ag-projects.com
56
Resolved DNS SRV record "_sip._udp.ag-projects.com" --> proxy.sipthor.net:5060
57
Resolved DNS A record "proxy.sipthor.net" --> 85.17.186.7, 81.23.228.150, 81.23.228.129
58
Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/
59
Allowed list:
60
	sip:2233350608@sip2sip.info
61
	sip:31208005163@ag-projects.com
62
	sip:31208005166@ag-projects.com
63
	sip:31208005167@ag-projects.com
64
	sip:adi@umts.ro
65
	sip:alice@example.com
66
	sip:ruud@umts.ro
67
	sip:317105169@eurovoice.ro
68
Blocked list:
69
Polite-blocked list:
70
Subscribing to "31208005169@ag-projects.com" for the presence.winfo event, at 81.23.228.129:5060
71
Received NOTIFY:
72
----
73
Active watchers:
74
Terminated watchers:
75
Pending watchers:
76
  sip:bob@example.com
77
Waiting watchers:
78
----
79
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
Watcher sip:bob@example.com is now allowed
81
82 20 Adrian Georgescu
</pre>