Call length_in_sec incorrect for some calls

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Call length_in_sec incorrect for some calls

Postby roger.milligan » 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
------------------------------------------------------------------------------------------------------
Roger Milligan
Thrive, Cape Town, South Africa.
Mobile: +27 791412325 rogerm(at)thrivedatasolutions(dot)com
roger.milligan
 
Posts: 58
Joined: Sun Jul 19, 2015 12:18 pm
Location: Cape Town, South Africa

Re: Call length_in_sec incorrect for some calls

Postby mflorell » Fri Dec 08, 2023 7:29 am

Thank you for the detailed description of the issue. Do you know if the "/usr/share/astguiclient/AST_cleanup_agent_log.pl --last-24hours" script that runs at night fixes these call log entries?
mflorell
Site Admin
 
Posts: 18379
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Support

Who is online

Users browsing this forum: No registered users and 77 guests