Someone’s Watching

The quantum physics says that some events will happen differently if someone is watching. And one doesn’t need to be a physics to have that experience. At least my performance is always worst when someone is watching me playing piano.

Authors of IMS Presence System were either aware of it or they knew that there can be a thin line between being a watcher and being a stalker. Either way IMS allows to inform a presentity about watchers and authorize their subscription.

The key specification is the RFC 3857 which defines so called watcher info (winfo) event “template-package”. Event template-packages are event packages that can be applied to any other event package (so not only presence). The winfo provides the users with information about who is watching the subscribed resource. If the winfo is applied to presence (see previous posts Presence – More than you wanted to know and Is the Presence Social?) the value of the Event header field is set to presence.winfo.

Event: presence.winfo

The package defines a new MIME type application/watcherinfo+xml. When a SIP request or response contains a Content-Type header field set to application/watcherinfo+xml, it is indicating that the body is an XML document that contains watcher information.

NOTIFY sip:Richard@operator.com SIP/2.0
Content-Type: application/watcherinfo+xml
<?xml version="1.0"?>
   <watcherinfo xmlns="urn:ietf:params:xml:ns:watcherinfo"
                version="0" state="full">
      <watcher-list resource="sip:Richard@operator.com"
                    package="presence">
        <watcher id="23456abcd" event="subscribe"
                 status="pending">sip:Jorgen@operator.com</watcher>
      </watcher-list>
   </watcherinfo>

 

Our scenario can be following. Jorgen subscribes for a winfo.presence package. When Richard wants to watch Jorgen’s presence Jorgen has to approve it first. Based on the approval status Richard’s subscription can be in pending/active/terminated state.

Subscription-State: active

So our call will look like:

 

winfo.presence flow

winfo.presence flow

 

This is so-called reactive authorization. There can be also some services applied by PS e.g. black-list alerting, pro-active subscription etc.

Some more information can be found in Presence – from the other site.

3 thoughts on “Someone’s Watching

  1. Pingback: Presence – from the other site | Real Time Communication

  2. Pingback: Presence – More Than You Wanted to Know | Real Time Communication

  3. Pingback: IMS Presence Illustrated: Beginners Guide | Real Time Communication

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s