diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE
index 28352845..fe75ea5f 100644
--- a/agc_2-X/trunk/UPGRADE
+++ b/agc_2-X/trunk/UPGRADE
@@ -23,6 +23,11 @@ REQUIRED STEPS!!!
\. /path/from/root/extras/upgrade_2.4.sql
quit
+3. For each of your ViciDial servers, go the Admin -> Servers -> Modify Server
+ page and set each one to "Rebuild conf files = Y" and click submit.
+ This will rebuild the conf files to ensure any changes are updated.
+
+
OTHER CHANGES:
1. Changed "After hours", "No agent no queue" and "drop timeout reached" DROPs
@@ -139,6 +144,11 @@ OTHER CHANGES:
32. Added several PRESS-1 options to the Hold Time Option settings for In-Groups
+33. Added Call Time after-hours filename override option used by inbound groups
+
+34. Added Campaign setting for inbound queue no dial that will prohibit outbound
+ auto-dialing if there are any allowed in-group calls in queue if enabled
+
diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi
index 19cc0118..ef10ec9c 100644
--- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi
+++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi
@@ -128,6 +128,7 @@
# 100429-1457 - Remote agent fixes
# 100512-2118 - Added several press-1 hold time options
# 100513-2338 - Changed hold time callback filename to after press filename and now plays after all PRESS-1
+# 100518-0710 - Added call time after hours override options
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -610,25 +611,27 @@ while ($sthArows > $cbc)
}
$sthA->finish();
-if ($wday==0) {$daySQL=',ct_sunday_start,ct_sunday_stop';}
-if ($wday==1) {$daySQL=',ct_monday_start,ct_monday_stop';}
-if ($wday==2) {$daySQL=',ct_tuesday_start,ct_tuesday_stop';}
-if ($wday==3) {$daySQL=',ct_wednesday_start,ct_wednesday_stop';}
-if ($wday==4) {$daySQL=',ct_thursday_start,ct_thursday_stop';}
-if ($wday==5) {$daySQL=',ct_friday_start,ct_friday_stop';}
-if ($wday==6) {$daySQL=',ct_saturday_start,ct_saturday_stop';}
+if ($wday==0) {$daySQL=',ct_sunday_start,ct_sunday_stop,sunday_afterhours_filename_override';}
+if ($wday==1) {$daySQL=',ct_monday_start,ct_monday_stop,monday_afterhours_filename_override';}
+if ($wday==2) {$daySQL=',ct_tuesday_start,ct_tuesday_stop,tuesday_afterhours_filename_override';}
+if ($wday==3) {$daySQL=',ct_wednesday_start,ct_wednesday_stop,wednesday_afterhours_filename_override';}
+if ($wday==4) {$daySQL=',ct_thursday_start,ct_thursday_stop,thursday_afterhours_filename_override';}
+if ($wday==5) {$daySQL=',ct_friday_start,ct_friday_stop,friday_afterhours_filename_override';}
+if ($wday==6) {$daySQL=',ct_saturday_start,ct_saturday_stop,saturday_afterhours_filename_override';}
### Grab call_times values from the database
-$stmtA = "SELECT ct_default_start,ct_default_stop $daySQL FROM vicidial_call_times where call_time_id = '$call_time_id';";
+$stmtA = "SELECT ct_default_start,ct_default_stop,default_afterhours_filename_override $daySQL FROM vicidial_call_times where call_time_id = '$call_time_id';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02006'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
@aryA = $sthA->fetchrow_array;
-$ct_default_start = $aryA[0];
-$ct_default_stop = $aryA[1];
-$ct_day_start = $aryA[2];
-$ct_day_stop = $aryA[3];
+$ct_default_start = $aryA[0];
+$ct_default_stop = $aryA[1];
+$deafult_afterhours_filename_override = $aryA[2];
+$ct_day_start = $aryA[3];
+$ct_day_stop = $aryA[4];
+$day_afterhours_filename_override = $aryA[5];
$sthA->finish();
if ( ($ct_day_start > 0) || ($ct_day_stop > 0) )
@@ -637,6 +640,11 @@ if ( ($ct_day_start > 0) || ($ct_day_stop > 0) )
$ct_default_stop = $ct_day_stop;
}
+if ( (length($deafult_afterhours_filename_override) > 0) && ($deafult_afterhours_filename_override !~ /---NONE---/) )
+ {$after_hours_message_filename = $deafult_afterhours_filename_override;}
+if ( (length($day_afterhours_filename_override) > 0) && ($day_afterhours_filename_override !~ /---NONE---/) )
+ {$after_hours_message_filename = $day_afterhours_filename_override;}
+
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
@@ -849,6 +857,7 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02019'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- AH VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
+ if ($AGILOG) {$agi_string = "-- AH action: |$$after_hours_action|$after_hours_exten|$after_hours_message_filename|$after_hours_voicemail|"; &agi_output;}
if ($after_hours_action =~ /EXTENSION|VOICEMAIL|IN_GROUP/)
{
@@ -2990,6 +2999,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 10);} # add prompt play time to total queue time
+ $AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
diff --git a/agc_2-X/trunk/bin/AST_VDauto_dial.pl b/agc_2-X/trunk/bin/AST_VDauto_dial.pl
index 1ec8438e..ffad89e0 100644
--- a/agc_2-X/trunk/bin/AST_VDauto_dial.pl
+++ b/agc_2-X/trunk/bin/AST_VDauto_dial.pl
@@ -299,6 +299,8 @@ while($one_day_interval > 0)
@DBIPcampaigncid=@MT;
@DBIPexistcalls=@MT;
@DBIPexistcalls_IN=@MT;
+ @DBIPexistcalls_IN_ALL=@MT;
+ @DBIPexistcalls_IN_LIVE=@MT;
@DBIPexistcalls_OUT=@MT;
@DBIPgoalcalls=@MT;
@DBIPmakecalls=@MT;
@@ -315,6 +317,7 @@ while($one_day_interval > 0)
@DBIPqueue_priority=@MT;
@DBIPdial_method=@MT;
@DBIPuse_custom_cid=@MT;
+ @DBIPinbound_queue_no_dial=@MT;
$active_line_counter=0;
$user_counter=0;
@@ -509,7 +512,7 @@ while($one_day_interval > 0)
### grab the dial_level and multiply by active agents to get your goalcalls
$DBIPadlevel[$user_CIPct]=0;
- $stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
+ $stmtA = "SELECT auto_dial_level,local_call_time,dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,closer_campaigns,omit_phone_code,available_only_ratio_tally,auto_alt_dial,campaign_allow_inbound,queue_priority,dial_method,use_custom_cid,inbound_queue_no_dial FROM vicidial_campaigns where campaign_id='$DBIPcampaign[$user_CIPct]'";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -540,6 +543,7 @@ while($one_day_interval > 0)
$DBIPqueue_priority[$user_CIPct] = $aryA[12];
$DBIPdial_method[$user_CIPct] = $aryA[13];
$DBIPuse_custom_cid[$user_CIPct] = $aryA[14];
+ $DBIPinbound_queue_no_dial[$user_CIPct] = $aryA[15];
$rec_count++;
}
@@ -593,6 +597,28 @@ while($one_day_interval > 0)
$DBIPexistcalls_IN[$user_CIPct] = $aryA[0];
}
$sthA->finish();
+
+ $stmtA = "SELECT count(*) FROM vicidial_auto_calls where (call_type='IN' and campaign_id IN($DBIPclosercamp[$user_CIPct])) and status IN('SENT','RINGING','LIVE','XFER','CLOSER');";
+ $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;
+ $DBIPexistcalls_IN_ALL[$user_CIPct] = $aryA[0];
+ }
+ $sthA->finish();
+
+ $stmtA = "SELECT count(*) FROM vicidial_auto_calls where call_type='IN' and campaign_id IN($DBIPclosercamp[$user_CIPct]) and status IN('LIVE');";
+ $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;
+ $DBIPexistcalls_IN_LIVE[$user_CIPct] = $aryA[0];
+ }
+ $sthA->finish();
}
else
{$DBIPexistcalls_IN[$user_CIPct]=0;}
@@ -609,6 +635,8 @@ while($one_day_interval > 0)
$sthA->finish();
$DBIPexistcalls[$user_CIPct] = ($DBIPexistcalls_IN[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]);
+ if ($DBIPinbound_queue_no_dial[$user_CIPct] =~ /ALL_SERVERS/)
+ {$DBIPexistcalls[$user_CIPct] = ($DBIPexistcalls_IN_ALL[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]);}
if ( ($DBIPcampaign_ready_agents[$user_CIPct] > 0) && ($DBIPexistcalls_IN[$user_CIPct] > 0) )
{
@@ -666,7 +694,7 @@ while($one_day_interval > 0)
if ($DBIPmakecalls[$user_CIPct] > 0)
{$active_line_counter = ($DBIPmakecalls[$user_CIPct] + $active_line_counter);}
- $event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: Calls to place: $DBIPmakecalls[$user_CIPct] ($DBIPgoalcalls[$user_CIPct] - $DBIPexistcalls[$user_CIPct] [$DBIPexistcalls_IN[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]]) $active_line_counter $MVT_msg";
+ $event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: Calls to place: $DBIPmakecalls[$user_CIPct] ($DBIPgoalcalls[$user_CIPct] - $DBIPexistcalls[$user_CIPct] [$DBIPexistcalls_IN[$user_CIPct] + $DBIPexistcalls_OUT[$user_CIPct]|$DBIPexistcalls_IN_ALL[$user_CIPct]|$DBIPexistcalls_IN_LIVE[$user_CIPct]]) $active_line_counter $MVT_msg";
&event_logger;
### Calculate campaign-wide agent waiting and calls waiting differential
@@ -804,236 +832,244 @@ while($one_day_interval > 0)
}
else
{
- $event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: CALLING";
- &event_logger;
- $call_CMPIPct=0;
- $lead_id_call_list='|';
- my $UDaffected_rows=0;
- if ($call_CMPIPct < $DBIPmakecalls[$user_CIPct])
+ if ( ($DBIPinbound_queue_no_dial[$user_CIPct] =~ /ENABLED/) && ($DBIPexistcalls_IN_LIVE[$user_CIPct] > 0) )
{
- $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$server_ip' where campaign_id='$DBIPcampaign[$user_CIPct]' and status='READY' order by priority desc,hopper_id LIMIT $DBIPmakecalls[$user_CIPct]";
- print "|$stmtA|\n";
- $UDaffected_rows = $dbhA->do($stmtA);
- print "hopper rows updated to QUEUE: |$UDaffected_rows|\n";
-
- if ($UDaffected_rows)
+ $event_string="$DBIPcampaign[$user_CIPct] $DBIPexistcalls_IN_LIVE[$user_CIPct]: INBOUND QUEUE NO DIAL, NO DIALING";
+ &event_logger;
+ }
+ else
+ {
+ $event_string="$DBIPcampaign[$user_CIPct] $DBIPaddress[$user_CIPct]: CALLING";
+ &event_logger;
+ $call_CMPIPct=0;
+ $lead_id_call_list='|';
+ my $UDaffected_rows=0;
+ if ($call_CMPIPct < $DBIPmakecalls[$user_CIPct])
{
- $lead_id=''; $phone_code=''; $phone_number=''; $called_count='';
- while ($call_CMPIPct < $UDaffected_rows)
+ $stmtA = "UPDATE vicidial_hopper set status='QUEUE', user='VDAD_$server_ip' where campaign_id='$DBIPcampaign[$user_CIPct]' and status='READY' order by priority desc,hopper_id LIMIT $DBIPmakecalls[$user_CIPct]";
+ print "|$stmtA|\n";
+ $UDaffected_rows = $dbhA->do($stmtA);
+ print "hopper rows updated to QUEUE: |$UDaffected_rows|\n";
+
+ if ($UDaffected_rows)
{
- $stmtA = "SELECT lead_id,alt_dial FROM vicidial_hopper where campaign_id='$DBIPcampaign[$user_CIPct]' and status='QUEUE' and user='VDAD_$server_ip' order by priority desc,hopper_id LIMIT 1";
- print "|$stmtA|\n";
- $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
- $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
- $sthArows=$sthA->rows;
- $rec_count=0;
- $rec_countCUSTDATA=0;
- while ($sthArows > $rec_count)
+ $lead_id=''; $phone_code=''; $phone_number=''; $called_count='';
+ while ($call_CMPIPct < $UDaffected_rows)
{
- @aryA = $sthA->fetchrow_array;
- $lead_id = $aryA[0];
- $alt_dial = $aryA[1];
- $rec_count++;
- }
- $sthA->finish();
-
- if ($lead_id_call_list =~ /\|$lead_id\|/)
- {
- print "!!!!!!!!!!!!!!!!duplicate lead_id for this run: |$lead_id| $lead_id_call_list\n";
- if ($SYSLOG)
- {
- open(DUPout, ">>$PATHlogs/VDAD_DUPLICATE.$file_date")
- || die "Can't open $PATHlogs/VDAD_DUPLICATE.$file_date: $!\n";
- print DUPout "$now_date-----$lead_id_call_list-----$lead_id\n";
- close(DUPout);
- }
- }
- else
- {
- $stmtA = "UPDATE vicidial_hopper set status='INCALL' where lead_id='$lead_id'";
- print "|$stmtA|\n";
- $UQaffected_rows = $dbhA->do($stmtA);
- print "hopper row updated to INCALL: |$UQaffected_rows|$lead_id|\n";
-
- ### Gather lead data
- $stmtA = "SELECT list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,address3,alt_phone,called_count,security_phrase FROM vicidial_list where lead_id='$lead_id';";
- $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
- $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
- $sthArows=$sthA->rows;
- $rec_count=0;
- $rec_countCUSTDATA=0;
- if ($sthArows > 0)
- {
- @aryA = $sthA->fetchrow_array;
- $list_id = $aryA[0];
- $gmt_offset_now = $aryA[1];
- $called_since_last_reset = $aryA[2];
- $phone_code = $aryA[3];
- $phone_number = $aryA[4];
- $address3 = $aryA[5];
- $alt_phone = $aryA[6];
- $called_count = $aryA[7];
- $security_phrase = $aryA[8];
-
- $rec_countCUSTDATA++;
- $rec_count++;
- }
- $sthA->finish();
-
- if ($rec_countCUSTDATA)
- {
- $campaign_cid_override='';
- ### gather list_id overrides
- $stmtA = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_id';";
+ $stmtA = "SELECT lead_id,alt_dial FROM vicidial_hopper where campaign_id='$DBIPcampaign[$user_CIPct]' and status='QUEUE' and user='VDAD_$server_ip' order by priority desc,hopper_id LIMIT 1";
+ print "|$stmtA|\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
- $sthArowsL=$sthA->rows;
- if ($sthArowsL > 0)
+ $sthArows=$sthA->rows;
+ $rec_count=0;
+ $rec_countCUSTDATA=0;
+ while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
- $campaign_cid_override = $aryA[0];
+ $lead_id = $aryA[0];
+ $alt_dial = $aryA[1];
+ $rec_count++;
}
$sthA->finish();
- ### update called_count
- $called_count++;
- if ($called_since_last_reset =~ /^Y/)
+ if ($lead_id_call_list =~ /\|$lead_id\|/)
+ {
+ print "!!!!!!!!!!!!!!!!duplicate lead_id for this run: |$lead_id| $lead_id_call_list\n";
+ if ($SYSLOG)
{
- if ($called_since_last_reset =~ /^Y$/) {$CSLR = 'Y1';}
- else
- {
- $called_since_last_reset =~ s/^Y//gi;
- $called_since_last_reset++;
- $CSLR = "Y$called_since_last_reset";
- }
- }
- else {$CSLR = 'Y';}
-
- $LLCT_DATE_offset = ($LOCAL_GMT_OFF - $gmt_offset_now);
- $LLCT_DATE_offset_epoch = ( $secX - ($LLCT_DATE_offset * 3600) );
- ($Lsec,$Lmin,$Lhour,$Lmday,$Lmon,$Lyear,$Lwday,$Lyday,$Lisdst) = localtime($LLCT_DATE_offset_epoch);
- $Lyear = ($Lyear + 1900);
- $Lmon++;
- if ($Lmon < 10) {$Lmon = "0$Lmon";}
- if ($Lmday < 10) {$Lmday = "0$Lmday";}
- if ($Lhour < 10) {$Lhour = "0$Lhour";}
- if ($Lmin < 10) {$Lmin = "0$Lmin";}
- if ($Lsec < 10) {$Lsec = "0$Lsec";}
- $LLCT_DATE = "$Lyear-$Lmon-$Lmday $Lhour:$Lmin:$Lsec";
-
- if ( ($alt_dial =~ /ALT|ADDR3|X/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT|ADDR|X/) )
- {
- if ( ($alt_dial =~ /ALT/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT/) )
- {
- $alt_phone =~ s/\D//gi;
- $phone_number = $alt_phone;
- }
- if ( ($alt_dial =~ /ADDR3/) && ($DBIPautoaltdial[$user_CIPct] =~ /ADDR3/) )
- {
- $address3 =~ s/\D//gi;
- $phone_number = $address3;
- }
- if ( ($alt_dial =~ /X/) && ($DBIPautoaltdial[$user_CIPct] =~ /X/) )
- {
- if ($alt_dial =~ /LAST/)
- {
- $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' order by alt_phone_count desc limit 1;";
- }
- else
- {
- $Talt_dial = $alt_dial;
- $Talt_dial =~ s/\D//gi;
- $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' and alt_phone_count='$Talt_dial';";
- }
- $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;
- $phone_code = $aryA[0];
- $phone_number = $aryA[1];
- $phone_number =~ s/\D//gi;
- }
- $sthA->finish();
- }
-
- $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR',called_count='$called_count',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'";
- }
- else
- {
- $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR', called_count='$called_count',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'";
- }
- $affected_rows = $dbhA->do($stmtA);
-
- $stmtA = "DELETE FROM vicidial_hopper where lead_id='$lead_id'";
- $affected_rows = $dbhA->do($stmtA);
-
- $CCID_on=0; $CCID='';
- $local_DEF = 'Local/';
- $local_AMP = '@';
- $Local_out_prefix = '9';
- $Local_dial_timeout = '60';
- if ($DBIPdialtimeout[$user_CIPct] > 4) {$Local_dial_timeout = $DBIPdialtimeout[$user_CIPct];}
- $Local_dial_timeout = ($Local_dial_timeout * 1000);
- if (length($DBIPdialprefix[$user_CIPct]) > 0) {$Local_out_prefix = "$DBIPdialprefix[$user_CIPct]";}
- if (length($DBIPvdadexten[$user_CIPct]) > 0) {$VDAD_dial_exten = "$DBIPvdadexten[$user_CIPct]";}
- else {$VDAD_dial_exten = "$answer_transfer_agent";}
-
- if (length($DBIPcampaigncid[$user_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$user_CIPct]"; $CCID_on++;}
- if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
- if ($DBIPuse_custom_cid[$user_CIPct] =~ /Y/)
- {
- $temp_CID = $security_phrase;
- $temp_CID =~ s/\D//gi;
- if (length($temp_CID) > 6)
- {$CCID = "$temp_CID"; $CCID_on++;}
- }
-
- if ($DBIPdialprefix[$user_CIPct] =~ /x/i) {$Local_out_prefix = '';}
-
- if ($RECcount)
- {
- if ( (length($RECprefix)>0) && ($called_count < $RECcount) )
- {$Local_out_prefix .= "$RECprefix";}
- }
- $PADlead_id = sprintf("%09s", $lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
-
- if ($lists_update !~ /'$list_id'/) {$lists_update .= "'$list_id',"; $LUcount++;}
-
- $lead_id_call_list .= "$lead_id|";
-
- if (length($alt_dial)<1) {$alt_dial='MAIN';}
-
- ### whether to omit phone_code or not
- if ($DBIPomitcode[$user_CIPct] > 0)
- {$Ndialstring = "$Local_out_prefix$phone_number";}
- else
- {$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
-
- if (length($ext_context) < 1) {$ext_context='default';}
- ### use manager middleware-app to connect the next call to the meetme room
- # VmmddhhmmssLLLLLLLLL
- $VqueryCID = "V$CIDdate$PADlead_id";
- if ($CCID_on) {$CIDstring = "\"$VqueryCID\" <$CCID>";}
- else {$CIDstring = "$VqueryCID";}
- ### insert a NEW record to the vicidial_manager table to be processed
- $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DBIPaddress[$user_CIPct]','','Originate','$VqueryCID','Exten: $VDAD_dial_exten','Context: $ext_context','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','')";
- $affected_rows = $dbhA->do($stmtA);
-
- $event_string = "| number call dialed|$DBIPcampaign[$user_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|";
- &event_logger;
-
- ### insert a SENT record to the vicidial_auto_calls table
- $stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','$alt_dial','$DBIPqueue_priority[$user_CIPct]')";
- $affected_rows = $dbhA->do($stmtA);
-
- ### sleep for a five hundredths of a second to not flood the server with new calls
- # usleep(1*50*1000);
- usleep(1*$per_call_delay*1000);
+ open(DUPout, ">>$PATHlogs/VDAD_DUPLICATE.$file_date")
+ || die "Can't open $PATHlogs/VDAD_DUPLICATE.$file_date: $!\n";
+ print DUPout "$now_date-----$lead_id_call_list-----$lead_id\n";
+ close(DUPout);
}
}
- $call_CMPIPct++;
+ else
+ {
+ $stmtA = "UPDATE vicidial_hopper set status='INCALL' where lead_id='$lead_id'";
+ print "|$stmtA|\n";
+ $UQaffected_rows = $dbhA->do($stmtA);
+ print "hopper row updated to INCALL: |$UQaffected_rows|$lead_id|\n";
+
+ ### Gather lead data
+ $stmtA = "SELECT list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,address3,alt_phone,called_count,security_phrase FROM vicidial_list where lead_id='$lead_id';";
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ $rec_count=0;
+ $rec_countCUSTDATA=0;
+ if ($sthArows > 0)
+ {
+ @aryA = $sthA->fetchrow_array;
+ $list_id = $aryA[0];
+ $gmt_offset_now = $aryA[1];
+ $called_since_last_reset = $aryA[2];
+ $phone_code = $aryA[3];
+ $phone_number = $aryA[4];
+ $address3 = $aryA[5];
+ $alt_phone = $aryA[6];
+ $called_count = $aryA[7];
+ $security_phrase = $aryA[8];
+
+ $rec_countCUSTDATA++;
+ $rec_count++;
+ }
+ $sthA->finish();
+
+ if ($rec_countCUSTDATA)
+ {
+ $campaign_cid_override='';
+ ### gather list_id overrides
+ $stmtA = "SELECT campaign_cid_override FROM vicidial_lists where list_id='$list_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;
+ $campaign_cid_override = $aryA[0];
+ }
+ $sthA->finish();
+
+ ### update called_count
+ $called_count++;
+ if ($called_since_last_reset =~ /^Y/)
+ {
+ if ($called_since_last_reset =~ /^Y$/) {$CSLR = 'Y1';}
+ else
+ {
+ $called_since_last_reset =~ s/^Y//gi;
+ $called_since_last_reset++;
+ $CSLR = "Y$called_since_last_reset";
+ }
+ }
+ else {$CSLR = 'Y';}
+
+ $LLCT_DATE_offset = ($LOCAL_GMT_OFF - $gmt_offset_now);
+ $LLCT_DATE_offset_epoch = ( $secX - ($LLCT_DATE_offset * 3600) );
+ ($Lsec,$Lmin,$Lhour,$Lmday,$Lmon,$Lyear,$Lwday,$Lyday,$Lisdst) = localtime($LLCT_DATE_offset_epoch);
+ $Lyear = ($Lyear + 1900);
+ $Lmon++;
+ if ($Lmon < 10) {$Lmon = "0$Lmon";}
+ if ($Lmday < 10) {$Lmday = "0$Lmday";}
+ if ($Lhour < 10) {$Lhour = "0$Lhour";}
+ if ($Lmin < 10) {$Lmin = "0$Lmin";}
+ if ($Lsec < 10) {$Lsec = "0$Lsec";}
+ $LLCT_DATE = "$Lyear-$Lmon-$Lmday $Lhour:$Lmin:$Lsec";
+
+ if ( ($alt_dial =~ /ALT|ADDR3|X/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT|ADDR|X/) )
+ {
+ if ( ($alt_dial =~ /ALT/) && ($DBIPautoaltdial[$user_CIPct] =~ /ALT/) )
+ {
+ $alt_phone =~ s/\D//gi;
+ $phone_number = $alt_phone;
+ }
+ if ( ($alt_dial =~ /ADDR3/) && ($DBIPautoaltdial[$user_CIPct] =~ /ADDR3/) )
+ {
+ $address3 =~ s/\D//gi;
+ $phone_number = $address3;
+ }
+ if ( ($alt_dial =~ /X/) && ($DBIPautoaltdial[$user_CIPct] =~ /X/) )
+ {
+ if ($alt_dial =~ /LAST/)
+ {
+ $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' order by alt_phone_count desc limit 1;";
+ }
+ else
+ {
+ $Talt_dial = $alt_dial;
+ $Talt_dial =~ s/\D//gi;
+ $stmtA = "SELECT phone_code,phone_number FROM vicidial_list_alt_phones where lead_id='$lead_id' and alt_phone_count='$Talt_dial';";
+ }
+ $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;
+ $phone_code = $aryA[0];
+ $phone_number = $aryA[1];
+ $phone_number =~ s/\D//gi;
+ }
+ $sthA->finish();
+ }
+
+ $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR',called_count='$called_count',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'";
+ }
+ else
+ {
+ $stmtA = "UPDATE vicidial_list set called_since_last_reset='$CSLR', called_count='$called_count',user='VDAD',last_local_call_time='$LLCT_DATE' where lead_id='$lead_id'";
+ }
+ $affected_rows = $dbhA->do($stmtA);
+
+ $stmtA = "DELETE FROM vicidial_hopper where lead_id='$lead_id'";
+ $affected_rows = $dbhA->do($stmtA);
+
+ $CCID_on=0; $CCID='';
+ $local_DEF = 'Local/';
+ $local_AMP = '@';
+ $Local_out_prefix = '9';
+ $Local_dial_timeout = '60';
+ if ($DBIPdialtimeout[$user_CIPct] > 4) {$Local_dial_timeout = $DBIPdialtimeout[$user_CIPct];}
+ $Local_dial_timeout = ($Local_dial_timeout * 1000);
+ if (length($DBIPdialprefix[$user_CIPct]) > 0) {$Local_out_prefix = "$DBIPdialprefix[$user_CIPct]";}
+ if (length($DBIPvdadexten[$user_CIPct]) > 0) {$VDAD_dial_exten = "$DBIPvdadexten[$user_CIPct]";}
+ else {$VDAD_dial_exten = "$answer_transfer_agent";}
+
+ if (length($DBIPcampaigncid[$user_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$user_CIPct]"; $CCID_on++;}
+ if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
+ if ($DBIPuse_custom_cid[$user_CIPct] =~ /Y/)
+ {
+ $temp_CID = $security_phrase;
+ $temp_CID =~ s/\D//gi;
+ if (length($temp_CID) > 6)
+ {$CCID = "$temp_CID"; $CCID_on++;}
+ }
+
+ if ($DBIPdialprefix[$user_CIPct] =~ /x/i) {$Local_out_prefix = '';}
+
+ if ($RECcount)
+ {
+ if ( (length($RECprefix)>0) && ($called_count < $RECcount) )
+ {$Local_out_prefix .= "$RECprefix";}
+ }
+ $PADlead_id = sprintf("%09s", $lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
+
+ if ($lists_update !~ /'$list_id'/) {$lists_update .= "'$list_id',"; $LUcount++;}
+
+ $lead_id_call_list .= "$lead_id|";
+
+ if (length($alt_dial)<1) {$alt_dial='MAIN';}
+
+ ### whether to omit phone_code or not
+ if ($DBIPomitcode[$user_CIPct] > 0)
+ {$Ndialstring = "$Local_out_prefix$phone_number";}
+ else
+ {$Ndialstring = "$Local_out_prefix$phone_code$phone_number";}
+
+ if (length($ext_context) < 1) {$ext_context='default';}
+ ### use manager middleware-app to connect the next call to the meetme room
+ # VmmddhhmmssLLLLLLLLL
+ $VqueryCID = "V$CIDdate$PADlead_id";
+ if ($CCID_on) {$CIDstring = "\"$VqueryCID\" <$CCID>";}
+ else {$CIDstring = "$VqueryCID";}
+ ### insert a NEW record to the vicidial_manager table to be processed
+ $stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DBIPaddress[$user_CIPct]','','Originate','$VqueryCID','Exten: $VDAD_dial_exten','Context: $ext_context','Channel: $local_DEF$Ndialstring$local_AMP$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: $Local_dial_timeout','','','','')";
+ $affected_rows = $dbhA->do($stmtA);
+
+ $event_string = "| number call dialed|$DBIPcampaign[$user_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|";
+ &event_logger;
+
+ ### insert a SENT record to the vicidial_auto_calls table
+ $stmtA = "INSERT INTO vicidial_auto_calls (server_ip,campaign_id,status,lead_id,callerid,phone_code,phone_number,call_time,call_type,alt_dial,queue_priority) values('$DBIPaddress[$user_CIPct]','$DBIPcampaign[$user_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUT','$alt_dial','$DBIPqueue_priority[$user_CIPct]')";
+ $affected_rows = $dbhA->do($stmtA);
+
+ ### sleep for a five hundredths of a second to not flood the server with new calls
+ # usleep(1*50*1000);
+ usleep(1*$per_call_delay*1000);
+ }
+ }
+ $call_CMPIPct++;
+ }
}
}
}
diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
index b1736c83..1847b78f 100644
--- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
+++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
@@ -746,7 +746,8 @@ scheduled_callbacks_count ENUM('LIVE','ALL_ACTIVE') default 'ALL_ACTIVE',
manual_dial_override ENUM('NONE','ALLOW_ALL','DISABLE_ALL') default 'NONE',
blind_monitor_warning ENUM('DISABLED','ALERT','NOTICE','AUDIO','ALERT_NOTICE','ALERT_AUDIO','NOTICE_AUDIO','ALL') default 'DISABLED',
blind_monitor_message VARCHAR(255) default 'Someone is blind monitoring your session',
-blind_monitor_filename VARCHAR(100) default ''
+blind_monitor_filename VARCHAR(100) default '',
+inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED'
);
CREATE TABLE vicidial_lists (
@@ -1078,7 +1079,15 @@ ct_friday_start SMALLINT(4) unsigned default '0',
ct_friday_stop SMALLINT(4) unsigned default '0',
ct_saturday_start SMALLINT(4) unsigned default '0',
ct_saturday_stop SMALLINT(4) unsigned default '0',
-ct_state_call_times TEXT default ''
+ct_state_call_times TEXT default '',
+default_afterhours_filename_override VARCHAR(255) default '',
+sunday_afterhours_filename_override VARCHAR(255) default '',
+monday_afterhours_filename_override VARCHAR(255) default '',
+tuesday_afterhours_filename_override VARCHAR(255) default '',
+wednesday_afterhours_filename_override VARCHAR(255) default '',
+thursday_afterhours_filename_override VARCHAR(255) default '',
+friday_afterhours_filename_override VARCHAR(255) default '',
+saturday_afterhours_filename_override VARCHAR(255) default ''
);
CREATE TABLE vicidial_state_call_times (
@@ -2232,7 +2241,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
-UPDATE system_settings SET db_schema_version='1222',db_schema_update_date=NOW();
+UPDATE system_settings SET db_schema_version='1223',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
diff --git a/agc_2-X/trunk/extras/upgrade_2.4.sql b/agc_2-X/trunk/extras/upgrade_2.4.sql
index bf92b648..8fd4aa1b 100644
--- a/agc_2-X/trunk/extras/upgrade_2.4.sql
+++ b/agc_2-X/trunk/extras/upgrade_2.4.sql
@@ -330,3 +330,19 @@ UPDATE vicidial_inbound_groups SET hold_time_option_press_filename='to-be-called
UPDATE system_settings SET db_schema_version='1222',db_schema_update_date=NOW();
+
+
+
+
+ALTER TABLE vicidial_campaigns ADD inbound_queue_no_dial ENUM('DISABLED','ENABLED','ALL_SERVERS') default 'DISABLED';
+
+ALTER TABLE vicidial_call_times ADD default_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD sunday_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD monday_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD tuesday_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD wednesday_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD thursday_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD friday_afterhours_filename_override VARCHAR(255) default '';
+ALTER TABLE vicidial_call_times ADD saturday_afterhours_filename_override VARCHAR(255) default '';
+
+UPDATE system_settings SET db_schema_version='1223',db_schema_update_date=NOW();
diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
index af7348c9..5bf18695 100644
--- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
+++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt
@@ -190,6 +190,10 @@ If Hold Time Option is set to one of the PRESS_ options, this is the filename pr
If one of the PRESS_ options is selected, it will play the Press Filename defined below and give the customer the option to press 1 on their phone to leave the queue and run the selected option||
Hold Time Option After Press Filename||
If Hold Time Option is set to one of the PRESS_ options or CALLERID_CALLBACK, this is the filename prompt that is played after the customer has pressed 1 or the call has been added to the callback list||
+Inbound Queue No Dial||
+This feature if set to ENABLED allows you to prevent outbound auto-dialing of this campaign if there are any inbound calls waiting in queue that are part of the allowed inbound groups set in this campaign. Setting this to ALL_SERVERS will change the algorithm to calculate all inbound calls as active calls on this server even if they are on another server which will reduce the chance of placing unnecessary outbound calls if you have calls coming in on another server. Default is DISABLED||
+After Hours Filename Override||
+These fields allow you to override the After Hours message for inbound groups if it is set to something. Default is empty||
AST_VICIDIAL_ingrouplist.php
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index fb219779..cde08985 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -1259,6 +1259,24 @@ if (isset($_GET["hold_time_option_press_filename"])) {$hold_time_option_press_
elseif (isset($_POST["hold_time_option_press_filename"])) {$hold_time_option_press_filename=$_POST["hold_time_option_press_filename"];}
if (isset($_GET["hold_time_option_callmenu"])) {$hold_time_option_callmenu=$_GET["hold_time_option_callmenu"];}
elseif (isset($_POST["hold_time_option_callmenu"])) {$hold_time_option_callmenu=$_POST["hold_time_option_callmenu"];}
+if (isset($_GET["inbound_queue_no_dial"])) {$inbound_queue_no_dial=$_GET["inbound_queue_no_dial"];}
+ elseif (isset($_POST["inbound_queue_no_dial"])) {$inbound_queue_no_dial=$_POST["inbound_queue_no_dial"];}
+if (isset($_GET["default_afterhours_filename_override"])) {$default_afterhours_filename_override=$_GET["default_afterhours_filename_override"];}
+ elseif (isset($_POST["default_afterhours_filename_override"])) {$default_afterhours_filename_override=$_POST["default_afterhours_filename_override"];}
+if (isset($_GET["sunday_afterhours_filename_override"])) {$sunday_afterhours_filename_override=$_GET["sunday_afterhours_filename_override"];}
+ elseif (isset($_POST["sunday_afterhours_filename_override"])) {$sunday_afterhours_filename_override=$_POST["sunday_afterhours_filename_override"];}
+if (isset($_GET["monday_afterhours_filename_override"])) {$monday_afterhours_filename_override=$_GET["monday_afterhours_filename_override"];}
+ elseif (isset($_POST["monday_afterhours_filename_override"])) {$monday_afterhours_filename_override=$_POST["monday_afterhours_filename_override"];}
+if (isset($_GET["tuesday_afterhours_filename_override"])) {$tuesday_afterhours_filename_override=$_GET["tuesday_afterhours_filename_override"];}
+ elseif (isset($_POST["tuesday_afterhours_filename_override"])) {$tuesday_afterhours_filename_override=$_POST["tuesday_afterhours_filename_override"];}
+if (isset($_GET["wednesday_afterhours_filename_override"])) {$wednesday_afterhours_filename_override=$_GET["wednesday_afterhours_filename_override"];}
+ elseif (isset($_POST["wednesday_afterhours_filename_override"])) {$wednesday_afterhours_filename_override=$_POST["wednesday_afterhours_filename_override"];}
+if (isset($_GET["thursday_afterhours_filename_override"])) {$thursday_afterhours_filename_override=$_GET["thursday_afterhours_filename_override"];}
+ elseif (isset($_POST["thursday_afterhours_filename_override"])) {$thursday_afterhours_filename_override=$_POST["thursday_afterhours_filename_override"];}
+if (isset($_GET["friday_afterhours_filename_override"])) {$friday_afterhours_filename_override=$_GET["friday_afterhours_filename_override"];}
+ elseif (isset($_POST["friday_afterhours_filename_override"])) {$friday_afterhours_filename_override=$_POST["friday_afterhours_filename_override"];}
+if (isset($_GET["saturday_afterhours_filename_override"])) {$saturday_afterhours_filename_override=$_GET["saturday_afterhours_filename_override"];}
+ elseif (isset($_POST["saturday_afterhours_filename_override"])) {$saturday_afterhours_filename_override=$_POST["saturday_afterhours_filename_override"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1763,6 +1781,7 @@ if ($non_latin < 1)
$blind_monitor_warning = ereg_replace("[^-_0-9a-zA-Z]","",$blind_monitor_warning);
$uniqueid_status_display = ereg_replace("[^-_0-9a-zA-Z]","",$uniqueid_status_display);
$hold_time_option_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_callmenu);
+ $inbound_queue_no_dial = ereg_replace("[^-_0-9a-zA-Z]","",$inbound_queue_no_dial);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -1779,6 +1798,14 @@ if ($non_latin < 1)
$campaign_groups = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$campaign_groups);
$blind_monitor_filename = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$blind_monitor_filename);
$hold_time_option_press_filename = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$hold_time_option_press_filename);
+ $default_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$default_afterhours_filename_override);
+ $sunday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$sunday_afterhours_filename_override);
+ $monday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$monday_afterhours_filename_override);
+ $tuesday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$tuesday_afterhours_filename_override);
+ $wednesday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$wednesday_afterhours_filename_override);
+ $thursday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$thursday_afterhours_filename_override);
+ $friday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$friday_afterhours_filename_override);
+ $saturday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$saturday_afterhours_filename_override);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -2208,11 +2235,12 @@ else
# 100506-1807 - Added hidden settings for lists custom fields
# 100507-1102 - Added hold_time_option_minimum option to in-groups and copy carrier function
# 100512-1615 - Added more hold time press-1 options
+# 100518-0643 - Added inbound_queue_no_dial and call time after hours override features
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
-$admin_version = '2.4-254';
-$build = '100512-1615';
+$admin_version = '2.4-255';
+$build = '100518-0643';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -3733,6 +3761,11 @@ if ($ADD==99999)
Multiple Campaign Drop Rate Group - This feature allows you to set a campaign as a member of a Campaign Drop Rate Group, or a group of campaigns whose Human Answered calls and Drop calls for all campaigns in the group will be combined into a shared drop percentage, or abandon rate. This allows you to to run multiple campaigns at once and more easily control your drop rate. This is particularly useful in the UK where regulations permit this drop rate calculation method with campaign grouping for the same company even if there are several campaigns that company is running during the same day. To enable this for a campaign, just select a group from the list. There are 10 groups defined in the system by default, you can contact your system administrator to add more. Default is DISABLED.
+
+
+
+ Inbound Queue No Dial - This feature if set to ENABLED allows you to prevent outbound auto-dialing of this campaign if there are any inbound calls waiting in queue that are part of the allowed inbound groups set in this campaign. Setting this to ALL_SERVERS will change the algorithm to calculate all inbound calls as active calls on this server even if they are on another server which will reduce the chance of placing unnecessary outbound calls if you have calls coming in on another server. Default is DISABLED.
+
@@ -5221,6 +5254,10 @@ if ($ADD==99999)
Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times.
+
+
+ After Hours Filename Override - These fields allow you to override the After Hours message for inbound groups if it is set to something. Default is empty.
+
State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition.
@@ -9206,7 +9243,7 @@ if ($ADD==20)
{
echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n";
- $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename from vicidial_campaigns where campaign_id='$source_campaign_id';";
+ $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial from vicidial_campaigns where campaign_id='$source_campaign_id';";
$rslt=mysql_query($stmt, $link);
$stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');";
@@ -11921,7 +11958,7 @@ if ($ADD==41)
if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) )
{$hopper_level='100';}
- $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename' where campaign_id='$campaign_id';";
+ $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial' where campaign_id='$campaign_id';";
$rslt=mysql_query($stmtA, $link);
if ($reset_hopper == 'Y')
@@ -13326,7 +13363,7 @@ if ($ADD==411111111)
$ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop);
$ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start);
$ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop);
- $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';";
+ $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop', default_afterhours_filename_override='$default_afterhours_filename_override', sunday_afterhours_filename_override='$sunday_afterhours_filename_override', monday_afterhours_filename_override='$monday_afterhours_filename_override', tuesday_afterhours_filename_override='$tuesday_afterhours_filename_override', wednesday_afterhours_filename_override='$wednesday_afterhours_filename_override', thursday_afterhours_filename_override='$thursday_afterhours_filename_override', friday_afterhours_filename_override='$friday_afterhours_filename_override', saturday_afterhours_filename_override='$saturday_afterhours_filename_override' where call_time_id='$call_time_id';";
$rslt=mysql_query($stmt, $link);
echo "
CALL TIME MODIFIED\n";
@@ -16700,7 +16737,7 @@ if ($ADD==31)
$enable_vtiger_integration_LU = $row[0];
$vtiger_url_LU = $row[1];
- $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename from vicidial_campaigns where campaign_id='$campaign_id';";
+ $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial from vicidial_campaigns where campaign_id='$campaign_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$campaign_name = $row[1];
@@ -16850,6 +16887,8 @@ if ($ADD==31)
$blind_monitor_warning = $row[148];
$blind_monitor_message = $row[149];
$blind_monitor_filename = $row[150];
+ $inbound_queue_no_dial = $row[151];
+
if (ereg("DISABLED",$list_order_mix))
{$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;}
@@ -17415,7 +17454,7 @@ if ($ADD==31)
}
echo "$DRgroups_list$NWB#vicidial_campaigns-drop_rate_group$NWE\n";
-
+ echo " \n";
echo "Inbound Queue No Dial: $NWB#vicidial_campaigns-inbound_queue_no_dial$NWE \n";
}
@@ -21800,7 +21839,7 @@ if ($ADD==31111111)
######################
-# ADD=321111111 modify call time definition info in the system
+# ADD=321111111 modify call time definition info in the system, ADD/REMOVE
######################
if ($ADD==321111111)
@@ -21855,7 +21894,7 @@ if ($ADD==311111111)
echo "Auto Alt-Number Dialing: $NWB#vicidial_campaigns-auto_alt_dial$NWE
\n";
echo "";
- $stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';";
+ $stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times,default_afterhours_filename_override,sunday_afterhours_filename_override,monday_afterhours_filename_override,tuesday_afterhours_filename_override,wednesday_afterhours_filename_override,thursday_afterhours_filename_override,friday_afterhours_filename_override,saturday_afterhours_filename_override from vicidial_call_times where call_time_id='$call_time_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$call_time_name = $row[1];
@@ -21877,6 +21916,14 @@ if ($ADD==311111111)
$ct_saturday_start = $row[17];
$ct_saturday_stop = $row[18];
$ct_state_call_times = $row[19];
+ $default_afterhours_filename_override = $row[20];
+ $sunday_afterhours_filename_override = $row[21];
+ $monday_afterhours_filename_override = $row[22];
+ $tuesday_afterhours_filename_override = $row[23];
+ $wednesday_afterhours_filename_override = $row[24];
+ $thursday_afterhours_filename_override = $row[25];
+ $friday_afterhours_filename_override = $row[26];
+ $saturday_afterhours_filename_override = $row[27];
echo "";
@@ -21887,14 +21934,14 @@ if ($ADD==311111111)
echo "| Call Time ID: | $call_time_id$NWB#vicidial_call_times-call_time_id$NWE | Call Time Name: | (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE | Call Time Comments: | $NWB#vicidial_call_times-call_time_comments$NWE | Default Start: | | Default Stop: | $NWB#vicidial_call_times-ct_default_start$NWE | Sunday Start: | | Sunday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Monday Start: | | Monday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Tuesday Start: | | Tuesday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Wednesday Start: | | Wednesday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Thursday Start: | | Thursday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Friday Start: | | Friday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Saturday Start: | | Saturday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE | Default Start: | | Default Stop: | $NWB#vicidial_call_times-ct_default_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Sunday Start: | | Sunday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Monday Start: | | Monday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Tuesday Start: | | Tuesday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Wednesday Start: | | Wednesday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Thursday Start: | | Thursday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Friday Start: | | Friday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | Saturday Start: | | Saturday Stop: | $NWB#vicidial_call_times-ct_sunday_start$NWE AH Override: audio chooser $NWB#vicidial_call_times-default_afterhours_filename_override$NWE | $state_rules[$b] - REMOVE | $row[0] - $row[1] | $state_rules[$b] - REMOVE | $row[0] - $row[1] | | ||||||||||||