Project

General

Profile

Sip subscribe winfo » History » Version 19

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

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