[OpenSIPS-Users] Question Regarding Watchers table.
Iñaki Baz Castillo
ibc at aliax.net
Tue Oct 20 10:24:51 CEST 2009
El Martes, 20 de Octubre de 2009, Sanjeev BA escribió:
> Hi,
>
>
>
> What watcher A adds presentity B to his contact list using OpenXCAP, how is
> the watchers/active_watchers table updated?
>
> I assume that once the B is added to the the xcap entry for A, the xcap
> server would send a refreshWatchers command, that would make opensips
> presence module to update the watchers/active_watchers table and
> subsequently, presence status changes would be NOTIFY ed to the watchers.
>
>
>
> I have set force_active parameter to 1 in opensips config.
>
> Please provide some info on how this interaction works. Any pointers will
> also be helpful.
Hi, in order to use XCAP stuf I strongly recommedn you to read RFC 4825 and
other XCAP RFC's, and also SIMPLE RFC's.
First of all, if you are using "force_active = 1" then XCAP pres-rules is
*unuseful* for you as the subscriber/watcher will *always* be allowed to see
the status of the presentity. So first you should consider setting that
parameter to 0 if you want to use XCAP.
After that, when watcher A subscribes to B, OpenSIPS presence_xml module will
inspect the user A's XCAP pres-rules to determine if A allows B or not. If the
pres-rules document doesn't exist or A is not allowed in it, then presence
module will set an entry in (active_)watchers with status 1 ("pending") and
send an empty NOTIFY with "Subscription-Status: pending" to A.
If B is subscribed to presence.winfo event then B will receive a NOTIFY
explaining that A as subscribed to her. Then, B software will ask its human
user to allow/disallow that user to see his status (as MSN/Gtalk/Skyp/Yahoo
messengers...).
If B allows, it would create/modify the XCAP pres-rules document and upload
it.
When the XCAP server receives it it will update to the presence server about a
pres-rules change for A (the only "working" solution is using OpenXCAP as it
notifies it to OpenSIPS using XMLRPC).
Then OpenSIPS presence_xml module will inspect the new pres-rules document
and, ince now B is allowed by A, will change the state of the
(active_)watchers) entry to 2 ("active") and will send to A a NOTIFY with
"Subscription-Status: active" and the real presence status of A in the body.
Said that, I would also comment that IETF hasn't done a strict and
interoperable specifications for XCAP/SIMPLE. Instead it leave many
specificacitions "open" so ech vendor would implement it in a
custom/propietary way => NO interoperability.
This is: if somebody tells you that he has created a device/softphone
implementing IETF's XCAP-SIMPLE specificacions then he lies you. What he has
really done is creating a softphone implementing propietary and custom
specifications since IETF didn't finish his work and left it "open" to be
finished by vendors. Most probabbly that softphone will just work with the
same vendor's softphones, same vendor's presence server and same vendor's XCAP
server. For sure!
Regards.
--
Iñaki Baz Castillo <ibc at aliax.net>
More information about the Users
mailing list