Sip subscribe winfo » History » Version 5
Adrian Georgescu, 10/26/2008 04:24 PM
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 | 5 | Adrian Georgescu | [[Image(http://www.openxcap.org/chrome/site/SIMPLE-Winfo.png, align=right, nolink)]] |
8 | 3 | Adrian Georgescu | |
9 | 2 | Adrian Georgescu | Source code: [source:scripts/sip_subscribe_winfo.py scripts/sip_subscribe_winfo.py] |
10 | |||
11 | 1 | Adrian Georgescu | {{{ |
12 | adigeo@ag-imac3:~$sip_subscribe_winfo -h |
||
13 | Usage: sip_subscribe_winfo [options] |
||
14 | |||
15 | This example script will use the specified SIP account to SUBSCRIBE to the |
||
16 | presence.winfo event of itself and request action to be taken when a new |
||
17 | watcher is in 'pending'/'waiting' state. The program will un-SUBSCRIBE and |
||
18 | quit when CTRL+D is pressed. |
||
19 | |||
20 | Options: |
||
21 | -h, --help show this help message and exit |
||
22 | -a NAME, --account-name=NAME |
||
23 | The account name from which to read account settings. |
||
24 | Corresponds to section Account_NAME in the |
||
25 | configuration file. If not supplied, the section |
||
26 | Account will be read. |
||
27 | --sip-address=SIP_ADDRESS |
||
28 | SIP address of the user in the form user@domain |
||
29 | -p PASSWORD, --password=PASSWORD |
||
30 | Password to use to authenticate the local account. |
||
31 | This overrides the setting from the config file. |
||
32 | -n DISPLAY_NAME, --display-name=DISPLAY_NAME |
||
33 | Display name to use for the local account. This |
||
34 | overrides the setting from the config file. |
||
35 | -e EXPIRES, --expires=EXPIRES |
||
36 | "Expires" value to set in SUBSCRIBE. Default is 300 |
||
37 | seconds. |
||
38 | -o IP[:PORT], --outbound-proxy=IP[:PORT] |
||
39 | Outbound SIP proxy to use. By default a lookup of the |
||
40 | domain is performed based on SRV and A records. This |
||
41 | overrides the setting from the config file. |
||
42 | -x XCAP_ROOT, --xcap-root=XCAP_ROOT |
||
43 | The XCAP root to use to access the pres-rules document |
||
44 | for authorizing subscriptions to presence. |
||
45 | -s, --trace-sip Dump the raw contents of incoming and outgoing SIP |
||
46 | messages (disabled by default). |
||
47 | -l, --log-pjsip Print PJSIP logging output (disabled by default). |
||
48 | }}} |
||
49 | |||
50 | === Example === |
||
51 | |||
52 | {{{ |
||
53 | adigeo@ag-imac3:~/work/pypjua$sip_subscribe_winfo |
||
54 | 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 | }}} |