Added User Maximum Inbound Calls Filters features

git-svn-id: svn://192.168.202.10@3149 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2019-10-20 17:42:33 +00:00
parent 4e65b47a29
commit 37f62d3836
12 changed files with 767 additions and 378 deletions
+5
View File
@@ -427,6 +427,11 @@ OTHER CHANGES:
118. Added bench_agent_assign.php script to allow managers to move
'owner-assigned' to another agent.
119. Added User Inbound Max Calls filtering options. Allowing selective counting
of inbound calls excluding calls involving set in-groups, statuses and
with a minimum time threshold. Also, new in-group routing options based
on last non-filtered call times
+13 -4
View File
@@ -56,6 +56,7 @@
# 190216-0813 - Fix for user-group, in-group and campaign allowed/permissions matching issues
# 190320-2331 - Added more logging options
# 190720-1007 - Added Call Quota logging
# 191017-1051 - Added option for multiple prompts in DYN messages
#
$script = 'VD_amd.agi';
@@ -664,10 +665,18 @@ else
{
$useTTS=0;
if ($DB_am_message_exten =~ /^TTS/)
{$useTTS++;}
$TTS_filename = $DB_am_message_exten;
$TTS_filename =~s/^TTS|^DYN//gi;
$TTS_filename =~s/\|.*//gi;
{
$useTTS++;
$TTS_filename = $DB_am_message_exten;
$TTS_filename =~s/^TTS//gi;
$TTS_filename =~s/\|.*//gi;
}
else
{
$TTS_filename = $DB_am_message_exten;
$TTS_filename =~s/^DYN//gi;
$TTS_text = $TTS_filename;
}
if ($AGILOG) {$agi_string = "-- TTS : |$useTTS|$TTS_filename|"; &agi_output;}
+46 -18
View File
@@ -2683,6 +2683,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_call_finish';}
if ($CAMP_callorder =~ /oldest_inbound_call_start/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_time';}
if ($CAMP_callorder =~ /oldest_inbound_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_finish';}
if ($CAMP_callorder =~ /oldest_inbound_filtered_call_start/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_time_filtered';}
if ($CAMP_callorder =~ /oldest_inbound_filtered_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_finish_filtered';}
if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';}
if ($CAMP_callorder =~ /campaign_rank/i) {$agent_call_order = 'order by campaign_weight desc,last_call_finish';}
if ($CAMP_callorder =~ /fewest_calls_campaign/i) {$agent_call_order = 'order by vicidial_live_agents.calls_today,vicidial_live_agents.last_call_finish';}
@@ -3748,8 +3750,24 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$AGI->stream_file('sip-silence');
}
### gather user details for max calls and filtered settings
$max_inbound_calls=0;
$stmtA = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$VDADuser';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsMIC=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02199'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArowsMIC > 0)
{
@aryA = $sthA->fetchrow_array;
$VU_max_inbound_calls = $aryA[0];
$VU_max_inbound_filter_enabled = $aryA[1];
$VU_max_inbound_filter_ingroups = $aryA[2];
}
### update calls_today for vicidial_live_inbound_agents ###
$stmtA = "SELECT calls_today from vicidial_inbound_group_agents WHERE user='$VDADuser' and group_id='$channel_group';";
$calls_today_filteredSQL='';
$stmtA = "SELECT calls_today,calls_today_filtered from vicidial_inbound_group_agents WHERE user='$VDADuser' and group_id='$channel_group';";
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -3758,34 +3776,38 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$calls_today = $aryA[0];
$calls_today = $aryA[0];
$calls_today_filtered = $aryA[1];
$calls_today++;
# if ($VU_max_inbound_filter_enabled > 0)
# {
# $VU_max_inbound_filter_ingroupsTEST = ",$VU_max_inbound_filter_ingroups,";
# if ($VU_max_inbound_filter_ingroups !~ /,$channel_group,/)
# {
# $calls_today_filtered++;
# $calls_today_filteredSQL = ",calls_today_filtered='$calls_today_filtered'";
# }
# }
# else
# {
# $calls_today_filtered++;
# $calls_today_filteredSQL = ",calls_today_filtered='$calls_today_filtered'";
# }
}
$sthA->finish();
if ($sthArows > 0)
{
$stmtA = "UPDATE vicidial_live_inbound_agents set calls_today='$calls_today',last_call_time=NOW() WHERE user='$VDADuser' and group_id='$channel_group';";
$stmtA = "UPDATE vicidial_live_inbound_agents set calls_today='$calls_today',last_call_time=NOW() $calls_today_filteredSQL WHERE user='$VDADuser' and group_id='$channel_group';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02070'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$stmtA = "UPDATE vicidial_inbound_group_agents set calls_today='$calls_today' WHERE user='$VDADuser' and group_id='$channel_group';";
$stmtA = "UPDATE vicidial_inbound_group_agents set calls_today='$calls_today' $calls_today_filteredSQL WHERE user='$VDADuser' and group_id='$channel_group';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02071'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDLIA agent calls: |$calls_today|$VDADuser|$channel_group|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDLIA agent calls: |$calls_today|$calls_today_filtered|$VDADuser|$channel_group|"; &agi_output;}
}
##### BEGIN check for user max inbound calls #####
$max_inbound_calls=0;
$stmtA = "SELECT max_inbound_calls FROM vicidial_users where user='$VDADuser';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsMIC=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02199'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArowsMIC > 0)
{
@aryA = $sthA->fetchrow_array;
$VU_max_inbound_calls = $aryA[0];
}
$stmtA = "SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$log_campaign';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -3802,9 +3824,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{
$max_inbound_calls = $CP_max_inbound_calls;
if ($VU_max_inbound_calls > 0)
{$max_inbound_calls = $VU_max_inbound_calls;}
{
$max_inbound_calls = $VU_max_inbound_calls;
}
$max_inbound_count=0;
$stmtA = "SELECT sum(calls_today) FROM vicidial_inbound_group_agents where user='$VDADuser' and group_type='C';";
$stmtA = "SELECT sum(calls_today),sum(calls_today_filtered) FROM vicidial_inbound_group_agents where user='$VDADuser' and group_type='C';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVIGA=$sthA->rows;
@@ -3813,6 +3837,10 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
{
@aryA = $sthA->fetchrow_array;
$max_inbound_count = $aryA[0];
if ($VU_max_inbound_filter_enabled > 0)
{
$max_inbound_count = $aryA[1];
}
}
if ($max_inbound_count >= $max_inbound_calls)
{
+4 -3
View File
@@ -137,9 +137,10 @@
# 190220-2258 - Added flushing of vicidial_sessions_recent table
# 190530-1411 - Added SIP logger code
# 190713-0900 - Added vicidial_lead_call_quota_counts log archiving
# 191017-2039 - Added reset of calls_today_filtered fields
#
$build = '190713-0900';
$build = '191017-2039';
$DB=0; # Debug flag
$teodDB=0; # flag to log Timeclock End of Day processes to log file
@@ -1153,7 +1154,7 @@ if ($timeclock_end_of_day_NOW > 0)
if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
$stmtA = "update vicidial_inbound_group_agents SET calls_today=0;";
$stmtA = "update vicidial_inbound_group_agents SET calls_today=0,calls_today_filtered=0;";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA);
if($DB){print STDERR "\n|$affected_rows vicidial_inbound_group_agents call counts reset|\n";}
@@ -1258,7 +1259,7 @@ if ($timeclock_end_of_day_NOW > 0)
if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
$stmtA = "update vicidial_live_inbound_agents SET calls_today=0;";
$stmtA = "update vicidial_live_inbound_agents SET calls_today=0,calls_today_filtered=0;";
if($DBX){print STDERR "\n|$stmtA|\n";}
$affected_rows = $dbhA->do($stmtA);
if($DB){print STDERR "\n|$affected_rows vicidial_live_inbound_agents call counts reset|\n";}
+53 -20
View File
@@ -53,6 +53,7 @@
# 161102-1032 - Fixed QM partition problem
# 170527-2348 - Fix for rare inbound logging issue #1017
# 190716-1628 - Added code for Call Quotas
# 191017-1909 - Added code for filtered maximum inbound calls
#
### begin parsing run-time options ###
@@ -367,7 +368,7 @@ while($one_day_interval > 0)
if ($QHcall_type[$w] =~ /IN/)
{$licf_SQL = ",last_inbound_call_time='$SQLdate'";}
$stmtA = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$SQLdate',comments='REMOTE',calls_today=(calls_today + 1),last_state_change='$SQLdate' $licf_SQL where live_agent_id='$QHlive_agent_id[$w]';";
$stmtA = "UPDATE vicidial_live_agents set status='INCALL',last_call_time='$SQLdate',last_inbound_call_time_filtered='$SQLdate',last_inbound_call_finish_filtered='$SQLdate',comments='REMOTE',calls_today=(calls_today + 1),last_state_change='$SQLdate' $licf_SQL where live_agent_id='$QHlive_agent_id[$w]';";
$Aaffected_rows = $dbhA->do($stmtA);
$stmtB = "UPDATE vicidial_list set status='XFER',user='$QHuser[$w]' where lead_id='$QHlead_id[$w]';";
@@ -375,27 +376,54 @@ while($one_day_interval > 0)
if ($QHcall_type[$w] =~ /IN/)
{
$stmtC = "UPDATE vicidial_closer_log set status='XFER',user='$QHuser[$w]',comments='REMOTE' where lead_id='$QHlead_id[$w]' and uniqueid='$QHuniqueid[$w]' and campaign_id='$QHcampaign_id[$w]' order by closecallid desc limit 1;";
$Caffected_rows = $dbhA->do($stmtC);
$stmtD = "INSERT IGNORE INTO vicidial_live_inbound_agents SET calls_today='1',last_call_time='$SQLdate',user='$QHuser[$w]', group_id='$QHcampaign_id[$w]' ON DUPLICATE KEY UPDATE calls_today=(calls_today + 1),last_call_time='$SQLdate';";
$Daffected_rows = $dbhA->do($stmtD);
# $stmtE = "INSERT IGNORE INTO vicidial_inbound_group_agents set calls_today=1,user='$QHuser[$w]',group_id='$QHcampaign_id[$w]' ON DUPLICATE KEY UPDATE calls_today=(calls_today + 1);";
$stmtE = "INSERT IGNORE INTO vicidial_inbound_group_agents set calls_today=1,user='$QHuser[$w]',group_id='$QHcampaign_id[$w]';";
$Eaffected_rows = $dbhA->do($stmtE);
##### BEGIN check for user max inbound calls #####
### Gather user details for max inbound calls
$max_inbound_calls=0;
$stmtJ = "SELECT max_inbound_calls FROM vicidial_users where user='$QHuser[$w]';";
$stmtJ = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$QHuser[$w]';";
$sthA = $dbhA->prepare($stmtJ) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtJ ", $dbhA->errstr;
$sthArowsMIC=$sthA->rows;
if ($sthArowsMIC > 0)
{
@aryA = $sthA->fetchrow_array;
$VU_max_inbound_calls = $aryA[0];
$VU_max_inbound_calls = $aryA[0];
$VU_max_inbound_filter_enabled = $aryA[1];
$VU_max_inbound_filter_ingroups = $aryA[2];
}
$channel_group = $QHcampaign_id[$w];
$calls_today_filteredSQL = ",calls_today_filtered=(calls_today_filtered + 1),last_call_time_filtered='$SQLdate'";
$calls_today_filteredSQLnew = ",calls_today_filtered='1',last_call_time_filtered='$SQLdate'";
$calls_today_filteredSQLnewIGA = ",calls_today_filtered='1' ON DUPLICATE KEY UPDATE calls_today_filtered=(calls_today_filtered + 1)";
if ($VU_max_inbound_filter_enabled > 0)
{
$calls_today_filteredSQL = '';
$calls_today_filteredSQLnew = '';
$calls_today_filteredSQLnewIGA = '';
$VU_max_inbound_filter_ingroupsTEST = ",$VU_max_inbound_filter_ingroups,";
if ($VU_max_inbound_filter_ingroupsTEST !~ /,$channel_group,/)
{
$calls_today_filteredSQL = ",calls_today_filtered=(calls_today_filtered + 1),last_call_time_filtered='$SQLdate'";
$calls_today_filteredSQLnew = ",calls_today_filtered='1',last_call_time_filtered='$SQLdate'";
$calls_today_filteredSQLnewIGA = ",calls_today_filtered='1' ON DUPLICATE KEY UPDATE calls_today_filtered=(calls_today_filtered + 1)";
}
}
$stmtC = "UPDATE vicidial_closer_log set status='XFER',user='$QHuser[$w]',comments='REMOTE' where lead_id='$QHlead_id[$w]' and uniqueid='$QHuniqueid[$w]' and campaign_id='$QHcampaign_id[$w]' order by closecallid desc limit 1;";
$Caffected_rows = $dbhA->do($stmtC);
$stmtD = "INSERT IGNORE INTO vicidial_live_inbound_agents SET calls_today='1',last_call_time='$SQLdate',user='$QHuser[$w]', group_id='$QHcampaign_id[$w]' $calls_today_filteredSQLnew ON DUPLICATE KEY UPDATE calls_today=(calls_today + 1) $calls_today_filteredSQL;";
$Daffected_rows = $dbhA->do($stmtD);
# $stmtE = "INSERT IGNORE INTO vicidial_inbound_group_agents set calls_today=1,user='$QHuser[$w]',group_id='$QHcampaign_id[$w]' ON DUPLICATE KEY UPDATE calls_today=(calls_today + 1);";
$stmtE = "INSERT IGNORE INTO vicidial_inbound_group_agents set calls_today=1,user='$QHuser[$w]',group_id='$QHcampaign_id[$w]' $calls_today_filteredSQLnewIGA;";
$Eaffected_rows = $dbhA->do($stmtE);
if (length($calls_today_filteredSQL) > 10)
{
$stmtF = "UPDATE vicidial_live_agents set last_inbound_call_time_filtered='$SQLdate' where live_agent_id='$QHlive_agent_id[$w]';";
$Faffected_rows = $dbhA->do($stmtF);
}
##### BEGIN check for user max inbound calls #####
$stmtJ = "SELECT max_inbound_calls FROM vicidial_campaigns where campaign_id='$QHcampaign_id[$w]';";
$sthA = $dbhA->prepare($stmtJ) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtJ ", $dbhA->errstr;
@@ -412,7 +440,7 @@ while($one_day_interval > 0)
if ($VU_max_inbound_calls > 0)
{$max_inbound_calls = $VU_max_inbound_calls;}
$max_inbound_count=0;
$stmtJ = "SELECT sum(calls_today) FROM vicidial_inbound_group_agents where user='$QHuser[$w]' and group_type='C';";
$stmtJ = "SELECT sum(calls_today),sum(calls_today_filtered) FROM vicidial_inbound_group_agents where user='$QHuser[$w]' and group_type='C';";
$sthA = $dbhA->prepare($stmtJ) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtJ ", $dbhA->errstr;
$sthArowsVIGA=$sthA->rows;
@@ -420,6 +448,10 @@ while($one_day_interval > 0)
{
@aryA = $sthA->fetchrow_array;
$max_inbound_count = $aryA[0];
if ($VU_max_inbound_filter_enabled > 0)
{
$max_inbound_count = $aryA[1];
}
}
if ($max_inbound_count >= $max_inbound_calls)
{
@@ -868,16 +900,17 @@ while($one_day_interval > 0)
$TEMPexistsVLIA=0;
# grab the group weight and calls today of the agent in each in-group
$DBuser_level[$h]='1';
$stmtA = "SELECT group_weight,calls_today,group_grade FROM vicidial_inbound_group_agents where user='$DBuser_start[$h]' and group_id='$TEMPingroups[$s]';";
$stmtA = "SELECT group_weight,calls_today,group_grade,calls_today_filtered FROM vicidial_inbound_group_agents where user='$DBuser_start[$h]' and group_id='$TEMPingroups[$s]';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVIGA=$sthA->rows;
if ($sthArowsVIGA > 0)
{
@aryA = $sthA->fetchrow_array;
$TEMPagentWEIGHT = $aryA[0];
$TEMPagentCALLS = $aryA[1];
$TEMPagentGRADE = $aryA[2];
$TEMPagentWEIGHT = $aryA[0];
$TEMPagentCALLS = $aryA[1];
$TEMPagentGRADE = $aryA[2];
$TEMPagentCALLSftl = $aryA[3];
}
$sthA->finish();
@@ -898,7 +931,7 @@ while($one_day_interval > 0)
if ($TEMPexistsVLIA < 1)
{
$stmtA = "INSERT IGNORE INTO vicidial_live_inbound_agents SET user='$DBremote_user[$h]', group_id='$TEMPingroups[$s]', group_weight='$TEMPagentWEIGHT', calls_today='$TEMPagentCALLS', last_call_time='$SQLdate', last_call_finish='$SQLdate', group_grade='$TEMPagentGRADE' ON DUPLICATE KEY UPDATE group_weight='$TEMPagentWEIGHT',group_grade='$TEMPagentGRADE';";
$stmtA = "INSERT IGNORE INTO vicidial_live_inbound_agents SET user='$DBremote_user[$h]', group_id='$TEMPingroups[$s]', group_weight='$TEMPagentWEIGHT', calls_today='$TEMPagentCALLS', calls_today_filtered='$TEMPagentCALLSftl', last_call_time='$SQLdate', last_call_time_filtered='$SQLdate', last_call_finish='$SQLdate', group_grade='$TEMPagentGRADE' ON DUPLICATE KEY UPDATE group_weight='$TEMPagentWEIGHT',group_grade='$TEMPagentGRADE';";
$affected_rows = $dbhA->do($stmtA);
if ( ($DBX) && ($affected_rows > 0) ) {print STDERR "$DBremote_user[$h] VLIA UPDATE: $affected_rows|$TEMPingroups[$s]|$TEMPagentWEIGHT\n";}
+3
View File
@@ -25,6 +25,7 @@ $PATHconf = '/etc/astguiclient.conf';
# 121214-2303 - First Build
# 180610-1812 - Added code to not allow XFER emails to go to user who transferred
# 190216-0810 - Fix for user-group, email-group and campaign allowed/permissions matching issues
# 191017-2043 - Added filtered routing options
#
if ($ARGV[0]=~/--help/)
@@ -259,6 +260,8 @@ sub AssignAgents()
if ($CAMP_callorder =~ /oldest_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_call_finish';}
if ($CAMP_callorder =~ /oldest_inbound_call_start/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_time';} #
if ($CAMP_callorder =~ /oldest_inbound_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_finish';} #
if ($CAMP_callorder =~ /oldest_inbound_filtered_call_start/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_time_filtered';}
if ($CAMP_callorder =~ /oldest_inbound_filtered_call_finish/i) {$agent_call_order = 'order by vicidial_live_agents.last_inbound_call_finish_filtered';}
if ($CAMP_callorder =~ /random/i) {$agent_call_order = 'order by random_id';}
if ($CAMP_callorder =~ /campaign_rank/i) {$agent_call_order = 'order by campaign_weight desc,last_call_finish';}
if ($CAMP_callorder =~ /fewest_calls_campaign/i) {$agent_call_order = 'order by vicidial_live_agents.calls_today,vicidial_live_agents.last_call_finish';}
+12 -2
View File
@@ -436,6 +436,8 @@ external_pause_code VARCHAR(6) default '',
pause_code VARCHAR(6) default '',
preview_lead_id INT(9) UNSIGNED default '0',
external_lead_id INT(9) UNSIGNED default '0',
last_inbound_call_time_filtered DATETIME,
last_inbound_call_finish_filtered DATETIME,
index (random_id),
index (last_call_time),
index (last_update_time),
@@ -673,7 +675,11 @@ max_hopper_calls_hour SMALLINT(5) UNSIGNED default '0',
mute_recordings ENUM('DISABLED','Y','N') default 'DISABLED',
hide_call_log_info ENUM('DISABLED','Y','N','SHOW_1','SHOW_2','SHOW_3','SHOW_4','SHOW_5','SHOW_6','SHOW_7','SHOW_8','SHOW_9','SHOW_10') default 'DISABLED',
next_dial_my_callbacks ENUM('NOT_ACTIVE','DISABLED','ENABLED') default 'NOT_ACTIVE',
user_admin_redirect_url TEXT
user_admin_redirect_url TEXT,
max_inbound_filter_enabled ENUM('0','1') default '0',
max_inbound_filter_statuses TEXT,
max_inbound_filter_ingroups TEXT,
max_inbound_filter_min_sec SMALLINT(5) default '-1'
) ENGINE=MyISAM;
CREATE UNIQUE INDEX user ON vicidial_users (user);
@@ -1916,6 +1922,7 @@ calls_today SMALLINT(5) UNSIGNED default '0',
group_web_vars VARCHAR(255) default '',
group_grade TINYINT(2) UNSIGNED default '1',
group_type VARCHAR(1) default 'C',
calls_today_filtered SMALLINT(5) UNSIGNED default '0',
index (group_id),
index (user),
unique index viga_user_group_id (user, group_id)
@@ -1929,6 +1936,9 @@ calls_today SMALLINT(5) UNSIGNED default '0',
last_call_time DATETIME,
last_call_finish DATETIME,
group_grade TINYINT(2) UNSIGNED default '1',
calls_today_filtered SMALLINT(5) UNSIGNED default '0',
last_call_time_filtered DATETIME,
last_call_finish_filtered DATETIME,
index (group_id),
index (group_weight),
unique index vlia_user_group_id (user, group_id)
@@ -4523,4 +4533,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1576',db_schema_update_date=NOW(),reload_timestamp=NOW();
UPDATE system_settings SET db_schema_version='1577',db_schema_update_date=NOW(),reload_timestamp=NOW();
+16 -1
View File
@@ -1052,5 +1052,20 @@ ALTER TABLE vicidial_log_noanswer MODIFY term_reason ENUM('CALLER','AGENT','QUE
ALTER TABLE vicidial_log_archive MODIFY term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','NONE','SYSTEM') default 'NONE';
ALTER TABLE vicidial_log_noanswer_archive MODIFY term_reason ENUM('CALLER','AGENT','QUEUETIMEOUT','ABANDON','AFTERHOURS','NONE','SYSTEM') default 'NONE';
UPDATE system_settings SET db_schema_version='1576',db_schema_update_date=NOW() where db_schema_version < 1576;
ALTER TABLE vicidial_users ADD max_inbound_filter_enabled ENUM('0','1') default '0';
ALTER TABLE vicidial_users ADD max_inbound_filter_statuses TEXT;
ALTER TABLE vicidial_users ADD max_inbound_filter_ingroups TEXT;
ALTER TABLE vicidial_users ADD max_inbound_filter_min_sec SMALLINT(5) default '-1';
ALTER TABLE vicidial_live_inbound_agents ADD calls_today_filtered SMALLINT(5) UNSIGNED default '0';
ALTER TABLE vicidial_live_inbound_agents ADD last_call_time_filtered DATETIME;
ALTER TABLE vicidial_live_inbound_agents ADD last_call_finish_filtered DATETIME;
ALTER TABLE vicidial_inbound_group_agents ADD calls_today_filtered SMALLINT(5) UNSIGNED default '0';
ALTER TABLE vicidial_live_agents ADD last_inbound_call_time_filtered DATETIME;
ALTER TABLE vicidial_live_agents ADD last_inbound_call_finish_filtered DATETIME;
UPDATE system_settings SET db_schema_version='1577',db_schema_update_date=NOW() where db_schema_version < 1577;
+434 -304
View File
@@ -480,13 +480,14 @@
# 190730-0926 - Added campaign SIP Actions processing
# 190925-1347 - Added logtable SIP Action
# 191013-0934 - Fixes for PHP7 issues
# 191017-2205 - Added code for filtered inbound max calls
#
$version = '2.14-374';
$build = '191013-0934';
$php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=809;
$mysql_log_count=817;
$one_mysql_log=0;
$DB=0;
$VD_login=0;
@@ -786,6 +787,8 @@ if (isset($_GET["start_date"])) {$start_date=$_GET["start_date"];}
elseif (isset($_POST["start_date"])){$start_date=$_POST["start_date"];}
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
if (isset($_GET["customer_sec"])) {$customer_sec=$_GET["customer_sec"];}
elseif (isset($_POST["customer_sec"])) {$customer_sec=$_POST["customer_sec"];}
header ("Content-type: text/html; charset=utf-8");
@@ -1123,7 +1126,7 @@ $callback_timezone = preg_replace('/[^-, _0-9a-zA-Z]/','',$callback_timezone);
$manual_dial_validation = preg_replace('/[^-_0-9a-zA-Z]/','',$manual_dial_validation);
$start_date = preg_replace('/[^-_0-9]/','',$start_date);
$end_date = preg_replace('/[^-_0-9]/','',$end_date);
$customer_sec = preg_replace('/[^-_0-9]/','',$customer_sec);
# default optional vars if not set
if (!isset($format)) {$format="text";}
@@ -1488,7 +1491,7 @@ if ($ACTION == 'regCLOSER')
else
{
$orig_closer_choice = $closer_choice;
$stmt = "SELECT max_inbound_calls FROM vicidial_users where user='$user';";
$stmt = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00587',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
@@ -1496,7 +1499,9 @@ if ($ACTION == 'regCLOSER')
if ($vumic_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VU_max_inbound_calls = $row[0];
$VU_max_inbound_calls = $row[0];
$VU_max_inbound_filter_enabled = $row[1];
$VU_max_inbound_filter_ingroups = $row[2];
}
$stmt = "SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
@@ -1516,7 +1521,7 @@ if ($ACTION == 'regCLOSER')
if ($VU_max_inbound_calls > 0)
{$max_inbound_calls = $VU_max_inbound_calls;}
$stmt = "SELECT sum(calls_today) FROM vicidial_inbound_group_agents where user='$user' and group_type='C';";
$stmt = "SELECT sum(calls_today),sum(calls_today_filtered) FROM vicidial_inbound_group_agents where user='$user' and group_type='C';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00588',$user,$server_ip,$session_name,$one_mysql_log);}
if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
@@ -1525,6 +1530,8 @@ if ($ACTION == 'regCLOSER')
{
$row=mysqli_fetch_row($rslt);
$max_inbound_count = $row[0];
if ($VU_max_inbound_filter_enabled > 0)
{$max_inbound_count = $row[1];}
if ($max_inbound_count >= $max_inbound_calls)
{$closer_choice = "MAXLOCK-";}
@@ -1674,7 +1681,7 @@ if ($ACTION == 'regCLOSER')
{
if (strlen($in_groups[$k])>1)
{
$stmt="SELECT group_weight,calls_today,group_grade FROM vicidial_inbound_group_agents where user='$user' and group_id='$in_groups[$k]';";
$stmt="SELECT group_weight,calls_today,group_grade,calls_today_filtered FROM vicidial_inbound_group_agents where user='$user' and group_id='$in_groups[$k]';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00013',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
@@ -1682,9 +1689,10 @@ if ($ACTION == 'regCLOSER')
if ($viga_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$group_weight = $row[0];
$calls_today = $row[1];
$group_grade = $row[2];
$group_weight = $row[0];
$calls_today = $row[1];
$group_grade = $row[2];
$calls_today_filtered = $row[3];
}
else
{
@@ -1692,7 +1700,7 @@ if ($ACTION == 'regCLOSER')
$calls_today = 0;
$group_grade = 1;
}
$stmt="INSERT INTO vicidial_live_inbound_agents set user='$user',group_id='$in_groups[$k]',group_weight='$group_weight',calls_today='$calls_today',last_call_time='$NOW_TIME',last_call_finish='$NOW_TIME',group_grade='$group_grade';";
$stmt="INSERT INTO vicidial_live_inbound_agents set user='$user',group_id='$in_groups[$k]',group_weight='$group_weight',calls_today='$calls_today',last_call_time='$NOW_TIME',last_call_finish='$NOW_TIME',last_call_time_filtered='$NOW_TIME',last_call_finish_filtered='$NOW_TIME',group_grade='$group_grade',calls_today_filtered='$calls_today_filtered';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00014',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -11805,330 +11813,463 @@ if ($ACTION == 'updateDISPO')
if ($SSagent_debug_logging > 0) {vicidial_ajax_log($NOW_TIME,$startMS,$link,$ACTION,$php_script,$user,$stage,$lead_id,$session_name,$stmt);}
exit;
}
else
$user_group='';
$stmt="SELECT user_group,max_inbound_filter_enabled,max_inbound_filter_ingroups,max_inbound_filter_statuses,max_inbound_filter_min_sec,max_inbound_calls FROM vicidial_users where user='$user' LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$ug_record_ct = mysqli_num_rows($rslt);
if ($ug_record_ct > 0)
{
$stmt = "SELECT dispo_call_url,queuemetrics_callstatus_override,comments_dispo_screen,comments_callback_screen,vc.campaign_id from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';";
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
$row=mysqli_fetch_row($rslt);
$user_group = trim("$row[0]");
$max_inbound_filter_enabled = $row[1];
$max_inbound_filter_ingroups = $row[2];
$max_inbound_filter_statuses = $row[3];
$max_inbound_filter_min_sec = $row[4];
$VU_max_inbound_calls = $row[5];
}
$stmt = "SELECT dispo_call_url,queuemetrics_callstatus_override,comments_dispo_screen,comments_callback_screen,vc.campaign_id from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';";
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00284',$user,$server_ip,$session_name,$one_mysql_log);}
$VC_dcu_ct = mysqli_num_rows($rslt);
if ($VC_dcu_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$dispo_call_url = $row[0];
$queuemetrics_callstatus_override = $row[1];
$comments_dispo_screen = $row[2];
$comments_callback_screen = $row[3];
$DUcampaign_id = $row[4];
$DUentry_type = 'campaign';
}
### reset the API fields in vicidial_live_agents record
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_timer_action_seconds='-1',external_dtmf='',external_transferconf='',external_park='',external_recording='',last_state_change='$NOW_TIME',preview_lead_id='0' where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00141',$user,$server_ip,$session_name,$one_mysql_log);}
$retry_count=0;
while ( ($errno > 0) and ($retry_count < 9) )
{
$rslt=mysql_to_mysqli($stmt, $link);
$one_mysql_log=1;
$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,"9141$retry_count",$user,$server_ip,$session_name,$one_mysql_log);
$one_mysql_log=0;
$retry_count++;
}
if ($auto_dial_level < 1)
{
$stmt = "UPDATE vicidial_live_agents set status='PAUSED',callerid='' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00284',$user,$server_ip,$session_name,$one_mysql_log);}
$VC_dcu_ct = mysqli_num_rows($rslt);
if ($VC_dcu_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$dispo_call_url = $row[0];
$queuemetrics_callstatus_override = $row[1];
$comments_dispo_screen = $row[2];
$comments_callback_screen = $row[3];
$DUcampaign_id = $row[4];
$DUentry_type = 'campaign';
}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00285',$user,$server_ip,$session_name,$one_mysql_log);}
}
$commentsSQL='';
if ( (strlen($dispo_comments)>0) and ( ($comments_dispo_screen == 'ENABLED') or ($comments_dispo_screen == 'REPLACE_CALL_NOTES') ) )
{$commentsSQL = ",comments='" . mysqli_real_escape_string($link, $dispo_comments) . "'";}
if ( (strlen($cbcomment_comments)>0) and ( ($comments_callback_screen == 'ENABLED') or ($comments_callback_screen == 'REPLACE_CB_NOTES') ) )
{$commentsSQL = ",comments='" . mysqli_real_escape_string($link, $cbcomment_comments) . "'";}
$stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' $commentsSQL where lead_id='$lead_id';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00142',$user,$server_ip,$session_name,$one_mysql_log);}
### reset the API fields in vicidial_live_agents record
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_timer_action_seconds='-1',external_dtmf='',external_transferconf='',external_park='',external_recording='',last_state_change='$NOW_TIME',preview_lead_id='0' where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00141',$user,$server_ip,$session_name,$one_mysql_log);}
$retry_count=0;
while ( ($errno > 0) and ($retry_count < 9) )
{
$rslt=mysql_to_mysqli($stmt, $link);
$one_mysql_log=1;
$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,"9141$retry_count",$user,$server_ip,$session_name,$one_mysql_log);
$one_mysql_log=0;
$retry_count++;
}
//Added by Poundteam Incorporated for Audit Comments Package
require_once('audit_comments.php');
audit_comments($lead_id,$list_id,$format,$user,$mel,$NOW_TIME,$link,$server_ip,$session_name,$one_mysql_log,$campaign);
if ($auto_dial_level < 1)
{
$stmt = "UPDATE vicidial_live_agents set status='PAUSED',callerid='' where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00285',$user,$server_ip,$session_name,$one_mysql_log);}
}
$commentsSQL='';
if ( (strlen($dispo_comments)>0) and ( ($comments_dispo_screen == 'ENABLED') or ($comments_dispo_screen == 'REPLACE_CALL_NOTES') ) )
{$commentsSQL = ",comments='" . mysqli_real_escape_string($link, $dispo_comments) . "'";}
if ( (strlen($cbcomment_comments)>0) and ( ($comments_callback_screen == 'ENABLED') or ($comments_callback_screen == 'REPLACE_CB_NOTES') ) )
{$commentsSQL = ",comments='" . mysqli_real_escape_string($link, $cbcomment_comments) . "'";}
$stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' $commentsSQL where lead_id='$lead_id';";
// JOEJ - Email feature - may not be necessary if vicidial_email_list doesn't need a status column.
if ($email_enabled>0)
{
$stmt="UPDATE vicidial_email_list set status='$dispo_choice', user='$user' where lead_id='$lead_id' and uniqueid='$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00142',$user,$server_ip,$session_name,$one_mysql_log);}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00552',$user,$server_ip,$session_name,$one_mysql_log);}
}
//Added by Poundteam Incorporated for Audit Comments Package
require_once('audit_comments.php');
audit_comments($lead_id,$list_id,$format,$user,$mel,$NOW_TIME,$link,$server_ip,$session_name,$one_mysql_log,$campaign);
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|DISPO_CALL |$MDnextCID|$stage|$campaign|$lead_id|$dispo_choice|$user|$uniqueid|$auto_dial_level|$agent_log_id|\n");
# fclose($fp);
$log_dispo_choice = $dispo_choice;
if (strlen($CallBackLeadStatus) > 0) {$log_dispo_choice = $CallBackLeadStatus;}
// JOEJ - Email feature - may not be necessary if vicidial_email_list doesn't need a status column.
if ($email_enabled>0)
$term_reasonSQL = '';
if ($parked_hangup=='1')
{$term_reasonSQL = ",term_reason='CALLER'";}
$stmt = "SELECT count(*) from vicidial_inbound_groups where group_id='$stage';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00143',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$call_type='IN';
$stmt = "SELECT dispo_call_url from vicidial_inbound_groups where group_id='$stage';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00286',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
if ($row[0] != 'CAMP')
{
$stmt="UPDATE vicidial_email_list set status='$dispo_choice', user='$user' where lead_id='$lead_id' and uniqueid='$uniqueid';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00552',$user,$server_ip,$session_name,$one_mysql_log);}
$dispo_call_url = $row[0];
$DUcampaign_id = $stage;
$DUentry_type = 'ingroup';
}
$stmt = "UPDATE vicidial_closer_log set status='$log_dispo_choice' $term_reasonSQL where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00144',$user,$server_ip,$session_name,$one_mysql_log);}
$VCLaffected_rows = mysqli_affected_rows($link);
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|DISPO_CALL |$MDnextCID|$stage|$campaign|$lead_id|$dispo_choice|$user|$uniqueid|$auto_dial_level|$agent_log_id|\n");
# fwrite ($fp, "$NOW_TIME|DISPO_CALL2|$user|$customer_sec <> $max_inbound_filter_min_sec|$stage <> $max_inbound_filter_ingroups|$dispo_choice <> $max_inbound_filter_statuses|\n");
# fclose($fp);
$log_dispo_choice = $dispo_choice;
if (strlen($CallBackLeadStatus) > 0) {$log_dispo_choice = $CallBackLeadStatus;}
$term_reasonSQL = '';
if ($parked_hangup=='1')
{$term_reasonSQL = ",term_reason='CALLER'";}
$stmt = "SELECT count(*) from vicidial_inbound_groups where group_id='$stage';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00143',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
$calls_today_filteredSQL = ",calls_today_filtered=(calls_today_filtered + 1),last_call_finish_filtered=NOW(),last_call_time_filtered=last_call_time";
if ($max_inbound_filter_enabled > 0)
{
$call_type='IN';
$stmt = "UPDATE vicidial_closer_log set status='$log_dispo_choice' $term_reasonSQL where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00144',$user,$server_ip,$session_name,$one_mysql_log);}
$VCLaffected_rows = mysqli_affected_rows($link);
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|DISPO_CALL2|$VCLaffected_rows|$stmt|\n");
# fclose($fp);
$stmt = "UPDATE vicidial_live_inbound_agents set last_call_finish=NOW() where group_id='$stage' and user='$user' limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00553',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt = "SELECT dispo_call_url from vicidial_inbound_groups where group_id='$stage';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00286',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
if ($row[0] != 'CAMP')
$calls_today_filteredSQL = '';
$max_inbound_filter_ingroupsTEST = ",$max_inbound_filter_ingroups,";
$max_inbound_filter_statusesTEST = ",$max_inbound_filter_statuses,";
if ( (!preg_match("/,$stage,/",$max_inbound_filter_ingroupsTEST)) and (!preg_match("/,$dispo_choice,/",$max_inbound_filter_statusesTEST)) and ($customer_sec >= $max_inbound_filter_min_sec) )
{
$dispo_call_url = $row[0];
$DUcampaign_id = $stage;
$DUentry_type = 'ingroup';
$calls_today_filteredSQL = ",calls_today_filtered=(calls_today_filtered + 1),last_call_finish_filtered=NOW(),last_call_time_filtered=last_call_time";
}
}
else
$stmt = "UPDATE vicidial_live_inbound_agents set last_call_finish=NOW() $calls_today_filteredSQL where group_id='$stage' and user='$user' limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00553',$user,$server_ip,$session_name,$one_mysql_log);}
##### BEGIN process filtered calls today, if set #####
if (strlen($calls_today_filteredSQL) > 10)
{
$call_type='OUT';
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
$stmt = "UPDATE vicidial_inbound_group_agents set calls_today_filtered=(calls_today_filtered + 1) where group_id='$stage' and user='$user' limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00810',$user,$server_ip,$session_name,$one_mysql_log);}
if ( ($auto_dial_level < 1) or (preg_match('/^M/',$MDnextCID)) )
$stmt = "UPDATE vicidial_live_agents set last_inbound_call_time_filtered=last_inbound_call_time,last_inbound_call_finish_filtered=NOW() where user='$user';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00811',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00812',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$camp_record_ct = mysqli_num_rows($rslt);
if ($camp_record_ct > 0)
{
$stmt = "SELECT count(*) from vicidial_log where lead_id='$lead_id' and call_date > \"$four_hours_ago\" and called_count='$called_count';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00213',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt="UPDATE vicidial_log set status='$log_dispo_choice',user='$user' $term_reasonSQL where lead_id='$lead_id' and call_date > \"$four_hours_ago\" and called_count='$called_count' order by uniqueid desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
}
else
{
$VLlist_id = ''; $VLphone_number = ''; $VLphone_code = ''; $user_group='';
$stmt = "SELECT user_group FROM vicidial_users where user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00217',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VUinfo_ct = mysqli_num_rows($rslt);
if ($VUinfo_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$user_group = "$row[0]";
}
$stmt = "SELECT list_id,phone_number,phone_code,alt_phone,address3 FROM vicidial_list where lead_id='$lead_id';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00216',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VLinfo_ct = mysqli_num_rows($rslt);
if ($VLinfo_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VLlist_id = $row[0];
if (strlen($phone_number)<6)
{
$VLphone_number = $row[1];
$VLalt = 'MAIN';
$VLalt_phone = $row[3];
$VLaddress3 = $row[4];
}
else
{
$VLphone_number = "$phone_number";
if ($phone_number == "$row[1]")
{$VLalt = 'MAIN';}
else
{
if ($phone_number != $VLalt_phone)
{
if ($phone_number != $VLaddress3)
{
$VLalt = 'X1';
$stmt = "SELECT alt_phone_count from vicidial_list_alt_phones where lead_id='$lead_id' and phone_number = '$dialed_number' order by alt_phone_count limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00250',$user,$server_ip,$session_name,$one_mysql_log);}
$VDAP_cid_ct = mysqli_num_rows($rslt);
if ($VDAP_cid_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$Xalt_phone_count =$row[0];
$stmt = "SELECT count(*) from vicidial_list_alt_phones where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00251',$user,$server_ip,$session_name,$one_mysql_log);}
$VDAPct_cid_ct = mysqli_num_rows($rslt);
if ($VDAPct_cid_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$COUNTalt_phone_count =$row[0];
if ($COUNTalt_phone_count <= $Xalt_phone_count)
{$VLalt = 'XLAST';}
else
{$VLalt = "X$Xalt_phone_count";}
}
}
}
else
{$VLalt = 'ADDR3';}
}
else
{$VLalt = 'ALT';}
}
}
if (strlen($phone_code)<1)
{$VLphone_code = "$row[2]";}
else
{$VLphone_code = "$phone_code";}
}
$PADlead_id = sprintf("%010s", $lead_id);
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 1);}
$FAKEcall_id = "$StarTtime.$PADlead_id";
$stmt = "INSERT INTO vicidial_log set uniqueid='$FAKEcall_id',lead_id='$lead_id',list_id='$VLlist_id',campaign_id='$campaign',call_date='$NOW_TIME',start_epoch='$StarTtime',end_epoch='$StarTtime',length_in_sec='0',status='$log_dispo_choice',phone_code='$VLphone_code',phone_number='$VLphone_number',user='$user',comments='MANUAL',processed='N',user_group='$user_group',term_reason='AGENT',alt_dial='$VLalt',called_count='$called_count';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00215',$user,$server_ip,$session_name,$one_mysql_log);}
##### insert log into vicidial_log_extended for manual VICIDiaL call
$stmt="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$FAKEcall_id',server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00402',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsX = mysqli_affected_rows($link);
$MAN_vl_insert++;
}
$stmt="DELETE FROM vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00219',$user,$server_ip,$session_name,$one_mysql_log);}
$stmt="UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00403',$user,$server_ip,$session_name,$one_mysql_log);}
$CP_max_inbound_calls = $row[0];
$max_inbound_calls_outcome = $row[1];
}
else
if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) )
{
$stmt="UPDATE vicidial_log set status='$log_dispo_choice' $term_reasonSQL where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
$max_inbound_calls = $CP_max_inbound_calls;
if ($VU_max_inbound_calls > 0)
{
$max_inbound_calls = $VU_max_inbound_calls;
}
$max_inbound_count=0;
$stmt="SELECT sum(calls_today),sum(calls_today_filtered) FROM vicidial_inbound_group_agents where user='$user' and group_type='C';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00813',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$viga_record_ct = mysqli_num_rows($rslt);
if ($viga_record_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$max_inbound_count = $row[0];
if ($max_inbound_filter_enabled > 0)
{
$max_inbound_count = $row[1];
}
}
# $fp = fopen ("./vicidial_debug.txt", "a");
# fwrite ($fp, "$NOW_TIME|DISPO_CALL3|$user|$max_inbound_count - $row[0] - $row[1]|\n");
# fclose($fp);
if ($max_inbound_count >= $max_inbound_calls)
{
$outbound_autodial='0';
$stmt="SELECT outbound_autodial,closer_campaigns FROM vicidial_live_agents where user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00814',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$vla_record_ct = mysqli_num_rows($rslt);
if ($vla_record_ct > 0)
{
$row=mysqli_fetch_row($rslt);
if (preg_match("/Y/",$row[0]))
{$outbound_autodial = '1';}
$closer_campaigns = $row[1];
}
$stmtA = "UPDATE vicidial_live_agents set external_ingroups=' -',external_blended='$outbound_autodial',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$user'";
$stmtB = "DELETE FROM vicidial_live_inbound_agents where user='$user';";
if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome) )
{
$closer_campaigns = preg_replace("/^ | -$//gi",'',$closer_campaigns);
$ADcloser_campaignsARY = explode(" ",$closer_campaigns);
$ADcloser_campaignsARYct = count($ADcloser_campaignsARY);
$ADc=0;
$ADcloser_campaigns='';
while ($ADc < $ADcloser_campaignsARYct)
{
if (preg_match("/AGENTDIRECT/i",$ADcloser_campaignsARY[$ADc]))
{$ADcloser_campaigns .= "$ADcloser_campaignsARY[$ADc] ";}
$ADc++;
}
if (strlen($ADcloser_campaigns) > 3)
{$ADcloser_campaigns = " ".$ADcloser_campaigns."-";}
else
{$ADcloser_campaigns = " -";}
$stmtA = "UPDATE vicidial_live_agents set external_ingroups='$ADcloser_campaigns',external_blended='$outbound_autodial',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$user'";
$stmtB = "DELETE FROM vicidial_live_inbound_agents where user='$user' and group_id NOT LIKE\"%AGENTDIRECT%\";";
}
if ($DB) {echo "$stmtA\n";}
$rslt=mysql_to_mysqli($stmtA, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtA,'00815',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsA = mysqli_affected_rows($link);
if ($DB) {echo "$stmtB\n";}
$rslt=mysql_to_mysqli($stmtB, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtB,'00816',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsB = mysqli_affected_rows($link);
$SQL_log = "$stmtA|$stmtB";
$SQL_log = preg_replace("/'|%//",'',$SQL_log);
$stmtC = "INSERT INTO vicidial_admin_log set event_date=NOW(), user='$user', ip_address='$VARserver_ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='MAX IN CALLS MODIFY USER', event_sql='$SQL_log', event_notes='|$dispo_choice|$customer_sec|$max_inbound_count|$max_inbound_calls|$user|IC|$max_inbound_calls_outcome|$closer_campaigns|$affected_rowsA|$affected_rowsB|';";
$rslt=mysql_to_mysqli($stmtC, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtC,'00817',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsC = mysqli_affected_rows($link);
if ($DB) {echo "-- MAX INBOUND AGENT CALLS TRIGGER: |$affected_rowsC|$dispo_choice|$customer_sec|$max_inbound_count|$max_inbound_calls|$user|$max_inbound_calls_outcome|$closer_campaigns|";}
}
}
}
##### END process filtered calls today, if set #####
}
else
{
$call_type='OUT';
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
if ( ($auto_dial_level < 1) or (preg_match('/^M/',$MDnextCID)) )
{
$stmt = "SELECT count(*) from vicidial_log where lead_id='$lead_id' and call_date > \"$four_hours_ago\" and called_count='$called_count';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00213',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt="UPDATE vicidial_log set status='$log_dispo_choice',user='$user' $term_reasonSQL where lead_id='$lead_id' and call_date > \"$four_hours_ago\" and called_count='$called_count' order by uniqueid desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
}
}
### find all DNC-type statuses in the system
if ( ($use_internal_dnc=='Y') or ($use_campaign_dnc=='Y') or ($use_internal_dnc=='AREACODE') or ($use_campaign_dnc=='AREACODE') )
{
$DNC_string_check = '|';
$stmt = "SELECT status FROM vicidial_statuses where dnc='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00195',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$dncvs_ct = mysqli_num_rows($rslt);
$i=0;
while ($i < $dncvs_ct)
else
{
$row=mysqli_fetch_row($rslt);
$DNC_string_check .= "$row[0]|";
$i++;
$VLlist_id = ''; $VLphone_number = ''; $VLphone_code = '';
$stmt = "SELECT list_id,phone_number,phone_code,alt_phone,address3 FROM vicidial_list where lead_id='$lead_id';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00216',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$VLinfo_ct = mysqli_num_rows($rslt);
if ($VLinfo_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VLlist_id = $row[0];
if (strlen($phone_number)<6)
{
$VLphone_number = $row[1];
$VLalt = 'MAIN';
$VLalt_phone = $row[3];
$VLaddress3 = $row[4];
}
else
{
$VLphone_number = "$phone_number";
if ($phone_number == "$row[1]")
{$VLalt = 'MAIN';}
else
{
if ($phone_number != $VLalt_phone)
{
if ($phone_number != $VLaddress3)
{
$VLalt = 'X1';
$stmt = "SELECT alt_phone_count from vicidial_list_alt_phones where lead_id='$lead_id' and phone_number = '$dialed_number' order by alt_phone_count limit 1;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00250',$user,$server_ip,$session_name,$one_mysql_log);}
$VDAP_cid_ct = mysqli_num_rows($rslt);
if ($VDAP_cid_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$Xalt_phone_count =$row[0];
$stmt = "SELECT count(*) from vicidial_list_alt_phones where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00251',$user,$server_ip,$session_name,$one_mysql_log);}
$VDAPct_cid_ct = mysqli_num_rows($rslt);
if ($VDAPct_cid_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$COUNTalt_phone_count =$row[0];
if ($COUNTalt_phone_count <= $Xalt_phone_count)
{$VLalt = 'XLAST';}
else
{$VLalt = "X$Xalt_phone_count";}
}
}
}
else
{$VLalt = 'ADDR3';}
}
else
{$VLalt = 'ALT';}
}
}
if (strlen($phone_code)<1)
{$VLphone_code = "$row[2]";}
else
{$VLphone_code = "$phone_code";}
}
$PADlead_id = sprintf("%010s", $lead_id);
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 1);}
$FAKEcall_id = "$StarTtime.$PADlead_id";
$stmt = "INSERT INTO vicidial_log set uniqueid='$FAKEcall_id',lead_id='$lead_id',list_id='$VLlist_id',campaign_id='$campaign',call_date='$NOW_TIME',start_epoch='$StarTtime',end_epoch='$StarTtime',length_in_sec='0',status='$log_dispo_choice',phone_code='$VLphone_code',phone_number='$VLphone_number',user='$user',comments='MANUAL',processed='N',user_group='$user_group',term_reason='AGENT',alt_dial='$VLalt',called_count='$called_count';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00215',$user,$server_ip,$session_name,$one_mysql_log);}
##### insert log into vicidial_log_extended for manual VICIDiaL call
$stmt="INSERT IGNORE INTO vicidial_log_extended SET uniqueid='$FAKEcall_id',server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID',custom_call_id='' ON DUPLICATE KEY UPDATE server_ip='$server_ip',call_date='$NOW_TIME',lead_id='$lead_id',caller_code='$MDnextCID';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00402',$user,$server_ip,$session_name,$one_mysql_log);}
$affected_rowsX = mysqli_affected_rows($link);
$MAN_vl_insert++;
}
$stmt = "SELECT status FROM vicidial_campaign_statuses where dnc='Y' and campaign_id='$campaign';";
$stmt="DELETE FROM vicidial_auto_calls where callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00196',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$dncvcs_ct = mysqli_num_rows($rslt);
$i=0;
while ($i < $dncvcs_ct)
{
$row=mysqli_fetch_row($rslt);
$DNC_string_check .= "$row[0]|";
$i++;
}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00219',$user,$server_ip,$session_name,$one_mysql_log);}
# echo "$DNC_string_check";
$stmt="UPDATE vicidial_live_agents set ring_callerid='' where ring_callerid='$MDnextCID';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00403',$user,$server_ip,$session_name,$one_mysql_log);}
}
$insert_into_dnc=0;
if ( ( ($use_internal_dnc=='Y') or ($use_internal_dnc=='AREACODE') ) and (preg_match("/\|$log_dispo_choice\|/i", $DNC_string_check) ) )
else
{
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$stmt="UPDATE vicidial_log set status='$log_dispo_choice' $term_reasonSQL where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00146',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
$stmt="INSERT IGNORE INTO vicidial_dnc (phone_number) values('$row[0]');";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00147',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$insert_into_dnc++;
$stmt="INSERT INTO vicidial_dnc_log SET phone_number='$row[0]', campaign_id='-SYSINT-', action='add', action_date=NOW(), user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00632',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
}
if ( ( ($use_campaign_dnc=='Y') or ($use_campaign_dnc=='AREACODE') ) and (preg_match("/\|$log_dispo_choice\|/i", $DNC_string_check) ) )
{
$stmt="SELECT use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00446',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
$use_other_campaign_dnc = $row[0];
$temp_campaign_id = $campaign;
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
}
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00148',$user,$server_ip,$session_name,$one_mysql_log);}
### find all DNC-type statuses in the system
if ( ($use_internal_dnc=='Y') or ($use_campaign_dnc=='Y') or ($use_internal_dnc=='AREACODE') or ($use_campaign_dnc=='AREACODE') )
{
$DNC_string_check = '|';
$stmt = "SELECT status FROM vicidial_statuses where dnc='Y';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00195',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$dncvs_ct = mysqli_num_rows($rslt);
$i=0;
while ($i < $dncvs_ct)
{
$row=mysqli_fetch_row($rslt);
$stmt="INSERT IGNORE INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$row[0]','$temp_campaign_id');";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00149',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$insert_into_dnc++;
$stmt="INSERT INTO vicidial_dnc_log SET phone_number='$row[0]', campaign_id='$temp_campaign_id', action='add', action_date=NOW(), user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00633',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$DNC_string_check .= "$row[0]|";
$i++;
}
$stmt = "SELECT status FROM vicidial_campaign_statuses where dnc='Y' and campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00196',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$dncvcs_ct = mysqli_num_rows($rslt);
$i=0;
while ($i < $dncvcs_ct)
{
$row=mysqli_fetch_row($rslt);
$DNC_string_check .= "$row[0]|";
$i++;
}
# echo "$DNC_string_check";
}
$insert_into_dnc=0;
if ( ( ($use_internal_dnc=='Y') or ($use_internal_dnc=='AREACODE') ) and (preg_match("/\|$log_dispo_choice\|/i", $DNC_string_check) ) )
{
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00146',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
$stmt="INSERT IGNORE INTO vicidial_dnc (phone_number) values('$row[0]');";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00147',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$insert_into_dnc++;
$stmt="INSERT INTO vicidial_dnc_log SET phone_number='$row[0]', campaign_id='-SYSINT-', action='add', action_date=NOW(), user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00632',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
}
if ( ( ($use_campaign_dnc=='Y') or ($use_campaign_dnc=='AREACODE') ) and (preg_match("/\|$log_dispo_choice\|/i", $DNC_string_check) ) )
{
$stmt="SELECT use_other_campaign_dnc from vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00446',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
$use_other_campaign_dnc = $row[0];
$temp_campaign_id = $campaign;
if (strlen($use_other_campaign_dnc) > 0) {$temp_campaign_id = $use_other_campaign_dnc;}
$stmt = "SELECT phone_number from vicidial_list where lead_id='$lead_id';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00148',$user,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
$stmt="INSERT IGNORE INTO vicidial_campaign_dnc (phone_number,campaign_id) values('$row[0]','$temp_campaign_id');";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00149',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$insert_into_dnc++;
$stmt="INSERT INTO vicidial_dnc_log SET phone_number='$row[0]', campaign_id='$temp_campaign_id', action='add', action_date=NOW(), user='$user';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00633',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
}
$dispo_sec=0;
@@ -12178,17 +12319,6 @@ if ($ACTION == 'updateDISPO')
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00272',$user,$server_ip,$session_name,$one_mysql_log);}
$user_group='';
$stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";}
$ug_record_ct = mysqli_num_rows($rslt);
if ($ug_record_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$user_group = trim("$row[0]");
}
$CALL_agent_log_id = $agent_log_id;
if ($auto_dial_level < 1)
+12 -7
View File
@@ -619,10 +619,11 @@
# 190901-0956 - Added cid_choice option to API transfer_conference function
# 190902-0914 - Fix for PHP 7.2
# 190925-1346 - Changes for more SIP Event Action features
# 191018-0904 - Added User Inbound Filtered features
#
$version = '2.14-588c';
$build = '190925-1346';
$version = '2.14-589c';
$build = '191018-0904';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=87;
$one_mysql_log=0;
@@ -1420,7 +1421,7 @@ else
if($auth>0)
{
##### grab the full name and other settings of the agent
$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled,agent_shift_enforcement_override,shift_override_flag,allow_alerts,closer_campaigns,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,agent_call_log_view_override,agent_choose_blended,agent_lead_search_override,preset_contact_search,max_inbound_calls,wrapup_seconds_override,email,user_choose_language,ready_max_logout,mute_recordings from vicidial_users where user='$VD_login' and active='Y' and api_only_user != '1';";
$stmt="SELECT full_name,user_level,hotkeys_active,agent_choose_ingroups,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,closer_default_blended,user_group,vicidial_recording_override,alter_custphone_override,alert_enabled,agent_shift_enforcement_override,shift_override_flag,allow_alerts,closer_campaigns,agent_choose_territories,custom_one,custom_two,custom_three,custom_four,custom_five,agent_call_log_view_override,agent_choose_blended,agent_lead_search_override,preset_contact_search,max_inbound_calls,wrapup_seconds_override,email,user_choose_language,ready_max_logout,mute_recordings,max_inbound_filter_enabled from vicidial_users where user='$VD_login' and active='Y' and api_only_user != '1';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01007',$VD_login,$server_ip,$session_name,$one_mysql_log);}
$row=mysqli_fetch_row($rslt);
@@ -1458,6 +1459,7 @@ else
$VU_user_choose_language = $row[31];
$VU_ready_max_logout = $row[32];
$VU_mute_recordings = $row[33];
$VU_max_inbound_filter_enabled = $row[34];
if ( ($VU_alert_enabled > 0) and ($VU_allow_alerts > 0) ) {$VU_alert_enabled = 'ON';}
else {$VU_alert_enabled = 'OFF';}
@@ -2449,7 +2451,7 @@ else
if ($VU_max_inbound_calls > 0)
{$max_inbound_calls = $VU_max_inbound_calls;}
$stmt = "SELECT sum(calls_today) FROM vicidial_inbound_group_agents where user='$VD_login' and group_type='C';";
$stmt = "SELECT sum(calls_today),sum(calls_today_filtered) FROM vicidial_inbound_group_agents where user='$VD_login' and group_type='C';";
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01080',$VD_login,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "\n<!-- $rowx[0]|$stmt -->";}
@@ -2458,6 +2460,8 @@ else
{
$row=mysqli_fetch_row($rslt);
$max_inbound_count = $row[0];
if ($VU_max_inbound_filter_enabled > 0)
{$max_inbound_count = $row[1];}
if ($max_inbound_count >= $max_inbound_calls)
{
@@ -3531,7 +3535,7 @@ else
echo "<!-- campaign is set to auto_dial_level: $auto_dial_level -->\n";
$closer_chooser_string='';
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set,on_hook_ring_time,on_hook_agent,last_inbound_call_time,last_inbound_call_finish,campaign_grade,pause_code) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today','$NOW_TIME','Y','N','$phone_ring_timeout','$on_hook_agent','$NOW_TIME','$NOW_TIME','$campaign_grade','LOGIN');";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,closer_campaigns,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set,on_hook_ring_time,on_hook_agent,last_inbound_call_time,last_inbound_call_finish,campaign_grade,pause_code,last_inbound_call_time_filtered,last_inbound_call_finish_filtered) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$closer_chooser_string','$user_level','$campaign_weight','$calls_today','$NOW_TIME','Y','N','$phone_ring_timeout','$on_hook_agent','$NOW_TIME','$NOW_TIME','$campaign_grade','LOGIN','$NOW_TIME','$NOW_TIME');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01044',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -3598,7 +3602,7 @@ else
{
print "<!-- campaign is set to manual dial: $auto_dial_level -->\n";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set,on_hook_ring_time,on_hook_agent,campaign_grade) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME','N','N','$phone_ring_timeout','$on_hook_agent','$campaign_grade');";
$stmt="INSERT INTO vicidial_live_agents (user,server_ip,conf_exten,extension,status,lead_id,campaign_id,uniqueid,callerid,channel,random_id,last_call_time,last_update_time,last_call_finish,user_level,campaign_weight,calls_today,last_state_change,outbound_autodial,manager_ingroup_set,on_hook_ring_time,on_hook_agent,campaign_grade,last_inbound_call_time_filtered,last_inbound_call_finish_filtered) values('$VD_login','$server_ip','$session_id','$SIP_user','PAUSED','','$VD_campaign','','','','$random','$NOW_TIME','$tsNOW_TIME','$NOW_TIME','$user_level', '$campaign_weight', '$calls_today','$NOW_TIME','N','N','$phone_ring_timeout','$on_hook_agent','$campaign_grade','$NOW_TIME','$NOW_TIME');";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01047',$VD_login,$server_ip,$session_name,$one_mysql_log);}
@@ -13804,6 +13808,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
CheckDEADcallON=0;
CheckDEADcallCOUNT=0;
dead_trigger_count=0;
var last_customer_sec = customer_sec;
customer_sec=0;
currently_in_email_or_chat=0;
customer_3way_hangup_counter=0;
@@ -13949,7 +13954,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
if (xmlhttp)
{
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method=" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&dispo_comments=" + encodeURIComponent(document.vicidial_form.dispo_comments.value) + "&cbcomment_comments=" + encodeURIComponent(document.vicidial_form.cbcomment_comments.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value + "&parked_hangup=" + parked_hangup + "&phone_login=" + phone_login + "&agent_email=" + LOGemail + "&conf_exten=" + session_id + "&camp_script=" + campaign_script + '' + "&in_script=" + CalL_ScripT_id + "&customer_server_ip=" + lastcustserverip + "&exten=" + extension + "&original_phone_login=" + original_phone_login + "&phone_pass=" + phone_pass + "&callback_gmt_offset=" + callback_gmt_offset + "&callback_timezone=" + callback_timezone;
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method=" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&dispo_comments=" + encodeURIComponent(document.vicidial_form.dispo_comments.value) + "&cbcomment_comments=" + encodeURIComponent(document.vicidial_form.cbcomment_comments.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value + "&parked_hangup=" + parked_hangup + "&phone_login=" + phone_login + "&agent_email=" + LOGemail + "&conf_exten=" + session_id + "&camp_script=" + campaign_script + '' + "&in_script=" + CalL_ScripT_id + "&customer_server_ip=" + lastcustserverip + "&exten=" + extension + "&original_phone_login=" + original_phone_login + "&phone_pass=" + phone_pass + "&callback_gmt_offset=" + callback_gmt_offset + "&callback_timezone=" + callback_timezone + "&customer_sec=" + last_customer_sec;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(DSupdate_query);
+161 -15
View File
File diff suppressed because one or more lines are too long
+8 -4
View File
@@ -1,4 +1,4 @@
# version: 20190724162601
# version: 20191020091901
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
@@ -40,6 +40,10 @@ users-alert_enabled Alert Enabled <QXZ>This field shows whether the agent has we
users-allow_alerts Allow Alerts <QXZ>This field gives you the ability to allow agent browser alerts to be enabled by the agent for when calls come into their agent screen session. Default is 0 for NO.</QXZ>
users-preset_contact_search Preset Contact Search <QXZ>If the user is logged into a campaign that has Transfer Presets set to CONTACTS, then this setting can disable contact searching for this user only. Default is NOT_ACTIVE which will use whatever the campaign setting is.</QXZ>
users-max_inbound_calls Max Inbound Calls <QXZ>If this setting is set to a number greater than 0, then it will be the maximum number of inbound calls that an agent can handle across all inbound groups in one day. If the agent reaches their maximum number of inbound calls, then they will not be able to select inbound groups to take calls from until the next day. This setting will override the Campaign setting of the same name. Default is 0 for disabled.</QXZ>
users-max_inbound_filter_enabled Max Inbound Calls Filtering Enabled <QXZ>If this option is enabled, then the Max Inbound Calls Filtering Options below will be used to determine if an inbound call will be counted as a part of a users inbound call count for the day.</QXZ>
users-max_inbound_filter_statuses Filter Statuses <QXZ>If Max Inbound Calls Filtering is enabled, the calls dispositioned with the statuses selected in this multi-select box will be excluded from the inbound call count for this user for the day, as well as the -filtered- Next Agent Call routing options.</QXZ>
users-max_inbound_filter_ingroups Filter In-Groups <QXZ>If Max Inbound Calls Filtering is enabled, the calls coming from the inbound groups selected in this multi-select box will be excluded from the inbound call count for this user for the day, as well as the -filtered- Next Agent Call routing options.</QXZ>
users-max_inbound_filter_min_sec Filter Minimum Seconds <QXZ>If Max Inbound Calls Filtering is enabled, the calls that have a customer talk time less than the number of seconds entered in this field will be excluded from the inbound call count for this user for the day, as well as the -filtered- Next Agent Call routing options.</QXZ>
users-max_hopper_calls Max Manual Dial Hopper Calls <QXZ>If this setting is set to a number greater than 0, then it will be the maximum number of outbound manual dial hopper calls that an agent can place across all campaigns in one day. A hopper call is a call that is placed by the agent clicking on the DIAL NEXT NUMBER button on their agent screen. If the agent reaches their maximum number of hopper calls and they click to place another DIAL NEXT NUMBER call, then their agent screen will say there are no more leads for them to dial. Default is 0 for disabled.</QXZ>
users-max_hopper_calls_hour Max Manual Dial Hopper Calls Per Hour <QXZ>If this setting is set to a number greater than 0, then it will be the maximum number of outbound manual dial hopper calls that an agent can place across all campaigns in one hour. A hopper call is a call that is placed by the agent clicking on the DIAL NEXT NUMBER button on their agent screen. If the agent reaches their maximum number of hopper calls for the current hour and they click to place another DIAL NEXT NUMBER call, then their agent screen will say there are no more leads for them to dial. The per hour hopper totals are reset at the top of every hour. Default is 0 for disabled.</QXZ>
users-wrapup_seconds_override Wrap Seconds Override <QXZ>If this setting is set to a number 0 or greater, then it will override the Campaign setting for Wrapup Seconds. This is a setting that is only refreshed in the agent interface at agent login time. Default is -1 for disabled.</QXZ>
@@ -436,7 +440,7 @@ inbound_groups-user_group Admin User Group <QXZ>This is the administrative user
inbound_groups-callback_queue_calls Callback Queue Calls <QXZ>This will only show up if there are LIVE inbound callback queue calls waiting to be called back by agents when their turn arrives.</QXZ>
inbound_groups-group_calldate In-Group Calldate <QXZ>This is the last date and time that a call was directed to this inbound group.</QXZ>
inbound_groups-web_form_address Web Form <QXZ>This is the custom address that clicking on the WEB FORM button in the agent screen will take you to for calls that come in on this group. If you want to use custom fields in a web form address, you need to add &CF_uses_custom_fields=Y as part of your URL.</QXZ>
inbound_groups-next_agent_call Next Agent Call <QXZ>This determines which agent receives the next call that is available:</QXZ><BR> &nbsp; - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> &nbsp; - <QXZ>oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall.</QXZ><BR> &nbsp; - <QXZ>oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls overall.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>ingroup_grade_random: gives a higher probability of getting a call to the higher graded agents by in-group.</QXZ><BR> &nbsp; - <QXZ>campaign_grade_random: gives a higher probability of getting a call to the higher graded agents by campaign.</QXZ><BR> &nbsp; - <QXZ>fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first.</QXZ><BR> &nbsp; - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call.</QXZ><BR> &nbsp; - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ><BR> &nbsp; - <QXZ>overall_user_level_wait_time: same as overall_user_level except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>campaign_rank_wait_time: same as campaign_rank except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_wait_time: same as fewest_calls except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign_wait_time: same as fewest_calls_campaign except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank_wait_time: same as inbound_group_rank except will use longest waiting as secondary order.</QXZ>
inbound_groups-next_agent_call Next Agent Call <QXZ>This determines which agent receives the next call that is available:</QXZ><BR> &nbsp; - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> &nbsp; - <QXZ>oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall.</QXZ><BR> &nbsp; - <QXZ>oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls overall.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_filtered_call_start: orders by the last time an agent was sent an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_filtered_call_finish: orders by the last time an agent finished an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> &nbsp; - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>ingroup_grade_random: gives a higher probability of getting a call to the higher graded agents by in-group.</QXZ><BR> &nbsp; - <QXZ>campaign_grade_random: gives a higher probability of getting a call to the higher graded agents by campaign.</QXZ><BR> &nbsp; - <QXZ>fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first.</QXZ><BR> &nbsp; - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call.</QXZ><BR> &nbsp; - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ><BR> &nbsp; - <QXZ>overall_user_level_wait_time: same as overall_user_level except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>campaign_rank_wait_time: same as campaign_rank except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_wait_time: same as fewest_calls except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign_wait_time: same as fewest_calls_campaign except will use longest waiting as secondary order.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank_wait_time: same as inbound_group_rank except will use longest waiting as secondary order.</QXZ>
inbound_groups-on_hook_ring_time On-Hook Ring Time <QXZ>This option is only used for agents that are logged in with phones that have the agent-on-hook feature enabled. This is the number of seconds that each call attempt to the agent will ring for until the system will wait one second and start ringing the available agent phones again. This field can be overridden if the agent phones are set to a lower ring time which may be necessary to prevent calls from being sent one phones voicemail. Default is 15.</QXZ>
inbound_groups-on_hook_cid On-Hook CID <QXZ>This option is only used for agents that are logged in with phones that have the agent-on-hook feature enabled. This is the caller ID that will show up on their agent phones when the calls are ringing. GENERIC is a generic RINGAGENT00000000001 type of notification. INGROUP will show only the in-group the call came from. CUSTOMER_PHONE will show only the customer phone number. CUSTOMER_PHONE_RINGAGENT will show RINGAGENT_3125551212 with the RINGAGENT as part of the CID with the customer phone number. CUSTOMER_PHONE_INGROUP will show the first 10 characters of the in-group followed by the customer phone number. Default is GENERIC. If you are using Asterisk 13 or higher, only the RINGAGENT options will work properly.</QXZ>
inbound_groups-on_hook_cid_number On-Hook CID Number <QXZ>This option allows you to set a CID Number to be sent out with the On-Hook CID. If you put a Y, YES or CUSTOMER in this field, then the customer CID number will be sent to the ringing agent phone. If you put a different phone number, that number will be sent. Default is blank for disabled.</QXZ>
@@ -1261,10 +1265,10 @@ custom_reports_admin-constants Preset constants <QXZ>Here is where a user can de
custom_reports_admin-current_constants Current constants <QXZ>Any report constant the user has entered to add to the report is displayed here. They are not editable, but they can be removed by clicking 'REMOVE' and then re-entered.</QXZ>
custom_reports_admin-preset_constants Preset constants <QXZ>This textarea field is where presets for the current custom reports are displayed and can be edited. The name/value pairs are displayed per-line and are fully editable. Users can also remove variables simply by deleting the line they are displayed on, or can enter new name/value pairs per line. Variables can also be separated by an ampersand as in the typical URL GET display - the dialer interface will make the necessary adjustments to display them properly in this textarea field.</QXZ>
inbound_groups-na_chat_url No Agent Chat URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a chat that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. dispo can be used to retrieve the system-defined disposition for the chat. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature.</QXZ>
inbound_groups-next_agent_chat Next Agent Chat <QXZ>This determines which agent receives the next chat that is available:</QXZ><BR> &nbsp; - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> &nbsp; - <QXZ>oldest_call_start: orders by the last time an agent was sent a call/chat. Results in agents receiving about the same number of calls/chats overall.</QXZ><BR> &nbsp; - <QXZ>oldest_call_finish: orders by the last time an agent finished a call/chat. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls/chats overall.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls/chats.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>ingroup_grade_random: gives a higher probability of getting a call/chat to the higher graded agents by in-group.</QXZ><BR> &nbsp; - <QXZ>campaign_grade_random: gives a higher probability of getting a call/chat to the higher graded agents by campaign.</QXZ><BR> &nbsp; - <QXZ>fewest_calls: orders by the number of calls/chats received by an agent for that specific inbound group. Least calls/chats first.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign: orders by the number of calls/chats received by an agent for the campaign. Least calls/chats first.</QXZ><BR> &nbsp; - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call/chat.</QXZ><BR> &nbsp; - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ>
inbound_groups-next_agent_chat Next Agent Chat <QXZ>This determines which agent receives the next chat that is available:</QXZ><BR> &nbsp; - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> &nbsp; - <QXZ>oldest_call_start: orders by the last time an agent was sent a call/chat. Results in agents receiving about the same number of calls/chats overall.</QXZ><BR> &nbsp; - <QXZ>oldest_call_finish: orders by the last time an agent finished a call/chat. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls/chats overall.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_filtered_call_start: orders by the last time an agent was sent an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_filtered_call_finish: orders by the last time an agent finished an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> &nbsp; - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls/chats.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>ingroup_grade_random: gives a higher probability of getting a call/chat to the higher graded agents by in-group.</QXZ><BR> &nbsp; - <QXZ>campaign_grade_random: gives a higher probability of getting a call/chat to the higher graded agents by campaign.</QXZ><BR> &nbsp; - <QXZ>fewest_calls: orders by the number of calls/chats received by an agent for that specific inbound group. Least calls/chats first.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign: orders by the number of calls/chats received by an agent for the campaign. Least calls/chats first.</QXZ><BR> &nbsp; - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call/chat.</QXZ><BR> &nbsp; - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ>
inbound_groups-group_emaildate In-Group Email Date <QXZ>This is the last date and time that an email was directed to this inbound group.</QXZ>
inbound_groups-group_chatdate In-Group Chat Date <QXZ>This is the last date and time that a chat was directed to this inbound group.</QXZ>
inbound_groups-next_agent_email Next Agent Email <QXZ>This determines which agent receives the next email that is available:</QXZ><BR> &nbsp; - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> &nbsp; - <QXZ>oldest_call_start: orders by the last time an agent was sent a call/email. Results in agents receiving about the same number of calls/emails overall.</QXZ><BR> &nbsp; - <QXZ>oldest_call_finish: orders by the last time an agent finished a call/email. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls/emails overall.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls/emails.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>ingroup_grade_random: gives a higher probability of getting a call/email to the higher graded agents by in-group.</QXZ><BR> &nbsp; - <QXZ>campaign_grade_random: gives a higher probability of getting a call/email to the higher graded agents by campaign.</QXZ><BR> &nbsp; - <QXZ>fewest_calls: orders by the number of calls/emails received by an agent for that specific inbound group. Least calls/emails first.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign: orders by the number of calls/emails received by an agent for the campaign. Least calls/emails first.</QXZ><BR> &nbsp; - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call/email.</QXZ><BR> &nbsp; - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ>
inbound_groups-next_agent_email Next Agent Email <QXZ>This determines which agent receives the next email that is available:</QXZ><BR> &nbsp; - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> &nbsp; - <QXZ>oldest_call_start: orders by the last time an agent was sent a call/email. Results in agents receiving about the same number of calls/emails overall.</QXZ><BR> &nbsp; - <QXZ>oldest_call_finish: orders by the last time an agent finished a call/email. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls/emails overall.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_filtered_call_start: orders by the last time an agent was sent an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> &nbsp; - <QXZ>oldest_inbound_filtered_call_finish: orders by the last time an agent finished an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> &nbsp; - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls/emails.</QXZ><BR> &nbsp; - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> &nbsp; - <QXZ>ingroup_grade_random: gives a higher probability of getting a call/email to the higher graded agents by in-group.</QXZ><BR> &nbsp; - <QXZ>campaign_grade_random: gives a higher probability of getting a call/email to the higher graded agents by campaign.</QXZ><BR> &nbsp; - <QXZ>fewest_calls: orders by the number of calls/emails received by an agent for that specific inbound group. Least calls/emails first.</QXZ><BR> &nbsp; - <QXZ>fewest_calls_campaign: orders by the number of calls/emails received by an agent for the campaign. Least calls/emails first.</QXZ><BR> &nbsp; - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call/email.</QXZ><BR> &nbsp; - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ>
inbound_groups-start_email_url Start Email URL <QXZ>This web URL address is not seen by the agent, but it is emailed every time a email is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. Default is blank.</QXZ>
inbound_groups-dispo_email_url Dispo Email URL <QXZ>This web URL address is not seen by the agent, but it is emailed every time a email is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo and talk_time are the variables you can use to retrieve the agent-defined disposition for the email and the actual talk time in seconds of the email. Default is blank</QXZ> <QXZ>If you put ALT into this field and submit this form, you will be able to go to a separate page where you can define multiple URLs for this action as well as specific statuses that will trigger them</QXZ> <QXZ>If you want the campaign Dispo email URL to be used for inbound emails, then put CAMP into this field.</QXZ>
inbound_groups-default_list_id Default List ID <QXZ>This is the List ID that leads may be searched through and that leads will be inserted into if necessary.</QXZ>