added SURVEY script functionality to ALL_outbound script
added posttime update to ALL_inbound script to prevent timeouts on playing of hold message added calls-in-queue display to agent vicidial.php screen git-svn-id: svn://192.168.202.10@869 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -114,6 +114,8 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
|
||||
23. Added a new inbound/closer report for showing service levels
|
||||
|
||||
24. Added Calls in Queue counter to agent vicidial.php screen
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1312,6 +1312,22 @@ if ($agent_search_method =~ /^LO|^LB/)
|
||||
}
|
||||
if ($hold_message_counter > $prompt_interval)
|
||||
{
|
||||
$now_date_epoch = time();
|
||||
$FDtarget = ($now_date_epoch + 10);
|
||||
($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget);
|
||||
$Fyear = ($Fyear + 1900);
|
||||
$Fmon++;
|
||||
if ($Fmon < 10) {$Fmon = "0$Fmon";}
|
||||
if ($Fmday < 10) {$Fmday = "0$Fmday";}
|
||||
if ($Fhour < 10) {$Fhour = "0$Fhour";}
|
||||
if ($Fmin < 10) {$Fmin = "0$Fmin";}
|
||||
if ($Fsec < 10) {$Fsec = "0$Fsec";}
|
||||
$FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec";
|
||||
|
||||
$stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
|
||||
|
||||
$AGI->stream_file('sip-silence'); # stop music-on-hold process
|
||||
$AGI->stream_file("$onhold_prompt_filename"); # this prompt must be less than 10 seconds long
|
||||
$hold_message_counter = 0;
|
||||
|
||||
@@ -20,20 +20,35 @@
|
||||
# ; - LB - <default> Load Balance total system
|
||||
# ; - LO - Load Balance Overflow only (priority to home server)
|
||||
# ; - SO - Home server only
|
||||
# ; 3. the sound file to play when doing a SURVEY, REMINDER, REMINDX campaign
|
||||
# ; 4. the acceptible dtmf digits for a SURVEY
|
||||
# ; 5. the out-opt digit for a SURVEY (must be in the digit map)
|
||||
# ; 6. the sound file to play for a SURVEY when transfering to an agent
|
||||
# ; 7. the sound file to play for a SURVEY when DNCing the call
|
||||
# ; 8. OPTIN or OPTOUT: if OPTIN call is only sent to agent with button press
|
||||
# ; if OPTOUT call is sent to agent if no button press at all
|
||||
#
|
||||
# ;outbound VICIDIAL calls:
|
||||
#exten => 8368,1,Answer ; Answer the line
|
||||
#exten => 8368,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
#exten => 8368,2,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
|
||||
#exten => 8368,3,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
|
||||
#exten => 8368,4,AGI(agi-VDAD_ALL_outbound.agi,NORMAL-----LB)
|
||||
#exten => 8368,5,Hangup
|
||||
#
|
||||
# ;outbound VICIDIAL calls:
|
||||
#exten => 8366,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
#exten => 8366,2,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT)
|
||||
#exten => 8366,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT)
|
||||
#exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT)
|
||||
#exten => 8366,5,Hangup
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 80218-2027 - First Build
|
||||
# 80302-0232 - added drop_action and transfer to in-group
|
||||
# 80430-1144 - added term_reason to vicidial_log, QUEUETIMEOUT
|
||||
# 80520-0059 - added SURVEY ability and digit maps
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||
@@ -55,6 +70,7 @@ if ($sec < 10) {$sec = "0$sec";}
|
||||
$now_date_epoch = time();
|
||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$CLInow_date = "$year-$mon-$mday\\ $hour:$min:$sec";
|
||||
$start_time_epoch = $now_date_epoch;
|
||||
$start_time=$now_date;
|
||||
$CIDdate = "$mon$mday$hour$min$sec";
|
||||
$tsSQLdate = "$year$mon$mday$hour$min$sec";
|
||||
@@ -72,6 +88,17 @@ if ($Bmin < 10) {$Bmin = "0$Bmin";}
|
||||
if ($Bsec < 10) {$Bsec = "0$Bsec";}
|
||||
$BDtsSQLdate = "$Byear$Bmon$Bmday$Bhour$Bmin$Bsec";
|
||||
|
||||
$FDtarget = ($now_date_epoch + 120);
|
||||
($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget);
|
||||
$Fyear = ($Fyear + 1900);
|
||||
$Fmon++;
|
||||
if ($Fmon < 10) {$Fmon = "0$Fmon";}
|
||||
if ($Fmday < 10) {$Fmday = "0$Fmday";}
|
||||
if ($Fhour < 10) {$Fhour = "0$Fhour";}
|
||||
if ($Fmin < 10) {$Fmin = "0$Fmin";}
|
||||
if ($Fsec < 10) {$Fsec = "0$Fsec";}
|
||||
$FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec";
|
||||
|
||||
|
||||
|
||||
# default path to astguiclient configuration file:
|
||||
@@ -135,18 +162,18 @@ while ($sthArows > $rec_count)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$DBvoicemail_dump_exten = "$aryA[0]";
|
||||
$DBext_context = "$aryA[1]";
|
||||
$DBext_context = "$aryA[1]";
|
||||
$DBanswer_transfer_agent = "$aryA[2]";
|
||||
$DBSERVER_GMT = "$aryA[3]";
|
||||
$DBSERVER_GMT = "$aryA[3]";
|
||||
$DBasterisk_version = "$aryA[4]";
|
||||
$DBmax_vicidial_trunks = "$aryA[5]";
|
||||
$DBagi_output = "$aryA[6]";
|
||||
$DBagi_output = "$aryA[6]";
|
||||
if ($DBvoicemail_dump_exten) {$voicemail_dump_exten = $DBvoicemail_dump_exten;}
|
||||
if ($DBext_context) {$ext_context = $DBext_context;}
|
||||
if ($DBext_context) {$ext_context = $DBext_context;}
|
||||
if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;}
|
||||
if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;}
|
||||
if ($DBasterisk_version) {$AST_ver = $DBasterisk_version;}
|
||||
if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;}
|
||||
if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;}
|
||||
if ($DBasterisk_version) {$AST_ver = $DBasterisk_version;}
|
||||
if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;}
|
||||
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
|
||||
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
|
||||
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
|
||||
@@ -171,13 +198,18 @@ if (length($ARGV[0])>1)
|
||||
|
||||
$call_handle_method = $ARGV_vars[0];
|
||||
$agent_search_method = $ARGV_vars[1];
|
||||
|
||||
$playback_message = $ARGV_vars[2];
|
||||
$digit_map = $ARGV_vars[3];
|
||||
$opt_out_digit = $ARGV_vars[4];
|
||||
$opt_in_message = $ARGV_vars[5];
|
||||
$opt_out_message = $ARGV_vars[6];
|
||||
$opt_inout = $ARGV_vars[7];
|
||||
}
|
||||
|
||||
if ($call_handle_method !~ /NORMAL|TEST|BROADCAST|SURVEY|REMIND/) {$call_handle_method='NORMAL';}
|
||||
if ($agent_search_method !~ /LB|LO|SO/) {$agent_search_method='LB';}
|
||||
|
||||
if ($call_handle_method =~ /BROADCAST|SURVEY/) {$vdlog_status='PU';}
|
||||
if ($call_handle_method =~ /BROADCAST|SURVEY|REMIND/) {$vdlog_status='PU';}
|
||||
else {$vdlog_status='QUEUE';}
|
||||
|
||||
$|=1;
|
||||
@@ -321,7 +353,7 @@ if ($affected_rows > 0)
|
||||
$sthA->finish();
|
||||
|
||||
### Grab campaign values from the database
|
||||
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
|
||||
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -339,6 +371,7 @@ if ($affected_rows > 0)
|
||||
$CAMP_callorder = "$aryA[4]";
|
||||
$VDADvoicemail_ext = "$aryA[5]";
|
||||
$drop_inbound_group = "$aryA[6]";
|
||||
$use_internal_dnc = "$aryA[7]";
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -418,11 +451,128 @@ if ($affected_rows > 0)
|
||||
}
|
||||
|
||||
|
||||
##### PLAY SURVEY/REMINDER MESSAGE #####
|
||||
#if ($call_handle_method =~ /SURVEY|REMIND/)
|
||||
# {
|
||||
# $AGI->stream_file("$welcome_message_filename");
|
||||
# }
|
||||
##### PLAY REMINDER MESSAGE #####
|
||||
if ($call_handle_method =~ /REMIND/)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
|
||||
|
||||
$AGI->stream_file("$playback_message");
|
||||
}
|
||||
|
||||
##### DO THE SURVEY #####
|
||||
if ($call_handle_method =~ /SURVEY/)
|
||||
{
|
||||
$AGI->stream_file('sip-silence');
|
||||
|
||||
$stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
|
||||
|
||||
# play the message and let them press a number
|
||||
$opt_code = enter_pin_number($playback_message,$digit_map);
|
||||
|
||||
if (length($opt_code) < 1) {$opt_code = 'X';}
|
||||
# record what they entered
|
||||
$stmtA = "UPDATE vicidial_list set security_phrase='$opt_code' where lead_id = '$CIDlead_id';";
|
||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vicidial_list OPT_CODE update: |$affected_rows|$CIDlead_id|$opt_code|";
|
||||
&agi_output;
|
||||
}
|
||||
|
||||
# they opted out
|
||||
if ("$opt_code" eq "$opt_out_digit")
|
||||
{
|
||||
if ( $opt_out_message ne "")
|
||||
{
|
||||
$AGI->stream_file($opt_out_message);
|
||||
}
|
||||
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vac record deleted: |$affected_rows|$VDADcampaign|";
|
||||
&agi_output;
|
||||
}
|
||||
|
||||
# $stmtA ="UPDATE vicidial_log set status='DNC',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds' where uniqueid = '$uniqueid';";
|
||||
$Euniqueid=$uniqueid;
|
||||
$Euniqueid =~ s/\.\d+//gi;
|
||||
$now_date_epoch = time();
|
||||
$drop_seconds = $now_date_epoch - $start_time_epoch;
|
||||
$stmtA = "UPDATE vicidial_log FORCE INDEX(lead_id) set status='DNC',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',term_reason='CALLER' where lead_id = '$CIDlead_id' and uniqueid LIKE \"$Euniqueid%\";";
|
||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vicidial_log update: DNC|$affected_rows|$uniqueid";
|
||||
&agi_output;
|
||||
}
|
||||
|
||||
$stmtA = "UPDATE vicidial_list set status='DNC' where lead_id = '$CIDlead_id';";
|
||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vicidial_list update: DNC|$affected_rows|$CIDlead_id";
|
||||
&agi_output;
|
||||
}
|
||||
|
||||
if ($use_internal_dnc =~ /Y/)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_dnc set phone_number='$VDADphone';";
|
||||
if ($AGILOG) { $agi_string = "|$stmtA|"; &agi_output; }
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG)
|
||||
{
|
||||
$agi_string = "-- VDAD vicidial_dnc insert: $affected_rows|$VDADphone";
|
||||
&agi_output;
|
||||
}
|
||||
}
|
||||
|
||||
$AGI->hangup();
|
||||
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
# they opted in
|
||||
if ( ($opt_code =~ /\d/) || ($opt_inout =~ /OPTOUT/) )
|
||||
{
|
||||
$now_date_epoch = time();
|
||||
$FDtarget = ($now_date_epoch + 60);
|
||||
($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget);
|
||||
$Fyear = ($Fyear + 1900);
|
||||
$Fmon++;
|
||||
if ($Fmon < 10) {$Fmon = "0$Fmon";}
|
||||
if ($Fmday < 10) {$Fmday = "0$Fmday";}
|
||||
if ($Fhour < 10) {$Fhour = "0$Fhour";}
|
||||
if ($Fmin < 10) {$Fmin = "0$Fmin";}
|
||||
if ($Fsec < 10) {$Fsec = "0$Fsec";}
|
||||
$FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec";
|
||||
|
||||
$stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAC posttime record: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
|
||||
|
||||
if ( $opt_in_message ne "")
|
||||
{
|
||||
$AGI->stream_file($opt_in_message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$AGI->hangup();
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$drop_timer=0;
|
||||
@@ -921,6 +1071,9 @@ exit;
|
||||
sub enter_pin_number
|
||||
{
|
||||
|
||||
$sound = $_[0];
|
||||
$digit_map = $_[1];
|
||||
|
||||
$digits_to_collect =~ s/DIGITID//gi;
|
||||
|
||||
# please enter the pin number followed by the pound key
|
||||
@@ -931,7 +1084,7 @@ undef $digit;
|
||||
$interrupt_digit='';
|
||||
undef $interrupt_digit;
|
||||
|
||||
$interrupt_digit = $AGI->stream_file('four_digit_id','123456789');
|
||||
$interrupt_digit = $AGI->stream_file("$sound","$digit_map");
|
||||
|
||||
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit|"; &agi_output;}
|
||||
|
||||
@@ -939,16 +1092,8 @@ $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;}
|
||||
|
||||
$interrupt_digit = $interrupt_digit - 48;
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
}
|
||||
@@ -976,6 +1121,8 @@ while ( ($digit_loop_counter < $digits_to_collect) )
|
||||
$totalDTMF =~ s/\D//gi;
|
||||
$pin = $totalDTMF;
|
||||
if ($totalDTMF) {if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}}
|
||||
|
||||
return $pin;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -358,9 +358,9 @@ exten => 8365,5,Hangup
|
||||
|
||||
; VICIDIAL_auto_dialer transfer script SURVEY at beginning:
|
||||
exten => 8366,1,AGI(agi://127.0.0.1:4577/call_log)
|
||||
exten => 8366,2,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
|
||||
exten => 8366,3,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
|
||||
exten => 8366,4,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
|
||||
exten => 8366,2,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact)
|
||||
exten => 8366,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact)
|
||||
exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact)
|
||||
exten => 8366,5,Hangup
|
||||
|
||||
; VICIDIAL_auto_dialer transfer script Load Balance Overflow:
|
||||
@@ -413,8 +413,8 @@ exten => 8372,5,Hangup
|
||||
;; VICIDIAL_auto_dialer transfer script SURVEY at beginning:
|
||||
;exten => 8366,1,Playback(sip-silence)
|
||||
;exten => 8366,2,AGI(agi://127.0.0.1:4577/call_log)
|
||||
;exten => 8366,3,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
|
||||
;exten => 8366,4,AGI(agi-VDADtransferSURVEY.agi,${EXTEN})
|
||||
;exten => 8366,3,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT)
|
||||
;exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT)
|
||||
;exten => 8366,5,Hangup
|
||||
;
|
||||
;; VICIDIAL_auto_dialer transfer script Load Balance Overflow:
|
||||
|
||||
@@ -160,6 +160,7 @@ Group Shifts -<\/B> This is a selectable list of shifts that can restrict the ag
|
||||
Gender: ||
|
||||
Date of Birth: ||
|
||||
YOU MUST BE PAUSED TO CHANGE GROUPS||
|
||||
Calls in Queue:||
|
||||
|
||||
|
||||
############################################################ MANAGER Manual
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
# 70319-1542 - Added agent disabled display function
|
||||
# 71122-0205 - Added vicidial_live_agent status output
|
||||
# 80424-0442 - Added non_latin lookup from system_settings
|
||||
# 80519-1425 - Added calls-in-queue tally
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -96,6 +97,10 @@ if (!isset($format)) {$format="text";}
|
||||
if (!isset($ACTION)) {$ACTION="refresh";}
|
||||
if (!isset($client)) {$client="agc";}
|
||||
|
||||
$Alogin='N';
|
||||
$RingCalls='N';
|
||||
$DiaLCalls='N';
|
||||
|
||||
$version = '2.0.4-12';
|
||||
$build = '71122-0205';
|
||||
$StarTtime = date("U");
|
||||
@@ -207,30 +212,45 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
if ($campagentstdisp == 'YES')
|
||||
{
|
||||
### grab the status of this agent to display
|
||||
$stmt="SELECT status,campaign_id from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
$stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$Alogin=$row[0];
|
||||
$Acampaign=$row[1];
|
||||
$AccampSQL=$row[2];
|
||||
$AccampSQL = ereg_replace(' -','', $AccampSQL);
|
||||
$AccampSQL = ereg_replace(' ',"','", $AccampSQL);
|
||||
|
||||
### grab the number of calls being placed from this server and campaign
|
||||
$stmt="SELECT count(*) from vicidial_auto_calls where server_ip='$server_ip' and status NOT IN('XFER') and campaign_id='$Acampaign';";
|
||||
$stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$RingCalls=$row[0];
|
||||
if ($RingCalls > 0) {$RingCalls = "<font class=\"queue_text_red\">Calls in Queue: $RingCalls</font>";}
|
||||
else {$RingCalls = "<font class=\"queue_text\">Calls in Queue: $RingCalls</font>";}
|
||||
|
||||
### grab the number of calls being placed from this server and campaign
|
||||
$stmt="SELECT count(*) from vicidial_auto_calls where status NOT IN('XFER') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$DiaLCalls=$row[0];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$Alogin='N';
|
||||
$RingCalls='N';
|
||||
$DiaLCalls='N';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$Alogin='N';
|
||||
$RingCalls='N';
|
||||
$DiaLCalls='N';
|
||||
|
||||
### update the vicidial_live_agents every second with a new random number so it is shown to be alive
|
||||
$stmt="UPDATE vicidial_live_agents set random_id='$random' where user='$user' and server_ip='$server_ip';";
|
||||
@@ -242,7 +262,7 @@ echo "<BODY BGCOLOR=white marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>
|
||||
if ($Acount < 1) {$Alogin='DEAD_VLA';}
|
||||
if ($AexternalDEAD > 0) {$Alogin='DEAD_EXTERNAL';}
|
||||
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . "|\n";
|
||||
echo 'DateTime: ' . $NOW_TIME . '|UnixTime: ' . $StarTtime . '|Logged-in: ' . $Alogin . '|CampCalls: ' . $RingCalls . '|Status: ' . $Astatus . '|DiaLCalls: ' . $DiaLCalls . "|\n";
|
||||
|
||||
}
|
||||
$total_conf=0;
|
||||
|
||||
@@ -175,10 +175,11 @@
|
||||
# 80428-0413 - UTF8 changes and testing
|
||||
# 80505-0054 - Added multi-phones load-balanced alias option
|
||||
# 80507-0932 - Fixed Script display bug (+ instead of space)
|
||||
# 80519-1425 - Added calls in queue display
|
||||
#
|
||||
|
||||
$version = '2.0.5-154';
|
||||
$build = '80507-0932';
|
||||
$version = '2.0.5-155';
|
||||
$build = '80519-1425';
|
||||
|
||||
require("dbconnect.php");
|
||||
|
||||
@@ -272,8 +273,9 @@ $multi_line_comments = '1'; # set to 1 to allow multi-line comment box
|
||||
$user_login_first = '0'; # set to 1 to have the vicidial_user login before the phone login
|
||||
$view_scripts = '1'; # set to 1 to show the SCRIPTS tab
|
||||
$dispo_check_all_pause = '0'; # set to 1 to allow for persistent pause after dispo
|
||||
$agentcallsstatus = '0'; # set to 1 to show agent status and call count
|
||||
$campagentstatctmax = '0'; # Number of seconds for campaign call and agent stats
|
||||
$callholdstatus = '1'; # set to 1 to show calls on hold count
|
||||
$agentcallsstatus = '0'; # set to 1 to show agent status and call dialed count
|
||||
$campagentstatctmax = '3'; # Number of seconds for campaign call and agent stats
|
||||
$show_campname_pulldown = '1'; # set to 1 to show campaign name on login pulldown
|
||||
$webform_sessionname = '1'; # set to 1 to include the session_name in webform URL
|
||||
$local_consult_xfers = '1'; # set to 1 to send consultative transfers from original server
|
||||
@@ -1884,6 +1886,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var AgainCalLSecondS = '';
|
||||
var AgaiNCalLCID = '';
|
||||
var CB_count_check = 60;
|
||||
var callholdstatus = '<? echo $callholdstatus ?>'
|
||||
var agentcallsstatus = '<? echo $agentcallsstatus ?>'
|
||||
var campagentstatctmax = '<? echo $campagentstatctmax ?>'
|
||||
var campagentstatct = '0';
|
||||
@@ -2327,7 +2330,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
if (typeof(xmlhttprequestcheckconf) == "undefined") {
|
||||
//alert (xmlhttprequestcheckconf == xmlhttpSendConf);
|
||||
custchannellive--;
|
||||
if (agentcallsstatus == '1')
|
||||
if ( (agentcallsstatus == '1') || (callholdstatus == '1') )
|
||||
{
|
||||
campagentstatct++;
|
||||
if (campagentstatct > campagentstatctmax)
|
||||
@@ -2387,12 +2390,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
UnixTime = parseInt(UnixTime);
|
||||
UnixTimeMS = (UnixTime * 1000);
|
||||
t.setTime(UnixTimeMS);
|
||||
if ( (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') )
|
||||
if ( (callholdstatus == '1') || (agentcallsstatus == '1') || (vicidial_agent_disable != 'NOT_ACTIVE') )
|
||||
{
|
||||
var Alogin_array = check_time_array[2].split("Logged-in: ");
|
||||
var AGLogiN = Alogin_array[1];
|
||||
var CamPCalLs_array = check_time_array[3].split("CampCalls: ");
|
||||
var CamPCalLs = CamPCalLs_array[1];
|
||||
var DiaLCalLs_array = check_time_array[5].split("DiaLCalls: ");
|
||||
var DiaLCalLs = DiaLCalLs_array[1];
|
||||
if (AGLogiN != 'N')
|
||||
{
|
||||
document.getElementById("AgentStatusStatus").innerHTML = AGLogiN;
|
||||
@@ -2401,6 +2406,10 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
{
|
||||
document.getElementById("AgentStatusCalls").innerHTML = CamPCalLs;
|
||||
}
|
||||
if (DiaLCalLs != 'N')
|
||||
{
|
||||
document.getElementById("AgentStatusDiaLs").innerHTML = DiaLCalLs;
|
||||
}
|
||||
if ( (AGLogiN == 'DEAD_VLA') && ( (vicidial_agent_disable == 'LIVE_AGENT') || (vicidial_agent_disable == 'ALL') ) )
|
||||
{
|
||||
showDiv('AgenTDisablEBoX');
|
||||
@@ -6046,6 +6055,8 @@ else
|
||||
// if ( (agentcall_manual != '1') && (starting_dial_level > 0) )
|
||||
if (agentcall_manual != '1')
|
||||
{hideDiv('ManuaLDiaLButtons');}
|
||||
if (callholdstatus != '1')
|
||||
{hideDiv('AgentStatusCalls');}
|
||||
if (agentcallsstatus != '1')
|
||||
{hideDiv('AgentStatusSpan');}
|
||||
if ( (auto_dial_level != 0) || (manual_dial_preview != 1) )
|
||||
@@ -6575,6 +6586,8 @@ else
|
||||
div.scroll_script {height: <?=$SSheight ?>px; width: <?=$SDwidth ?>px; background: #FFF5EC; overflow: scroll; font-size: 12px; font-family: sans-serif;}
|
||||
div.text_input {overflow: auto; font-size: 10px; font-family: sans-serif;}
|
||||
.body_text {font-size: 13px; font-family: sans-serif;}
|
||||
.queue_text_red {font-size: 12px; font-family: sans-serif; font-weight: bold; color: red}
|
||||
.queue_text {font-size: 12px; font-family: sans-serif; color: black}
|
||||
.preview_text {font-size: 13px; font-family: sans-serif; background: #CCFFCC}
|
||||
.preview_text_red {font-size: 13px; font-family: sans-serif; background: #FFCCCC}
|
||||
.body_small {font-size: 11px; font-family: sans-serif;}
|
||||
@@ -6617,7 +6630,7 @@ echo "</head>\n";
|
||||
<TR VALIGN=TOP ALIGN=LEFT>
|
||||
<TD ALIGN=LEFT WIDTH=115><A HREF="#" onclick="MainPanelToFront('NO');"><IMG SRC="./images/vdc_tab_vicidial.gif" ALT="VICIDIAL" WIDTH=115 HEIGHT=30 BORDER=0></A></TD>
|
||||
<TD ALIGN=LEFT WIDTH=105><A HREF="#" onclick="ScriptPanelToFront();"><IMG SRC="./images/vdc_tab_script.gif" ALT="SCRIPT" WIDTH=105 HEIGHT=30 BORDER=0></A></TD>
|
||||
<TD WIDTH=<?=$HSwidth ?> VALIGN=MIDDLE ALIGN=CENTER><font class="body_text"> <span id=status>LIVE</span> session ID: <span id=sessionIDspan></span></TD>
|
||||
<TD WIDTH=<?=$HSwidth ?> VALIGN=MIDDLE ALIGN=CENTER><font class="body_text"> <span id=status>LIVE</span> session ID: <span id=sessionIDspan></span> <span id=AgentStatusCalls></span></TD>
|
||||
<TD WIDTH=109><IMG SRC="./images/agc_live_call_OFF.gif" NAME=livecall ALT="Live Call" WIDTH=109 HEIGHT=30 BORDER=0></TD>
|
||||
</TR></TABLE>
|
||||
</span>
|
||||
@@ -6709,7 +6722,7 @@ echo "</head>\n";
|
||||
|
||||
|
||||
<span style="position:absolute;left:35px;top:<?=$CBheight ?>px;z-index:20;" id="AgentStatusSpan"><font class="body_text">
|
||||
Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="AgentStatusCalls"></span>
|
||||
Your Status: <span id="AgentStatusStatus"></span> <BR>Calls Dialing: <span id="AgentStatusDiaLs"></span>
|
||||
</font></span>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user