Could this be a bug in pua?
Using kamailio 4.1.3 (642428c)
Looking forward to hear from you.
BR,
--
*Nuno Miguel Reis* | *Unified Communication** Systems*
M. +351 913907481 | nreis(a)wavecom.pt
WAVECOM-Soluções Rádio, S.A.
Cacia Park | Rua do Progresso, Lote 15
3800-639 AVEIRO | Portugal
T. +351 309 700 225 | F. +351 234 919 191
*GPS
<http://maps.google.com/maps/ms?msa=0&msid=202333747613191340808.0004b4b227a6144f0df88>
|
<http://www.wavecom.pt/>** <http://www.wavecom.pt/>*
[image: Description: Description: WavecomSignature]
<http://www.wavecom.pt/pt/wavecom/premios.php>
[image: Publicity] <http://www.wavecom.pt/pt/mail_eventos.php>
On Tue, Jun 3, 2014 at 3:23 PM, Nuno Reis <nreis(a)wavecom.pt> wrote:
Hi guys.
I've setup presence management in kamailio and i'm currently persisting
the presence info in a postgres DB.
I'm having a recurring issue on DB key violations, here's a log error
output on that:
Jun 3 15:09:46 144227 ERROR: pua_dialoginfo [pua_dialoginfo.c:264]:
__dialog_sendpublish(): bad reply or missing CONTACT hdr
Jun 3 15:10:01 723993 ERROR: presence [presentity.c:807]:
update_presentity(): No E_Tag match a.1401768964.671509.1990.6
Jun 3 15:10:06 242334 WARNING: db_postgres [km_dbase.c:235]:
db_postgres_submit_query(): postgres result check failed with code 7
(PGRES_FATAL_ERROR)
Jun 3 15:10:06 242370 WARNING: db_postgres [km_dbase.c:239]:
db_postgres_submit_query(): postgres query command failed, connection
status 0, error [ERROR: duplicate key value violates unique constraint
"pua_pua_idx"#012DETAIL: Key (etag, tuple_id, call_id,
from_tag)=(a.1401768964.671497.1902.6, , , ) already exists.#012]
Jun 3 15:10:06 243415 WARNING: db_postgres [km_dbase.c:235]:
db_postgres_submit_query(): postgres result check failed with code 7
(PGRES_FATAL_ERROR)
Jun 3 15:10:06 243449 WARNING: db_postgres [km_dbase.c:239]:
db_postgres_submit_query(): postgres query command failed, connection
status 0, error [ERROR: duplicate key value violates unique constraint
"pua_pua_idx"#012DETAIL: Key (etag, tuple_id, call_id,
from_tag)=(a.1401768964.671497.1902.6, , , ) already exists.#012]
Jun 3 15:10:06 244458 WARNING: db_postgres [km_dbase.c:235]:
db_postgres_submit_query(): postgres result check failed with code 7
(PGRES_FATAL_ERROR)
Jun 3 15:10:06 244487 WARNING: db_postgres [km_dbase.c:239]:
db_postgres_submit_query(): postgres query command failed, connection
status 0, error [ERROR: duplicate key value violates unique constraint
"pua_pua_idx"#012DETAIL: Key (etag, tuple_id, call_id,
from_tag)=(a.1401768964.671497.1902.6, , , ) already exists.#012]
Jun 3 15:10:06 244504 ERROR: db_postgres [km_dbase.c:247]:
db_postgres_submit_query(): 0x7f21476b1910 PQsendQuery Error: ERROR:
duplicate key value violates unique constraint "pua_pua_idx"#012DETAIL:
Key (etag, tuple_id, call_id, from_tag)=(a.1401768964.671497.1902.6, , , )
already exists.#012 Query: update kamailio.pua set
expires=1401807715,cseq=0,etag='a.1401768964.671497.1902.6',desired_expires=1401811600,version=2
where pres_uri='sip:208@freguesiadearroios.govoice.pt' AND
pres_id='DIALOG_PUBLISH.440163220-35219-52(a)BJC.BGI.B.BAI' AND flag=1024
AND event=32
Jun 3 15:10:06 244521 ERROR: <core> [db_query.c:337]: db_do_update():
error while submitting query
Jun 3 15:10:06 244548 ERROR: db_postgres [km_dbase.c:537]:
db_postgres_store_result(): invalid query, execution aborted
Jun 3 15:10:06 244560 ERROR: db_postgres [km_dbase.c:538]:
db_postgres_store_result(): driver error: PGRES_FATAL_ERROR, ERROR:
duplicate key value violates unique constraint "pua_pua_idx"#012DETAIL:
Key (etag, tuple_id, call_id, from_tag)=(a.1401768964.671497.1902.6, , , )
already exists.#012
Jun 3 15:10:06 244584 WARNING: db_postgres [km_dbase.c:647]:
db_postgres_update(): unexpected result returned
Jun 3 15:10:06 244591 ERROR: pua [pua.c:1076]: db_update(): while
updating in database
I've read the module documentation, but there isn't much documentation on
it and i'm basically guessing and trying here.
Can someone tell me what am i doing wrong or maybe what should a try to be
able to persist the presence status in a postgres database.
I know that i could use in memory persistence or other type of DB, but i
really want to know if i can use a normal postgres DB for presence
persistence and what could be used to avoid key violations.
Looking forward to hear from you.
Best Regards,
--
*Nuno Miguel Reis* | *Unified Communication** Systems*
M. +351 913907481 | nreis(a)wavecom.pt
WAVECOM-Soluções Rádio, S.A.
Cacia Park | Rua do Progresso, Lote 15
3800-639 AVEIRO | Portugal
T. +351 309 700 225 | F. +351 234 919 191
*GPS
<http://maps.google.com/maps/ms?msa=0&msid=202333747613191340808.0004b4b227a6144f0df88>
|
www.wavecom.pt <http://www.wavecom.pt/>** <http://www.wavecom.pt/>*
[image: Description: Description: WavecomSignature]
<http://www.wavecom.pt/pt/wavecom/premios.php>
[image: Publicity] <http://www.wavecom.pt/pt/mail_eventos.php>