Project

General

Profile

Actions

Sip subscribe presence » History » Revision 17

« Previous | Revision 17/22 (diff) | Next »
Adrian Georgescu, 04/13/2009 10:54 AM


sip_subscribe_presence
<abbr title="SipTesting*, sip_*, depth=2">TOC</abbr>

=== Description ===

[[Image(http://www.openxcap.org/chrome/site/SIMPLE-Server.png, nolink)]]

Source code: [source:scripts/sip_subscribe_presence.py scripts/sip_subscribe_presence.py]

{{{
adigeo@ag-imac3:~$sip_subscribe_presence -h
Usage: sip_subscribe_presence [options] []

This script will SUBSCRIBE to the presence event published by the specified
SIP target. If a SIP target is not specified, it will subscribe to its own
address. It will then interprete PIDF bodies contained in NOTIFYs and display
their meaning. The program will un-SUBSCRIBE and quit when CTRL+D is pressed.

Options:
-h, --help show this help message and exit
-a ACCOUNT_NAME, --account-name=ACCOUNT_NAME
The name of the account to use.
-s, --trace-sip Dump the raw contents of incoming and outgoing SIP
messages (disabled by default).
-j, --trace-pjsip Print PJSIP logging output (disabled by default).

}}}

=== Example ===

{{{
adigeo@ag-imac3:~$sip_subscribe_presence a umts
Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
Using account 'umts':
Resolved DNS SRV record "_sip._udp.umts.ro" -
> proxy.sipthor.net:5060
Resolved DNS A record "proxy.sipthor.net" --> 81.23.228.150, 81.23.228.129, 85.17.186.7
Subscribing to "<sip:>" for the presence event, at 85.17.186.7:5060
Received NOTIFY:
----------------
Presence for :
Person id yipgulqr
Timestamp: 2008-10-26 10:37:32
Activities
Note(en): I am working
Mood: sad, contended, mean
Time offset from UTC: 60 minutes
---
Service id apgjjwtz
Timestamp: 2008-10-26 10:37:42
Status: open
----------------
Received NOTIFY:
----------------
Presence for :
Person id ksgxtgwo
Timestamp: 2008-10-26 10:41:04
Mood: impressed, flirtatious, thirsty
Time offset from UTC: 60 minutes
Person id yipgulqr
Timestamp: 2008-10-26 10:37:32
Activities
Note(en): I am working
Mood: sad, contended, mean
Time offset from UTC: 60 minutes
---
Service id apgjjwtz
Timestamp: 2008-10-26 10:37:42
Status: open
Service id hxpzsnfp
Timestamp: 2008-10-26 10:41:00
Status: open
----------------
Received NOTIFY:
----------------
Presence for :
Person id ksgxtgwo
Timestamp: 2008-10-26 10:41:04
Mood: impressed, flirtatious, thirsty
Time offset from UTC: 60 minutes
Person id yipgulqr
Timestamp: 2008-10-26 10:37:32
Activities
Note(en): I am working
Mood: sad, contended, mean
Time offset from UTC: 60 minutes
---
Service id apgjjwtz
Timestamp: 2008-10-26 10:37:42
Status: open
Service id hxpzsnfp
Timestamp: 2008-10-26 10:41:07
Status: closed
----------------

}}}

Updated by Adrian Georgescu over 15 years ago · 17 revisions