< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] NOTIFY and PUBLISH for Presence


Karlsson wrote:
Hi all, a quesiton: for the presence, when to use PUBLISH and when to use Notify?

From a protocol perspective, it is usually illegal to send a NOTIFY somewhere unless you have received a SUBSCRIBE from that same place (REFER is the one exception). If you use PUBLISH to send presence information, you need to be pretty sure that the thing you're sending it to is expecting it. That pretty much limits you to sending PUBLISH to presence servers, and never to phones (or similar devices).

The the practical guideline is that clients generally send PUBLISH to the presence server, and the presence server will sentd NOTIFY to clients that have sent it SUBSCRIBEs.

There are a bunch of exceptions to that guideline, but that's what you'll want to do for the most common presence server architectures most of the time.

/a