Page 1 of 1
Discrepancy between User Timesheets and Campaigns

Posted:
Tue May 12, 2009 8:28 am
by chrism
I'm sure this has been asked before, but i'm not quite sure what to search for in the forums...
I have noticed on many occasions that a user's timesheet will indicate a different total number of calls from the campaign report (VDAD). I've seen this where they dial the number and then hang up while it is dialing. It will register as a dialed number for the user, but it will not register in the campaign as a dialed number.
I'm still trying to get my head wrapped around it, but under what conditions will a call register just for the user and not for the campaign?
Thanks again.

Posted:
Tue May 12, 2009 7:54 pm
by mflorell
vicidial.php version and build?
vicidial.php version and build

Posted:
Tue May 12, 2009 9:56 pm
by chrism
VERSION: 2.0.5-173
BUILD: 90320-0424

Posted:
Wed May 13, 2009 7:02 pm
by mflorell
Depending on the campaign dial method, the way that the agent is dialing, and some other factors, this can cause log differences. I know that since that version I have fixed a couple of logging bugs(before the 2.0.5 release) so you might want to upgrade.

Posted:
Thu May 14, 2009 11:06 am
by chrism
So that release wasn't the official v2.05 release or are you suggesting to download from the latest beta?
Thanks.

Posted:
Thu May 14, 2009 11:08 am
by chrism
ahh... I see. There is a newer release. What is the latest release version?
Thanks.

Posted:
Thu May 14, 2009 9:52 pm
by mflorell
The full 2.0.5 release is the latest full release.

Posted:
Fri May 15, 2009 8:54 am
by chrism
Hi Matt,
I apologize for my ignorance, but I just want to understand...
So there have been fixes since the first v2.0.5. VERSION: 2.0.5-173 BUILD: 90320-0424 is not the "official" v2.0.5 release? I guess we downloaded it a bit too early.

Posted:
Fri May 15, 2009 11:25 am
by mflorell
Did you download the astguiclient_2.0.5.zip file from sourceforge.net or did you download from SVN?

Posted:
Fri May 15, 2009 11:45 am
by chrism
I'm pretty sure from sourceforge. I've never checked anything out of your SVN.

Posted:
Fri May 15, 2009 4:58 pm
by mflorell
Oh, that's the admin.php, not the vicidial.php that I had asked for. Yes that is probably the release version then.
Not sure what is causing the calls number sync issue, are you only doing manual dial? are you only doing one campaign?

Posted:
Fri May 15, 2009 7:04 pm
by chrism
We are doing manual dial with multiple campaigns across multiple agents. I'd be more than happy to give you access to take a look. Is anyone else checking their numbers too? Here's the scenario to reproduce it:
1) Setup a campaign within /vicidial/ for manual dialing.
2) Login as an agent under /agc/
3) Click the check mark next to 'Lead Preview'
4) Click on 'Dail next number'
5) Click 'Dial Lead'
6) Immediately hang up.
7) Select a call disposition. In our case 'B - Busy'.

Go back under /vicidial/
9) View the VDAD report for AST_VDADstats.php doing the one call. It will not register.
10) View the user stats report user_stats.php for the one call. That call will register.
Here is what is even more confusing... this only seems to randomly happen. I may be missing something, but it does happen because we'll do like 100 calls on a campaign and just have one user. The agent's calls will be higher than the campaign calls.

Posted:
Sat May 16, 2009 5:42 am
by mflorell
This is something that we will have to test and reproduce on our dev system. Does this happen when you aren't using preview dial as well, or only under preview dialing?

Posted:
Sat May 16, 2009 5:52 am
by chrism
To be honest, I've never tested without actually previewing the lead first. Let me know if I can assist.
Hello chrism

Posted:
Tue Jun 02, 2009 10:10 am
by arpit.modi
I have got why there is so difference....
Here is the patch
Please open the file user_stats.php in vicidial directory
go to line 174,
you will find a query of selecting this total calls for user stats page.
which is,
$stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59' group by status order by status";
and change it to
$stmt="SELECT count(*),status, sum(length_in_sec) from vicidial_log where user='" . mysql_real_escape_string($user) . "' and call_date >= '" . mysql_real_escape_string($begin_date) . " 0:00:01' and call_date <= '" . mysql_real_escape_string($end_date) . " 23:59:59'
and length_in_sec is not null and length_in_sec > 0 group by status order by status";
Please note i have added
and length_in_sec is not null and length_in_sec > 0 in the query and which i found from AST_VDADstats.php
Then try to run it, so it will show same number of total calls in user stats as well as vdad stats...
Thanks,
Let me know if this works, it worked for me.......


Posted:
Tue Jun 02, 2009 10:56 am
by chrism
Hi Arpit,
Nice suggestion, but are you running an older version of Vicidial? My code looks more like this for that line:
- Code: Select all
$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 and length_in_sec is not null and length_in_sec > 0 limit 1;";

Posted:
Tue Jun 02, 2009 12:45 pm
by mflorell
We have fixed a few bugs in more recent code, including in SVN trunk we have added a new agent time detail report that you will probably find useful.
Solution!

Posted:
Tue Jun 02, 2009 4:47 pm
by chrism
Hi Matt,
FYI - The latest AST_agent_time_sheet.php within the SVN trunk did not resolve the problem with it. With Arpit's suggestion, I got an idea and took a closer look at the database. I noticed a number of entries with 'NULL' records for the lead_id field.
Therefore, I changed this:
- Code: Select all
$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 limit 1;";
To this:
- Code: Select all
$stmt="select count(*) as calls,sum(talk_sec) as talk,avg(talk_sec),sum(pause_sec),avg(pause_sec),sum(wait_sec),avg(wait_sec),sum(dispo_sec),avg(dispo_sec) from vicidial_agent_log where event_time <= '" . mysql_real_escape_string($query_date_END) . "' and event_time >= '" . mysql_real_escape_string($query_date_BEGIN) . "' and user='" . mysql_real_escape_string($agent) . "' and pause_sec<48800 and wait_sec<48800 and talk_sec<48800 and dispo_sec<48800 and lead_id IS NOT NULL limit 1;";
Notice the
and lead_id IS NOT NULL added to the query.
Any idea why entries are getting in like that? Sounds to me like there is a timing issue with my set up maybe?
Thanks,
Chris

Posted:
Tue Jun 02, 2009 7:14 pm
by mflorell
That is an old report and there is no longer one entry per received call, so it is normal to have NULL lead_id in entries for that table.
Take a look at the AST_agent_time_detail.php report.
Hello chrism

Posted:
Wed Jun 03, 2009 2:40 am
by arpit.modi
Mine is also the same version and build of vicidial.
VERSION: 2.0.5-173
BUILD: 90320-0424
Strange, so by changing that query, did it work for you?

Posted:
Wed Jun 03, 2009 8:18 am
by chrism
Yes, it worked, but I want to know why the calls are entering in NULL data.