Call length_in_sec incorrect for some calls
Posted: Fri Dec 08, 2023 4:20 am
Hello
We've hit what looks like a bug where the length_in_sec values in vicidial_log & vicidial_closer log are far to high for about 2% of calls. The vicidial_agent_log.agent talk_sec, call_log.length_in_sec and vicidial_log.end_epoch-start_epoch all match and are correct.
I changed the Ajax logging to record this:
UPDATE vicidial_log SET end_epoch='1701954483',length_in_sec='3893',uniqueid='1701954348.102420',alt_dial='MAIN',user='KL1563' where lead_id='851601' and user IN('KL1563','VDAD') and phone_number='0724640422' and uniqueid LIKE "1701954348%" and called_count='1'|
length_in_sec is 3893 when it should be 135.
Turns out that all the cases that I followed had the scenario where the previous call was a MANUAL call with 0 length and NA status. The faulty call then uses the start time of the PREVIOUS call for this calculation:
$length_in_sec = ($StarTtime - $start_epoch);
I'll continue to troubleshoot and see if I can find the bug, but in the meantime, if anyone has already solved this, please let me know before I duplicate effort.
In the meantime I have a DB event to repair the data - update vicidial_log set length_in_sec=end_epoch-tart_epoch where ...
Thanks
Roger
ViciBox 11 VERSION: 2.14-897a BUILD: 230927-0857
We've hit what looks like a bug where the length_in_sec values in vicidial_log & vicidial_closer log are far to high for about 2% of calls. The vicidial_agent_log.agent talk_sec, call_log.length_in_sec and vicidial_log.end_epoch-start_epoch all match and are correct.
I changed the Ajax logging to record this:
UPDATE vicidial_log SET end_epoch='1701954483',length_in_sec='3893',uniqueid='1701954348.102420',alt_dial='MAIN',user='KL1563' where lead_id='851601' and user IN('KL1563','VDAD') and phone_number='0724640422' and uniqueid LIKE "1701954348%" and called_count='1'|
length_in_sec is 3893 when it should be 135.
Turns out that all the cases that I followed had the scenario where the previous call was a MANUAL call with 0 length and NA status. The faulty call then uses the start time of the PREVIOUS call for this calculation:
$length_in_sec = ($StarTtime - $start_epoch);
I'll continue to troubleshoot and see if I can find the bug, but in the meantime, if anyone has already solved this, please let me know before I duplicate effort.
In the meantime I have a DB event to repair the data - update vicidial_log set length_in_sec=end_epoch-tart_epoch where ...
Thanks
Roger
ViciBox 11 VERSION: 2.14-897a BUILD: 230927-0857