When a client (S) subscribes to this contact (username@domain) whose
credentials are used by two clients, (S) gets NOTIFYs containing
statuses from either of the username@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.
Cheers,
Yufei
On 05/10/13 11:00, sr-users-request(a)lists.sip-router.org wrote:
Hi
I use kamailio 4.0.3 with presence. I sometimes get these errors:
Oct 4 09:26:24 server /usr/sbin/kamailio[1292]: ERROR: presence
[publish.c:171]: msg_presentity_clean(): Marking presentity
Oct 4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: db_mysql
[km_dbase.c:122]: db_mysql_submit_query(): driver error on query:
Duplicate entry 'username-domain-presence-*#-OFFLINE-#*' for key
'presentity_idx'
Oct 4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: <core>
[db_query.c:337]: db_do_update(): error while submitting query
Oct 4 09:26:34 server /usr/sbin/kamailio[1292]: ERROR: presence
[presentity.c:1281]: mark_presentity_for_delete(): unsuccessful sql
update operation
This is when multiple SIP clients are registered using the same
credentials, they each have a presentity entry, with the same username
and domain but different etags, which is fine. But when they expire, the
presentity.etag will be filled with '*#-OFFLINE-#*', and when both
expire at about the same time, kamailio tries to fill both with the same
'*#-OFFLINE-#*' etag. Because presentity table has a 'CONSTRAINT
presentity_idx UNIQUE (username, domain, event, etag)', this gives the
errors.
Should the constraint be removed to cope with this situation?
Thank you!
Yufei
--
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for
the addressee. If you are not the intended addressee please notify the sender by return
and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party
without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts
Mill Rd, Saltaire, BD17 7EZ
------------------------------
Message: 3
Date: Fri, 4 Oct 2013 14:30:23 +0300
From: Juha Heinanen <jh(a)tutpro.com>
To: "Kamailio \(SER\) - Users Mailing List"
<sr-users(a)lists.sip-router.org>
Subject: [SR-Users] Presence: Duplicate entry
'username-domain-presence-*#-OFFLINE-#*' for key 'presentity_idx'
when
multiple clients register using the same credentials
Message-ID: <21070.42703.920666.161344(a)siika.tutpro.com>
Content-Type: text/plain; charset=us-ascii
Yufei Tao writes:
> This is when multiple SIP clients are
registered using the same
> credentials, they each have a presentity entry, with the same username
> and domain but different etags, which is fine. But when they expire, the
> presentity.etag will be filled with '*#-OFFLINE-#*', and when both
> expire at about the same time, kamailio tries to fill both with the same
> '*#-OFFLINE-#*' etag. Because presentity table has a 'CONSTRAINT
> presentity_idx UNIQUE (username, domain, event, etag)', this gives the
> errors.
>
> Should the constraint be removed to cope with this situation?
how are those
'*#-OFFLINE-#*' records used? are both needed? does it
make sense to publish different information for the same presentity by
two UAs? if i subscribe to presence of that username@domain, do i get
two notifys one from each or just one?
-- juha
--
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for
the addressee. If you are not the intended addressee please notify the sender by return
and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party
without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts
Mill Rd, Saltaire, BD17 7EZ