Added "Admin User Group" setting to just about every section of the admin web interface, allowing for more complete administrative access segmentation for different divisions within the same company.

Added Max Calls settings to in-groups, allowing for a cap on concurrent calls being handled by each in-group, either in total or in queue.

git-svn-id: svn://192.168.202.10@1750 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-11-03 10:40:56 +00:00
parent 4214e263d1
commit 8a3aa7d5fe
11 changed files with 1565 additions and 744 deletions
+7
View File
@@ -753,6 +753,13 @@ OTHER CHANGES:
DIAL links from callback list if the lead is outside of the campaign
selected call time.
171. Added "Admin User Group" setting to just about every section of the admin
web interface, allowing for more complete administrative access
segmentation for different divisions within the same company.
172. Added Max Calls settings to in-groups, allowing for a cap on concurrent
calls being handled by each in-group, either in total or in queue.
+100 -18
View File
@@ -159,6 +159,7 @@
# 110920-1426 - Small fix for rare remote agent recording issue
# 110922-2149 - Added compatibility with DID remote agent extension overrides
# 110923-1133 - Added drop and after-hours to callmenu, and added action transfer cid setting
# 111102-2014 - Added in-group max_calls_ feature
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -170,7 +171,7 @@ $wait_prompt_runs=0;
$at='@';
$S='*';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=186;
$mysql_log_count=187;
$one_mysql_log=0;
@@ -641,7 +642,7 @@ $affected_rows = $dbhA->do($stmtA);
### Grab inbound groups values from the database
$cbc=0;
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu FROM vicidial_inbound_groups where group_id = '$channel_group';";
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action FROM vicidial_inbound_groups where group_id = '$channel_group';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -729,6 +730,9 @@ if ($sthArows > 0)
$action_xfer_cid = $aryA[70];
$drop_callmenu = $aryA[71];
$after_hours_callmenu = $aryA[72];
$max_calls_method = $aryA[73];
$max_calls_count = $aryA[74];
$max_calls_action = $aryA[75];
$custom_call_id='';
if ($uniqueid_status_display =~ /ENABLED/)
@@ -1065,15 +1069,76 @@ if (length($action_xfer_cid) > 4)
##### BEGIN MAX CONCURRENT CALLS CHECK #####
$MCafterhours_override=0;
$MCnanque_override=0;
$MCdrop_override=0;
$MCstatus='';
$MCterm='';
$MCcomments='';
if ( ($max_calls_method !~ /DISABLED/) && ($max_calls_count > 0) )
{
$concurrent_calls=0;
### Get count of concurrent calls for this in-group
$stmtA = "SELECT count(*) FROM vicidial_auto_calls where campaign_id='$channel_group';";
if (($max_calls_method =~ /IN_QUEUE/))
{$stmtA = "SELECT count(*) FROM vicidial_auto_calls where campaign_id='$channel_group' and status IN('LIVE','IVR');";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02187'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$concurrent_calls = $aryA[0];
}
$sthA->finish();
if ($concurrent_calls >= $max_calls_count)
{
if ($max_calls_action =~ /DROP/)
{
$MCdrop_override++;
}
if ($max_calls_action =~ /AFTERHOURS/)
{
$MCafterhours_override++;
}
if ($max_calls_action =~ /NO_AGENT_NO_QUEUE/)
{
$MCnanque_override++;
}
$MCstatus='MAXCAL';
$MCterm='MAXCALLS';
$MCcomments='MAX CALLS DROP';
}
if ($AGILOG) {$agi_string = "-- MAX CALLS: |$concurrent_calls|$max_calls_count|$max_calls_method|$max_calls_action|$MCafterhours_override|$MCnanque_override|$MCdrop_override|$MCstatus|$MCterm|$MCcomments|"; &agi_output;}
}
##### END MAX CONCURRENT CALLS CHECK #####
##### BEGIN AFTER HOURS CHECK #####
$ct_stop_overflow=0; # allow for overflow time, past midnight
if ($ct_default_stop > 2400)
{$ct_stop_overflow = ($ct_default_stop - 2400);}
if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_stop_overflow) )
if ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_stop_overflow) ) || ($MCafterhours_override > 0) )
{
$VHqueryCID = "VA$CIDdate$hour$min$sec$sec";
$stmtA = "INSERT INTO vicidial_closer_log set status='AFTHRS',start_epoch='$now_date_epoch',end_epoch='$now_date_epoch',length_in_sec='1',queue_seconds='0',lead_id = '$insert_lead_id',campaign_id='$channel_group',user='VDCL',list_id='$list_id',call_date='$now_date',phone_code='$phone_code',phone_number='$phone_number',comments='AFTER HOURS DROP',term_reason='AFTERHOURS',uniqueid='$uniqueid';";
$AHstatus='AFTHRS';
$AHterm='AFTERHOURS';
$AHcomments='AFTER HOURS DROP';
if ($MCafterhours_override > 0)
{
$AHstatus = $MCstatus;
$AHterm = $MCterm;
$AHcomments = $MCcomments;
}
$stmtA = "INSERT INTO vicidial_closer_log set status='$AHstatus',start_epoch='$now_date_epoch',end_epoch='$now_date_epoch',length_in_sec='1',queue_seconds='0',lead_id = '$insert_lead_id',campaign_id='$channel_group',user='VDCL',list_id='$list_id',call_date='$now_date',phone_code='$phone_code',phone_number='$phone_number',comments='$AHcomments',term_reason='$AHterm',uniqueid='$uniqueid';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02016'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -1088,7 +1153,7 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
$cbc++;
}
$sthA->finish();
if ($AGILOG) {$agi_string = "-- AH VDCL vcl insert: |$affected_rows|$insert_lead_id|$insert_close_id|$hm|$ct_default_start|$ct_default_stop|$ct_stop_overflow\n|$stmtA|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- AH VDCL vcl insert: |$affected_rows|$insert_lead_id|$insert_close_id|$hm|$ct_default_start|$ct_default_stop|$ct_stop_overflow|$MCafterhours_override\n|$stmtA|"; &agi_output;}
if ($VLEcount < 1)
{
@@ -1099,7 +1164,7 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
$VLEcount++;
}
$stmtA = "UPDATE vicidial_list set status='AFTHRS' where lead_id = '$insert_lead_id';";
$stmtA = "UPDATE vicidial_list set status='$AHstatus' where lead_id = '$insert_lead_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02018'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- AH VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
@@ -1250,7 +1315,7 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
##### BEGIN NO AGENT NO QUEUE CHECK #####
if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
if ( ($no_agent_no_queue =~ /Y|NO_PAUSED/) || ($$MCnanque_override > 0) )
{
$NPsql='';
$ADsql='';
@@ -1271,11 +1336,20 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
$sthA->finish();
if ($AGILOG) {$agi_string = "-- NANQUE Check: |$group_agents_count|$stmtA"; &agi_output;}
if ($group_agents_count < 1)
if ( ($group_agents_count < 1) || ($MCnanque_override > 0) )
{
$VHqueryCID = "VA$CIDdate$hour$min$sec$sec";
$NQstatus='NANQUE';
$NQterm='NOAGENT';
$NQcomments='NO AGENT DROP';
if ($MCnanque_override > 0)
{
$NQstatus = $MCstatus;
$NQterm = $MCterm;
$NQcomments = $MCcomments;
}
$stmtA = "INSERT INTO vicidial_closer_log set status='NANQUE',start_epoch='$now_date_epoch',end_epoch='$now_date_epoch',length_in_sec='1',queue_seconds='0',lead_id = '$insert_lead_id',campaign_id='$channel_group',user='VDCL',list_id='$list_id',call_date='$now_date',phone_code='$phone_code',phone_number='$phone_number',comments='NO AGENT DROP',term_reason='NOAGENT',uniqueid='$uniqueid';";
$stmtA = "INSERT INTO vicidial_closer_log set status='$NQstatus',start_epoch='$now_date_epoch',end_epoch='$now_date_epoch',length_in_sec='1',queue_seconds='0',lead_id='$insert_lead_id',campaign_id='$channel_group',user='VDCL',list_id='$list_id',call_date='$now_date',phone_code='$phone_code',phone_number='$phone_number',comments='$NQcomments',term_reason='$NQterm',uniqueid='$uniqueid';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02105'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
@@ -1290,7 +1364,7 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
$cbc++;
}
$sthA->finish();
if ($AGILOG) {$agi_string = "-- NA VDCL vcl insert: |$affected_rows|$insert_lead_id|$insert_close_id|\n|$stmtA|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- NA VDCL vcl insert: |$affected_rows|$insert_lead_id|$insert_close_id|$MCnanque_override|\n|$stmtA|"; &agi_output;}
if ($VLEcount < 1)
{
@@ -1301,7 +1375,7 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
$VLEcount++;
}
$stmtA = "UPDATE vicidial_list set status='NANQUE' where lead_id = '$insert_lead_id';";
$stmtA = "UPDATE vicidial_list set status='$NQstatus' where lead_id = '$insert_lead_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02106'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- NA VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
@@ -1470,7 +1544,7 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
##### PLAY WELCOME MESSAGE #####
if ( ($welcome_message_filename !~ /---NONE---/) && (length($welcome_message_filename) > 0) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) )
if ( ( ($welcome_message_filename !~ /---NONE---/) && (length($welcome_message_filename) > 0) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) ) && ($MCdrop_override < 1) )
{
if ($welcome_message_filename =~ /\|/)
{
@@ -1832,7 +1906,7 @@ if ( ($CLchannel_group =~ /DID_INBOUND/) && (length($CLend_epoch) < 5) )
############################################
### Loop to try to send call to an agent ###
while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override < 1) )
{
$channel_status = $AGI->channel_status("$channel");
if ($channel_status < 1)
@@ -4228,7 +4302,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
### End of Loop to try to send call to an agent ###
### Time to figure out where to drop the call ###
if ($drop_timer > $DROP_TIME)
if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
{
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
@@ -4246,6 +4320,14 @@ if ($drop_timer > $DROP_TIME)
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
# $VDADvoicemail_ext = '';
$DRstatus='TIMEOT';
$DRterm='QUEUETIMEOUT';
if ($MCdrop_override > 0)
{
$DRstatus = $MCstatus;
$DRterm = $MCterm;
}
if ($enable_queuemetrics_logging > 0)
{
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
@@ -4262,7 +4344,7 @@ if ($drop_timer > $DROP_TIME)
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02097'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='TIMEOT',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='$DRstatus',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02098'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
@@ -4402,12 +4484,12 @@ if ($drop_timer > $DROP_TIME)
$dbhP=$dbhA; $mysql_count='02099'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
$stmtA = "UPDATE vicidial_closer_log set status='TIMEOT',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='QUEUETIMEOUT' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;";
$stmtA = "UPDATE vicidial_closer_log set status='$DRstatus',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='$DRterm' where lead_id='$insert_lead_id' order by start_epoch desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02100'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='TIMEOT' where lead_id = '$insert_lead_id';";
$stmtA = "UPDATE vicidial_list set status='$DRstatus' where lead_id = '$insert_lead_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02101'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
+5 -4
View File
@@ -35,6 +35,7 @@
# 91206-2203 - Added campaign_calldate within last 5 minute as an override to recalculate stats
# 100206-1453 - Fixed calculation of hold_sec stats (service level) for in-groups
# 110513-0721 - Added debug DB table, dial level and available only tally threshold options
# 111103-0626 - Added MAXCAL as a drop status
#
# constants
@@ -1404,7 +1405,7 @@ sub calculate_drops_inbound
if ($iVCScalls_today[$p] > 0)
{
# TODAY ANSWERS
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1436,7 +1437,7 @@ sub calculate_drops_inbound
$sthA->finish();
# TODAY ANSWER PERCENT OF HOLD SECONDS one and two
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and queue_seconds <= $answer_sec_pct_rt_stat_one and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and queue_seconds <= $answer_sec_pct_rt_stat_one and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1446,7 +1447,7 @@ sub calculate_drops_inbound
$answer_sec_pct_rt_stat_one_PCT[$p] = $aryA[0];
}
$sthA->finish();
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and queue_seconds <= $answer_sec_pct_rt_stat_two and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmtA = "SELECT count(*) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and queue_seconds <= $answer_sec_pct_rt_stat_two and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -1457,7 +1458,7 @@ sub calculate_drops_inbound
}
# TODAY TOTAL HOLD TIME FOR ANSWERED CALLS
$stmtA = "SELECT sum(queue_seconds) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmtA = "SELECT sum(queue_seconds) from $vicidial_closer_log where campaign_id='$group_id[$p]' and call_date > '$VDL_date' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
+3 -2
View File
@@ -15,6 +15,7 @@
# 100310-0112 - First version
# 110202-2214 - Added ncad14csv format
# 110423-0350 - Do not die on email issue
# 111103-0626 - Added MAXCAL as a drop status
#
$txt = '.txt';
@@ -415,7 +416,7 @@ if (!$Q)
###########################################################################
# call_date|phone_number|vendor_id|status|user|first_name|last_name|lead_id|list_id|campaign_id|length_in_sec|source_id|
$stmtA = "select CONVERT_TZ(call_date,$convert_tz),vicidial_log.phone_number,vendor_lead_code,vicidial_log.status,vicidial_log.user,first_name,last_name,vicidial_list.lead_id,vicidial_log.list_id,campaign_id,length_in_sec,vicidial_list.source_id,uniqueid from vicidial_list,vicidial_log where $VLcampaignSQL and $VLdateSQL and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_log.status IN('DROP','XDROP','NA','AA','AM','AL','AB','ADC','PU','PM','SVYEXT','SVYVM','SVYHU','SVYREC','HXFER','HOLDTO','QVMAIL','RQXFER','CPDATB','CPDB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDUK','CPDERR','TIMEOT','AFTHRS','NANQUE') order by call_date;";
$stmtA = "select CONVERT_TZ(call_date,$convert_tz),vicidial_log.phone_number,vendor_lead_code,vicidial_log.status,vicidial_log.user,first_name,last_name,vicidial_list.lead_id,vicidial_log.list_id,campaign_id,length_in_sec,vicidial_list.source_id,uniqueid from vicidial_list,vicidial_log where $VLcampaignSQL and $VLdateSQL and vicidial_log.lead_id=vicidial_list.lead_id and vicidial_log.status IN('DROP','XDROP','NA','AA','AM','AL','AB','ADC','PU','PM','SVYEXT','SVYVM','SVYHU','SVYREC','HXFER','HOLDTO','QVMAIL','RQXFER','CPDATB','CPDB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDUK','CPDERR','TIMEOT','AFTHRS','NANQUE','MAXCAL') order by call_date;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -452,7 +453,7 @@ $sthA->finish();
###########################################################################
# call_date|phone_number|vendor_id|status|user|first_name|last_name|lead_id|list_id|campaign_id|length_in_sec|source_id|
$stmtA = "select CONVERT_TZ(event_time,$convert_tz),vicidial_list.phone_number,vendor_lead_code,vicidial_agent_log.status,vicidial_agent_log.user,first_name,last_name,vicidial_list.lead_id,vicidial_list.list_id,campaign_id,talk_sec,vicidial_list.source_id,dead_sec,agent_log_id from vicidial_list,vicidial_agent_log where $VLAcampaignSQL and $VLAdateSQL and vicidial_agent_log.lead_id=vicidial_list.lead_id and vicidial_agent_log.status NOT IN('DROP','XDROP','NA','AA','AM','AL','AB','ADC','PU','PM','SVYEXT','SVYVM','SVYHU','SVYREC','HXFER','HOLDTO','QVMAIL','RQXFER','CPDATB','CPDB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDUK','CPDERR','TIMEOT','AFTHRS','NANQUE','INCALL','','QUEUE') order by event_time;";
$stmtA = "select CONVERT_TZ(event_time,$convert_tz),vicidial_list.phone_number,vendor_lead_code,vicidial_agent_log.status,vicidial_agent_log.user,first_name,last_name,vicidial_list.lead_id,vicidial_list.list_id,campaign_id,talk_sec,vicidial_list.source_id,dead_sec,agent_log_id from vicidial_list,vicidial_agent_log where $VLAcampaignSQL and $VLAdateSQL and vicidial_agent_log.lead_id=vicidial_list.lead_id and vicidial_agent_log.status NOT IN('DROP','XDROP','NA','AA','AM','AL','AB','ADC','PU','PM','SVYEXT','SVYVM','SVYHU','SVYREC','HXFER','HOLDTO','QVMAIL','RQXFER','CPDATB','CPDB','CPDNA','CPDREJ','CPDINV','CPDSUA','CPDSI','CPDSNC','CPDSR','CPDSUK','CPDSV','CPDUK','CPDERR','TIMEOT','AFTHRS','NANQUE','INCALL','','QUEUE','MAXCAL') order by event_time;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
+1
View File
@@ -60,3 +60,4 @@ PDROP - Pre-routing dropped call, call hung up the instant the Answer signal is
IVRXFR - Outbound drop to Call Menu
SVYCLM - Survey sent to Call Menu - Survey outbound campaign status only
MLINAT - Multi-Lead auto-alt-dial lead set to inactive
MAXCAL - Max Calls drop from in-group
@@ -82,6 +82,7 @@ on_hook_agent ENUM('Y','N') default 'N',
webphone_auto_answer ENUM('Y','N') default 'Y',
voicemail_timezone VARCHAR(30) default 'eastern',
voicemail_options VARCHAR(255) default '',
user_group VARCHAR(20) default '---ALL---',
index (server_ip),
unique index extenserver (extension, server_ip)
);
@@ -128,7 +129,8 @@ active_agent_login_server ENUM('Y','N') default 'Y',
conf_secret VARCHAR(20) default 'test',
external_server_ip VARCHAR(100) default '',
custom_dialplan_entry TEXT,
active_twin_server_ip VARCHAR(15) default ''
active_twin_server_ip VARCHAR(15) default '',
user_group VARCHAR(20) default '---ALL---'
);
CREATE UNIQUE INDEX server_id on servers (server_id);
@@ -362,7 +364,7 @@ last_update_time TIMESTAMP,
last_call_finish DATETIME,
closer_campaigns TEXT,
call_server_ip VARCHAR(15),
user_level INT(2) default '0',
user_level TINYINT(3) UNSIGNED default '0',
comments VARCHAR(20),
campaign_weight TINYINT(1) default '0',
calls_today SMALLINT(5) UNSIGNED default '0',
@@ -468,7 +470,7 @@ processed ENUM('Y','N'),
queue_seconds DECIMAL(7,2) default '0',
user_group VARCHAR(20),
xfercallid INT(9) UNSIGNED,
term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE') default 'NONE',
term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE','MAXCALLS') default 'NONE',
uniqueid VARCHAR(20) NOT NULL default '',
agent_only VARCHAR(20) default '',
queue_position SMALLINT(4) UNSIGNED default '1',
@@ -497,7 +499,7 @@ user_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
user VARCHAR(20) NOT NULL,
pass VARCHAR(20) NOT NULL,
full_name VARCHAR(50),
user_level TINYINT(2) default '1',
user_level TINYINT(3) UNSIGNED default '1',
user_group VARCHAR(20),
phone_login VARCHAR(20),
phone_pass VARCHAR(20),
@@ -587,7 +589,10 @@ modify_audiostore ENUM('1','0') default '0',
modify_moh ENUM('1','0') default '0',
modify_tts ENUM('1','0') default '0',
preset_contact_search ENUM('NOT_ACTIVE','ENABLED','DISABLED') default 'NOT_ACTIVE',
modify_contacts ENUM('1','0') default '0'
modify_contacts ENUM('1','0') default '0',
modify_same_user_level ENUM('0','1') default '1',
admin_hide_lead_data ENUM('0','1') default '0',
admin_hide_phone_data ENUM('0','1','2_DIGITS','3_DIGITS','4_DIGITS') default '0'
);
CREATE UNIQUE INDEX user ON vicidial_users (user);
@@ -631,7 +636,9 @@ agent_fullscreen ENUM('Y','N') default 'N',
allowed_reports VARCHAR(2000) default 'ALL REPORTS',
webphone_url_override VARCHAR(255) default '',
webphone_systemkey_override VARCHAR(100) default '',
webphone_dialpad_override ENUM('DISABLED','Y','N','TOGGLE','TOGGLE_OFF') default 'DISABLED'
webphone_dialpad_override ENUM('DISABLED','Y','N','TOGGLE','TOGGLE_OFF') default 'DISABLED',
admin_viewable_groups TEXT,
admin_viewable_call_times TEXT
);
CREATE TABLE vicidial_campaigns (
@@ -838,7 +845,8 @@ pllb_grouping_limit SMALLINT(5) default '50',
call_count_limit SMALLINT(5) UNSIGNED default '0',
call_count_target SMALLINT(5) UNSIGNED default '3',
callback_hours_block TINYINT(2) default '0',
callback_list_calltime ENUM('ENABLED','DISABLED') default 'DISABLED'
callback_list_calltime ENUM('ENABLED','DISABLED') default 'DISABLED',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_lists (
@@ -1035,7 +1043,11 @@ on_hook_cid VARCHAR(30) default 'GENERIC',
group_calldate DATETIME,
action_xfer_cid VARCHAR(18) default 'CUSTOMER',
drop_callmenu VARCHAR(50) default '',
after_hours_callmenu VARCHAR(50) default ''
after_hours_callmenu VARCHAR(50) default '',
user_group VARCHAR(20) default '---ALL---',
max_calls_method ENUM('TOTAL','IN_QUEUE','DISABLED') default 'DISABLED',
max_calls_count SMALLINT(5) default '0',
max_calls_action ENUM('DROP','AFTERHOURS','NO_AGENT_NO_QUEUE') default 'NO_AGENT_NO_QUEUE'
);
CREATE TABLE vicidial_stations (
@@ -1145,7 +1157,8 @@ script_id VARCHAR(10) PRIMARY KEY NOT NULL,
script_name VARCHAR(50),
script_comments VARCHAR(255),
script_text TEXT,
active ENUM('Y','N')
active ENUM('Y','N'),
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE phone_favorites (
@@ -1191,7 +1204,8 @@ CREATE TABLE vicidial_lead_filters (
lead_filter_id VARCHAR(10) PRIMARY KEY NOT NULL,
lead_filter_name VARCHAR(30) NOT NULL,
lead_filter_comments VARCHAR(255),
lead_filter_sql TEXT
lead_filter_sql TEXT,
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_call_times (
@@ -1222,7 +1236,8 @@ tuesday_afterhours_filename_override VARCHAR(255) default '',
wednesday_afterhours_filename_override VARCHAR(255) default '',
thursday_afterhours_filename_override VARCHAR(255) default '',
friday_afterhours_filename_override VARCHAR(255) default '',
saturday_afterhours_filename_override VARCHAR(255) default ''
saturday_afterhours_filename_override VARCHAR(255) default '',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_state_call_times (
@@ -1245,7 +1260,8 @@ sct_thursday_stop SMALLINT(4) unsigned default '0',
sct_friday_start SMALLINT(4) unsigned default '0',
sct_friday_stop SMALLINT(4) unsigned default '0',
sct_saturday_start SMALLINT(4) unsigned default '0',
sct_saturday_stop SMALLINT(4) unsigned default '0'
sct_saturday_stop SMALLINT(4) unsigned default '0',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_campaign_stats (
@@ -1606,7 +1622,8 @@ index (stat_date)
CREATE TABLE phones_alias (
alias_id VARCHAR(20) NOT NULL UNIQUE PRIMARY KEY,
alias_name VARCHAR(50),
logins_list VARCHAR(255)
logins_list VARCHAR(255),
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_shifts (
@@ -1616,6 +1633,7 @@ shift_start_time VARCHAR(4) default '0900',
shift_length VARCHAR(5) default '16:00',
shift_weekdays VARCHAR(7) default '0123456',
report_option ENUM('Y','N') default 'N',
user_group VARCHAR(20) default '---ALL---',
index (shift_id)
);
@@ -1675,6 +1693,7 @@ record_id VARCHAR(50) NOT NULL,
event_code VARCHAR(255) NOT NULL,
event_sql TEXT,
event_notes TEXT,
user_group VARCHAR(20) default '---ALL---',
index (user),
index (event_section),
index (record_id)
@@ -1746,6 +1765,7 @@ custom_two VARCHAR(100) default '',
custom_three VARCHAR(100) default '',
custom_four VARCHAR(100) default '',
custom_five VARCHAR(100) default '',
user_group VARCHAR(20) default '---ALL---',
unique index (did_pattern),
index (group_id)
);
@@ -1817,6 +1837,7 @@ CREATE TABLE vicidial_conf_templates (
template_id VARCHAR(15) NOT NULL,
template_name VARCHAR(50) NOT NULL,
template_contents TEXT,
user_group VARCHAR(20) default '---ALL---',
unique index (template_id)
);
@@ -1832,6 +1853,7 @@ dialplan_entry TEXT,
server_ip VARCHAR(15) NOT NULL,
active ENUM('Y','N') default 'Y',
carrier_description VARCHAR(255),
user_group VARCHAR(20) default '---ALL---',
unique index(carrier_id),
index (server_ip)
);
@@ -1841,7 +1863,8 @@ group_alias_id VARCHAR(30) NOT NULL UNIQUE PRIMARY KEY,
group_alias_name VARCHAR(50),
caller_id_number VARCHAR(20),
caller_id_name VARCHAR(20),
active ENUM('Y','N') default 'N'
active ENUM('Y','N') default 'N',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE user_call_log (
@@ -1869,7 +1892,8 @@ tts_id VARCHAR(50) PRIMARY KEY NOT NULL,
tts_name VARCHAR(100),
active ENUM('Y','N'),
tts_text TEXT,
tts_voice VARCHAR(100) default 'Allison-8kHz'
tts_voice VARCHAR(100) default 'Allison-8kHz',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_call_menu (
@@ -1886,7 +1910,8 @@ track_in_vdac ENUM('0','1') default '1',
custom_dialplan_entry TEXT,
tracking_group VARCHAR(20) default 'CALLMENU',
dtmf_log ENUM('0','1') default '0',
dtmf_field VARCHAR(50) default 'NONE'
dtmf_field VARCHAR(50) default 'NONE',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_call_menu_options (
@@ -2141,7 +2166,8 @@ moh_id VARCHAR(100) PRIMARY KEY NOT NULL,
moh_name VARCHAR(255),
active ENUM('Y','N') default 'N',
random ENUM('Y','N') default 'N',
remove ENUM('Y','N') default 'N'
remove ENUM('Y','N') default 'N',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_music_on_hold_files (
@@ -2161,7 +2187,8 @@ old_messages INT(4) default '0',
email VARCHAR(100),
delete_vm_after_email ENUM('N','Y') default 'N',
voicemail_timezone VARCHAR(30) default 'eastern',
voicemail_options VARCHAR(255) default ''
voicemail_options VARCHAR(255) default '',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_user_territory_log (
@@ -2343,6 +2370,7 @@ CREATE TABLE vicidial_filter_phone_groups (
filter_phone_group_id VARCHAR(20) NOT NULL,
filter_phone_group_name VARCHAR(40) NOT NULL,
filter_phone_group_description VARCHAR(100),
user_group VARCHAR(20) default '---ALL---',
index (filter_phone_group_id)
);
@@ -2439,7 +2467,8 @@ label_phone_code VARCHAR(40) default '',
label_alt_phone VARCHAR(40) default '',
label_security_phrase VARCHAR(40) default '',
label_email VARCHAR(40) default '',
label_comments VARCHAR(40) default ''
label_comments VARCHAR(40) default '',
user_group VARCHAR(20) default '---ALL---'
);
CREATE TABLE vicidial_agent_skip_log (
@@ -2703,7 +2732,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer;
CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log;
CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route);
UPDATE system_settings SET db_schema_version='1307',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1308',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
@@ -359,3 +359,4 @@ INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,cate
INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed) values('IVRXFR','Outbound drop to Call Menu','N','Y','UNDEFINED','N','N','N','N','N','N','N');
INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed) values('SVYCLM','Survey sent to Call Menu','N','Y','UNDEFINED','N','N','N','N','N','N','N');
INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed) values('MLINAT','Multi-Lead auto-alt-dial lead set to inactive','N','Y','UNDEFINED','N','N','N','N','N','N','Y');
INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed) values('MAXCAL','Inbound Max Calls Drop','N','Y','UNDEFINED','N','N','N','N','N','N','N');
+41
View File
@@ -1137,3 +1137,44 @@ UPDATE system_settings SET db_schema_version='1306',db_schema_update_date=NOW()
ALTER TABLE vicidial_campaigns ADD callback_list_calltime ENUM('ENABLED','DISABLED') default 'DISABLED';
UPDATE system_settings SET db_schema_version='1307',db_schema_update_date=NOW() where db_schema_version < 1307;
ALTER TABLE vicidial_live_agents MODIFY user_level TINYINT(3) UNSIGNED default '0';
ALTER TABLE vicidial_users MODIFY user_level TINYINT(3) UNSIGNED default '1';
ALTER TABLE vicidial_users ADD modify_same_user_level ENUM('0','1') default '1';
ALTER TABLE vicidial_users ADD admin_hide_lead_data ENUM('0','1') default '0';
ALTER TABLE vicidial_users ADD admin_hide_phone_data ENUM('0','1','2_DIGITS','3_DIGITS','4_DIGITS') default '0';
ALTER TABLE vicidial_user_groups ADD admin_viewable_groups TEXT;
ALTER TABLE vicidial_user_groups ADD admin_viewable_call_times TEXT;
ALTER TABLE vicidial_campaigns ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_scripts ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_lead_filters ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_inbound_groups ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_inbound_dids ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_call_menu ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_filter_phone_groups ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_call_times ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_state_call_times ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_shifts ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE phones ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE phones_alias ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE groups_alias ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_conf_templates ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_server_carriers ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE servers ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_screen_labels ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_voicemail ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_music_on_hold ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_tts_prompts ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_admin_log ADD user_group VARCHAR(20) default '---ALL---';
ALTER TABLE vicidial_inbound_groups ADD max_calls_method ENUM('TOTAL','IN_QUEUE','DISABLED') default 'DISABLED';
ALTER TABLE vicidial_inbound_groups ADD max_calls_count SMALLINT(5) default '0';
ALTER TABLE vicidial_inbound_groups ADD max_calls_action ENUM('DROP','AFTERHOURS','NO_AGENT_NO_QUEUE') default 'NO_AGENT_NO_QUEUE';
ALTER TABLE vicidial_closer_log MODIFY term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE','MAXCALLS') default 'NONE';
ALTER TABLE vicidial_closer_log_archive MODIFY term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','HOLDRECALLXFER','HOLDTIME','NOAGENT','NONE','MAXCALLS') default 'NONE';
UPDATE system_settings SET db_schema_version='1308',db_schema_update_date=NOW() where db_schema_version < 1308;
@@ -790,6 +790,33 @@ Scheduled Callbacks Hours Block||
This option allows you to restrict a USERONLY scheduled callback from being displayed on the agent callback list until X hours after it has been set. Default is 0 for no block||
Scheduled Callbacks Calltime Block||
This option if enabled will prevent the scheduled callback in the agent callback list from being dialed if it is outside of the scheduled calltime for the campaign. Default is DISABLED||
Modify Same User Level||
This setting only applies to level 9 users. If enabled it allows the level 9 user to modify their own settings as well as other level 9 users. Default is 1 for enabled||
Admin Hide Lead Data||
This setting only applies to level 7, 8 and 9 users. If enabled it replaces the customer lead data in the many reports and screens in the system with Xs. Default is 0 for disabled||
Admin Hide Phone Data||
This setting only applies to level 7, 8 and 9 users. If enabled it replaces the customer phone numbers in the many reports and screens in the system with Xs. The DIGITS settings will show only the last X digits of the phone number. Default is 0 for disabled||
Allowed User Groups||
This is a selectable list of User Groups to which members of this user group can view and possibly edit. User Groups can restrict access to almost all aspects of the system, from inbound DIDs to phones to voicemail boxes. The --ALL-- option allows the users in this group to see and log in to any record on the system if their user permissions allow for it||
Allowed Call Times||
This is a selectable list of Call Times to which members of this user group can use in campaigns, in-groups and call menus. The --ALL-- option allows the users in this group to use all call times in the system||
All call times in the system||
You are not allowed to edit your own user group||
You are not allowed to edit your own user||
Admin User Group||
All Admin User Groups||
This is the administrative user group for this campaign, this allows admin viewing of this campaign as well as the lists assigned to this campaign to be restricted by user group. Default is --ALL-- which allows any admin user with user group campaign permissions to view this campaign||
This is the administrative user group for this inbound group, this allows admin viewing of this in-group restricted by user group. Default is --ALL-- which allows any admin user to view this in-group||
This is the administrative user group for this did, this allows admin viewing of this did restricted by user group. Default is --ALL-- which allows any admin user to view this did||
This is the administrative user group for this record, this allows admin viewing of this recoird restricted by user group. Default is --ALL-- which allows any admin user to view this record||
User Start for this remote agent does not exist||
ADMIN GROUP||
Max Calls Method||
This option can enable the maximum concurrent calls feature for this in-group. If set to TOTAL, then the total number of calls being handled by agents and in queue in this in-group will not be allowed to exceed the Max Calls Count number of lines as defined below. If set to IN_QUEUE, then if the number of calls in queue waiting for agents will not be allowed to exceed the Max Calls Count no matter how many calls are with agents for this in-group. Default is DISABLED||
Max Calls Count||
This option must be set higher than 0 if you want to use the Max Calls Method feature. Default is 0||
Max Calls Action||
This is the action to be taken if the Max Calls Method is enabled and the number of calls exceeds what is set above in the Max Calls Count setting. The calls above that amount will be sent to either the DROP action, the AFTERHOURS action or the NO_AGENT_NO_QUEUE action and will be logged as a MAXCAL status with a MAXCALLS hangup reason. Default is NO_AGENT_NO_QUEUE||
lead_report_export.php
@@ -32,6 +32,7 @@
# 100913-1634 - Added DID option to select by DIDs instead of In-groups
# 100914-1326 - Added lookup for user_level 7 users to set to reports only which will remove other admin links
# 110703-1759 - Added download option
# 111103-0632 - Added MAXCAL as a drop status
#
require("dbconnect.php");
@@ -520,10 +521,10 @@ $rslt=mysql_query($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
$row=mysql_fetch_row($rslt);
$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
if ($DID=='Y')
{
$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND') and uniqueid IN($unid_SQL);";
$stmt="select count(*),sum(queue_seconds) from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL') and uniqueid IN($unid_SQL);";
}
$rslt=mysql_query($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
@@ -638,13 +639,13 @@ if (strlen($group_SQL)>3)
$Sanswer_sec_pct_rt_stat_one = $row[0];
$Sanswer_sec_pct_rt_stat_two = $row[1];
$stmt = "SELECT count(*) from vicidial_closer_log where campaign_id IN($group_SQL) and call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and queue_seconds <= $Sanswer_sec_pct_rt_stat_one and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmt = "SELECT count(*) from vicidial_closer_log where campaign_id IN($group_SQL) and call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and queue_seconds <= $Sanswer_sec_pct_rt_stat_one and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
$rslt=mysql_query($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
$row=mysql_fetch_row($rslt);
$answer_sec_pct_rt_stat_one = $row[0];
$stmt = "SELECT count(*) from vicidial_closer_log where campaign_id IN($group_SQL) and call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and queue_seconds <= $Sanswer_sec_pct_rt_stat_two and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND');";
$stmt = "SELECT count(*) from vicidial_closer_log where campaign_id IN($group_SQL) and call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and queue_seconds <= $Sanswer_sec_pct_rt_stat_two and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL');";
$rslt=mysql_query($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
$row=mysql_fetch_row($rslt);
@@ -931,10 +932,10 @@ $MAIN.="----------+-------------------------------------------------------------
$CSV_text2.="\n\"CALL ANSWERED TIME AND PERCENT BREAKDOWN IN SECONDS\"\n";
$CSV_text2.="\"\",\"0\",\"5\",\"10\",\"15\",\"20\",\"25\",\"30\",\"35\",\"40\",\"45\",\"50\",\"55\",\"60\",\"90\",\"+90\",\"TOTAL\"\n";
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND') group by queue_seconds;";
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and campaign_id IN($group_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL') group by queue_seconds;";
if ($DID=='Y')
{
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and uniqueid IN($unid_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND') group by queue_seconds;";
$stmt="select count(*),queue_seconds from vicidial_closer_log where call_date >= '$query_date_BEGIN' and call_date <= '$query_date_END' and uniqueid IN($unid_SQL) and status NOT IN('DROP','XDROP','HXFER','QVMAIL','HOLDTO','LIVE','QUEUE','TIMEOT','AFTHRS','NANQUE','INBND','MAXCAL') group by queue_seconds;";
}
$rslt=mysql_query($stmt, $link);
if ($DB) {$MAIN.="$stmt\n";}
@@ -1531,7 +1532,7 @@ while ($j < $calls_to_print)
{
$Ftotal[$i]++;
if (ereg("DROP",$Cstatus[$j])) {$Fdrop[$i]++;}
if (!ereg("DROP|XDROP|HXFER|QVMAIL|HOLDTO|LIVE|QUEUE|TIMEOT|AFTHRS|NANQUE|INBND",$Cstatus[$j]))
if (!ereg("DROP|XDROP|HXFER|QVMAIL|HOLDTO|LIVE|QUEUE|TIMEOT|AFTHRS|NANQUE|INBND|MAXCAL",$Cstatus[$j]))
{
$BDansweredCALLS++;
$Fanswer[$i]++;
File diff suppressed because one or more lines are too long