Added In-Group option to ask callers if they would take a survey after agent has handled their call. Overrides agent HANGUP CUSTOMER button to send call to survey instead. Includes sample 'survey_' audio
Added HTML option to User Group Hourly Detail report Small fix for XFER LINE HUNG UP detection git-svn-id: svn://192.168.202.10@2804 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -182,6 +182,10 @@ OTHER CHANGES:
|
|||||||
42. Added AST_agent_wait_check.pl script to send out emails if there are agents
|
42. Added AST_agent_wait_check.pl script to send out emails if there are agents
|
||||||
waiting more than X seconds.
|
waiting more than X seconds.
|
||||||
|
|
||||||
|
43. Added In-Group option to ask callers if they would take a survey after
|
||||||
|
agent has handled their call. Overrides agent HANGUP CUSTOMER button
|
||||||
|
to send call to survey instead.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,7 @@
|
|||||||
# 170412-2223 - Fix for drop call logging
|
# 170412-2223 - Fix for drop call logging
|
||||||
# 170527-2240 - Fix for rare inbound logging issue #1017
|
# 170527-2240 - Fix for rare inbound logging issue #1017
|
||||||
# 170621-2031 - Added missing list_id in log inserts
|
# 170621-2031 - Added missing list_id in log inserts
|
||||||
|
# 170816-2245 - Added ask survey options
|
||||||
#
|
#
|
||||||
|
|
||||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||||
@@ -223,7 +224,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=220;
|
$mysql_log_count=222;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
$dial_ingroup_flag=0;
|
$dial_ingroup_flag=0;
|
||||||
$called_count=1;
|
$called_count=1;
|
||||||
@@ -739,7 +740,7 @@ $affected_rows = $dbhA->do($stmtA);
|
|||||||
|
|
||||||
### Grab inbound groups values from the database
|
### Grab inbound groups values from the database
|
||||||
$cbc=0;
|
$cbc=0;
|
||||||
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action,populate_lead_ingroup,na_call_url,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,routing_initiated_recordings,on_hook_cid_number,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action,populate_lead_ingroup,na_call_url,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,routing_initiated_recordings,on_hook_cid_number,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
||||||
$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;
|
||||||
@@ -845,6 +846,9 @@ if ($sthArows > 0)
|
|||||||
$areacode_filter_action = $aryA[88];
|
$areacode_filter_action = $aryA[88];
|
||||||
$areacode_filter_action_value = $aryA[89];
|
$areacode_filter_action_value = $aryA[89];
|
||||||
$populate_state_areacode = $aryA[90];
|
$populate_state_areacode = $aryA[90];
|
||||||
|
$inbound_survey = $aryA[91];
|
||||||
|
$inbound_survey_filename = $aryA[92];
|
||||||
|
$inbound_survey_accept_digit = $aryA[93];
|
||||||
|
|
||||||
$custom_call_id='';
|
$custom_call_id='';
|
||||||
if ($uniqueid_status_display =~ /ENABLED/)
|
if ($uniqueid_status_display =~ /ENABLED/)
|
||||||
@@ -1999,7 +2003,7 @@ if ( ( ($no_agent_no_queue =~ /Y|NO_PAUSED/) || ($MCnanque_override > 0) ) && ($
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### PLAY WELCOME MESSAGE #####
|
##### BEGIN PLAY WELCOME MESSAGE #####
|
||||||
if ( ( ( ($welcome_message_filename !~ /---NONE---/) && (length($welcome_message_filename) > 0) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) ) && ($MCdrop_override < 1) ) && ($dial_ingroup_flag < 1) )
|
if ( ( ( ($welcome_message_filename !~ /---NONE---/) && (length($welcome_message_filename) > 0) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) ) && ($MCdrop_override < 1) ) && ($dial_ingroup_flag < 1) )
|
||||||
{
|
{
|
||||||
if ($welcome_message_filename =~ /\|/)
|
if ($welcome_message_filename =~ /\|/)
|
||||||
@@ -2022,6 +2026,97 @@ if ($play_welcome_message =~ /IF_WAIT_ONLY/)
|
|||||||
{$if_wait_play_welcome=1;}
|
{$if_wait_play_welcome=1;}
|
||||||
else
|
else
|
||||||
{$if_wait_play_welcome=0;}
|
{$if_wait_play_welcome=0;}
|
||||||
|
##### END PLAY WELCOME MESSAGE #####
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### BEGIN ASK ABOUT A POST-CALL SURVEY #####
|
||||||
|
if ( ($inbound_survey =~ /ENABLED/) && (length($inbound_survey_filename) > 0) && (length($inbound_survey_accept_digit) > 0) )
|
||||||
|
{
|
||||||
|
$digits_to_collect=1;
|
||||||
|
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('silence');
|
||||||
|
|
||||||
|
$digit='';
|
||||||
|
undef $digit;
|
||||||
|
$interrupt_digit='';
|
||||||
|
undef $interrupt_digit;
|
||||||
|
$digit_loop_counter=0;
|
||||||
|
|
||||||
|
$interrupt_digit = $AGI->stream_file('sip-silence',"$inbound_survey_accept_digit");
|
||||||
|
|
||||||
|
$interrupt_digit='';
|
||||||
|
undef $interrupt_digit;
|
||||||
|
|
||||||
|
$interrupt_digit = $AGI->stream_file("$inbound_survey_filename","$inbound_survey_accept_digit");
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit| |$inbound_survey_filename|"; &agi_output;}
|
||||||
|
|
||||||
|
$digits_being_entered=1;
|
||||||
|
$totalDTMF='';
|
||||||
|
if ($interrupt_digit > 1)
|
||||||
|
{
|
||||||
|
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||||
|
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||||
|
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||||
|
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||||
|
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||||
|
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||||
|
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||||
|
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||||
|
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||||
|
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||||
|
|
||||||
|
$totalDTMF=$interrupt_digit;
|
||||||
|
$digit_loop_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while ( ($digit_loop_counter < $digits_to_collect) )
|
||||||
|
{
|
||||||
|
$digit = chr($AGI->wait_for_digit('5000')); # wait 5 seconds for input or until the key is pressed
|
||||||
|
if ($digit =~ /\d/)
|
||||||
|
{
|
||||||
|
$totalDTMF = "$totalDTMF$digit";
|
||||||
|
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
|
||||||
|
# $AGI->say_digits("$digit");
|
||||||
|
undef $digit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$digit_loop_counter=$digits_to_collect;
|
||||||
|
}
|
||||||
|
|
||||||
|
$digit_loop_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$totalDTMF =~ s/\D//gi;
|
||||||
|
$VISLaffected_rows=0;
|
||||||
|
if (length($totalDTMF) > 0)
|
||||||
|
{
|
||||||
|
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
|
||||||
|
if ($totalDTMF =~ /$inbound_survey_accept_digit/)
|
||||||
|
{
|
||||||
|
$stmtA = "INSERT INTO vicidial_inbound_survey_log SET uniqueid='$uniqueid',lead_id='$insert_lead_id',campaign_id='$channel_group',call_date='$SQLdate',participate='Y';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$VISLaffected_rows = $dbhA->do($stmtA);
|
||||||
|
$dbhP=$dbhA; $mysql_count='02221'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
|
if ($AGILOG) {$agi_string = "-- Ask-Post-Call-Survey YES: $VISLaffected_rows|$insert_lead_id|insert to vicidial_inbound_survey_log: $uniqueid"; &agi_output;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($VISLaffected_rows < 1)
|
||||||
|
{
|
||||||
|
$stmtA = "INSERT INTO vicidial_inbound_survey_log SET uniqueid='$uniqueid',lead_id='$insert_lead_id',campaign_id='$channel_group',call_date='$SQLdate',participate='N';";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$VISLaffected_rows = $dbhA->do($stmtA);
|
||||||
|
$dbhP=$dbhA; $mysql_count='02222'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||||
|
if ($AGILOG) {$agi_string = "-- Ask-Post-Call-Survey NO: $VISLaffected_rows|$insert_lead_id|insert to vicidial_inbound_survey_log: $uniqueid"; &agi_output;}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
##### END ASK ABOUT A POST-CALL SURVEY #####
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$vci=0;
|
$vci=0;
|
||||||
|
|||||||
@@ -0,0 +1,446 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# agi-ingroup_survey.agi version 2.14
|
||||||
|
#
|
||||||
|
# runs after a call gets transferred from an agent to ask a question, then
|
||||||
|
# optionally transfer to a call menu. Takes settings from an In-Group
|
||||||
|
#
|
||||||
|
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||||
|
#
|
||||||
|
# changes:
|
||||||
|
# 170816-2357 - first build
|
||||||
|
#
|
||||||
|
|
||||||
|
$script = 'agi-ingroup_survey.agi';
|
||||||
|
|
||||||
|
$wav='.wav';
|
||||||
|
|
||||||
|
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||||
|
$year = ($year + 1900);
|
||||||
|
$mon++;
|
||||||
|
if ($mon < 10) {$mon = "0$mon";}
|
||||||
|
if ($mday < 10) {$mday = "0$mday";}
|
||||||
|
if ($hour < 10) {$hour = "0$hour";}
|
||||||
|
if ($min < 10) {$min = "0$min";}
|
||||||
|
if ($sec < 10) {$sec = "0$sec";}
|
||||||
|
|
||||||
|
$now_date_epoch = time();
|
||||||
|
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||||
|
|
||||||
|
# default path to astguiclient configuration file:
|
||||||
|
$PATHconf = '/etc/astguiclient.conf';
|
||||||
|
|
||||||
|
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
|
||||||
|
@conf = <conf>;
|
||||||
|
close(conf);
|
||||||
|
$i=0;
|
||||||
|
foreach(@conf)
|
||||||
|
{
|
||||||
|
$line = $conf[$i];
|
||||||
|
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
|
||||||
|
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
|
||||||
|
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
|
||||||
|
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
|
||||||
|
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
|
||||||
|
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
|
||||||
|
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
|
||||||
|
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
|
||||||
|
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
|
||||||
|
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
|
||||||
|
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
|
||||||
|
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
|
||||||
|
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
|
||||||
|
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
|
||||||
|
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$VARDB_port) {$VARDB_port='3306';}
|
||||||
|
if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";}
|
||||||
|
|
||||||
|
use DBI;
|
||||||
|
use Asterisk::AGI;
|
||||||
|
$AGI = new Asterisk::AGI;
|
||||||
|
|
||||||
|
|
||||||
|
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||||
|
or die "Couldn't connect to database: " . DBI->errstr;
|
||||||
|
|
||||||
|
### Grab Server values from the database
|
||||||
|
$stmtA = "SELECT agi_output,asterisk_version,ext_context FROM servers where server_ip = '$VARserver_ip';";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
$AGILOG = '0';
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$DBagi_output = $aryA[0];
|
||||||
|
$asterisk_version = $aryA[1];
|
||||||
|
$DBext_context = $aryA[2];
|
||||||
|
if ($DBext_context) {$ext_context = $DBext_context;}
|
||||||
|
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
|
||||||
|
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
|
||||||
|
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
### begin parsing run-time options ###
|
||||||
|
if (length($ARGV[0])>1)
|
||||||
|
{
|
||||||
|
if ($AGILOG)
|
||||||
|
{$agi_string = "Perl Environment Dump:"; &agi_output;}
|
||||||
|
$i=0;
|
||||||
|
while ($#ARGV >= $i)
|
||||||
|
{
|
||||||
|
$args = "$args $ARGV[$i]";
|
||||||
|
if ($AGILOG) {$agi_string = "$i|$ARGV[$i]"; &agi_output;}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
### list of command-line array arguments:
|
||||||
|
@ARGV_vars = split(/-----/, $ARGV[0]);
|
||||||
|
$CLI_exten = $ARGV_vars[0];
|
||||||
|
$force_playback = $ARGV_vars[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$|=1;
|
||||||
|
while(<STDIN>)
|
||||||
|
{
|
||||||
|
chomp;
|
||||||
|
last unless length($_);
|
||||||
|
if ($AGILOG)
|
||||||
|
{
|
||||||
|
if (/^agi_(\w+)\:\s+(.*)$/)
|
||||||
|
{
|
||||||
|
$AGI{$1} = $2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;}
|
||||||
|
if (/^agi_priority\:\s+(.*)$/) {$priority = $1;}
|
||||||
|
if (/^agi_channel\:\s+(.*)$/) {$channel = $1;}
|
||||||
|
if (/^agi_extension\:\s+(.*)$/) {$extension = $1;}
|
||||||
|
if (/^agi_type\:\s+(.*)$/) {$type = $1;}
|
||||||
|
if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1; $calleridnum = $callerid;}
|
||||||
|
if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( (length($callerid)>20) && ($callerid =~ /\"\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S\S/) )
|
||||||
|
{
|
||||||
|
$callerid =~ s/^\"//gi;
|
||||||
|
$callerid =~ s/\".*$//gi;
|
||||||
|
# ### set the callerid to the ACQS value(calleridname)
|
||||||
|
# print "SET CALLERID $callerid\n";
|
||||||
|
# checkresult($result);
|
||||||
|
# print STDERR "callerID changed: $callerid\n";
|
||||||
|
}
|
||||||
|
if ( (
|
||||||
|
(length($calleridname)>5) && ( (!$callerid) or ($callerid =~ /unknown|private|00000000/i) or ($callerid =~ /5551212/) )
|
||||||
|
) or ( (length($calleridname)>17) && ($calleridname =~ /\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/) ) )
|
||||||
|
{
|
||||||
|
$callerid = $calleridname;
|
||||||
|
# ### set the callerid to the ACQS value(calleridname)
|
||||||
|
# print "SET CALLERID $callerid\n";
|
||||||
|
# checkresult($result);
|
||||||
|
# print STDERR "callerID changed: $callerid\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "AGI Environment Dump:"; &agi_output;}
|
||||||
|
|
||||||
|
foreach $i (sort keys %AGI)
|
||||||
|
{
|
||||||
|
if ($AGILOG) {$agi_string = " -- $i = $AGI{$i}"; &agi_output;}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$VDADcampaign='';
|
||||||
|
$VDADphone='';
|
||||||
|
$VDADphone_code='';
|
||||||
|
|
||||||
|
$callerid =~ s/\"//gi;
|
||||||
|
$callerid =~ s/ .*//gi;
|
||||||
|
$CIDlead_id = $callerid;
|
||||||
|
$CIDlead_id = substr($CIDlead_id, 10, 10);
|
||||||
|
$CIDlead_id = ($CIDlead_id + 0);
|
||||||
|
if ( ($CLIlead_id > 0) && ($CIDlead_id < 1) ) {$CIDlead_id = $CLIlead_id;}
|
||||||
|
$VD_lead_id = $CIDlead_id;
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$CIDlead_id|$callerid|$AST_ver|"; &agi_output;}
|
||||||
|
|
||||||
|
|
||||||
|
if ( ($channel =~ /Local/i) && ($AST_ver !~ /^1\.0\.8|^1\.0\.9/) )
|
||||||
|
{
|
||||||
|
if ($AGILOG) {$agi_string = "+++++ VDAD START LOCAL CHANNEL: EXITING- $priority"; &agi_output;}
|
||||||
|
if ($priority > 2) {sleep(1);}
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
|
||||||
|
|
||||||
|
########## FIND vicidial_inbound_survey_log record ##########
|
||||||
|
$stmtA = "SELECT campaign_id,participate,call_date FROM vicidial_inbound_survey_log where lead_id='$CIDlead_id' and uniqueid='$unique_id' order by call_date desc limit 1;";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
if ($AGILOG) {$agi_string = "$sthArows|$stmtA|"; &agi_output;}
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$VD_campaign_id = $aryA[0];
|
||||||
|
$VD_participate = $aryA[1];
|
||||||
|
$VD_call_date = $aryA[2];
|
||||||
|
$sthA->finish();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
### log record not found, hangup and exit
|
||||||
|
if ($AGILOG) {$agi_string = "-- vicidial_inbound_survey_log record not found, exiting: |$CIDlead_id|$unique_id"; &agi_output;}
|
||||||
|
$AGI->hangup($channel);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### find in-group settings for this call
|
||||||
|
$stmtA = "SELECT inbound_survey,inbound_survey_question_filename,inbound_survey_callmenu from vicidial_inbound_groups where group_id = '$VD_campaign_id';";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArowsL=$sthA->rows;
|
||||||
|
if ($sthArowsL > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$inbound_survey = $aryA[0];
|
||||||
|
$inbound_survey_question_filename = $aryA[1];
|
||||||
|
$inbound_survey_callmenu = $aryA[2];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### BEGIN ASK QUESTION, COLLECT RESPONSE #####
|
||||||
|
if ( ($inbound_survey =~ /ENABLED/) && (length($inbound_survey_question_filename) > 0) && ($VD_participate =~ /Y/) )
|
||||||
|
{
|
||||||
|
$digits_to_collect=1;
|
||||||
|
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('silence');
|
||||||
|
|
||||||
|
$stmtA = "UPDATE vicidial_inbound_survey_log SET played='R' where lead_id='$CIDlead_id' and uniqueid='$unique_id' and campaign_id='$VD_campaign_id' order by call_date desc limit 1;";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$VISLaffected_rowsX = $dbhA->do($stmtA);
|
||||||
|
|
||||||
|
$stmtA = "INSERT INTO live_inbound_log (uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,comment_a,comment_b,comment_d,comment_e) values('$uniqueid','$channel','$VARserver_ip','$callerid','$extension','$CIDlead_id','$now_date','$VD_campaign_id','$VD_campaign_id','$VD_campaign_id','1');";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$LILaffected_rowsX = $dbhA->do($stmtA);
|
||||||
|
if ($AGILOG) {$agi_string = "-- Ask-Post-Call-Survey RUNNING: $VISLaffected_rowsX|$LILaffected_rowsX|$unique_id|$CIDlead_id|"; &agi_output;}
|
||||||
|
|
||||||
|
|
||||||
|
$digit='';
|
||||||
|
undef $digit;
|
||||||
|
$interrupt_digit='';
|
||||||
|
undef $interrupt_digit;
|
||||||
|
$digit_loop_counter=0;
|
||||||
|
|
||||||
|
$interrupt_digit = $AGI->stream_file('sip-silence',"123456789");
|
||||||
|
|
||||||
|
$interrupt_digit='';
|
||||||
|
undef $interrupt_digit;
|
||||||
|
|
||||||
|
$interrupt_digit = $AGI->stream_file("$inbound_survey_question_filename","123456789");
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit| |$inbound_survey_question_filename|"; &agi_output;}
|
||||||
|
|
||||||
|
$digits_being_entered=1;
|
||||||
|
$totalDTMF='';
|
||||||
|
if ($interrupt_digit > 1)
|
||||||
|
{
|
||||||
|
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||||
|
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||||
|
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||||
|
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||||
|
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||||
|
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||||
|
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||||
|
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||||
|
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||||
|
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||||
|
|
||||||
|
$totalDTMF=$interrupt_digit;
|
||||||
|
$digit_loop_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
while ( ($digit_loop_counter < $digits_to_collect) )
|
||||||
|
{
|
||||||
|
$digit = chr($AGI->wait_for_digit('10000')); # wait 5 seconds for input or until the key is pressed
|
||||||
|
if ($digit =~ /\d/)
|
||||||
|
{
|
||||||
|
$totalDTMF = "$totalDTMF$digit";
|
||||||
|
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
|
||||||
|
# $AGI->say_digits("$digit");
|
||||||
|
undef $digit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$digit_loop_counter=$digits_to_collect;
|
||||||
|
}
|
||||||
|
|
||||||
|
$digit_loop_counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
$totalDTMF =~ s/\D//gi;
|
||||||
|
$VISLaffected_rows=0;
|
||||||
|
if (length($totalDTMF) > 0)
|
||||||
|
{
|
||||||
|
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
|
||||||
|
}
|
||||||
|
$stmtA = "UPDATE vicidial_inbound_survey_log SET played='Y',dtmf_response='$totalDTMF',next_call_menu='$inbound_survey_callmenu' where lead_id='$CIDlead_id' and uniqueid='$unique_id' and campaign_id='$VD_campaign_id' order by call_date desc limit 1;";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$VISLaffected_rows = $dbhA->do($stmtA);
|
||||||
|
|
||||||
|
$stmtA = "INSERT INTO live_inbound_log (uniqueid,channel,server_ip,caller_id,extension,phone_ext,start_time,comment_a,comment_b,comment_d,comment_e) values('$uniqueid','$channel','$VARserver_ip','$callerid','$extension','$CIDlead_id','$now_date','$VD_campaign_id','$totalDTMF','$VD_campaign_id>$totalDTMF','1');";
|
||||||
|
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||||
|
$LILaffected_rows = $dbhA->do($stmtA);
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "-- Ask-Post-Call-Survey DONE: $VISLaffected_rows|$LILaffected_rows|$totalDTMF|$unique_id|$CIDlead_id|"; &agi_output;}
|
||||||
|
|
||||||
|
|
||||||
|
### send call to a call menu, if defined
|
||||||
|
if (length($inbound_survey_callmenu) > 0)
|
||||||
|
{
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
$AGI->stream_file('sip-silence');
|
||||||
|
|
||||||
|
if ($AGILOG) {$agi_string = "exiting the ingroup survey app, transferring call to s:$inbound_survey_callmenu"; &agi_output;}
|
||||||
|
print "SET CONTEXT $inbound_survey_callmenu\n";
|
||||||
|
$result = <STDIN>;
|
||||||
|
checkresult($result);
|
||||||
|
print "SET EXTENSION s\n";
|
||||||
|
$result = <STDIN>;
|
||||||
|
checkresult($result);
|
||||||
|
print "SET PRIORITY 1\n";
|
||||||
|
$result = <STDIN>;
|
||||||
|
checkresult($result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
### no call menu defined, hangup and exit
|
||||||
|
if ($AGILOG) {$agi_string = "-- exiting the ingroup survey app, no call menu defined: |$CIDlead_id|$unique_id"; &agi_output;}
|
||||||
|
$AGI->hangup($channel);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
##### END ASK QUESTION, COLLECT RESPONSE #####
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$dbhA->disconnect();
|
||||||
|
|
||||||
|
exit;
|
||||||
|
|
||||||
|
sub checkresult
|
||||||
|
{
|
||||||
|
my ($res) = @_;
|
||||||
|
my $retval;
|
||||||
|
$tests++;
|
||||||
|
chomp $res;
|
||||||
|
if ($res =~ /^200/)
|
||||||
|
{
|
||||||
|
$res =~ /result=(-?\d+)/;
|
||||||
|
if (!length($1))
|
||||||
|
{
|
||||||
|
# print STDERR "FAIL ($res)\n";
|
||||||
|
$fail++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# print STDERR "PASS ($1)\n";
|
||||||
|
$pass++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# print STDERR "FAIL (unexpected result '$res')\n";
|
||||||
|
$fail++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub agi_output
|
||||||
|
{
|
||||||
|
if ($AGILOG >=2)
|
||||||
|
{
|
||||||
|
### open the log file for writing ###
|
||||||
|
open(Lout, ">>$AGILOGfile")
|
||||||
|
|| die "Can't open $AGILOGfile: $!\n";
|
||||||
|
print Lout "$now_date|$script|$agi_string\n";
|
||||||
|
close(Lout);
|
||||||
|
}
|
||||||
|
### send to STDERR writing ###
|
||||||
|
if ( ($AGILOG == '1') || ($AGILOG == '3') )
|
||||||
|
{print STDERR "$now_date|$script|$agi_string\n";}
|
||||||
|
$agi_string='';
|
||||||
|
}
|
||||||
|
|
||||||
|
# subroutine to parse the asterisk version
|
||||||
|
# and return a hash with the various part
|
||||||
|
sub parse_asterisk_version
|
||||||
|
{
|
||||||
|
# grab the arguments
|
||||||
|
my $ast_ver_str = $_[0];
|
||||||
|
|
||||||
|
# get everything after the - and put it in $ast_ver_postfix
|
||||||
|
my @hyphen_parts = split( /-/ , $ast_ver_str );
|
||||||
|
|
||||||
|
my $ast_ver_postfix = $hyphen_parts[1];
|
||||||
|
|
||||||
|
# now split everything before the - up by the .
|
||||||
|
my @dot_parts = split( /\./ , $hyphen_parts[0] );
|
||||||
|
|
||||||
|
my %ast_ver_hash;
|
||||||
|
|
||||||
|
if ( $dot_parts[0] <= 1 )
|
||||||
|
{
|
||||||
|
%ast_ver_hash = (
|
||||||
|
"major" => $dot_parts[0],
|
||||||
|
"minor" => $dot_parts[1],
|
||||||
|
"build" => $dot_parts[2],
|
||||||
|
"revision" => $dot_parts[3],
|
||||||
|
"postfix" => $ast_ver_postfix
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
# digium dropped the 1 from asterisk 10 but we still need it
|
||||||
|
if ( $dot_parts[0] > 1 )
|
||||||
|
{
|
||||||
|
%ast_ver_hash = (
|
||||||
|
"major" => 1,
|
||||||
|
"minor" => $dot_parts[0],
|
||||||
|
"build" => $dot_parts[1],
|
||||||
|
"revision" => $dot_parts[2],
|
||||||
|
"postfix" => $ast_ver_postfix
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ( %ast_ver_hash );
|
||||||
|
}
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
# 170325-1108 - Added vicidial_drop_log table rolling
|
# 170325-1108 - Added vicidial_drop_log table rolling
|
||||||
# 170508-1212 - Added vicidial_rt_monitor_log table rolling
|
# 170508-1212 - Added vicidial_rt_monitor_log table rolling
|
||||||
# 170809-1926 - Added rolling of user_call_log if over 1000000 records
|
# 170809-1926 - Added rolling of user_call_log if over 1000000 records
|
||||||
|
# 170817-1318 - Added rolling of vicidial_inbound_survey_log
|
||||||
#
|
#
|
||||||
|
|
||||||
$CALC_TEST=0;
|
$CALC_TEST=0;
|
||||||
@@ -1688,6 +1689,58 @@ if (!$T)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##### vicidial_inbound_survey_log
|
||||||
|
$stmtA = "SELECT count(*) from vicidial_inbound_survey_log;";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$vicidial_inbound_survey_log_count = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
$stmtA = "SELECT count(*) from vicidial_inbound_survey_log_archive;";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows=$sthA->rows;
|
||||||
|
if ($sthArows > 0)
|
||||||
|
{
|
||||||
|
@aryA = $sthA->fetchrow_array;
|
||||||
|
$vicidial_inbound_survey_log_archive_count = $aryA[0];
|
||||||
|
}
|
||||||
|
$sthA->finish();
|
||||||
|
|
||||||
|
if (!$Q) {print "\nProcessing vicidial_inbound_survey_log table... ($vicidial_inbound_survey_log_count|$vicidial_inbound_survey_log_archive_count)\n";}
|
||||||
|
$stmtA = "INSERT IGNORE INTO vicidial_inbound_survey_log_archive SELECT * from vicidial_inbound_survey_log;";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
|
||||||
|
$sthArows = $sthA->rows;
|
||||||
|
if (!$Q) {print "$sthArows rows inserted into vicidial_inbound_survey_log_archive table \n";}
|
||||||
|
|
||||||
|
$rv = $sthA->err();
|
||||||
|
if (!$rv)
|
||||||
|
{
|
||||||
|
$stmtA = "DELETE FROM vicidial_inbound_survey_log WHERE call_date < '$del_time';";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
$sthArows = $sthA->rows;
|
||||||
|
if (!$Q) {print "$sthArows rows deleted from vicidial_inbound_survey_log table \n";}
|
||||||
|
|
||||||
|
$stmtA = "optimize table vicidial_inbound_survey_log;";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
|
||||||
|
$stmtA = "optimize table vicidial_inbound_survey_log_archive;";
|
||||||
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### vicidial_log_noanswer
|
##### vicidial_log_noanswer
|
||||||
$stmtA = "SELECT count(*) from vicidial_log_noanswer;";
|
$stmtA = "SELECT count(*) from vicidial_log_noanswer;";
|
||||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||||
|
|||||||
@@ -121,9 +121,10 @@
|
|||||||
# 170609-1601 - If phone entry fullname and cidnumber are empty, don't populate a callerid conf line
|
# 170609-1601 - If phone entry fullname and cidnumber are empty, don't populate a callerid conf line
|
||||||
# 170711-0824 - Fixed help documentation for delay seconds, issue #1025
|
# 170711-0824 - Fixed help documentation for delay seconds, issue #1025
|
||||||
# 170725-0017 - Added vicidial_campaign_hour_counts and vicidial_carrier_hour_counts rolling
|
# 170725-0017 - Added vicidial_campaign_hour_counts and vicidial_carrier_hour_counts rolling
|
||||||
|
# 170816-2323 - Added In-Group Ask-Post-Call Survey AGI dialplan entries
|
||||||
#
|
#
|
||||||
|
|
||||||
$build = '170725-0017';
|
$build = '170816-2323';
|
||||||
|
|
||||||
$DB=0; # Debug flag
|
$DB=0; # Debug flag
|
||||||
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
$teodDB=0; # flag to log Timeclock End of Day processes to log file
|
||||||
@@ -2208,6 +2209,10 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
|||||||
$Vext .= "exten => _8305888888888888X999,1,Answer\n";
|
$Vext .= "exten => _8305888888888888X999,1,Answer\n";
|
||||||
$Vext .= "exten => _8305888888888888X999,n,Wait($vicidial_recording_limit)\n";
|
$Vext .= "exten => _8305888888888888X999,n,Wait($vicidial_recording_limit)\n";
|
||||||
$Vext .= "exten => _8305888888888888X999,n,Hangup()\n";
|
$Vext .= "exten => _8305888888888888X999,n,Hangup()\n";
|
||||||
|
$Vext .= "; In-Group Ask-Post-Call Survey AGI\n";
|
||||||
|
$Vext .= "exten => _8306888888888888X999,1,Answer\n";
|
||||||
|
$Vext .= "exten => _8306888888888888X999,n,AGI(agi-ingroup_survey.agi)\n";
|
||||||
|
$Vext .= "exten => _8306888888888888X999,n,Hangup()\n";
|
||||||
##### END Create Voicemail extensions for this server_ip #####
|
##### END Create Voicemail extensions for this server_ip #####
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1219,7 +1219,12 @@ areacode_filter ENUM('DISABLED','ALLOW_ONLY','DROP_ONLY') default 'DISABLED',
|
|||||||
areacode_filter_seconds SMALLINT(5) default '10',
|
areacode_filter_seconds SMALLINT(5) default '10',
|
||||||
areacode_filter_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL','VMAIL_NO_INST') default 'MESSAGE',
|
areacode_filter_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL','VMAIL_NO_INST') default 'MESSAGE',
|
||||||
areacode_filter_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye',
|
areacode_filter_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye',
|
||||||
populate_state_areacode ENUM('DISABLED','NEW_LEAD_ONLY','OVERWRITE_ALWAYS') default 'DISABLED'
|
populate_state_areacode ENUM('DISABLED','NEW_LEAD_ONLY','OVERWRITE_ALWAYS') default 'DISABLED',
|
||||||
|
inbound_survey ENUM('DISABLED','ENABLED') default 'DISABLED',
|
||||||
|
inbound_survey_filename TEXT,
|
||||||
|
inbound_survey_accept_digit VARCHAR(1) default '',
|
||||||
|
inbound_survey_question_filename TEXT,
|
||||||
|
inbound_survey_callmenu TEXT
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
CREATE TABLE vicidial_stations (
|
CREATE TABLE vicidial_stations (
|
||||||
@@ -3770,6 +3775,20 @@ index (date_hour),
|
|||||||
unique index vclhc_hour (date_hour, type)
|
unique index vclhc_hour (date_hour, type)
|
||||||
) ENGINE=MyISAM;
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_inbound_survey_log (
|
||||||
|
uniqueid VARCHAR(50) NOT NULL,
|
||||||
|
lead_id INT(9) UNSIGNED NOT NULL,
|
||||||
|
campaign_id VARCHAR(20) NOT NULL,
|
||||||
|
call_date DATETIME,
|
||||||
|
participate ENUM('N','Y') default 'N',
|
||||||
|
played ENUM('N','R','Y') default 'N',
|
||||||
|
dtmf_response VARCHAR(1) default '',
|
||||||
|
next_call_menu TEXT,
|
||||||
|
index (call_date),
|
||||||
|
index (lead_id),
|
||||||
|
index (uniqueid)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||||
|
|
||||||
@@ -3967,6 +3986,9 @@ CREATE TABLE vicidial_carrier_hour_counts_archive LIKE vicidial_carrier_hour_cou
|
|||||||
CREATE TABLE user_call_log_archive LIKE user_call_log;
|
CREATE TABLE user_call_log_archive LIKE user_call_log;
|
||||||
ALTER TABLE user_call_log_archive MODIFY user_call_log_id INT(9) UNSIGNED NOT NULL;
|
ALTER TABLE user_call_log_archive MODIFY user_call_log_id INT(9) UNSIGNED NOT NULL;
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_inbound_survey_log_archive LIKE vicidial_inbound_survey_log;
|
||||||
|
CREATE UNIQUE INDEX visla_key on vicidial_inbound_survey_log_archive(uniqueid, call_date, campaign_id, lead_id);
|
||||||
|
|
||||||
GRANT RELOAD ON *.* TO cron@'%';
|
GRANT RELOAD ON *.* TO cron@'%';
|
||||||
GRANT RELOAD ON *.* TO cron@localhost;
|
GRANT RELOAD ON *.* TO cron@localhost;
|
||||||
|
|
||||||
@@ -4041,4 +4063,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
|
|||||||
|
|
||||||
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='1511',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
UPDATE system_settings SET db_schema_version='1512',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||||
|
|||||||
@@ -326,3 +326,28 @@ CREATE TABLE user_call_log_archive LIKE user_call_log;
|
|||||||
ALTER TABLE user_call_log_archive MODIFY user_call_log_id INT(9) UNSIGNED NOT NULL;
|
ALTER TABLE user_call_log_archive MODIFY user_call_log_id INT(9) UNSIGNED NOT NULL;
|
||||||
|
|
||||||
UPDATE system_settings SET db_schema_version='1511',db_schema_update_date=NOW() where db_schema_version < 1511;
|
UPDATE system_settings SET db_schema_version='1511',db_schema_update_date=NOW() where db_schema_version < 1511;
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_inbound_survey_log (
|
||||||
|
uniqueid VARCHAR(50) NOT NULL,
|
||||||
|
lead_id INT(9) UNSIGNED NOT NULL,
|
||||||
|
campaign_id VARCHAR(20) NOT NULL,
|
||||||
|
call_date DATETIME,
|
||||||
|
participate ENUM('N','Y') default 'N',
|
||||||
|
played ENUM('N','R','Y') default 'N',
|
||||||
|
dtmf_response VARCHAR(1) default '',
|
||||||
|
next_call_menu TEXT,
|
||||||
|
index (call_date),
|
||||||
|
index (lead_id),
|
||||||
|
index (uniqueid)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
CREATE TABLE vicidial_inbound_survey_log_archive LIKE vicidial_inbound_survey_log;
|
||||||
|
CREATE UNIQUE INDEX visla_key on vicidial_inbound_survey_log_archive(uniqueid, call_date, campaign_id, lead_id);
|
||||||
|
|
||||||
|
ALTER TABLE vicidial_inbound_groups ADD inbound_survey ENUM('DISABLED','ENABLED') default 'DISABLED';
|
||||||
|
ALTER TABLE vicidial_inbound_groups ADD inbound_survey_filename TEXT;
|
||||||
|
ALTER TABLE vicidial_inbound_groups ADD inbound_survey_accept_digit VARCHAR(1) default '';
|
||||||
|
ALTER TABLE vicidial_inbound_groups ADD inbound_survey_question_filename TEXT;
|
||||||
|
ALTER TABLE vicidial_inbound_groups ADD inbound_survey_callmenu TEXT;
|
||||||
|
|
||||||
|
UPDATE system_settings SET db_schema_version='1512',db_schema_update_date=NOW() where db_schema_version < 1512;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -78,10 +78,11 @@
|
|||||||
# 170220-1307 - Added external_lead_id trigger for switch_lead API function
|
# 170220-1307 - Added external_lead_id trigger for switch_lead API function
|
||||||
# 170526-2228 - Added additional variable filtering
|
# 170526-2228 - Added additional variable filtering
|
||||||
# 170709-1017 - Added xfer dead call checking process
|
# 170709-1017 - Added xfer dead call checking process
|
||||||
|
# 170817-0739 - Small change to xfer dead call checking process
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-53';
|
$version = '2.14-54';
|
||||||
$build = '170709-1017';
|
$build = '170817-0739';
|
||||||
$php_script = 'conf_exten_check.php';
|
$php_script = 'conf_exten_check.php';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=46;
|
$mysql_log_count=46;
|
||||||
@@ -848,7 +849,7 @@ if ($ACTION == 'refresh')
|
|||||||
|
|
||||||
//Check if xferchannel is active
|
//Check if xferchannel is active
|
||||||
$DEADxfer=0;
|
$DEADxfer=0;
|
||||||
if ( (strlen($xferchannel) > 2) and ($DEADcustomer < 1) )
|
if ( (strlen($xferchannel) > 2) and ($DEADcustomer < 1) and (preg_match("/INCALL/i",$Astatus)) )
|
||||||
{
|
{
|
||||||
$stmt="SELECT count(*) FROM live_channels where channel ='$xferchannel' and server_ip='$server_ip';";
|
$stmt="SELECT count(*) FROM live_channels where channel ='$xferchannel' and server_ip='$server_ip';";
|
||||||
if ($DB) {echo "|$stmt|\n";}
|
if ($DB) {echo "|$stmt|\n";}
|
||||||
|
|||||||
@@ -434,10 +434,11 @@
|
|||||||
# 170605-1633 - Added vendor_lead_code to agent lead search results screen
|
# 170605-1633 - Added vendor_lead_code to agent lead search results screen
|
||||||
# 170609-1710 - Small debug addition
|
# 170609-1710 - Small debug addition
|
||||||
# 170712-1548 - Changed agents view to use last_state_change for time
|
# 170712-1548 - Changed agents view to use last_state_change for time
|
||||||
|
# 170816-2334 - Added ask post-call survey feature for in-group calls
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-328';
|
$version = '2.14-329';
|
||||||
$build = '170712-1548';
|
$build = '170816-2334';
|
||||||
$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=684;
|
$mysql_log_count=684;
|
||||||
@@ -8130,7 +8131,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$script_recording_delay = $row[0];
|
$script_recording_delay = $row[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
$stmt = "SELECT group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix,timer_action_destination,web_form_address_three,status_group_id from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
$stmt = "SELECT group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,uniqueid_status_display,uniqueid_status_prefix,timer_action_destination,web_form_address_three,status_group_id,inbound_survey from vicidial_inbound_groups where group_id='$VDADchannel_group';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
|
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
@@ -8165,6 +8166,7 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
$VDCL_uniqueid_status_prefix = $row[24];
|
$VDCL_uniqueid_status_prefix = $row[24];
|
||||||
$VDCL_timer_action_destination = $row[25];
|
$VDCL_timer_action_destination = $row[25];
|
||||||
$VDCL_group_web_three = stripslashes($row[26]);
|
$VDCL_group_web_three = stripslashes($row[26]);
|
||||||
|
$VDCL_inbound_survey = $row[28];
|
||||||
|
|
||||||
$status_group_gather_data = status_group_gather($row[27],'INGROUP');
|
$status_group_gather_data = status_group_gather($row[27],'INGROUP');
|
||||||
|
|
||||||
@@ -8248,6 +8250,22 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
### BEGIN check if ask post-call survery is enabled and caller agreed to participate
|
||||||
|
$VDCL_survey_participate='N';
|
||||||
|
if ($VDCL_inbound_survey == 'ENABLED')
|
||||||
|
{
|
||||||
|
$stmt = "SELECT participate from vicidial_inbound_survey_log where campaign_id='$VDADchannel_group' and lead_id='$lead_id' and uniqueid='$uniqueid' order by call_date 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,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||||
|
$VDIG_visl_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($VDIG_visl_ct > 0)
|
||||||
|
{
|
||||||
|
$row=mysqli_fetch_row($rslt);
|
||||||
|
$VDCL_survey_participate = $row[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
### END check if ask post-call survery is enabled and caller agreed to participate
|
||||||
|
|
||||||
### update the comments in vicidial_live_agents record
|
### update the comments in vicidial_live_agents record
|
||||||
$stmt = "UPDATE vicidial_live_agents set comments='INBOUND',last_inbound_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
|
$stmt = "UPDATE vicidial_live_agents set comments='INBOUND',last_inbound_call_time='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
|
||||||
@@ -8412,8 +8430,8 @@ if ($ACTION == 'VDADcheckINCOMING')
|
|||||||
}
|
}
|
||||||
|
|
||||||
### if web form is set then send on to vicidial.php for override of WEB_FORM address
|
### if web form is set then send on to vicidial.php for override of WEB_FORM address
|
||||||
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|\n";}
|
if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|$VDCL_inbound_survey|$VDCL_survey_participate|\n";}
|
||||||
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|\n";}
|
else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|$VDCL_uniqueid_status_display|$custom_call_id|$VDCL_uniqueid_status_prefix|$VDCL_timer_action_destination|$DID_id|$DID_extension|$DID_pattern|$DID_description|$INclosecallid|$INxfercallid|$VDCL_group_web_three|$VDCL_ingroup_script_color|$VDCL_inbound_survey|$VDCL_survey_participate|\n";}
|
||||||
|
|
||||||
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
|
$stmt = "SELECT full_name from vicidial_users where user='$tsr';";
|
||||||
if ($DB) {echo "$stmt\n";}
|
if ($DB) {echo "$stmt\n";}
|
||||||
|
|||||||
@@ -561,10 +561,11 @@
|
|||||||
# 170710-1802 - Added logging of clicks on webform buttons
|
# 170710-1802 - Added logging of clicks on webform buttons
|
||||||
# 170725-2147 - Added counter(aec) to agent_events calls
|
# 170725-2147 - Added counter(aec) to agent_events calls
|
||||||
# 170808-1014 - Added more qualifiers for Hungup Xfer function to be triggered
|
# 170808-1014 - Added more qualifiers for Hungup Xfer function to be triggered
|
||||||
|
# 170816-2336 - Added ask post-call survey feature for in-group calls
|
||||||
#
|
#
|
||||||
|
|
||||||
$version = '2.14-531c';
|
$version = '2.14-532c';
|
||||||
$build = '170808-1014';
|
$build = '170816-2336';
|
||||||
$mel=1; # Mysql Error Log enabled = 1
|
$mel=1; # Mysql Error Log enabled = 1
|
||||||
$mysql_log_count=87;
|
$mysql_log_count=87;
|
||||||
$one_mysql_log=0;
|
$one_mysql_log=0;
|
||||||
@@ -4545,6 +4546,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|||||||
var transfer_panel_open=0;
|
var transfer_panel_open=0;
|
||||||
var last_conf_channel_count=1;
|
var last_conf_channel_count=1;
|
||||||
var aec=0;
|
var aec=0;
|
||||||
|
var inbound_post_call_survey='';
|
||||||
|
var inbound_survey_participate='';
|
||||||
var DiaLControl_auto_HTML = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>\" border=\"0\" alt=\"You are paused\" /></a>";
|
var DiaLControl_auto_HTML = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>\" border=\"0\" alt=\"You are paused\" /></a>";
|
||||||
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_active.gif") ?>\" border=\"0\" alt=\"You are active\" /></a>";
|
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_active.gif") ?>\" border=\"0\" alt=\"You are active\" /></a>";
|
||||||
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
|
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
|
||||||
@@ -9599,6 +9602,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
|||||||
RefresHScript('CLEAR');
|
RefresHScript('CLEAR');
|
||||||
ViewComments('OFF','OFF');
|
ViewComments('OFF','OFF');
|
||||||
last_call_date='';
|
last_call_date='';
|
||||||
|
inbound_post_call_survey='';
|
||||||
|
inbound_survey_participate='';
|
||||||
// document.getElementById('vcFormIFrame').src='./vdc_form_display.php?lead_id=&list_id=&stage=WELCOME';
|
// document.getElementById('vcFormIFrame').src='./vdc_form_display.php?lead_id=&list_id=&stage=WELCOME';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10293,6 +10298,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
|||||||
{VDIC_web_form_address_three = VDIC_data_VDIG[34];}
|
{VDIC_web_form_address_three = VDIC_data_VDIG[34];}
|
||||||
if (VDIC_data_VDIG[35].length > 1)
|
if (VDIC_data_VDIG[35].length > 1)
|
||||||
{CalL_ScripT_color = VDIC_data_VDIG[35];}
|
{CalL_ScripT_color = VDIC_data_VDIG[35];}
|
||||||
|
inbound_post_call_survey = VDIC_data_VDIG[36];
|
||||||
|
inbound_survey_participate = VDIC_data_VDIG[37];
|
||||||
|
|
||||||
var VDIC_data_VDFR=check_VDIC_array[3].split("|");
|
var VDIC_data_VDFR=check_VDIC_array[3].split("|");
|
||||||
if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') )
|
if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') )
|
||||||
@@ -10627,8 +10634,6 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
|||||||
document.getElementById("ivrParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParKivr','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_ivrparkcall.gif"); ?>\" border=\"0\" alt=\"IVR Park Call\" /></a>";
|
document.getElementById("ivrParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParKivr','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_ivrparkcall.gif"); ?>\" border=\"0\" alt=\"IVR Park Call\" /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
|
||||||
|
|
||||||
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('ON','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_transferconf.gif"); ?>\" border=\"0\" alt=\"Transfer - Conference\" /></a>";
|
document.getElementById("XferControl").innerHTML = "<a href=\"#\" onclick=\"ShoWTransferMain('ON','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_transferconf.gif"); ?>\" border=\"0\" alt=\"Transfer - Conference\" /></a>";
|
||||||
|
|
||||||
document.getElementById("LocalCloser").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_XB_localcloser.gif"); ?>\" border=\"0\" alt=\"LOCAL CLOSER\" style=\"vertical-align:middle\" /></a>";
|
document.getElementById("LocalCloser").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRLOCAL','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_XB_localcloser.gif"); ?>\" border=\"0\" alt=\"LOCAL CLOSER\" style=\"vertical-align:middle\" /></a>";
|
||||||
@@ -10675,6 +10680,18 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
|||||||
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "','','','" + quick_transfer_button_locked + "','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_quickxfer.gif"); ?>\" border=\"0\" alt=\"QUICK TRANSFER\" /></a>";
|
document.getElementById("QuickXfer").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "','','','" + quick_transfer_button_locked + "','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_quickxfer.gif"); ?>\" border=\"0\" alt=\"QUICK TRANSFER\" /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( (inbound_post_call_survey=='ENABLED') && (inbound_survey_participate=='Y') )
|
||||||
|
{
|
||||||
|
document.vicidial_form.xfernumber.value = '83068888888888883999';
|
||||||
|
document.vicidial_form.xferoverride.checked=true;
|
||||||
|
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"mainxfer_send_redirect('XfeRBLIND','" + lastcustchannel + "','" + lastcustserverip + "','','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||||
|
button_click_log = button_click_log + "" + SQLdate + "-----AskInGroupSurvey---" + inbound_post_call_survey + " " + inbound_survey_participate + " " + document.vicidial_form.xfernumber.value + "|";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
document.getElementById("HangupControl").innerHTML = "<a href=\"#\" onclick=\"dialedcall_send_hangup('','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_hangupcustomer.gif"); ?>\" border=\"0\" alt=\"Hangup Customer\" /></a>";
|
||||||
|
}
|
||||||
|
|
||||||
if (custom_3way_button_transfer_enabled > 0)
|
if (custom_3way_button_transfer_enabled > 0)
|
||||||
{
|
{
|
||||||
document.getElementById("CustomXfer").innerHTML = "<a href=\"#\" onclick=\"custom_button_transfer();return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_customxfer.gif"); ?>\" border=\"0\" alt=\"Custom Transfer\" /></a>";
|
document.getElementById("CustomXfer").innerHTML = "<a href=\"#\" onclick=\"custom_button_transfer();return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_customxfer.gif"); ?>\" border=\"0\" alt=\"Custom Transfer\" /></a>";
|
||||||
@@ -13338,6 +13355,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
|||||||
source_id='';
|
source_id='';
|
||||||
entry_date='';
|
entry_date='';
|
||||||
last_call_date='';
|
last_call_date='';
|
||||||
|
inbound_post_call_survey='';
|
||||||
|
inbound_survey_participate='';
|
||||||
if (manual_auto_next > 0)
|
if (manual_auto_next > 0)
|
||||||
{manual_auto_next_trigger=1; manual_auto_next_count=manual_auto_next;}
|
{manual_auto_next_trigger=1; manual_auto_next_count=manual_auto_next;}
|
||||||
if (agent_display_fields.match(adfREGentry_date))
|
if (agent_display_fields.match(adfREGentry_date))
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
# CHANGES
|
# CHANGES
|
||||||
# 160826-0054 - First build
|
# 160826-0054 - First build
|
||||||
# 170409-1542 - Added IP List validation code
|
# 170409-1542 - Added IP List validation code
|
||||||
|
# 170816-2026 - Added HTML formatting
|
||||||
#
|
#
|
||||||
|
|
||||||
$startMS = microtime();
|
$startMS = microtime();
|
||||||
@@ -43,6 +44,8 @@ if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
|||||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||||
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||||
|
if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];}
|
||||||
|
elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];}
|
||||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||||
if (isset($_GET["search_archived_data"])) {$search_archived_data=$_GET["search_archived_data"];}
|
if (isset($_GET["search_archived_data"])) {$search_archived_data=$_GET["search_archived_data"];}
|
||||||
@@ -363,7 +366,44 @@ else
|
|||||||
$group_SQL = "and campaign_id IN($group_SQL)";
|
$group_SQL = "and campaign_id IN($group_SQL)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##### BEGIN Define colors and logo #####
|
||||||
|
$SSmenu_background='015B91';
|
||||||
|
$SSframe_background='D9E6FE';
|
||||||
|
$SSstd_row1_background='9BB9FB';
|
||||||
|
$SSstd_row2_background='B9CBFD';
|
||||||
|
$SSstd_row3_background='8EBCFD';
|
||||||
|
$SSstd_row4_background='B6D3FC';
|
||||||
|
$SSstd_row5_background='FFFFFF';
|
||||||
|
$SSalt_row1_background='BDFFBD';
|
||||||
|
$SSalt_row2_background='99FF99';
|
||||||
|
$SSalt_row3_background='CCFFCC';
|
||||||
|
|
||||||
|
$screen_color_stmt="select admin_screen_colors from system_settings";
|
||||||
|
$screen_color_rslt=mysql_to_mysqli($screen_color_stmt, $link);
|
||||||
|
$screen_color_row=mysqli_fetch_row($screen_color_rslt);
|
||||||
|
$agent_screen_colors="$screen_color_row[0]";
|
||||||
|
|
||||||
|
if ($agent_screen_colors != 'default')
|
||||||
|
{
|
||||||
|
$asc_stmt = "SELECT menu_background,frame_background,std_row1_background,std_row2_background,std_row3_background,std_row4_background,std_row5_background,alt_row1_background,alt_row2_background,alt_row3_background,web_logo FROM vicidial_screen_colors where colors_id='$agent_screen_colors';";
|
||||||
|
$asc_rslt=mysql_to_mysqli($stmt, $link);
|
||||||
|
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||||
|
if ($qm_conf_ct > 0)
|
||||||
|
{
|
||||||
|
$asc_row=mysqli_fetch_row($asc_rslt);
|
||||||
|
$SSmenu_background = $asc_row[0];
|
||||||
|
$SSframe_background = $asc_row[1];
|
||||||
|
$SSstd_row1_background = $asc_row[2];
|
||||||
|
$SSstd_row2_background = $asc_row[3];
|
||||||
|
$SSstd_row3_background = $asc_row[4];
|
||||||
|
$SSstd_row4_background = $asc_row[5];
|
||||||
|
$SSstd_row5_background = $asc_row[6];
|
||||||
|
$SSalt_row1_background = $asc_row[7];
|
||||||
|
$SSalt_row2_background = $asc_row[8];
|
||||||
|
$SSalt_row3_background = $asc_row[9];
|
||||||
|
$SSweb_logo = $asc_row[10];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date&shift=$shift&DB=$DB&user=$user$groupQS&search_archived_data=$search_archived_data&report_display_type=$report_display_type";
|
$LINKbase = "$PHP_SELF?query_date=$query_date&end_date=$end_date&shift=$shift&DB=$DB&user=$user$groupQS&search_archived_data=$search_archived_data&report_display_type=$report_display_type";
|
||||||
|
|
||||||
@@ -404,91 +444,7 @@ if ($file_download < 1)
|
|||||||
echo "<PRE><FONT SIZE=2>";
|
echo "<PRE><FONT SIZE=2>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (strlen($group[0]) < 1)
|
|
||||||
{
|
|
||||||
echo "";
|
|
||||||
echo _QXZ("PLEASE SELECT A USER AND DATE-TIME BELOW AND CLICK SUBMIT")."\n";
|
|
||||||
echo " "._QXZ("NOTE: stats taken from shift specified")."\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($shift == 'AM')
|
|
||||||
{
|
|
||||||
$time_BEGIN=$AM_shift_BEGIN;
|
|
||||||
$time_END=$AM_shift_END;
|
|
||||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}
|
|
||||||
if (strlen($time_END) < 6) {$time_END = "15:14:59";}
|
|
||||||
}
|
|
||||||
if ($shift == 'PM')
|
|
||||||
{
|
|
||||||
$time_BEGIN=$PM_shift_BEGIN;
|
|
||||||
$time_END=$PM_shift_END;
|
|
||||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
|
|
||||||
if (strlen($time_END) < 6) {$time_END = "23:15:00";}
|
|
||||||
}
|
|
||||||
if ($shift == 'ALL')
|
|
||||||
{
|
|
||||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
|
|
||||||
if (strlen($time_END) < 6) {$time_END = "23:59:59";}
|
|
||||||
}
|
|
||||||
$query_date_BEGIN = "$query_date $time_BEGIN";
|
|
||||||
|
|
||||||
if (strlen($group[0]) < 1)
|
|
||||||
{
|
|
||||||
echo "";
|
|
||||||
echo _QXZ("PLEASE SELECT A DATE-HOUR AND USER GROUP BELOW AND CLICK SUBMIT")."\n";
|
|
||||||
echo " "._QXZ("NOTE: stats taken from shift specified")."\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($shift == 'AM')
|
|
||||||
{
|
|
||||||
$time_BEGIN=$AM_shift_BEGIN;
|
|
||||||
$time_END=$AM_shift_END;
|
|
||||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}
|
|
||||||
if (strlen($time_END) < 6) {$time_END = "15:14:59";}
|
|
||||||
}
|
|
||||||
if ($shift == 'PM')
|
|
||||||
{
|
|
||||||
$time_BEGIN=$PM_shift_BEGIN;
|
|
||||||
$time_END=$PM_shift_END;
|
|
||||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
|
|
||||||
if (strlen($time_END) < 6) {$time_END = "23:15:00";}
|
|
||||||
}
|
|
||||||
if ($shift == 'ALL')
|
|
||||||
{
|
|
||||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
|
|
||||||
if (strlen($time_END) < 6) {$time_END = "23:59:59";}
|
|
||||||
}
|
|
||||||
$query_date_BEGIN = "$query_date $time_BEGIN";
|
|
||||||
$query_date_END = "$query_date $time_END";
|
|
||||||
|
|
||||||
if ($file_download < 1)
|
|
||||||
{
|
|
||||||
$ASCII_text.=_QXZ("Agent Days Status Report",24).": $user $NOW_TIME ($db_source)\n";
|
|
||||||
$ASCII_text.=_QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$file_output .= _QXZ("Agent Days Status Report",24).": $user $NOW_TIME ($db_source)\n";
|
|
||||||
$file_output .= _QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$statuses='-';
|
|
||||||
$statusesTXT='';
|
|
||||||
$statusesHEAD='';
|
|
||||||
$statusesHTML='';
|
|
||||||
$statusesFILE='';
|
|
||||||
$statusesARY[0]='';
|
|
||||||
$j=0;
|
|
||||||
$dates='-';
|
|
||||||
$datesARY[0]='';
|
|
||||||
$date_namesARY[0]='';
|
|
||||||
$k=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
||||||
|
|
||||||
@@ -502,6 +458,11 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
|||||||
$ASCII_text .= _QXZ("User groups").": ".implode(', ', $user_group)."\n";
|
$ASCII_text .= _QXZ("User groups").": ".implode(', ', $user_group)."\n";
|
||||||
$ASCII_text .= _QXZ("Campaigns").": ".implode(', ', $group)."\n\n";
|
$ASCII_text .= _QXZ("Campaigns").": ".implode(', ', $group)."\n\n";
|
||||||
|
|
||||||
|
$HTML_text .= _QXZ("$report_name",24).": $user $NOW_TIME ($db_source)\n\n";
|
||||||
|
$HTML_text .= _QXZ("Time range").": $query_date $start_hour:00:00 "._QXZ("to")." $query_date $end_hour:59:59\n";
|
||||||
|
$HTML_text .= _QXZ("User groups").": ".implode(', ', $user_group)."\n";
|
||||||
|
$HTML_text .= _QXZ("Campaigns").": ".implode(', ', $group)."\n\n";
|
||||||
|
|
||||||
$stmt="select user_group, substr(event_time, 12,2) as hour, count(distinct user) as ct from ".$vicidial_agent_log_table." where event_time>='$query_date $start_hour:00:00' and event_time<='$query_date $end_hour:59:59' $group_SQL $user_group_SQL group by user_group, hour order by hour, user_group";
|
$stmt="select user_group, substr(event_time, 12,2) as hour, count(distinct user) as ct from ".$vicidial_agent_log_table." where event_time>='$query_date $start_hour:00:00' and event_time<='$query_date $end_hour:59:59' $group_SQL $user_group_SQL group by user_group, hour order by hour, user_group";
|
||||||
if ($DB) {$ASCII_text.=$stmt."\n";}
|
if ($DB) {$ASCII_text.=$stmt."\n";}
|
||||||
$rslt=mysql_to_mysqli($stmt, $link);
|
$rslt=mysql_to_mysqli($stmt, $link);
|
||||||
@@ -533,6 +494,16 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
|||||||
$ASCII_title .="| "._QXZ("USER GROUP", 20)." | "._QXZ("AGENTS", 6)." |";
|
$ASCII_title .="| "._QXZ("USER GROUP", 20)." | "._QXZ("AGENTS", 6)." |";
|
||||||
$ASCII_total .="| "._QXZ("TOTALS", 6)." | ".sprintf("%6s", $grand_total)." |";
|
$ASCII_total .="| "._QXZ("TOTALS", 6)." | ".sprintf("%6s", $grand_total)." |";
|
||||||
|
|
||||||
|
$table_columns=2;
|
||||||
|
$HTML_text.="<table border='0' cellpadding='3' cellspacing='1'>";
|
||||||
|
$HTML_text.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||||
|
$HTML_text.="<th><font size='2'>"._QXZ("USER GROUP")."</font></th>";
|
||||||
|
$HTML_text.="<th><font size='2'>"._QXZ("AGENTS")."</font></th>";
|
||||||
|
|
||||||
|
$HTML_text2.="<tr bgcolor='#".$SSstd_row1_background."'>";
|
||||||
|
$HTML_text2.="<th><font size='2'>"._QXZ("TOTALS")."</font></th>";
|
||||||
|
$HTML_text2.="<th><font size='2'>".$grand_total."</font></th>";
|
||||||
|
|
||||||
$CSV_text.="\""._QXZ("USER GROUP")."\",\""._QXZ("AGENTS")."\"";
|
$CSV_text.="\""._QXZ("USER GROUP")."\",\""._QXZ("AGENTS")."\"";
|
||||||
$CSV_total.="\""._QXZ("TOTALS")."\",\"$grand_total\"";
|
$CSV_total.="\""._QXZ("TOTALS")."\",\"$grand_total\"";
|
||||||
|
|
||||||
@@ -543,6 +514,10 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
|||||||
$ASCII_header.="--------------+";
|
$ASCII_header.="--------------+";
|
||||||
$ASCII_total.=" ".sprintf("%12s", ($hour_array[$key]+0))." |";
|
$ASCII_total.=" ".sprintf("%12s", ($hour_array[$key]+0))." |";
|
||||||
|
|
||||||
|
$HTML_text.="<th><font size='2'>".date("ha", strtotime("$key:00"))." to ".date("ha", strtotime("$key1:00"))."</font></th>";
|
||||||
|
$HTML_text2.="<th><font size='2'>".($hour_array[$key]+0)."</font></th>";
|
||||||
|
$table_columns++;
|
||||||
|
|
||||||
$CSV_text.=",\"".date("ha", strtotime("$key:00"))." to ".date("ha", strtotime("$key1:00"))."\"";
|
$CSV_text.=",\"".date("ha", strtotime("$key:00"))." to ".date("ha", strtotime("$key1:00"))."\"";
|
||||||
$CSV_total.=",\"".($hour_array[$key]+0)."\"";
|
$CSV_total.=",\"".($hour_array[$key]+0)."\"";
|
||||||
}
|
}
|
||||||
@@ -557,17 +532,25 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
|||||||
$ASCII_text.=$ASCII_title."\n";
|
$ASCII_text.=$ASCII_title."\n";
|
||||||
$ASCII_text.=$ASCII_header."\n";
|
$ASCII_text.=$ASCII_header."\n";
|
||||||
|
|
||||||
|
$HTML_text.="</tr>\n";
|
||||||
|
|
||||||
$CSV_text.="\n";
|
$CSV_text.="\n";
|
||||||
|
|
||||||
while (list($key, $val)=each($user_group_array)) {
|
while (list($key, $val)=each($user_group_array)) {
|
||||||
$ASCII_text.="| ".sprintf("%20s", $key)." | ".sprintf("%6s", $total_array[$key])." |";
|
$ASCII_text.="| ".sprintf("%20s", $key)." | ".sprintf("%6s", $total_array[$key])." |";
|
||||||
|
$HTML_text.="<tr bgcolor='#".$SSstd_row2_background."'>";
|
||||||
|
$HTML_text.="<td><font size='2'>".$key." </font></td>";
|
||||||
|
$HTML_text.="<td><font size='2'>".$total_array[$key]." </font></td>";
|
||||||
|
|
||||||
$CSV_text.="\"$key\",\"".$total_array[$key]."\"";
|
$CSV_text.="\"$key\",\"".$total_array[$key]."\"";
|
||||||
while (list($key2, $val2)=each($hour_array)) {
|
while (list($key2, $val2)=each($hour_array)) {
|
||||||
$ASCII_text.=" ".sprintf("%12s", ($hour_total_array[$key][$key2]+0))." |";
|
$ASCII_text.=" ".sprintf("%12s", ($hour_total_array[$key][$key2]+0))." |";
|
||||||
|
$HTML_text.="<td><font size='2'>".($hour_total_array[$key][$key2]+0)."</font></td>";
|
||||||
$CSV_text.=",\"".($hour_total_array[$key][$key2]+0)."\"";
|
$CSV_text.=",\"".($hour_total_array[$key][$key2]+0)."\"";
|
||||||
}
|
}
|
||||||
reset($hour_array);
|
reset($hour_array);
|
||||||
$CSV_text.="\n";
|
$CSV_text.="\n";
|
||||||
|
$HTML_text.="</tr>\n";
|
||||||
$ASCII_text.="\n";
|
$ASCII_text.="\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -576,6 +559,10 @@ if ($SUBMIT && $query_date && $start_hour && $end_hour) {
|
|||||||
$ASCII_text.=$ASCII_total."\n";
|
$ASCII_text.=$ASCII_total."\n";
|
||||||
$ASCII_text.=$ASCII_header."\n";
|
$ASCII_text.=$ASCII_header."\n";
|
||||||
|
|
||||||
|
$HTML_text2.="</tr>";
|
||||||
|
$HTML_text2.="</table>";
|
||||||
|
$HTML_text.=$HTML_text2;
|
||||||
|
|
||||||
$CSV_text.=$CSV_total."\n";
|
$CSV_text.=$CSV_total."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -709,6 +696,12 @@ if ($archives_available=="Y")
|
|||||||
echo "<input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
echo "<input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "<BR><BR>Display as:<BR>";
|
||||||
|
echo "<select name='report_display_type'>";
|
||||||
|
if ($report_display_type) {echo "<option value='$report_display_type' selected>$report_display_type</option>";}
|
||||||
|
echo "<option value='TEXT'>TEXT</option><option value='HTML'>HTML</option></select>\n<BR><BR>";
|
||||||
|
|
||||||
|
|
||||||
echo "<BR><BR><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
echo "<BR><BR><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='"._QXZ("SUBMIT")."'>\n";
|
||||||
echo "</TD><TD VALIGN=TOP ROWSPAN=2> ";
|
echo "</TD><TD VALIGN=TOP ROWSPAN=2> ";
|
||||||
|
|
||||||
@@ -737,8 +730,7 @@ echo "</FORM>";
|
|||||||
|
|
||||||
if ($report_display_type=="HTML")
|
if ($report_display_type=="HTML")
|
||||||
{
|
{
|
||||||
echo $GRAPH_text;
|
echo $HTML_text;
|
||||||
echo $JS_text;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -130,6 +130,7 @@
|
|||||||
# 170529-2337 - Added agent push events entries
|
# 170529-2337 - Added agent push events entries
|
||||||
# 170613-0855 - Added hide_inactive_lists
|
# 170613-0855 - Added hide_inactive_lists
|
||||||
# 170623-2134 - Changed parameters for password recommendations
|
# 170623-2134 - Changed parameters for password recommendations
|
||||||
|
# 170816-1057 - Added inbound after call entries
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -3031,6 +3032,32 @@ if ($SSqc_features_active > 0)
|
|||||||
<BR>
|
<BR>
|
||||||
<B><?php echo _QXZ("Populate Lead State Areacode"); ?> -</B><?php echo _QXZ("If this option is not DISABLED, then the system will look up the state that the areacode of the phone number is from and populate the state field with that value. If the OVERWRITE_ALWAYS option is selected, then every time that lead goes through this in-group, the state field will be looked up and populated again. Default is DISABLED."); ?>
|
<B><?php echo _QXZ("Populate Lead State Areacode"); ?> -</B><?php echo _QXZ("If this option is not DISABLED, then the system will look up the state that the areacode of the phone number is from and populate the state field with that value. If the OVERWRITE_ALWAYS option is selected, then every time that lead goes through this in-group, the state field will be looked up and populated again. Default is DISABLED."); ?>
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="inbound_groups-inbound_survey">
|
||||||
|
<BR>
|
||||||
|
<B><?php echo _QXZ("After Call Survey"); ?> -</B><?php echo _QXZ("If this option is ENABLED, then the customer calling in to this In-Group will be asked if they would like to participate in a survey after their call has been handled by an agent. Default is DISABLED."); ?>
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="inbound_groups-inbound_survey_filename">
|
||||||
|
<BR>
|
||||||
|
<B><?php echo _QXZ("After Call Survey Accept Filename"); ?> -</B><?php echo _QXZ("If the After Call Survey option is enabled above, this is the filename of the audio prompt that is played to ask the customer if they want to participate in the survey."); ?>
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="inbound_groups-inbound_survey_accept_digit">
|
||||||
|
<BR>
|
||||||
|
<B><?php echo _QXZ("After Call Survey Accept Digit"); ?> -</B><?php echo _QXZ("If the After Call Survey option is enabled above, this is the digit that the customer must press to have their call set to take a survey after the agent has handled their call."); ?>
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="inbound_groups-inbound_survey_question_filename">
|
||||||
|
<BR>
|
||||||
|
<B><?php echo _QXZ("After Call Question Filename"); ?> -</B><?php echo _QXZ("If the After Call Survey option is enabled above, and if the customer has chosen to take the survey, this is the audio prompt filename that will play the question to the customer."); ?>
|
||||||
|
|
||||||
|
<BR>
|
||||||
|
<A NAME="inbound_groups-inbound_survey_callmenu">
|
||||||
|
<BR>
|
||||||
|
<B><?php echo _QXZ("After Call End Call Menu"); ?> -</B><?php echo _QXZ("If the After Call Survey option is enabled above, this is the Call Menu that the customer will be sent to after the customer has responded to the survey question. This option can allow the customer to answer additional questions within Call Menus if desired. If this field is blank, the customer phone call will be hung up after they respond to the question."); ?>
|
||||||
|
|
||||||
|
|
||||||
<BR>
|
<BR>
|
||||||
<A NAME="inbound_groups-customer_chat_link">
|
<A NAME="inbound_groups-customer_chat_link">
|
||||||
<BR>
|
<BR>
|
||||||
|
|||||||
Reference in New Issue
Block a user