Page 1 of 1

vicidial_id in recording_log

PostPosted: Mon Apr 13, 2020 6:51 am
by andrei.miron
Hi,

I installed the latest ViciBox rom iso form the site and it update it. I created a campaign and in-group and did some test calls.
The campaign is configured to record all calls. I noticed something:
- the line in recording_log has on the vicidial_id the closecallid like this: recording_log.vicidial_id=vicidial_closer_log.closecallid
- if in the DID I have Record Call: Y then in the recording_log there is a new line (beside one the above) where recording_log.vicidial_id=vicidial_closer_log.vicidial_id

Is this a bug or is a reason for this?

For our setup this is very awkward the Vicidial_id in recording_log is the closecallid (int) and then you cannot do a join on the 2 tables in order to easily find the recordings.
For outbound calls everything is ok due to the fact that vicidial_log.uniqueid is varchar so a join with recording_log is possible.

Thanks,
Andrei
ViciBox 9.0.1 from .iso
VERSION: 2.14-744a
BUILD: 200401-1448
Asterisk 13.29.2-vici
Single Server
No Digium/Sangoma Hardware
No Extra Software After Installation
VMWare 14

Re: vicidial_id in recording_log

PostPosted: Mon Apr 13, 2020 7:30 am
by mflorell
When a call comes into a DID at first, there is no entry in the vicidial_closer_log for that call, so you can't use the closecallid in the recording_log when the record is inserted.

Re: vicidial_id in recording_log

PostPosted: Tue Apr 14, 2020 3:27 am
by andrei.miron
I understand that.

I don't understand why it is used closecallid in the column vicidial_id and not the uniqueid. Using uniqueid in the column vicidial_id it will be possible to have a join select between vicidial_closer_log and recording_log.
What is the advantage or the reason it is used closecallid in the column uniqueid in recording_log?

Thanks,
Andrei

Re: vicidial_id in recording_log

PostPosted: Tue Apr 14, 2020 7:25 am
by mflorell
Uniqueid was not used because when you transfer a call from one in-group to another it would have the same uniqueid, which would make it harder to identify which recording went with which ingroup-handled call. The same is not true of outbound calls where you can only have one.

Re: vicidial_id in recording_log

PostPosted: Wed Apr 15, 2020 2:27 am
by andrei.miron
Aha, thanks for the info.

Do you think it will be a problem to transform closecallid in varchar(20) like vicidial_id? In this way a join select will be possible.

Thanks,
Andrei

Re: vicidial_id in recording_log

PostPosted: Wed Apr 15, 2020 7:58 am
by mflorell
That is an AUTO_INCREMENT field, so I wouldn't recommend it. We also try to stay away from using JOINs in our SQL most of the time because of how horrible they are for performance of the database.