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>

Continue reading