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

Yufei Tao yufei.tao at redembedded.com
Fri Oct 4 12:35:26 CEST 2013


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



More information about the sr-users mailing list