Page MenuHomePhabricator

Sip Subscribe Winfo
Updated 2,102 Days AgoPublic

Watchers are defined as entities that request (i.e., subscribe to) information about a resource, using the SIP event framework, RFC 3265. There is fairly complex state associated with these subscriptions. This state includes the identity of the subscriber, the state of the subscription, and so on. The union of the state for all subscriptions to a particular resource is called the watcher information for that resource. This state is dynamic, changing as subscribers come and go. As a result, it is possible, and indeed useful, to subscribe to the watcher information for a particular resource. An important application of this is the ability for a user to find out the set of subscribers to their presentity. This would allow the user to provide an authorization decision for the subscription.

This script implements SUBSCRIBE for the watcher info event package and manipulation of the pres-rules document that holds the presence policy of the subscribing user.

This script is available in the Sip Clients package which must be installed separately from the SIP SIMPLE client SDK package.

subscribe info

adigeo@ag-imac3:~$sip-subscribe-winfo -h
Usage: sip-subscribe-winfo [options] []

This script displays the current presence rules, SUBSCRIBEs to the
presence.winfo event of itself and prompts the user to update the presence
rules document when a new watcher is in 'pending'/'waiting' state. The program
will un-SUBSCRIBE and quit when CTRL+D is pressed.

  -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).


Accounts available: 'alice', 'bob', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
Using default account:
Resolved DNS SRV record "" -->
Resolved DNS A record "" -->,,
Retrieving current presence rules from
Allowed list:
Blocked list:
Polite-blocked list:
Subscribing to "" for the presence.winfo event, at
Received NOTIFY:
Active watchers:
Terminated watchers:
Pending watchers:
Waiting watchers:
pending watcher wants to subscribe to your presence information. Press (a) to allow, (d) to deny, (p) to polite block:
Watcher is now allowed
Last Author
Last Edited
Sep 17 2018, 3:27 PM

Event Timeline

tijmen edited the content of this document. (Show Details)
tijmen edited the content of this document. (Show Details)