[SR-Users] Presence: Duplicate entry 'username-domain-presence-*#-OFFLINE-#*' for key 'presentity_idx' when multiple clients register using the same credentials

Juha Heinanen jh at tutpro.com
Mon Oct 7 12:31:17 CEST 2013

Yufei Tao writes:

> When a client (S) subscribes to this contact (username at domain) whose
> credentials are used by two clients, (S) gets NOTIFYs containing
> statuses from either of the username at domain contacts in alternation. But
> all these NOTIFYs have the same call-id.
> I've tried remove the constraint 'CONSTRAINT presentity_idx UNIQUE
> (username, domain, event, etag)' from the presentity table and the
> errors have gone away. Just wondering if this is something that *should*
> be done to cope with the situation where multiple presentities use the
> same credentials.

before knowing how to answer to that, i would like to know what presence
rfcs say about this situation, i.e., is current kamailio presence
implementation somehow broken when an aor (= presentity) has several
active contacts.

should notify give status of both contacts separately or should presence
server try somehow to combine status of the contacts into a single
notify?  what does it mean if one contact tells that it is offline and
another online?  should presence server send only one notify telling
that the presentity is online (since it is if one contact tells so)?

-- juha

More information about the sr-users mailing list