Error in cdr log when parked call coming back

i’ve configured parking feature with comebacktoorigin = yex option

when the parked call is not peaked up by anyone the call is coming back to who parked the call , but it is affecting in cdr telling duplicate entry for a primary key …

   > [INSERT INTO cdr (uniqueid,linkedid,clid,src,dst,dcontext,channel,dstchannel,lastapp,lastdata,start,answer,end,duration,billsec,disposition,amaflags,sequence) VALUES ('1425714914.10','1425714914.10','2008','2008','2001','from-internal','SIP/2008-00000008','SIP/2001-0000000a','Dial','SIP/2001,30,TWKtwk',{ ts '2015-03-07 13:55:27' },{ ts '2015-03-07 13:55:27' },{ ts '2015-03-07 13:56:40' },73,0,'BUSY',3,'16')]

[2015-03-07 13:56:40] WARNING[7267][C-0000000d]: res_odbc.c:646 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000: [MySQL][ODBC 5.1 Driver][mysqld-5.1.73-log]Duplicate entry ‘1425714914.10’ for key ‘PRIMARY’ (92)
[2015-03-07 13:56:40] WARNING[7267][C-0000000d]: res_odbc.c:658 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asteriskcdr [asteriskcdr]…
[2015-03-07 13:56:40] WARNING[7267][C-0000000d]: res_odbc.c:762 ast_odbc_sanity_check: Connection is down attempting to reconnect…
[2015-03-07 13:56:40] NOTICE[7267][C-0000000d]: res_odbc.c:1537 odbc_obj_connect: Connecting asteriskcdr
[2015-03-07 13:56:40] NOTICE[7267][C-0000000d]: res_odbc.c:1569 odbc_obj_connect: res_odbc: Connected to asteriskcdr [asteriskcdr]
[2015-03-07 13:56:40] WARNING[7267][C-0000000d]: res_odbc.c:646 ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000: [MySQL][ODBC 5.1 Driver][mysqld-5.1.73-log]Duplicate entry ‘1425714914.10’ for key ‘PRIMARY’ (92)
[2015-03-07 13:56:40] WARNING[7267][C-0000000d]: res_odbc.c:658 ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to asteriskcdr [asteriskcdr]…

You have an inappropriate unique constraint on your database. In particular note that one channel can produce more than CDR, so uniqueid should not be the only field in a unique constraint.

Also, this is a complex scenario, and CDRs are known not to work well in those, which is why CEL (channel event logging) was developed.