Page 1 of 1

Login Time different (today and yesterday)

PostPosted: Thu Mar 10, 2016 11:57 am
by ZibiX
Hi.

One of my clients found that Login Time from Agent Time Report is diferent after 24 H of initial checking.
Example:

On Monday Agent number 101 has 10:00:00 Login Time.
On Tuesday when we check Agent number 101 (statistics from Monday) he has 08:00:00 Login Time (which is correct)

I believe it has something to do with one of this three scripts:
AST_cleanup_agent_log.pl --last-24hours
AST_agent_week.pl
AST_agent_day.pl

Can you tell me exactly what are this script doing some couple of minutes after midnight that Time Reports are corrected?

Re: Login Time different (today and yesterday)

PostPosted: Thu Mar 10, 2016 4:24 pm
by mflorell
This script "AST_cleanup_agent_log.pl --last-24hours" will clean up the vicidial_agent_log in several different ways. Take a look at the code to see how it works.

Re: Login Time different (today and yesterday)

PostPosted: Wed Mar 23, 2016 3:26 am
by ZibiX
Thank you for reply. This file is huge :)

The think that i wanted to do is to add a Counter of Pause time on Agent Panel for Agent logged in. The problem is that when i get the pause_sec from asterisk.vicidial_agent_log and present this time on Agent Panel (refresh time 5 minutes) in some cases this time will be wrong.

I have made a test:
98 agents
For 92 agents pause time is the same when i generated the raport on 22.03.2016 and then the same raport from 22.03.2016 but generated today on 23.03.2016
For 6 users there are major differences in pause time - even 900 seconds.

Why are this happening?

Re: Login Time different (today and yesterday)

PostPosted: Wed Mar 23, 2016 6:53 am
by mflorell
There are several reasons, from latencies in the AJAX to math errors in Javascript when dealing with large numbers to unidentified logging errors that are only caused by rare conditions and agent behaviors. These issues are very difficult to identify, and even harder to reproduce, which is why we created the cleanup script in the first place.

Re: Login Time different (today and yesterday)

PostPosted: Wed Mar 30, 2016 10:21 am
by ZibiX
Thank you for your answer.

For our counter of Pause time on Agent Panel we will use wait_epoch-pause_epoch from vicidial_agent_log. It gives us quiet accurate values.