AST_agent_performance_detail.php

Discussions about development of VICIDIAL and astGUIclient

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

AST_agent_performance_detail.php

Postby yeshuawatso » Wed Oct 29, 2008 10:33 pm

Hey Matt,

I've been working with great effort to come up with a better statistics reporting than what Vicidial currently has for outbound telemarketing. In particularly, I'm developing abilities to use better averages and frequency distribution than the default. While ciphering through the agent_log table, I noticed extremely long pause times when manual dialing is enabled. From the test I have ran, it seems that the last entry that has not been assigned a lead id takes the pause_sec when the agent logs out.
So the pause_sec looks like this:
Code: Select all
pause_sec = logout epoch - Disp_epoch


This of course isn't a problem as the code seems to subtract this from the results. My problem is the results. When testing 7 manual dialed calls today and running the detailed report, the query looks like this:
Code: Select all
select count(*) as calls,sum(talk_sec) as talk,full_name,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status from vicidial_users,vicidial_agent_log where event_time <= '2008-10-29 23:59:59' and event_time >= '2008-10-29 00:00:00' and vicidial_users.user=vicidial_agent_log.user and campaign_id='9999' and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000  group by full_name,status order by status desc,full_name limit 100000;

When this code is executed directly into MySQL, sure enough I get 8 rows, 1 of which is the pause_sec logout event.

When running the default settings though, these are the results printed:
Code: Select all
+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+
| USER NAME       | ID       | CALLS  | TIME    | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG|     SALE |       NP |       NI |      DNC |      DEC |       DC |        A |
+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+
| Tommy Joe       | 6001     |      0 |    8:54 |   0:00 |   0:00 |   4:09 |   0:00 |   3:52 |   0:00 |   0:53 |   0:00 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |
+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+
|  TOTALS        AGENTS:1    |       0|     8:54|    0:00|   0:00 |    4:09|   0:00 |    3:52|   0:00 |    0:53|   0:00 |        0 |        0 |        0 |        0 |        0 |        0 |        0 |
+----------------------------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+

You can clearly see that the total number of calls results in 0. This is regardless of how many calls have been made. The times are correct, but this call volume value isn't for some strange reason. So out of curiosity I printed the array $calls[] to see the values with this result:
Code: Select all
Array
(
    [0] => 0
    [1] => 0
    [2] => 0
    [3] => 0
    [4] => 0
    [5] => 0
    [6] => 0
    [7] => 1
)

The [7] key is the logout event where the pause exist. After much experimentation, I commented out the line
Code: Select all
$row[0] = ($row[0] - 1);
and suddenly my call volume returned.

The new results:
Code: Select all
+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+
| USER NAME       | ID       | CALLS  | TIME    | PAUSE  | PAUSAVG| WAIT   | WAITAVG| TALK   | TALKAVG| DISPO  | DISPAVG|     SALE |       NP |       NI |      DNC |      DEC |       DC |        A |
+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+
| Tommy Joe       | 6001     |      7 |    8:54 |   0:00 |   0:00 |   4:09 |   0:35 |   3:52 |   0:33 |   0:53 |   0:08 |        1 |        1 |        1 |        1 |        1 |        1 |        1 |
+-----------------+----------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+
|  TOTALS        AGENTS:1    |       7|     8:54|    0:00|   0:00 |    4:09|   0:35 |    3:52|   0:33 |    0:53|   0:08 |        1 |        1 |        1 |        1 |        1 |        1 |        1 |
+----------------------------+--------+---------+--------+--------+--------+--------+--------+--------+--------+--------+----------+----------+----------+----------+----------+----------+----------+

And the array:
Code: Select all
Array
(
    [0] => 1
    [1] => 1
    [2] => 1
    [3] => 1
    [4] => 1
    [5] => 1
    [6] => 1
    [7] => 2
)


I wanted to know if you could shine some light on this problem. I'm not sure if it's my system setup or the code. My first assumption is to believe that the problem exist because there is only one agent but I figured you would know a little more about why this happens.

Vicidial Version:
2.04
MySQL 5
Php 5
Apache 2.2

My apologies in advance if this is a bug that is already on the tracker.

Thanks,
Yeshua
yeshuawatso
 
Posts: 22
Joined: Sat Apr 12, 2008 3:03 pm

Postby yeshuawatso » Wed Oct 29, 2008 11:22 pm

Just an update:

I added more users to see if the error was coming from having just one agent, but it doesn't seem to matter, the error still exist.
yeshuawatso
 
Posts: 22
Joined: Sat Apr 12, 2008 3:03 pm

Postby mflorell » Thu Oct 30, 2008 8:27 am

If you are working on development you should really use SVN trunk.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby yeshuawatso » Thu Oct 30, 2008 11:27 am

But that's just it: I'm not working on development of Vicidial, but a separate statistical program that reads the vicidial database directly. I was picking apart the performance detail code to get a better understanding of how vicidial stores its information in the database.

Coming across this problem was by mistake but I wanted some insight if this was a system problem or the code.

Thanks,
Yeshua
yeshuawatso
 
Posts: 22
Joined: Sat Apr 12, 2008 3:03 pm

Postby mflorell » Thu Oct 30, 2008 6:38 pm

The code has been changed significantly in SVN trunk, there were some bugs in the 2.0.4 branch code in relation to logging as well as in some of the reports.
mflorell
Site Admin
 
Posts: 18335
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 42 guests