Hi Klaus,
On 10/4/11 12:33 PM, Klaus Darilion wrote:
Hi!
When populating cdrs table from timer route I get some errors:
ERROR: db_mysql [km_dbase.c:120]: driver error on query: Duplicate
entry
'088827BCD0738B6F@111.11.111.11-00E0F510042319395872000014D3-6ADB'
for key 2
ERROR: <core> [db_query.c:130]: error while submitting query
ERROR: sqlops [sql_api.c:217]: cannot do the query
Checking the acc table for those key I found the entries in the
attachment.
Maybe it be that the stored procedure can not handle PRACK or
reINVITEs correctly?
it is about the INVITEs, if you look at the stored procedure, it
loads the unprocessed INVITEs and matches them against the BYE,
writing a CDR for each. Having re-INVITEs results in collisions of
unique key.
I guess you want the CDR to be from initial INVITE to the BYE -- you
would need to adjust the stored procedure to select the first one.
One way is to store in a new column of acc table a flag saying
whether is the first INVITE or not (a re-INVITE) and adjust the
stored procedure to select only those INVITE records.
Cheers,
Daniel
Thanks
Klaus
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda