Added User Inbound Calls Credits feature

Added User Inbound Calls Today admin utilities page

git-svn-id: svn://192.168.202.10@3730 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2023-05-23 15:08:36 +00:00
parent 2127ebe12f
commit 5695cdb5f6
9 changed files with 589 additions and 49 deletions
+88 -15
View File
@@ -252,6 +252,7 @@
# 221116-1050 - Fix for long in-group dialstring extensions # 221116-1050 - Fix for long in-group dialstring extensions
# 230204-0015 - Fix for vicidial_log_extended entries for multiple in-group calls in succession # 230204-0015 - Fix for vicidial_log_extended entries for multiple in-group calls in succession
# 230309-0950 - Added abandon_check_queue feature # 230309-0950 - Added abandon_check_queue feature
# 230523-0824 - Added User inbound_credits feature
# #
$script = 'agi-VDAD_ALL_inbound.agi'; $script = 'agi-VDAD_ALL_inbound.agi';
@@ -263,7 +264,7 @@ $wait_prompt_runs=0;
$at='@'; $at='@';
$S='*'; $S='*';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=256; $mysql_log_count=272;
$one_mysql_log=0; $one_mysql_log=0;
$dial_ingroup_flag=0; $dial_ingroup_flag=0;
$called_count=1; $called_count=1;
@@ -411,7 +412,7 @@ $sthA->finish();
############################################# #############################################
##### START SYSTEM SETTINGS LOOKUP ##### ##### START SYSTEM SETTINGS LOOKUP #####
$stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url,enable_did_entry_list_id,enable_drop_lists,inbound_answer_config,agent_search_method,abandon_check_queue FROM system_settings;"; $stmtA = "SELECT enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_log_id,queuemetrics_eq_prepend,queuemetrics_pe_phone_append,did_agent_log,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,did_ra_extensions_enabled,queuemetrics_socket,queuemetrics_socket_url,enable_did_entry_list_id,enable_drop_lists,inbound_answer_config,agent_search_method,abandon_check_queue,inbound_credits FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
@@ -441,6 +442,7 @@ if ($sthArows > 0)
$inbound_answer_config = $aryA[19]; $inbound_answer_config = $aryA[19];
$SSagent_search_method = $aryA[20]; $SSagent_search_method = $aryA[20];
$SSabandon_check_queue = $aryA[21]; $SSabandon_check_queue = $aryA[21];
$SSinbound_credits = $aryA[22];
} }
$sthA->finish(); $sthA->finish();
##### END SYSTEM SETTINGS LOOKUP ##### ##### END SYSTEM SETTINGS LOOKUP #####
@@ -646,7 +648,7 @@ if ($call_handle_method =~ /^CLOSER/)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02257'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0) if ($sthArows > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -667,7 +669,7 @@ if ($call_handle_method =~ /^CLOSER/)
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02258'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0) if ($sthArows > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -1916,7 +1918,7 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
$stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',prev_caller_code='$prev_callerid',group_id='$channel_group';"; $stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',prev_caller_code='$prev_callerid',group_id='$channel_group';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02259'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- AH VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;} if ($AGILOG) {$agi_string = "-- AH VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
} }
@@ -2007,7 +2009,7 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02260'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0) if ($sthArows > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -2488,7 +2490,7 @@ if ($VLEcount < 1)
$stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$callerid',prev_caller_code='$prev_callerid',group_id='$channel_group';"; $stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$callerid',prev_caller_code='$prev_callerid',group_id='$channel_group';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02261'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- ENTER QUEUE VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;} if ($AGILOG) {$agi_string = "-- ENTER QUEUE VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
} }
@@ -2720,7 +2722,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsTRIG=$sthA->rows; $sthArowsTRIG=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArowsTRIG; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02262'; $MEL_aff_rows=$sthArowsTRIG; &mysql_error_logging;
if ($sthArowsTRIG > 0) if ($sthArowsTRIG > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -2907,7 +2909,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$AGENTDIRECT_higher_count=$sthA->rows; $AGENTDIRECT_higher_count=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$AGENTDIRECT_higher_count; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02263'; $MEL_aff_rows=$AGENTDIRECT_higher_count; &mysql_error_logging;
$ad_ct=0; $ad_ct=0;
while ($AGENTDIRECT_higher_count > $ad_ct) while ($AGENTDIRECT_higher_count > $ad_ct)
{ {
@@ -3898,7 +3900,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
### gather user details for max calls and filtered settings ### gather user details for max calls and filtered settings
$max_inbound_calls=0; $max_inbound_calls=0;
$stmtA = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$VDADuser';"; $VU_inbound_credits=-1;
$stmtA = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups,inbound_credits FROM vicidial_users where user='$VDADuser';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsMIC=$sthA->rows; $sthArowsMIC=$sthA->rows;
@@ -3909,6 +3912,15 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$VU_max_inbound_calls = $aryA[0]; $VU_max_inbound_calls = $aryA[0];
$VU_max_inbound_filter_enabled = $aryA[1]; $VU_max_inbound_filter_enabled = $aryA[1];
$VU_max_inbound_filter_ingroups = $aryA[2]; $VU_max_inbound_filter_ingroups = $aryA[2];
$VU_inbound_credits = $aryA[3];
if ( ($VU_inbound_credits >= 1) && ($SSinbound_credits > 0) )
{
$VU_inbound_credits = ($VU_inbound_credits - 1);
$stmtA = "UPDATE vicidial_users SET inbound_credits='$VU_inbound_credits' WHERE user='$VDADuser';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02264'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VU inbound calls credits: |$VU_inbound_credits|$SSinbound_credits|$VDADuser|"; &agi_output;}
}
} }
### update calls_today for vicidial_live_inbound_agents ### ### update calls_today for vicidial_live_inbound_agents ###
@@ -3966,6 +3978,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$max_inbound_calls_outcome = $aryA[1]; $max_inbound_calls_outcome = $aryA[1];
} }
### Check for inbound max calls daily limit
$max_inbound_triggered=0;
if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) ) if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) )
{ {
$max_inbound_calls = $CP_max_inbound_calls; $max_inbound_calls = $CP_max_inbound_calls;
@@ -3990,6 +4004,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
} }
if ($max_inbound_count >= $max_inbound_calls) if ($max_inbound_count >= $max_inbound_calls)
{ {
$max_inbound_triggered++;
$outbound_autodial='0'; $outbound_autodial='0';
$stmtA = "SELECT outbound_autodial,closer_campaigns FROM vicidial_live_agents where user='$VDADuser';"; $stmtA = "SELECT outbound_autodial,closer_campaigns FROM vicidial_live_agents where user='$VDADuser';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -4043,6 +4058,64 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ($AGILOG) {$agi_string = "-- MAX INBOUND AGENT CALLS TRIGGER: |$max_inbound_count|$max_inbound_calls|$VDADuser|$callerid|$max_inbound_calls_outcome|$closer_campaigns|$ADcloser_campaignsARYct|"; &agi_output;} if ($AGILOG) {$agi_string = "-- MAX INBOUND AGENT CALLS TRIGGER: |$max_inbound_count|$max_inbound_calls|$VDADuser|$callerid|$max_inbound_calls_outcome|$closer_campaigns|$ADcloser_campaignsARYct|"; &agi_output;}
} }
} }
if ($max_inbound_triggered < 1)
{
### Check for inbound calls credits available, if feature enabled
if ( ($VU_inbound_credits < 1) && ($VU_inbound_credits >= 0) && ($SSinbound_credits > 0) )
{
$outbound_autodial='0';
$stmtA = "SELECT outbound_autodial,closer_campaigns FROM vicidial_live_agents where user='$VDADuser';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVLA=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02265'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArowsVLA > 0)
{
@aryA = $sthA->fetchrow_array;
if ($aryA[0] =~ /Y/)
{$outbound_autodial = '1';}
$closer_campaigns = $aryA[1];
}
$stmtA = "UPDATE vicidial_live_agents set external_ingroups=' -',external_blended='$outbound_autodial',external_igb_set_user='VDIC',manager_ingroup_set='SET' where user='$VDADuser'";
$stmtB = "DELETE FROM vicidial_live_inbound_agents where user='$VDADuser';";
if ($max_inbound_calls_outcome =~ /ALLOW_AGENTDIRECT/)
{
$closer_campaigns =~ s/^ | -$//gi;
@ADcloser_campaignsARY = split(/ /,$closer_campaigns);
$ADcloser_campaignsARYct = scalar(@ADcloser_campaignsARY);
$ADc=0;
$ADcloser_campaigns='';
while ($ADc < $ADcloser_campaignsARYct)
{
if ($ADcloser_campaignsARY[$ADc] =~ /AGENTDIRECT/i)
{$ADcloser_campaigns .= "$ADcloser_campaignsARY[$ADc] ";}
$ADc++;
}
if (length($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='$VDADuser'";
$stmtB = "DELETE FROM vicidial_live_inbound_agents where user='$VDADuser' and group_id NOT LIKE\"%AGENTDIRECT%\";";
}
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02266'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$affected_rows = $dbhA->do($stmtB);
$dbhP=$dbhA; $mysql_count='02267'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
$SQL_log = "$stmtA|$stmtB";
$SQL_log =~ s/'|%//gi;
$stmtC = "INSERT INTO vicidial_admin_log set event_date=NOW(), user='$VDADuser', ip_address='$VARserver_ip', event_section='USERS', event_type='MODIFY', record_id='$VDADuser', event_code='INBOUND CREDITS MODIFY USER', event_sql='$SQL_log', event_notes='|$VU_inbound_credits|$VDADuser|$callerid|IC|$max_inbound_calls_outcome|$closer_campaigns|$ADcloser_campaignsARYct|';";
$affected_rows = $dbhA->do($stmtC);
$dbhP=$dbhA; $mysql_count='02204'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- INBOUND CALLS CREDITS TRIGGER: |$VU_inbound_credits|$VDADuser|$callerid|$max_inbound_calls_outcome|$closer_campaigns|$ADcloser_campaignsARYct|"; &agi_output;}
}
}
##### END check for user max inbound calls ##### ##### END check for user max inbound calls #####
@@ -4942,7 +5015,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
$stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',prev_caller_code='$prev_callerid',group_id='$channel_group';"; $stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',prev_caller_code='$prev_callerid',group_id='$channel_group';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02268'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- ACFLTR VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;} if ($AGILOG) {$agi_string = "-- ACFLTR VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
} }
@@ -6897,7 +6970,7 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02269'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0) if ($sthArows > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -7891,7 +7964,7 @@ sub populate_lead_owner_process
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02270'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0) if ($sthArows > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -7903,7 +7976,7 @@ sub populate_lead_owner_process
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$DIDs_in_system=$sthA->rows; $DIDs_in_system=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02271'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($DIDs_in_system > 0) if ($DIDs_in_system > 0)
{ {
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
@@ -8899,7 +8972,7 @@ sub no_agent_no_queue_process
$stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',prev_caller_code='$prev_callerid',group_id='$channel_group';"; $stmtA = "INSERT INTO vicidial_inbound_caller_codes set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',prev_caller_code='$prev_callerid',group_id='$channel_group';";
$affected_rows = $dbhA->do($stmtA); $affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging; $dbhP=$dbhA; $mysql_count='02272'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- NANQUE VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;} if ($AGILOG) {$agi_string = "-- NANQUE VICC insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
} }
+27 -3
View File
@@ -11,7 +11,7 @@
# agents that should appear to be logged in so that the calls can be transferred # agents that should appear to be logged in so that the calls can be transferred
# out to them properly. # out to them properly.
# #
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2 # Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# #
# CHANGELOG: # CHANGELOG:
# 50215-0954 - First version of script # 50215-0954 - First version of script
@@ -54,6 +54,7 @@
# 170527-2348 - Fix for rare inbound logging issue #1017 # 170527-2348 - Fix for rare inbound logging issue #1017
# 190716-1628 - Added code for Call Quotas # 190716-1628 - Added code for Call Quotas
# 191017-1909 - Added code for filtered maximum inbound calls # 191017-1909 - Added code for filtered maximum inbound calls
# 230523-0825 - Added User inbound_credits feature
# #
### begin parsing run-time options ### ### begin parsing run-time options ###
@@ -180,7 +181,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
############################################# #############################################
##### Gather system_settings ##### ##### Gather system_settings #####
$stmtA = "SELECT sip_event_logging,call_quota_lead_ranking FROM system_settings;"; $stmtA = "SELECT sip_event_logging,call_quota_lead_ranking,inbound_credits FROM system_settings;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows; $sthArows=$sthA->rows;
@@ -189,6 +190,7 @@ if ($sthArows > 0)
@aryA = $sthA->fetchrow_array; @aryA = $sthA->fetchrow_array;
$SSsip_event_logging = $aryA[0]; $SSsip_event_logging = $aryA[0];
$SScall_quota_lead_ranking = $aryA[1]; $SScall_quota_lead_ranking = $aryA[1];
$SSinbound_credits = $aryA[2];
} }
$sthA->finish(); $sthA->finish();
########################################### ###########################################
@@ -378,7 +380,7 @@ while($one_day_interval > 0)
{ {
### Gather user details for max inbound calls ### Gather user details for max inbound calls
$max_inbound_calls=0; $max_inbound_calls=0;
$stmtJ = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$QHuser[$w]';"; $stmtJ = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups,inbound_credits FROM vicidial_users where user='$QHuser[$w]';";
$sthA = $dbhA->prepare($stmtJ) or die "preparing: ",$dbhA->errstr; $sthA = $dbhA->prepare($stmtJ) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtJ ", $dbhA->errstr; $sthA->execute or die "executing: $stmtJ ", $dbhA->errstr;
$sthArowsMIC=$sthA->rows; $sthArowsMIC=$sthA->rows;
@@ -388,6 +390,7 @@ while($one_day_interval > 0)
$VU_max_inbound_calls = $aryA[0]; $VU_max_inbound_calls = $aryA[0];
$VU_max_inbound_filter_enabled = $aryA[1]; $VU_max_inbound_filter_enabled = $aryA[1];
$VU_max_inbound_filter_ingroups = $aryA[2]; $VU_max_inbound_filter_ingroups = $aryA[2];
$VU_inbound_credits = $aryA[3];
} }
$channel_group = $QHcampaign_id[$w]; $channel_group = $QHcampaign_id[$w];
$calls_today_filteredSQL = ",calls_today_filtered=(calls_today_filtered + 1),last_call_time_filtered='$SQLdate'"; $calls_today_filteredSQL = ",calls_today_filtered=(calls_today_filtered + 1),last_call_time_filtered='$SQLdate'";
@@ -434,6 +437,7 @@ while($one_day_interval > 0)
$CP_max_inbound_calls = $aryA[0]; $CP_max_inbound_calls = $aryA[0];
} }
$max_inbound_triggered=0;
if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) ) if ( ($VU_max_inbound_calls > 0) || ($CP_max_inbound_calls > 0) )
{ {
$max_inbound_calls = $CP_max_inbound_calls; $max_inbound_calls = $CP_max_inbound_calls;
@@ -455,6 +459,7 @@ while($one_day_interval > 0)
} }
if ($max_inbound_count >= $max_inbound_calls) if ($max_inbound_count >= $max_inbound_calls)
{ {
$max_inbound_triggered++;
$stmtJ = "UPDATE vicidial_live_agents set closer_campaigns='' where user='$QHuser[$w]';"; $stmtJ = "UPDATE vicidial_live_agents set closer_campaigns='' where user='$QHuser[$w]';";
$affected_rows = $dbhA->do($stmtJ); $affected_rows = $dbhA->do($stmtJ);
@@ -471,7 +476,26 @@ while($one_day_interval > 0)
} }
} }
##### END check for user max inbound calls ##### ##### END check for user max inbound calls #####
if ($max_inbound_triggered < 1)
{
if ( ($VU_inbound_credits >= 0) && ($VU_inbound_credits < 1) && ($SSinbound_credits > 0) )
{
$max_inbound_triggered++;
$stmtJ = "UPDATE vicidial_live_agents set closer_campaigns='' where user='$QHuser[$w]';";
$affected_rows = $dbhA->do($stmtJ);
$stmtJ = "DELETE FROM vicidial_live_inbound_agents where user='$QHuser[$w]';";
$affected_rows = $dbhA->do($stmtJ);
$stmtJ = "UPDATE vicidial_remote_agents set closer_campaigns='' where user_start='$QHuser[$w]';";
$affected_rows = $dbhA->do($stmtJ);
$stmtJ = "INSERT INTO vicidial_admin_log set event_date=NOW(), user='$QHuser[$w]', ip_address='$VARserver_ip', event_section='USERS', event_type='MODIFY', record_id='$QHuser[$w]', event_code='INBOUND CREDITS REMOTE AGENT', event_sql='DELETE FROM vicidial_live_inbound_agents where user=$QHuser[$w]', event_notes='|$VU_inbound_credits|$QHuser[$w]|$QHcall_id[$w]|RA|';";
$affected_rows = $dbhA->do($stmtJ);
$event_string = "-- INBOUND CALLS CREDITS TRIGGER: |$VU_inbound_credits|$QHuser[$w]|$QHcall_id[$w]|"; &event_logger;
}
}
$stmtG = "SELECT start_call_url,'DISABLED' FROM vicidial_inbound_groups where group_id='$QHcampaign_id[$w]';"; $stmtG = "SELECT start_call_url,'DISABLED' FROM vicidial_inbound_groups where group_id='$QHcampaign_id[$w]';";
} }
@@ -703,7 +703,8 @@ failed_login_attempts_today MEDIUMINT(8) UNSIGNED default '0',
failed_login_count_today SMALLINT(6) UNSIGNED default '0', failed_login_count_today SMALLINT(6) UNSIGNED default '0',
failed_last_ip_today VARCHAR(50) default '', failed_last_ip_today VARCHAR(50) default '',
failed_last_type_today VARCHAR(20) default '', failed_last_type_today VARCHAR(20) default '',
modify_dial_prefix ENUM('0','1','2','3','4','5','6') default '0' modify_dial_prefix ENUM('0','1','2','3','4','5','6') default '0',
inbound_credits MEDIUMINT(7) default '-1'
) ENGINE=MyISAM; ) ENGINE=MyISAM;
CREATE UNIQUE INDEX user ON vicidial_users (user); CREATE UNIQUE INDEX user ON vicidial_users (user);
@@ -1999,7 +2000,8 @@ login_kickall ENUM('0','1','2','3','4','5','6','7') default '0',
abandon_check_queue ENUM('0','1','2','3','4','5','6','7') default '0', abandon_check_queue ENUM('0','1','2','3','4','5','6','7') default '0',
agent_notifications ENUM('0','1','2','3','4','5','6','7') default '0', agent_notifications ENUM('0','1','2','3','4','5','6','7') default '0',
demographic_quotas ENUM('0','1','2','3','4','5','6','7') default '0', demographic_quotas ENUM('0','1','2','3','4','5','6','7') default '0',
log_latency_gaps ENUM('0','1','2','3','4','5','6','7') default '1' log_latency_gaps ENUM('0','1','2','3','4','5','6','7') default '1',
inbound_credits ENUM('0','1','2','3','4','5','6','7') default '0'
) ENGINE=MyISAM; ) ENGINE=MyISAM;
CREATE TABLE vicidial_campaigns_list_mix ( CREATE TABLE vicidial_campaigns_list_mix (
@@ -5414,4 +5416,4 @@ INSERT INTO `wallboard_reports` VALUES ('AGENTS_AND_QUEUES','Agents and Queues',
UPDATE system_settings set vdc_agent_api_active='1'; UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1685',db_schema_update_date=NOW(),reload_timestamp=NOW(); UPDATE system_settings SET db_schema_version='1686',db_schema_update_date=NOW(),reload_timestamp=NOW();
+6
View File
@@ -2356,3 +2356,9 @@ ALTER TABLE vicidial_users ADD modify_dial_prefix ENUM('0','1','2','3','4','5','
UPDATE vicidial_users, system_settings SET modify_dial_prefix='1' where campaign_detail='1' and user_level >= 8 and active='Y' and db_schema_version < 1685; UPDATE vicidial_users, system_settings SET modify_dial_prefix='1' where campaign_detail='1' and user_level >= 8 and active='Y' and db_schema_version < 1685;
UPDATE system_settings SET db_schema_version='1685',db_schema_update_date=NOW() where db_schema_version < 1685; UPDATE system_settings SET db_schema_version='1685',db_schema_update_date=NOW() where db_schema_version < 1685;
ALTER TABLE system_settings ADD inbound_credits ENUM('0','1','2','3','4','5','6','7') default '0';
ALTER TABLE vicidial_users ADD inbound_credits MEDIUMINT(7) default '-1';
UPDATE system_settings SET db_schema_version='1686',db_schema_update_date=NOW() where db_schema_version < 1686;
+21 -8
View File
@@ -535,10 +535,11 @@
# 230418-1354 - Added vicidial_user_dial_log logging # 230418-1354 - Added vicidial_user_dial_log logging
# 230513-2043 - Fix for manual dial errors # 230513-2043 - Fix for manual dial errors
# 230518-1033 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use # 230518-1033 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use
# 230523-0827 - Added User inbound_credits feature
# #
$version = '2.14-428'; $version = '2.14-429';
$build = '230518-1033'; $build = '230523-0827';
$php_script = 'vdc_db_query.php'; $php_script = 'vdc_db_query.php';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=913; $mysql_log_count=913;
@@ -1054,7 +1055,7 @@ $sip_hangup_cause_dictionary = array(
############################################# #############################################
##### START SYSTEM_SETTINGS LOOKUP ##### ##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code,user_new_lead_limit,sip_event_logging,call_quota_lead_ranking,daily_call_count_limit,call_limit_24hour,allow_web_debug,abandon_check_queue FROM system_settings;"; $stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code,user_new_lead_limit,sip_event_logging,call_quota_lead_ranking,daily_call_count_limit,call_limit_24hour,allow_web_debug,abandon_check_queue,inbound_credits FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);}
#if ($DB) {echo "$stmt\n";} #if ($DB) {echo "$stmt\n";}
@@ -1087,6 +1088,7 @@ if ($qm_conf_ct > 0)
$SScall_limit_24hour = $row[22]; $SScall_limit_24hour = $row[22];
$SSallow_web_debug = $row[23]; $SSallow_web_debug = $row[23];
$SSabandon_check_queue = $row[24]; $SSabandon_check_queue = $row[24];
$SSinbound_credits = $row[25];
} }
if ($SSallow_web_debug < 1) {$DB=0; $format='text';} if ($SSallow_web_debug < 1) {$DB=0; $format='text';}
##### END SETTINGS LOOKUP ##### ##### END SETTINGS LOOKUP #####
@@ -1646,7 +1648,7 @@ if ($ACTION == 'regCLOSER')
else else
{ {
$orig_closer_choice = $closer_choice; $orig_closer_choice = $closer_choice;
$stmt = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups FROM vicidial_users where user='$user';"; $stmt = "SELECT max_inbound_calls,max_inbound_filter_enabled,max_inbound_filter_ingroups,inbound_credits FROM vicidial_users where user='$user';";
$rslt=mysql_to_mysqli($stmt, $link); $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 ($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 -->";} if ($format=='debug') {echo "\n<!-- $rowx[0]|$stmt -->";}
@@ -1657,6 +1659,7 @@ if ($ACTION == 'regCLOSER')
$VU_max_inbound_calls = $row[0]; $VU_max_inbound_calls = $row[0];
$VU_max_inbound_filter_enabled = $row[1]; $VU_max_inbound_filter_enabled = $row[1];
$VU_max_inbound_filter_ingroups = $row[2]; $VU_max_inbound_filter_ingroups = $row[2];
$VU_inbound_credits = $row[3];
} }
$stmt = "SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$campaign';"; $stmt = "SELECT max_inbound_calls,max_inbound_calls_outcome FROM vicidial_campaigns where campaign_id='$campaign';";
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
@@ -1670,6 +1673,7 @@ if ($ACTION == 'regCLOSER')
$max_inbound_calls_outcome = $row[1]; $max_inbound_calls_outcome = $row[1];
} }
$max_inbound_triggered=0;
if ( ($VU_max_inbound_calls > 0) or ($CP_max_inbound_calls > 0) ) if ( ($VU_max_inbound_calls > 0) or ($CP_max_inbound_calls > 0) )
{ {
$max_inbound_calls = $CP_max_inbound_calls; $max_inbound_calls = $CP_max_inbound_calls;
@@ -1689,9 +1693,17 @@ if ($ACTION == 'regCLOSER')
{$max_inbound_count = $row[1];} {$max_inbound_count = $row[1];}
if ($max_inbound_count >= $max_inbound_calls) if ($max_inbound_count >= $max_inbound_calls)
{$closer_choice = "MAXLOCK-";} {
$max_inbound_triggered++;
$closer_choice = "MAXLOCK-";
} }
} }
}
if ($max_inbound_triggered < 1)
{
if ( ($VU_inbound_credits >= 0) and ($VU_inbound_credits < 1) and ($SSinbound_credits > 0) )
{$closer_choice = "CDTLOCK-";}
}
if ($closer_blended > 0) if ($closer_blended > 0)
{$vla_autodial = 'Y';} {$vla_autodial = 'Y';}
@@ -1701,10 +1713,10 @@ if ($ACTION == 'regCLOSER')
{$vla_autodial = 'N';} {$vla_autodial = 'N';}
$standard_closer_update=1; $standard_closer_update=1;
if ( ($closer_choice == "MGRLOCK-") or ($closer_choice == "MAXLOCK-") ) if ( ($closer_choice == "MGRLOCK-") or ($closer_choice == "MAXLOCK-") or ($closer_choice == "CDTLOCK-") )
{ {
$standard_closer_update=0; $standard_closer_update=0;
if ($closer_choice == "MAXLOCK-") if ( ($closer_choice == "MAXLOCK-") or ($closer_choice == "CDTLOCK-") )
{ {
if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome)) if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome))
{ {
@@ -13458,7 +13470,7 @@ if ($ACTION == 'updateDISPO')
} }
$user_group=''; $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;"; $stmt="SELECT user_group,max_inbound_filter_enabled,max_inbound_filter_ingroups,max_inbound_filter_statuses,max_inbound_filter_min_sec,max_inbound_calls,inbound_credits FROM vicidial_users where user='$user' LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link); $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 ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);}
if ($DB) {echo "$stmt\n";} if ($DB) {echo "$stmt\n";}
@@ -13472,6 +13484,7 @@ if ($ACTION == 'updateDISPO')
$max_inbound_filter_statuses = $row[3]; $max_inbound_filter_statuses = $row[3];
$max_inbound_filter_min_sec = $row[4]; $max_inbound_filter_min_sec = $row[4];
$VU_max_inbound_calls = $row[5]; $VU_max_inbound_calls = $row[5];
$VU_inbound_credits = $row[6];
} }
$stmt = "SELECT dispo_call_url,queuemetrics_callstatus_override,comments_dispo_screen,comments_callback_screen,vc.campaign_id,vc.custom_one,vc.custom_two,vc.custom_three,vc.custom_four,vc.custom_five from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';"; $stmt = "SELECT dispo_call_url,queuemetrics_callstatus_override,comments_dispo_screen,comments_callback_screen,vc.campaign_id,vc.custom_one,vc.custom_two,vc.custom_three,vc.custom_four,vc.custom_five from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';";
+32 -9
View File
@@ -721,13 +721,14 @@
# 230424-1754 - Changed phone login to readonly when password is forced to change # 230424-1754 - Changed phone login to readonly when password is forced to change
# 230513-2010 - Fix for manual dial call error handling # 230513-2010 - Fix for manual dial call error handling
# 230518-0912 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use, chat fixes # 230518-0912 - Added in-group and campaign custom fields 1-5, for script/webform/dispo-call-url use, chat fixes
# 230523-0826 - Added User inbound_credits feature
# #
$version = '2.14-688c'; $version = '2.14-689c';
$build = '230518-0912'; $build = '230523-0826';
$php_script = 'vicidial.php'; $php_script = 'vicidial.php';
$mel=1; # Mysql Error Log enabled = 1 $mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=102; $mysql_log_count=103;
$one_mysql_log=0; $one_mysql_log=0;
$DB=0; $DB=0;
@@ -824,7 +825,7 @@ $random = (rand(1000000, 9999999) + 10000000);
############################################# #############################################
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP ##### ##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code,agent_screen_colors,manual_auto_next,agent_xfer_park_3way,admin_web_directory,agent_script,agent_push_events,agent_push_url,agent_logout_link,agentonly_callback_campaign_lock,manual_dial_validation,mute_recordings,enable_second_script,enable_first_webform,recording_buttons,outbound_cid_any,browser_call_alerts,manual_dial_phone_strip,require_password_length,pass_hash_enabled,agent_hidden_sound_seconds,agent_hidden_sound,agent_hidden_sound_volume,agent_screen_timer,agent_hide_hangup,allow_web_debug,max_logged_in_agents,login_kickall,agent_notifications FROM system_settings;"; $stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code,agent_screen_colors,manual_auto_next,agent_xfer_park_3way,admin_web_directory,agent_script,agent_push_events,agent_push_url,agent_logout_link,agentonly_callback_campaign_lock,manual_dial_validation,mute_recordings,enable_second_script,enable_first_webform,recording_buttons,outbound_cid_any,browser_call_alerts,manual_dial_phone_strip,require_password_length,pass_hash_enabled,agent_hidden_sound_seconds,agent_hidden_sound,agent_hidden_sound_volume,agent_screen_timer,agent_hide_hangup,allow_web_debug,max_logged_in_agents,login_kickall,agent_notifications,inbound_credits FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
#if ($DB) {echo "$stmt\n";} #if ($DB) {echo "$stmt\n";}
@@ -887,6 +888,7 @@ if ($qm_conf_ct > 0)
$SSmax_logged_in_agents = $row[52]; $SSmax_logged_in_agents = $row[52];
$SSlogin_kickall = $row[53]; $SSlogin_kickall = $row[53];
$SSagent_notifications = $row[54]; $SSagent_notifications = $row[54];
$SSinbound_credits = $row[55];
if ( ($SSagent_hidden_sound == '---NONE---') or ($SSagent_hidden_sound == '') ) {$SSagent_hidden_sound_seconds=0;} if ( ($SSagent_hidden_sound == '---NONE---') or ($SSagent_hidden_sound == '') ) {$SSagent_hidden_sound_seconds=0;}
} }
else else
@@ -1919,7 +1921,7 @@ else
} }
##### grab the full name and other settings of the agent ##### 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,max_inbound_filter_enabled,status_group_id,manual_dial_filter 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,status_group_id,manual_dial_filter,inbound_credits from vicidial_users where user='$VD_login' and active='Y' and api_only_user != '1';";
$rslt=mysql_to_mysqli($stmt, $link); $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);} 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); $row=mysqli_fetch_row($rslt);
@@ -1960,6 +1962,7 @@ else
$VU_max_inbound_filter_enabled = $row[34]; $VU_max_inbound_filter_enabled = $row[34];
$VU_status_group_id = $row[35]; $VU_status_group_id = $row[35];
$VU_manual_dial_filter = $row[36]; $VU_manual_dial_filter = $row[36];
$VU_inbound_credits = $row[37];
if ( ($VU_alert_enabled > 0) and ($VU_allow_alerts > 0) ) {$VU_alert_enabled = 'ON';} if ( ($VU_alert_enabled > 0) and ($VU_allow_alerts > 0) ) {$VU_alert_enabled = 'ON';}
else {$VU_alert_enabled = 'OFF';} else {$VU_alert_enabled = 'OFF';}
@@ -3238,10 +3241,30 @@ else
if ($max_inbound_count >= $max_inbound_calls) if ($max_inbound_count >= $max_inbound_calls)
{ {
if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome)) if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome))
{$closer_campaigns = $ADcloser_campaigns;} {
else $closer_campaigns = $ADcloser_campaigns;
{$closer_campaigns = "''";} echo "<!-- Max Inbound Calls trigger(AD allowed): |$max_inbound_count|$max_inbound_calls|$max_inbound_calls_outcome| -->\n";
} }
else
{
$closer_campaigns = "''";
echo "<!-- Max Inbound Calls trigger: |$max_inbound_count|$max_inbound_calls| -->\n";
}
}
}
}
### validate that the agent has inbound_credits available, if that feature is enabled
if ( ($VU_inbound_credits >= 0) and ($VU_inbound_credits < 1) && ($SSinbound_credits > 0) )
{
if (preg_match("/ALLOW_AGENTDIRECT/",$max_inbound_calls_outcome))
{
$closer_campaigns = $ADcloser_campaigns;
echo "<!-- Inbound Calls Credits zero trigger(AD allowed): |$VU_inbound_credits|$SSinbound_credits|$max_inbound_calls_outcome| -->\n";
}
else
{
$closer_campaigns = "''";
echo "<!-- Inbound Calls Credits zero trigger: |$VU_inbound_credits|$SSinbound_credits| -->\n";
} }
} }
@@ -4418,7 +4441,7 @@ else
$stmt="INSERT IGNORE INTO vicidial_live_agents_details set latency='0',web_ip='$ip',update_date=NOW(),user='$VD_login';"; $stmt="INSERT IGNORE INTO vicidial_live_agents_details set latency='0',web_ip='$ip',update_date=NOW(),user='$VD_login';";
if ($format=='debug') {echo "\n<!-- $stmt -->";} if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link); $rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03XXX',$user,$server_ip,$session_name,$one_mysql_log);} if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03103',$user,$server_ip,$session_name,$one_mysql_log);}
if ($enable_queuemetrics_logging > 0) if ($enable_queuemetrics_logging > 0)
{ {
File diff suppressed because one or more lines are too long
@@ -0,0 +1,376 @@
<?php
# admin_user_inbound.php
#
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# this screen will control the optional user list new limit override settings
#
#
# changes:
# 230523-0942 - First Build
#
$admin_version = '2.14-1';
$build = '230523-0942';
require("dbconnect_mysqli.php");
require("functions.php");
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
$PHP_SELF=$_SERVER['PHP_SELF'];
$PHP_SELF = preg_replace('/\.php.*/i','.php',$PHP_SELF);
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
if (isset($_GET["action"])) {$action=$_GET["action"];}
elseif (isset($_POST["action"])) {$action=$_POST["action"];}
if (isset($_GET["stage"])) {$stage=$_GET["stage"];}
elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];}
if (isset($_GET["user"])) {$user=$_GET["user"];}
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
if (isset($_GET["user_override"])) {$user_override=$_GET["user_override"];}
elseif (isset($_POST["user_override"])) {$user_override=$_POST["user_override"];}
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
if (strlen($action) < 2)
{$action = 'BLANK';}
if (strlen($DB) < 1)
{$DB=0;}
$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
$stmt = "SELECT use_non_latin,webroot_writable,enable_languages,language_method,qc_features_active,user_territories_active,user_new_lead_limit,allow_web_debug,inbound_credits FROM system_settings;";
$rslt=mysql_to_mysqli($stmt, $link);
#if ($DB) {echo "$stmt\n";}
$ss_conf_ct = mysqli_num_rows($rslt);
if ($ss_conf_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$non_latin = $row[0];
$webroot_writable = $row[1];
$SSenable_languages = $row[2];
$SSlanguage_method = $row[3];
$SSqc_features_active = $row[4];
$SSuser_territories_active = $row[5];
$SSuser_new_lead_limit = $row[6];
$SSallow_web_debug = $row[7];
$SSinbound_credits = $row[8];
}
if ($SSallow_web_debug < 1) {$DB=0;}
##### END SETTINGS LOOKUP #####
###########################################
$user_override = preg_replace('/[^-0-9]/','',$user_override);
$action = preg_replace('/[^-_0-9a-zA-Z]/','',$action);
$stage = preg_replace('/[^-_0-9a-zA-Z]/','',$stage);
$SUBMIT = preg_replace('/[^-_0-9a-zA-Z]/','',$SUBMIT);
if ($non_latin < 1)
{
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/','',$PHP_AUTH_PW);
$user = preg_replace('/[^-_0-9a-zA-Z]/','',$user);
} # end of non_latin
else
{
$PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER);
$PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW);
$user = preg_replace('/[^-_0-9\p{L}]/u', '', $user);
}
$STARTtime = date("U");
$TODAY = date("Y-m-d");
$NOW_TIME = date("Y-m-d H:i:s");
$date = date("r");
$ip = getenv("REMOTE_ADDR");
$browser = getenv("HTTP_USER_AGENT");
#$user = $PHP_AUTH_USER;
$US='_';
# $NWB = " &nbsp; <a href=\"javascript:openNewWindow('help.php?ADD=99999";
# $NWE = "')\"><IMG SRC=\"help.png\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
$stmt="SELECT selected_language,qc_enabled from vicidial_users where user='$PHP_AUTH_USER';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$sl_ct = mysqli_num_rows($rslt);
if ($sl_ct > 0)
{
$row=mysqli_fetch_row($rslt);
$VUselected_language = $row[0];
$qc_auth = $row[1];
}
$auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1,0);
if ( ($auth_message == 'GOOD') or ($auth_message == '2FA') )
{
$auth=1;
if ($auth_message == '2FA')
{
header ("Content-type: text/html; charset=utf-8");
echo _QXZ("Your session is expired").". <a href=\"admin.php\">"._QXZ("Click here to log in")."</a>.\n";
exit;
}
}
if ($auth < 1)
{
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
if ($auth_message == 'LOCK')
{
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
if ($auth_message == 'IPBLOCK')
{
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
exit;
}
$stmt="SELECT full_name,modify_lists,user_level,modify_users,user_group from vicidial_users where user='$PHP_AUTH_USER';";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$LOGfullname = $row[0];
$LOGmodify_lists = $row[1];
$LOGuser_level = $row[2];
$LOGmodify_users = $row[3];
$LOGuser_group = $row[4];
if ( ($LOGuser_level < 8) or ($LOGmodify_users < 1) )
{
Header ("Content-type: text/html; charset=utf-8");
echo _QXZ("You do not have permissions to modify users").": $LOGmodify_users|$LOGuser_level\n";
exit;
}
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$LOGallowed_campaigns = $row[0];
$LOGallowed_reports = $row[1];
$LOGadmin_viewable_groups = $row[2];
$LOGadmin_viewable_call_times = $row[3];
$LOGallowed_campaignsSQL='';
$whereLOGallowed_campaignsSQL='';
if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) )
{
$rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns);
$rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL);
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
$whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')";
}
$regexLOGallowed_campaigns = " $LOGallowed_campaigns ";
$LOGadmin_viewable_groupsSQL='';
$vuLOGadmin_viewable_groupsSQL='';
$whereLOGadmin_viewable_groupsSQL='';
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
{
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
$vuLOGadmin_viewable_groupsSQL = "and vicidial_users.user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
}
if (strlen($user) < 1)
{
echo _QXZ("ERROR: user not defined:");
exit;
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="vicidial_stylesheet.php">
<script language="JavaScript" src="help.js"></script>
<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title><?php echo _QXZ("ADMINISTRATION: User Inbound Calls Today"); ?>
</title></head><body bgcolor=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
<?php
##### BEGIN Set variables to make header show properly #####
$short_header=1;
require("admin_header.php");
if ($DB > 0)
{
echo "$DB,$action,$user,$user_override,$active\n<BR>";
}
################################################################################
##### BEGIN USER LIST NEW control form
if (strlen($user) < 1)
{
echo _QXZ("ERROR: no user defined",0,'')."\n";
exit;
}
$bgcolor='bgcolor="#'. $SSstd_row2_background .'"';
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
echo "<center><TABLE width=$section_width cellspacing=3>\n";
echo "<tr><td align=center colspan=2>\n";
$FORM_list_id='';
$FORM_user='';
if ($user == '---ALL---')
{
$userSQL = "user!=''";
echo "<br><b>"._QXZ("User Inbound Calls Today ALL USERS",0,'')."</b> &nbsp; $NWB#user_inbound_calls_today$NWE\n";
}
else
{
$userSQL = "user='$user'";
}
echo "<form action=$PHP_SELF method=POST>\n";
echo "<input type=hidden name=DB value=\"$DB\">\n";
echo "<input type=hidden name=action value=USER_INBOUND_MODIFY>\n";
echo "<input type=hidden name=user value=\"$user\">\n";
$Ruser = array();
$Rfull_name = array();
$Ruser_group = array();
$Rinbound_credits = array();
$Rmax_inbound_calls = array();
$Rmax_inbound_filter_enabled = array();
### Gather all users to be displayed
$stmt="SELECT user,full_name,user_group,inbound_credits,max_inbound_calls,max_inbound_filter_enabled from vicidial_users where $userSQL $LOGadmin_viewable_groupsSQL order by user limit 10000;";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$users_to_print = mysqli_num_rows($rslt);
$i=0;
while ($users_to_print > $i)
{
$rowx=mysqli_fetch_row($rslt);
$Ruser[$i] = $rowx[0];
$Rfull_name[$i] = $rowx[1];
$Ruser_group[$i] = $rowx[2];
$Rinbound_credits[$i] = $rowx[3];
$Rmax_inbound_calls[$i] = $rowx[4];
$Rmax_inbound_filter_enabled[$i] = $rowx[5];
$i++;
}
### Go through each user and gather inbound call stats
$notes_ct=0;
$rows_output='';
$i=0;
while ($users_to_print > $i)
{
$user_notes='';
$ti = ($i + 1);
$stmt="SELECT sum(calls_today),sum(calls_today_filtered) from vicidial_inbound_group_agents where user='$Ruser[$i]';";
$rslt=mysql_to_mysqli($stmt, $link);
$ranks_to_print = mysqli_num_rows($rslt);
if ($ranks_to_print > 0)
{
$row=mysqli_fetch_row($rslt);
$calls_today = $row[0];
$calls_today_filtered = $row[1];
}
else
{$calls_today=0; $calls_today_filtered=0;}
$max_limit_trigger=0;
if ( ($Rmax_inbound_filter_enabled[$i] > 0) and ($calls_today_filtered >= $Rmax_inbound_calls[$i]) and ($Rmax_inbound_calls[$i] > 0) )
{
$max_limit_trigger++;
if (strlen($user_notes) > 0) {$user_notes .= "<BR>";}
$user_notes .= "MAX INBOUND FILTERED HIT";
}
if ( ($max_limit_trigger < 1) and ($calls_today >= $Rmax_inbound_calls[$i]) and ($Rmax_inbound_calls[$i] > 0) )
{
$max_limit_trigger++;
if (strlen($user_notes) > 0) {$user_notes .= "<BR>";}
$user_notes .= "MAX INBOUND HIT";
}
if ( ($Rinbound_credits[$i] == 0) and ($SSinbound_credits > 0) )
{
$max_limit_trigger++;
if (strlen($user_notes) > 0) {$user_notes .= "<BR>";}
$user_notes .= "ZERO INBOUND CREDITS";
}
if ($max_limit_trigger > 0) {$notes_ct++;}
if (strlen($user_notes) > 0) {$user_notes = "<font color=red><b>$user_notes</b></font>";}
if ($Rmax_inbound_calls[$i] == 0) {$Rmax_inbound_calls[$i] = "<font size=1>("._QXZ("disabled").")</font>";}
if ($Rinbound_credits[$i] == -1) {$Rinbound_credits[$i] = "<font size=1>("._QXZ("disabled").")</font>";}
$bgcolor = "bgcolor='#$SSstd_row3_background'";
if (preg_match("/1$|3$|5$|7$|9$/",$i)) {$bgcolor = "bgcolor='#$SSstd_row4_background'";}
$rows_output .= "<tr $bgcolor>";
$rows_output .= "<td><font size=1>$ti</font></td>";
$rows_output .= "<td><font size=2><a href=\"admin.php?ADD=3&user=$Ruser[$i]\">$Ruser[$i]</a> - $Rfull_name[$i]</font></td>";
$rows_output .= "<td><font size=2>$Ruser_group[$i]</td>";
$rows_output .= "<td align=right>$calls_today</td>";
$rows_output .= "<td align=right>$calls_today_filtered</td>";
$rows_output .= "<td align=right>$Rmax_inbound_calls[$i]</td>";
$rows_output .= "<td align=right>$Rinbound_credits[$i]</td>";
$rows_output .= "<td><font size=2>$user_notes</td>";
$rows_output .= "</tr>\n";
$i++;
}
$credits_message='';
if ($SSinbound_credits < 1) {$credits_message = "<font size=1>("._QXZ("disabled").")</font>";}
echo "<TABLE width=1080 cellspacing=3>\n";
echo "<tr><td>#</td><td><font size=2><b>"._QXZ("USER")."</td><td><font size=2><b>"._QXZ("USER GROUP")."</td><td NOWRAP COLSPAN=2><font size=2><b>"._QXZ("INBOUND CALLS TODAY - filtered")."</td><td><font size=2><b>"._QXZ("MAX INBOUND CALLS")."</td><td><font size=2><b>"._QXZ("INBOUND CREDITS")." $credits_message</td><td><font size=2><b>"._QXZ("NOTES")." ($notes_ct)</td></tr>\n";
echo "$rows_output";
#echo "<tr bgcolor=white>";
#echo "<td colspan=7 align=center><input type=submit name=SUBMIT value='"._QXZ("SUBMIT")."'></td>";
#echo "</tr>\n";
echo "</table></center><br>\n";
echo "</form>\n";
echo "</td></tr>\n";
echo "<TABLE width=700 cellspacing=3>\n";
echo "<tr $bgcolor>";
echo "</tr>\n";
echo "</table></center><br>\n";
echo "</TABLE>\n";
echo "</center>\n";
echo "</TD></TR></TABLE>\n";
### END USER LIST NEW control form
$ENDtime = date("U");
$RUNtime = ($ENDtime - $STARTtime);
echo "\n\n\n<br><br><br>\n<font size=1> "._QXZ("runtime").": $RUNtime "._QXZ("seconds")." &nbsp; &nbsp; &nbsp; &nbsp; "._QXZ("Version").": $admin_version &nbsp; &nbsp; "._QXZ("Build").": $build</font>";
?>
</body>
</html>
@@ -1,4 +1,4 @@
# version: 20230522084101 # version: 20230522215501
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ> users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. 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-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. 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 or the agent screen. Default is N.</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 or the agent screen. Default is N.</QXZ>
@@ -49,6 +49,7 @@ users-max_inbound_filter_enabled Max Inbound Calls Filtering Enabled <QXZ>If thi
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_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_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_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-inbound_credits Inbound Calls Credits <QXZ>If set to 0 or greater, this feature will limit the number of inbound calls an agent can take to this number, and this number will be reduced by 1 with every inbound call that the agent receives. This feature is not reset per-day like the similar Max Inbound Calls feature, Inbound Calls Credits can only be reset by a manager. As long as this number is greater than 0, the agent will be able to receive inbound phone calls. If this feature is active and the user gets to 0 Inbound Calls Credits, their ability to take inbound calls will be disabled until this setting is set to a value other than 0 for them and then the agent has to log out and back in again. The campaign Max Inbound Calls Outcome setting will be in effect if it is enabled, if this feature is triggered. Default is -1 for disabled.</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 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-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> 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>
@@ -424,7 +425,7 @@ campaigns-blind_monitor_message Blind Monitor Notice <QXZ>This is the message th
campaigns-blind_monitor_filename Blind Monitor Filename <QXZ>This is the audio file that will play in the agents session at the start of someone blind monitoring them. This prompt will be played for everyone in the session including the customer if any is present. Default is empty.</QXZ> campaigns-blind_monitor_filename Blind Monitor Filename <QXZ>This is the audio file that will play in the agents session at the start of someone blind monitoring them. This prompt will be played for everyone in the session including the customer if any is present. Default is empty.</QXZ>
campaigns-custom_fields Custom Campaign Fields <QXZ>These five custom Campaign fields allow you to define variables that can be used in agent scripts, webforms and Dispo Call URL variables for calls handled through this Campaign on a per-campaign basis. These variables can be called with --A--camp_custom_one--B-- for the Custom 1 field. Default is blank.</QXZ> campaigns-custom_fields Custom Campaign Fields <QXZ>These five custom Campaign fields allow you to define variables that can be used in agent scripts, webforms and Dispo Call URL variables for calls handled through this Campaign on a per-campaign basis. These variables can be called with --A--camp_custom_one--B-- for the Custom 1 field. Default is blank.</QXZ>
campaigns-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 can be overridden by the User setting of the same name. Default is 0 for disabled.</QXZ> campaigns-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 can be overridden by the User setting of the same name. Default is 0 for disabled.</QXZ>
campaigns-max_inbound_calls_outcome Max Inbound Calls Outcome <QXZ>If the Max Inbound Calls setting above is enabled, this will be the outcome of what happens to the agent when the maximum number of inbound calls is reached. DEFAULT will halt all inbound call handling to the agent, and if the agent is in an INBOUND_MAN campaign, it will only allow them to manual dial, with no pausing ability. ALLOW_AGENTDIRECT will allow the agent to continue to receive AGENTDIRECT in-group calls after they have reached the max inbound calls count. ALLOW_MI_PAUSE will allow an agent in an INBOUND_MAN campaign to continue to pause after they have reached the max inbound calls count. Default is DEFAULT.</QXZ> campaigns-max_inbound_calls_outcome Max Inbound Calls Outcome <QXZ>If the Max Inbound Calls setting above is enabled, this will be the outcome of what happens to the agent when the maximum number of inbound calls is reached. DEFAULT will halt all inbound call handling to the agent, and if the agent is in an INBOUND_MAN campaign, it will only allow them to manual dial, with no pausing ability. ALLOW_AGENTDIRECT will allow the agent to continue to receive AGENTDIRECT in-group calls after they have reached the max inbound calls count. ALLOW_MI_PAUSE will allow an agent in an INBOUND_MAN campaign to continue to pause after they have reached the max inbound calls count. Default is DEFAULT. NOTE: this setting will also be in effect if the User Inbound Calls Credits feature is triggered.</QXZ>
campaigns-show_confetti Show Confetti <QXZ>Enable this option to add a bit of visual flair to the agent interface by having the screen rain confetti whenever the agent sets a call disposition that has been flagged with a sale or callback category. Options are SALES for sale calls only, CALLBACKS for callbacks only, and SALES_AND_CALLBACKS for both categories. By default the confetti will rain for 2 seconds after the call is dispositioned, but the duration of the confetti falling, the amount of confetti, and speed at which the confetti falls can be configured via an optional settings container, CONFETTI_SETTINGS. Default is DISABLED.</QXZ> campaigns-show_confetti Show Confetti <QXZ>Enable this option to add a bit of visual flair to the agent interface by having the screen rain confetti whenever the agent sets a call disposition that has been flagged with a sale or callback category. Options are SALES for sale calls only, CALLBACKS for callbacks only, and SALES_AND_CALLBACKS for both categories. By default the confetti will rain for 2 seconds after the call is dispositioned, but the duration of the confetti falling, the amount of confetti, and speed at which the confetti falls can be configured via an optional settings container, CONFETTI_SETTINGS. Default is DISABLED.</QXZ>
lists-list_id List ID <QXZ>This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. Must be a number greater than 99.</QXZ> lists-list_id List ID <QXZ>This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. Must be a number greater than 99.</QXZ>
lists-list_name List Name <QXZ>This is the description of the list, it must be between 2 and 20 characters in length.</QXZ> lists-list_name List Name <QXZ>This is the description of the list, it must be between 2 and 20 characters in length.</QXZ>
@@ -1142,6 +1143,7 @@ settings-callcard_enabled Enable CallCard <QXZ>This setting enables the CallCard
settings-test_campaign_calls Enable Campaign Test Calls <QXZ>This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled.</QXZ> settings-test_campaign_calls Enable Campaign Test Calls <QXZ>This setting enables the ability to enter a phone code and phone number into fields at the bottom of the Campaign Detail screen and place a phone call to that number as if it were a lead being auto-dialed in the system. The phone number will be stored as a new lead in the manual dial list ID list. The campaign must be active for this feature to be enabled, and it is recommended that the lists assigned to the campaign all be set to inactive. The dial prefix, dial timeout and all other dialing related features, except for DNC and call time options, will affect the dialing of the test number. The phone call will be placed on the server selected as the voicemail server in the system settings. Default is 0 for disabled.</QXZ>
settings-did_system_filter DID System Filter <QXZ>This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled.</QXZ> settings-did_system_filter DID System Filter <QXZ>This setting enables the special did_system_filter DID entry. The filter settings in this DID entry will be applied to all incoming calls to the system, prior to any other actions on the call. This feature is commonly used for system-wide inbound blacklists, or filtering of do-not-contact phone numbers. Default is 0 for disabled.</QXZ>
settings-inbound_answer_config Inbound Answer Configuration <QXZ>If enabled, this allows you to override the default behavior with inbound calls automatically being answered when they are routed. After this is enabled, you will see options to define if an Answer signal is sent at the individual DID, In-Group or Call Menu level. Default is 0 for disabled.</QXZ> settings-inbound_answer_config Inbound Answer Configuration <QXZ>If enabled, this allows you to override the default behavior with inbound calls automatically being answered when they are routed. After this is enabled, you will see options to define if an Answer signal is sent at the individual DID, In-Group or Call Menu level. Default is 0 for disabled.</QXZ>
settings-inbound_credits Inbound Calls Credits <QXZ>If this setting is enabled, it will allow you to set a number of Inbound Calls Credits in the User Modify screen for each user. Default is 0 for disabled.</QXZ>
settings-abandon_check_queue Enable Abandon Check Queue <QXZ>If enabled, this allows you to use the Abandon Check Queue to call back customers that called in to your system but did not talk to an agent. See the details for this feature at the bottom of the INBOUND_CALLBACK_QUEUE.txt document. Default is 0 for disabled.</QXZ> settings-abandon_check_queue Enable Abandon Check Queue <QXZ>If enabled, this allows you to use the Abandon Check Queue to call back customers that called in to your system but did not talk to an agent. See the details for this feature at the bottom of the INBOUND_CALLBACK_QUEUE.txt document. Default is 0 for disabled.</QXZ>
settings-enable_international_dncs Enable Interational DNCs <QXZ>If enabled, this allows you to create DNC lists for individual countries and provides the option to scrub against these lists when loading lead files.</QXZ> settings-enable_international_dncs Enable Interational DNCs <QXZ>If enabled, this allows you to create DNC lists for individual countries and provides the option to scrub against these lists when loading lead files.</QXZ>
settings-user_new_lead_limit New Leads Per List Limit <QXZ>This setting enables the new lead limits per list to be set on the list modify page and the user list new lead limit page. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled. Default is 0 for disabled.</QXZ> settings-user_new_lead_limit New Leads Per List Limit <QXZ>This setting enables the new lead limits per list to be set on the list modify page and the user list new lead limit page. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled. Default is 0 for disabled.</QXZ>
@@ -1421,6 +1423,7 @@ cb-export-cb-dates Scheduled callback dates <QXZ>The date the leads are schedule
alt_multi_urls Alternate Multi URLs <QXZ>This page allows you to define Alternate URLs with conditions in place of the simple URL option for Dispo, Start, Add Lead or No Agent URLs. The RANK field will define the order in which the URLs are requested, this is important because if you have a URL that may take a few seconds to run ranked as 1, that will mean that any URLs ranked after it will have to wait to be run until that first URL request receives a response. The ACTIVE field will determine whether the specific URL is run. The STATUSES field only works for the Dispo URLs and will determine which disposition statuses will trigger the URL being run, if you want to run the entry for all statuses just fill in ---ALL--- in this field, if you want only a few statuses, separate them by spaces. If populated, the LISTS field will limit the calls that the URL is run from to only the list IDs listed in this field. To have it run for all lists, leave the field blank, if you want only a few lists, separate them by spaces. The MIN LENGTH field will limit the calls that the URL is run for to only calls that are this minimum length in seconds and higher, default is 0. The min length option does not work for No Agent Call URLs. The URL field works the same as it would in the URL option in campaigns, in-groups and lists, and it is also limited to 2000 characters in length. If you want to delete a URL, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that URL entry.</QXZ> alt_multi_urls Alternate Multi URLs <QXZ>This page allows you to define Alternate URLs with conditions in place of the simple URL option for Dispo, Start, Add Lead or No Agent URLs. The RANK field will define the order in which the URLs are requested, this is important because if you have a URL that may take a few seconds to run ranked as 1, that will mean that any URLs ranked after it will have to wait to be run until that first URL request receives a response. The ACTIVE field will determine whether the specific URL is run. The STATUSES field only works for the Dispo URLs and will determine which disposition statuses will trigger the URL being run, if you want to run the entry for all statuses just fill in ---ALL--- in this field, if you want only a few statuses, separate them by spaces. If populated, the LISTS field will limit the calls that the URL is run from to only the list IDs listed in this field. To have it run for all lists, leave the field blank, if you want only a few lists, separate them by spaces. The MIN LENGTH field will limit the calls that the URL is run for to only calls that are this minimum length in seconds and higher, default is 0. The min length option does not work for No Agent Call URLs. The URL field works the same as it would in the URL option in campaigns, in-groups and lists, and it is also limited to 2000 characters in length. If you want to delete a URL, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that URL entry.</QXZ>
amm_multi AM Message Wildcards <QXZ>This page allows you to define Am Message Wildcards that will check lead data from the defined lead fields for matches in the defined order specified on this page. For example, if you add a wildcard with the word -vacation- tied to the vendor_lead_code field, and the lead being played a message has -vacation- in that field, then it will hear the message defined in that AM Message Wildcard record. If you want to delete a wildcard, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that wildcard entry</QXZ> amm_multi AM Message Wildcards <QXZ>This page allows you to define Am Message Wildcards that will check lead data from the defined lead fields for matches in the defined order specified on this page. For example, if you add a wildcard with the word -vacation- tied to the vendor_lead_code field, and the lead being played a message has -vacation- in that field, then it will hear the message defined in that AM Message Wildcard record. If you want to delete a wildcard, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that wildcard entry</QXZ>
user_list_new_limits User List New Lead Limits <QXZ>If the system setting for New Leads Per List Limit is enabled, then this page allows for the setting of per-user per-list new lead limit overrides to those List limits. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled.</QXZ> user_list_new_limits User List New Lead Limits <QXZ>If the system setting for New Leads Per List Limit is enabled, then this page allows for the setting of per-user per-list new lead limit overrides to those List limits. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled.</QXZ>
user_inbound_calls_today User Inbound Calls Today <QXZ>This page will show you the User Inbound Calls Today, the Max Limits and the Call Credits for all users in the system. If one of the limits is reached, you will see notes showing you which one was reached.</QXZ>
custom_reports_admin-report_name Report Name <QXZ>The report name that the report will be referred to as in the system for purposes of user group access and slave server use in the system settings. The report name may not be the same as any other custom report, nor may it be the same name as one of the standard system reports.</QXZ> custom_reports_admin-report_name Report Name <QXZ>The report name that the report will be referred to as in the system for purposes of user group access and slave server use in the system settings. The report name may not be the same as any other custom report, nor may it be the same name as one of the standard system reports.</QXZ>
custom_reports_admin-domain Domain <QXZ>The domain that the report is located at. This will be combined with the path name to make a complete URL to use as a link from the reports page. You may leave this blank when the report is located on the same server as the web admin and just use the path name field to make a local URL.</QXZ> custom_reports_admin-domain Domain <QXZ>The domain that the report is located at. This will be combined with the path name to make a complete URL to use as a link from the reports page. You may leave this blank when the report is located on the same server as the web admin and just use the path name field to make a local URL.</QXZ>
custom_reports_admin-path_name Path name <QXZ>The path on the domain where the report is located. When the domain is blank it is assumed that the report is housed on the local web server.</QXZ> custom_reports_admin-path_name Path name <QXZ>The path on the domain where the report is located. When the domain is blank it is assumed that the report is housed on the local web server.</QXZ>