2010/9/30 Daniel-Constantin Mierla miconda@gmail.com:
This means that the XCAP server MUST behave as a SIP presence server in order to allow or deny the icon of user B to user A. Painful? Yes.
Well, then this xcap server can do more than I expected so far, because it can behave like a presence server :-) since kamailio is a presence server.
You can check the authorization status for watchers in config, iirc, Juha added it: http://kamailio.org/docs/modules/devel/modules_k/presence.html#id2941538
So, when there is a query for someone's resources, you can check in the config if querying person is allowed to see presence of queried person.
Yes, but this mechanism is a bit "weak". Imagine I'm allowed by Bob and retrieve his icon. Later Bob's blocks me. Now if my client tries to retrieve his icon again I would receive a 403 or 404 (customizable using the script). Any code tells me that I've been blocked.
For sure all of us know web pages like "Discover if your friend has blocked you in MSN !!!". Well, here is a way to do the same in this "cool" SIP/SIMPLE specification.
And there is no solution. When I block a user he must believe that I've been disconnected, but since icon is retrieved via HTTP from a permanent storage then there is way to realize that I've blocked such user. The only solution is carrying the icon in the NOTIFY itself as XMPP does (by default).
Regards.