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?
Thanks Klaus
Very weird - if I call kamailio_cdrs() manually I often get errors which are gone when I call kamailio_cdrs() again. Strange......
regards klaus
On 04.10.2011 12:33, 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?
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
Hello,
On 10/4/11 12:57 PM, Klaus Darilion wrote:
Very weird - if I call kamailio_cdrs() manually I often get errors which are gone when I call kamailio_cdrs() again. Strange......
sql stored procedures are known to have AI and self-healing capabilities :-) ...
Well, I guess that the flag for unprocessed INVITEs is set to processed state (cdr_id!=0) even when inserting in cdrs table fails due to unique key collision, so a second call will not go again through those invites.
Maybe there is a way to find that the INSERT in cdrs fails, and if so, do not do UPDATE to acc.
Cheers, Daniel
regards klaus
On 04.10.2011 12:33, 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?
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
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
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