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