Sip subscribe presence

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

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