Sip subscribe presence

Version 22 (Tijmen de Mes, 04/19/2012 09:22 pm)

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