<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Klaus,<br>
<br>
On 10/4/11 12:33 PM, Klaus Darilion wrote:
<blockquote cite="mid:4E8AE107.6080701@pernau.at" type="cite">Hi!
When populating cdrs table from timer route I get some errors:
<br>
<br>
ERROR: db_mysql [km_dbase.c:120]: driver error on query: Duplicate
entry
'<a class="moz-txt-link-abbreviated" href="mailto:088827BCD0738B6F@111.11.111.11-00E0F510042319395872000014D3-6ADB">088827BCD0738B6F@111.11.111.11-00E0F510042319395872000014D3-6ADB</a>'
for key 2
<br>
ERROR: <core> [db_query.c:130]: error while submitting query
<br>
ERROR: sqlops [sql_api.c:217]: cannot do the query
<br>
<br>
<br>
Checking the acc table for those key I found the entries in the
attachment.
<br>
<br>
Maybe it be that the stored procedure can not handle PRACK or
reINVITEs correctly?
<br>
</blockquote>
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.<br>
<br>
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.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote cite="mid:4E8AE107.6080701@pernau.at" type="cite">
<br>
Thanks
<br>
Klaus
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Kamailio Advanced Training, Dec 5-8, Berlin: <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
<a class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
</body>
</html>