Sip subscribe presence

Version 20 (Adrian Georgescu, 01/24/2010 03:44 pm)

1 1 Adrian Georgescu
2 20 Adrian Georgescu
h2. sip-subscribe-presence
3 19 Adrian Georgescu
4 1 Adrian Georgescu
5 1 Adrian Georgescu
6 1 Adrian Georgescu
7 20 Adrian Georgescu
> This script is available in _sipclients_ package that must be installed separately from SIP SIMPLe client SDK package.
8 20 Adrian Georgescu
9 20 Adrian Georgescu
10 20 Adrian Georgescu
h3. Description
11 20 Adrian Georgescu
12 20 Adrian Georgescu
13 20 Adrian Georgescu
!{ nolink}http://www.openxcap.org/chrome/site/SIMPLE-Server.png!
14 20 Adrian Georgescu
15 20 Adrian Georgescu
<pre>
16 18 Adrian Georgescu
adigeo@ag-imac3:~$sip-subscribe-presence -h
17 18 Adrian Georgescu
Usage: sip-subscribe-presence [options] [target-user@target-domain.com]
18 1 Adrian Georgescu
19 5 Adrian Georgescu
This script will SUBSCRIBE to the presence event published by the specified
20 5 Adrian Georgescu
SIP target. If a SIP target is not specified, it will subscribe to its own
21 5 Adrian Georgescu
address. It will then interprete PIDF bodies contained in NOTIFYs and display
22 1 Adrian Georgescu
their meaning. The program will un-SUBSCRIBE and quit when CTRL+D is pressed.
23 1 Adrian Georgescu
24 16 Adrian Georgescu
Options:
25 1 Adrian Georgescu
  -h, --help            show this help message and exit
26 1 Adrian Georgescu
  -a ACCOUNT_NAME, --account-name=ACCOUNT_NAME
27 1 Adrian Georgescu
                        The name of the account to use.
28 1 Adrian Georgescu
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
29 1 Adrian Georgescu
                        messages (disabled by default).
30 1 Adrian Georgescu
  -j, --trace-pjsip     Print PJSIP logging output (disabled by default).
31 1 Adrian Georgescu
32 20 Adrian Georgescu
</pre>
33 16 Adrian Georgescu
34 1 Adrian Georgescu
35 20 Adrian Georgescu
h3. Example
36 20 Adrian Georgescu
37 20 Adrian Georgescu
38 20 Adrian Georgescu
<pre>
39 18 Adrian Georgescu
adigeo@ag-imac3:~$sip-subscribe-presence -a umts ag@ag-projects.com
40 2 Adrian Georgescu
Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
41 2 Adrian Georgescu
Using account 'umts': adi@umts.ro
42 2 Adrian Georgescu
Resolved DNS SRV record "_sip._udp.umts.ro" --> proxy.sipthor.net:5060
43 2 Adrian Georgescu
Resolved DNS A record "proxy.sipthor.net" --> 81.23.228.150, 81.23.228.129, 85.17.186.7
44 2 Adrian Georgescu
Subscribing to "<sip:ag@ag-projects.com>" for the presence event, at 85.17.186.7:5060
45 2 Adrian Georgescu
Received NOTIFY:
46 2 Adrian Georgescu
----------------
47 2 Adrian Georgescu
Presence for 31208005169@ag-projects.com:
48 2 Adrian Georgescu
  Person id yipgulqr
49 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:37:32
50 2 Adrian Georgescu
    Activities
51 2 Adrian Georgescu
      Note(en): I am working
52 2 Adrian Georgescu
    Mood: sad, contended, mean
53 2 Adrian Georgescu
    Time offset from UTC: 60 minutes 
54 2 Adrian Georgescu
  ---
55 2 Adrian Georgescu
  Service id apgjjwtz
56 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:37:42
57 2 Adrian Georgescu
    Status: open
58 2 Adrian Georgescu
----------------
59 2 Adrian Georgescu
Received NOTIFY:
60 2 Adrian Georgescu
----------------
61 2 Adrian Georgescu
Presence for 31208005169@ag-projects.com:
62 2 Adrian Georgescu
  Person id ksgxtgwo
63 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:41:04
64 2 Adrian Georgescu
    Mood: impressed, flirtatious, thirsty
65 2 Adrian Georgescu
    Time offset from UTC: 60 minutes 
66 2 Adrian Georgescu
  Person id yipgulqr
67 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:37:32
68 2 Adrian Georgescu
    Activities
69 2 Adrian Georgescu
      Note(en): I am working
70 2 Adrian Georgescu
    Mood: sad, contended, mean
71 2 Adrian Georgescu
    Time offset from UTC: 60 minutes 
72 2 Adrian Georgescu
  ---
73 2 Adrian Georgescu
  Service id apgjjwtz
74 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:37:42
75 2 Adrian Georgescu
    Status: open
76 2 Adrian Georgescu
  Service id hxpzsnfp
77 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:41:00
78 2 Adrian Georgescu
    Status: open
79 2 Adrian Georgescu
----------------
80 2 Adrian Georgescu
Received NOTIFY:
81 2 Adrian Georgescu
----------------
82 2 Adrian Georgescu
Presence for 31208005169@ag-projects.com:
83 2 Adrian Georgescu
  Person id ksgxtgwo
84 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:41:04
85 2 Adrian Georgescu
    Mood: impressed, flirtatious, thirsty
86 2 Adrian Georgescu
    Time offset from UTC: 60 minutes 
87 2 Adrian Georgescu
  Person id yipgulqr
88 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:37:32
89 2 Adrian Georgescu
    Activities
90 2 Adrian Georgescu
      Note(en): I am working
91 2 Adrian Georgescu
    Mood: sad, contended, mean
92 1 Adrian Georgescu
    Time offset from UTC: 60 minutes 
93 2 Adrian Georgescu
  ---
94 2 Adrian Georgescu
  Service id apgjjwtz
95 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:37:42
96 2 Adrian Georgescu
    Status: open
97 2 Adrian Georgescu
  Service id hxpzsnfp
98 2 Adrian Georgescu
    Timestamp: 2008-10-26 10:41:07
99 2 Adrian Georgescu
    Status: closed
100 2 Adrian Georgescu
----------------
101 2 Adrian Georgescu
102 20 Adrian Georgescu
</pre>