Project

General

Profile

Sip subscribe winfo » History » Version 1

Adrian Georgescu, 10/26/2008 10:52 AM

1 1 Adrian Georgescu
== sip_subscribe_winfo ==
2
3
To use this script you must to have a valid [wiki:configuration_file configuration file].
4
5
=== Description ===
6
7
{{{
8
adigeo@ag-imac3:~$sip_subscribe_winfo -h
9
Usage: sip_subscribe_winfo [options]
10
11
This example script will use the specified SIP account to SUBSCRIBE to the
12
presence.winfo event of itself and request action to be taken when a new
13
watcher is in 'pending'/'waiting' state. The program will un-SUBSCRIBE and
14
quit when CTRL+D is pressed.
15
16
Options:
17
  -h, --help            show this help message and exit
18
  -a NAME, --account-name=NAME
19
                        The account name from which to read account settings.
20
                        Corresponds to section Account_NAME in the
21
                        configuration file. If not supplied, the section
22
                        Account will be read.
23
  --sip-address=SIP_ADDRESS
24
                        SIP address of the user in the form user@domain
25
  -p PASSWORD, --password=PASSWORD
26
                        Password to use to authenticate the local account.
27
                        This overrides the setting from the config file.
28
  -n DISPLAY_NAME, --display-name=DISPLAY_NAME
29
                        Display name to use for the local account. This
30
                        overrides the setting from the config file.
31
  -e EXPIRES, --expires=EXPIRES
32
                        "Expires" value to set in SUBSCRIBE. Default is 300
33
                        seconds.
34
  -o IP[:PORT], --outbound-proxy=IP[:PORT]
35
                        Outbound SIP proxy to use. By default a lookup of the
36
                        domain is performed based on SRV and A records. This
37
                        overrides the setting from the config file.
38
  -x XCAP_ROOT, --xcap-root=XCAP_ROOT
39
                        The XCAP root to use to access the pres-rules document
40
                        for authorizing subscriptions to presence.
41
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
42
                        messages (disabled by default).
43
  -l, --log-pjsip       Print PJSIP logging output (disabled by default).
44
}}}
45
46
=== Example ===
47
48
{{{
49
adigeo@ag-imac3:~/work/pypjua$sip_subscribe_winfo
50
Accounts available: 'alice', 'bob', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
51
Using default account: 31208005169@ag-projects.com
52
Resolved DNS SRV record "_sip._udp.ag-projects.com" --> proxy.sipthor.net:5060
53
Resolved DNS A record "proxy.sipthor.net" --> 85.17.186.7, 81.23.228.150, 81.23.228.129
54
Retrieving current presence rules from https://xcap.sipthor.net/xcap-root/
55
Allowed list:
56
	sip:2233350608@sip2sip.info
57
	sip:31208005163@ag-projects.com
58
	sip:31208005166@ag-projects.com
59
	sip:31208005167@ag-projects.com
60
	sip:adi@umts.ro
61
	sip:alice@example.com
62
	sip:ruud@umts.ro
63
	sip:317105169@eurovoice.ro
64
Blocked list:
65
Polite-blocked list:
66
Subscribing to "31208005169@ag-projects.com" for the presence.winfo event, at 81.23.228.129:5060
67
Received NOTIFY:
68
----
69
Active watchers:
70
Terminated watchers:
71
Pending watchers:
72
  sip:bob@example.com
73
Waiting watchers:
74
----
75
pending watcher sip:bob@example.com wants to subscribe to your presence information. Press (a) to allow, (d) to deny, (p) to polite block:
76
Watcher sip:bob@example.com is now allowed
77
78
}}}