Page 1 of 1

recording_log table data is duplication!

PostPosted: Fri Nov 08, 2013 12:29 am
by mdys
I query recording_log table query recording, but found vicidial_id and lead_id is duplicate data records,
for example:
Code: Select all
mysql> select a.uniqueid,a.lead_id,a.user,b.user,b.vicidial_id,b.lead_id,a.phone_number,b.filename,a.call_date,b.start_time from vicidial_log a inner join recording_log b on a.uniqueid=b.vicidial_id and a.lead_id=b.lead_id where a.call_date BETWEEN '2013-11-08 00:00:01' and '2013-11-08 23:00:01' and a.uniqueid='1383870423.489';
+----------------+---------+------+------+----------------+---------+--------------+-----------------------------+---------------------+---------------------+
| uniqueid       | lead_id | user | user | vicidial_id    | lead_id | phone_number | filename                    | call_date           | start_time          |
+----------------+---------+------+------+----------------+---------+--------------+-----------------------------+---------------------+---------------------+
| 1383870423.489 | 4626372 | 8083 | 8083 | 1383870423.489 | 4626372 | 13721554090  | 20131108-082731_18208603400 | 2013-11-08 08:27:39 | 2013-11-08 08:27:32 |
| 1383870423.489 | 4626372 | 8083 | 8083 | 1383870423.489 | 4626372 | 13721554090  | 20131108-082740_13721554090 | 2013-11-08 08:27:39 | 2013-11-08 08:27:41 |
+----------------+---------+------+------+----------------+---------+--------------+-----------------------------+---------------------+---------------------+
2 rows in set (0.01 sec)


filename=20131108-082740_13721554090 is right!
filename=20131108-082731_18208603400 is wrong!
recording_log table has two data vicidial_id = 1383870423.489

vicidial_log and recording_log data records should be a unique value!~
That can help me solve? Thanks!

Re: recording_log table data is duplication!

PostPosted: Wed Nov 13, 2013 10:36 pm
by williamconley
Does this show as two records in the lead record, or one?

Do you have recording set up anywhere else? (Like ... for the agent or the DID)

If you are performing this with a "join", which table has two records?

Consider borrowing the query from the modify lead page: search for a lead, then click on it ... you are on the modify lead page ... if that page only shows ONE recording, then the query used to generate that page may solve your problem.

Re: recording_log table data is duplication!

PostPosted: Thu Nov 14, 2013 3:04 am
by mdys
williamconley wrote:Does this show as two records in the lead record, or one?

Do you have recording set up anywhere else? (Like ... for the agent or the DID)

If you are performing this with a "join", which table has two records?

Consider borrowing the query from the modify lead page: search for a lead, then click on it ... you are on the modify lead page ... if that page only shows ONE recording, then the query used to generate that page may solve your problem.

Thank you for your reply! Is recording_log table records repeated, vicidial_id should not only unique data fishes do? But found vicidial_id = 1383870423.489 the two records!