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);
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