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 callcrazy » Wed Nov 10, 2010 3:47 pm

As we create our own reports on the system we are noticing some odd behavior in the report

AST_agent_performance_detail.php

The last change I have listed in the flower box at top is 100216-0042 however the code in question still exists in svn-1538.

In the report a query is ran to generate times and totals. When I run the query I notice a list of all the users grouped together by their statuses and it's looping through each status. I'm noticing some of the status are equal to NULL.

I notice that statuses are getting processed using the following code around line 345.

if ( (!eregi("-$status[$i]-", $statuses)) and (strlen($status[$i])>0) )

It seems the NULL statuses are not being taken into account by the report and are dropped off. In calculating the NULL statuses this comes up to being a rather large chunk of time. For yesterday alone we had a total of 1 hour and 30 minutes of NULL status time.

----------------

What is the cause/reason for NULL status?

Is this time a duplication of another status is this why it's being removed from the report totals or is this a bug and NULL should actually be included in the report?

Thanks!
Vicibox 6.0.4 from .iso | VERSION: 2.12-538a BUILD: 160122-1401 | Asterisk 1.8.32.3-vici | 1xDB, 2xWeb, 7xPBX | Amfeltec Timers | Sangoma/Lyra AMD | Dell Hardware
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Wed Nov 10, 2010 4:12 pm

no lead should ever have null status. so find out where the null is, then find out how it got there.

if you are talking about users, what status does a user have other than active/inactive? what field in which table is null?
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby callcrazy » Wed Nov 10, 2010 4:17 pm

This is coming from vicidial_agent_log where we find NULL status.

EDIT: I'm assuming the agent is either hanging up the phone (conference) accidentally or their browser is locking up somehow.

The main concern though is should this time be removed from the report or should it be added to the time totals because the NULL statuses do have time?
Vicibox 6.0.4 from .iso | VERSION: 2.12-538a BUILD: 160122-1401 | Asterisk 1.8.32.3-vici | 1xDB, 2xWeb, 7xPBX | Amfeltec Timers | Sangoma/Lyra AMD | Dell Hardware
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Wed Nov 10, 2010 4:35 pm

Does NULL in the status field correspond at all times with 0 in the talk time?

Can you post a sample of the records you think may be wrong?

Code: Select all
agent_log_id user    server_ip      event_time         lead_id campaign_id pause_epoch pause wait_epoch waitsec talk talksec dispo _sec status    user_group    comments    sub_status    dead_epoch    dead_sec    processed    uniqueid
5099548    2162    192.168.10.42    2010-11-10 16:22:12    NULL    412    1289424132    0    1289424132    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099547    1177    192.168.10.42    2010-11-10 16:22:12    NULL    806    1289424132    0    1289424132    0    NULL    0    NULL    0    NULL    CTDAYSHIFT    NULL    NULL    NULL    0    N    
5099546    2364    192.168.10.42    2010-11-10 16:22:12    6205580    610    1289424132    0    1289424132    0    NULL    0    NULL    0    NULL    DayShiftAgents    MANUAL    NXDIAL    NULL    0    N    
5099545    2387    192.168.10.42    2010-11-10 16:22:12    NULL    412    1289424132    0    1289424132    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099544    2162    192.168.10.42    2010-11-10 16:22:12    NULL    412    1289424132    0    1289424132    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099543    2311    192.168.10.42    2010-11-10 16:22:11    NULL    412    1289424131    0    1289424131    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099542    2335    192.168.10.42    2010-11-10 16:22:11    NULL    412    1289424131    0    1289424131    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099541    2283    192.168.10.42    2010-11-10 16:22:09    NULL    412    1289424129    0    1289424129    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099540    1177    192.168.10.42    2010-11-10 16:22:08    5992396    806    1289424128    0    1289424128    1    1289424129    2    1289424131    2    A    CTDAYSHIFT    NULL    NULL    NULL    0    N    1289424120.18418
5099539    2162    192.168.10.42    2010-11-10 16:22:08    6275779    412    1289424128    0    1289424128    1    1289424129    1    1289424130    2    A    DayShiftAgents    NULL    NULL    NULL    0    N    1289424124.169978
5099538    2162    192.168.10.42    2010-11-10 16:22:08    NULL    412    1289424128    0    1289424128    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
5099537    2354    192.168.10.42    2010-11-10 16:22:06    NULL    412    1289424126    0    1289424126    0    NULL    0    NULL    0    NULL    DayShiftAgents    NULL    NULL    NULL    0    N    
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby callcrazy » Wed Nov 10, 2010 4:35 pm

An additional note is that according to php.net

www.php.net/eregi

This function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

So that may be a good idea to modify that looking toward the future.
Vicibox 6.0.4 from .iso | VERSION: 2.12-538a BUILD: 160122-1401 | Asterisk 1.8.32.3-vici | 1xDB, 2xWeb, 7xPBX | Amfeltec Timers | Sangoma/Lyra AMD | Dell Hardware
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby callcrazy » Wed Nov 10, 2010 4:49 pm

>Does NULL in the status field correspond at all times with 0 in the talk time?

There are some with talk times.

Here is a modified version of the query used in the report. This version I've removed the group by status and put the condition of 'status is null'

Code: Select all
select count(*) as calls,sum(talk_sec) as talk,vicidial_users.user,sum(pause_sec),sum(wait_sec),sum(dispo_sec),status,sum(dead_sec) from vicidial_users,vicidial_agent_log where event_time <= '2010-11-09 23:59:59' and event_time >= '2010-11-09 00:00:00' and vicidial_users.user=vicidial_agent_log.user and pause_sec<36000 and wait_sec<36000 and talk_sec<36000 and dispo_sec<36000  and campaign_id IN('DPOSEDU') and status is null group by user,full_name,status order by full_name,user,status desc limit 500000;


Here are the results of the above query. Notice the 5 and the 67 seconds in talk column. Also all the other times that are appearing seem like they should be accounted for in the agent performance report even though the status is NULL.

Code: Select all
calls     talk     user     sum(pause_sec)     sum(wait_sec)     sum(dispo_sec)     status     sum(dead_sec)
16     0     agent1     181     296     0     NULL     0
11     0     agent2     117     493     18    NULL     0
22     5     agent3     125     269     21    NULL     0
8      0     agent4     24      7       0     NULL     0
5      0     agent5     0       41      10    NULL     0
2      0     agent6     0       52      0     NULL     0
24     67    agent7     2593    202     5     NULL     0
8      0     agent8     149     16      0     NULL     0
Last edited by callcrazy on Wed Nov 10, 2010 4:55 pm, edited 1 time in total.
Vicibox 6.0.4 from .iso | VERSION: 2.12-538a BUILD: 160122-1401 | Asterisk 1.8.32.3-vici | 1xDB, 2xWeb, 7xPBX | Amfeltec Timers | Sangoma/Lyra AMD | Dell Hardware
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Wed Nov 10, 2010 4:54 pm

fair enough. now: what number on what report do you assert is incorrect based on the criteria? (URL without a domain and specific description, remembering that the words "time", "Subtotal", "Total" are often on many pages several times!) :)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby callcrazy » Wed Nov 10, 2010 5:04 pm

vicidial/AST_agent_performance_detail.php?DB=&query_date=2010-11-09&end_date=2010-11-09&group[]=CAMPAIGN1&user_group[]=--ALL--&shift=ALL&SUBMIT=SUBMIT

This is the URL of the report I'm looking at.

My thinking is that all totals are incorrect due to them not taking into account the NULL statuses in the vicidial_agent_log table. As seen in the query result above all those seconds are being suppressed in this report.

talk, pause_sec, wait_sec, dispo_sec

These are all being tallied up user by user in a loop on the report. If NULL is the status that line doesn't get added to any of the totals for the fields mentioned above.
Vicibox 6.0.4 from .iso | VERSION: 2.12-538a BUILD: 160122-1401 | Asterisk 1.8.32.3-vici | 1xDB, 2xWeb, 7xPBX | Amfeltec Timers | Sangoma/Lyra AMD | Dell Hardware
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Wed Nov 10, 2010 5:16 pm

Hm. "all totals".

Please pick one you assert to be incorrect. Many of them may need to exclude that for reasons like not calculating that particular time based on the column, status, etc.

So suggest a specific column which you say is wrong in your case ... and please remember that "Statistics related to handling of calls only" is at the top of this, and any time an agent is NOT on a call, this report should not be showing the data from that "non Prospect related" time.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby callcrazy » Wed Nov 10, 2010 5:19 pm

time column under call stats breakdown. time column is a calculation based on the other seconds in the query.

time = talk + pause + wait + disp

If you modify one of the statuses in the vicidial_agent_log to NULL you will see how that line now is subtracted across the board on all totals.

This may be exactly how it should be handled...however, our concern is that since we use these totals to invoice clients and when we run a flat query without taking status into account we get higher billable hours on our query than we do with the vicidial report.

My quest here is to determine if the NULL statuses actually should be suppressed from this report so that in our custom queries we can duplicate the same totals.
Vicibox 6.0.4 from .iso | VERSION: 2.12-538a BUILD: 160122-1401 | Asterisk 1.8.32.3-vici | 1xDB, 2xWeb, 7xPBX | Amfeltec Timers | Sangoma/Lyra AMD | Dell Hardware
callcrazy
 
Posts: 122
Joined: Fri Sep 10, 2010 11:30 am
Location: MI

Postby williamconley » Wed Nov 10, 2010 5:55 pm

the methods you are using involve two different situations.

one is for "total talk time" (billable asterisk hours to you) and one is for "total agent with prospect time" which will not be the same as asterisk hours because your agents are not ALWAYS on the phone with prospects.

Those numbers will always be different.

I suspect vicidial uses that "null" to indicate that the agent was not talking to a prospect and thereby exclude the number from this report. But i haven't taken a serious look.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Postby mflorell » Thu Nov 11, 2010 12:29 pm

I would really need to see each of those entries with the few agent entries before and after it as well as an explanation of how your campaign is configured before I could comment on the NULL statuses.
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 16 guests