Added CID Group Failover campaign setting(cid_group_id_two)
git-svn-id: svn://192.168.202.10@3489 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -672,6 +672,9 @@ OTHER CHANGES:
|
||||
period. Also allows for state-based override settings. For more
|
||||
information, read the CALL_COUNT_LIMITS.txt doc.
|
||||
|
||||
187. Added CID Group Failover setting for campaigns, to allow for backup CID
|
||||
Group to use if no AREACODE or STATE match found from first CID Group.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -142,9 +142,10 @@
|
||||
# 210713-1322 - Added call_limit_24hour feature support
|
||||
# 210718-0359 - Fixes for 24-Hour Call Count Limits with standard Auto-Alt-Dialing
|
||||
# 210719-1520 - Added additional state override methods for call_limit_24hour
|
||||
# 210731-0952 - Added cid_group_id_two campaign option
|
||||
#
|
||||
|
||||
$build='210719-1520';
|
||||
$build='210731-0952';
|
||||
$script='AST_VDauto_dial';
|
||||
### begin parsing run-time options ###
|
||||
if (length($ARGV[0])>1)
|
||||
@@ -451,6 +452,7 @@ while($one_day_interval > 0)
|
||||
@DBIPdial_method=@MT;
|
||||
@DBIPuse_custom_cid=@MT;
|
||||
@DBIPcid_group_id=@MT;
|
||||
@DBIPcid_group_id_two=@MT;
|
||||
@DBIPinbound_queue_no_dial=@MT;
|
||||
@DBIPinbound_no_agents_no_dial=@MT;
|
||||
@DBIPinbound_no_agents_no_dial_threshold=@MT;
|
||||
@@ -928,7 +930,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,inbound_queue_no_dial,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,adaptive_dl_diff_target,dl_diff_target_method,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,scheduled_callbacks_auto_reschedule,call_quota_lead_ranking,dial_timeout_lead_container,drop_call_seconds,drop_action,drop_inbound_group,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override 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,available_only_tally_threshold,available_only_tally_threshold_agents,dial_level_threshold,dial_level_threshold_agents,adaptive_dl_diff_target,dl_diff_target_method,inbound_no_agents_no_dial_container,inbound_no_agents_no_dial_threshold,cid_group_id,scheduled_callbacks_auto_reschedule,call_quota_lead_ranking,dial_timeout_lead_container,drop_call_seconds,drop_action,drop_inbound_group,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two 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;
|
||||
@@ -975,6 +977,7 @@ while($one_day_interval > 0)
|
||||
$DBIPcall_limit_24hour_scope[$user_CIPct] = $aryA[32];
|
||||
$DBIPcall_limit_24hour[$user_CIPct] = $aryA[33];
|
||||
$DBIPcall_limit_24hour_override[$user_CIPct] = $aryA[34];
|
||||
$DBIPcid_group_id_two[$user_CIPct] = $aryA[35];
|
||||
|
||||
# check for Dial Timeout Lead override
|
||||
if ( (length($DBIPdial_timeout_lead_container[$user_CIPct]) > 1) && ($DBIPdial_timeout_lead_container[$user_CIPct] !~ /^DISABLED$/i) )
|
||||
@@ -1952,7 +1955,7 @@ while($one_day_interval > 0)
|
||||
$stmtA = "DELETE FROM vicidial_hopper where lead_id='$lead_id'";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
$CCID_on=0; $CCID='';
|
||||
$CCID_on=0; $CCID=''; $CCIDtype='';
|
||||
$local_DEF = 'Local/';
|
||||
$local_AMP = '@';
|
||||
$Local_out_prefix = '9';
|
||||
@@ -1970,16 +1973,16 @@ while($one_day_interval > 0)
|
||||
$VDAD_dial_exten = $routing_prefix . $VDAD_dial_exten;
|
||||
}
|
||||
|
||||
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
|
||||
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
else
|
||||
{
|
||||
if (length($DBIPcampaigncid[$user_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$user_CIPct]"; $CCID_on++;}
|
||||
if (length($DBIPcampaigncid[$user_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$user_CIPct]"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
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++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='CUSTOM_CID';}
|
||||
}
|
||||
$CIDG_set=0;
|
||||
if ($DBIPcid_group_id[$user_CIPct] !~ /\-\-\-DISABLED\-\-\-/)
|
||||
@@ -2041,7 +2044,69 @@ while($one_day_interval > 0)
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP';}
|
||||
}
|
||||
}
|
||||
if ( ($DBIPcid_group_id_two[$user_CIPct] !~ /\-\-\-DISABLED\-\-\-/) && ($CIDG_set < 1) )
|
||||
{
|
||||
$stmtA = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$DBIPcid_group_id_two[$user_CIPct]';";
|
||||
$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;
|
||||
$cid_group_type = $aryA[0];
|
||||
$temp_CID='';
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type =~ /AREACODE/)
|
||||
{
|
||||
$temp_ac_two = substr("$phone_number", 0, 2);
|
||||
$temp_ac_three = substr("$phone_number", 0, 3);
|
||||
$temp_ac_four = substr("$phone_number", 0, 4);
|
||||
$temp_ac_five = substr("$phone_number", 0, 5);
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$DBIPcid_group_id_two[$user_CIPct]' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /STATE/)
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$DBIPcid_group_id_two[$user_CIPct]' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$DBIPcid_group_id_two[$user_CIPct]' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$act=0;
|
||||
while ($sthArows > $act)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$temp_vcca = $aryA[0];
|
||||
$temp_ac = $aryA[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$sthA->finish();
|
||||
$stmtA="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$DBIPcid_group_id_two[$user_CIPct]' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA="UPDATE vicidial_cid_groups set cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$DBIPcid_group_id_two[$user_CIPct]';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{$sthA->finish();}
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP_TWO';}
|
||||
}
|
||||
}
|
||||
if ( ($DBIPuse_custom_cid[$user_CIPct] =~ /AREACODE/) && ($CIDG_set < 1) )
|
||||
@@ -2076,7 +2141,7 @@ while($one_day_interval > 0)
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='AC_CID';}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2138,7 +2203,7 @@ while($one_day_interval > 0)
|
||||
$stmtD = "INSERT INTO vicidial_lead_24hour_calls SET lead_id='$lead_id',list_id='$list_id',call_date=NOW(),phone_number='$phone_number',phone_code='$phone_code',state='$TFhourSTATE',call_type='AUTO';";
|
||||
$affected_rowsD = $dbhA->do($stmtD);
|
||||
|
||||
$event_string = "| number call dialed|$DBIPcampaign[$user_CIPct]|$VqueryCID|$affected_rowsA|$stmtA|$gmt_offset_now|$alt_dial|$affected_rowsB|$affected_rowsC|$affected_rowsD|";
|
||||
$event_string = "| number call dialed|$DBIPcampaign[$user_CIPct]|$VqueryCID|$affected_rowsA|$stmtA|$gmt_offset_now|$alt_dial|$affected_rowsB|$affected_rowsC|$affected_rowsD|$CCIDtype|";
|
||||
&event_logger;
|
||||
|
||||
### sleep for a five hundredths of a second to not flood the server with new calls
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
# 201122-0932 - Added code for dialy call count limits
|
||||
# 201220-1034 - Changes for shared agent campaigns
|
||||
# 210715-1335 - Added call_limit_24hour feature support, also fix for variable issue
|
||||
# 210731-0951 - Added cid_group_id_two campaign option
|
||||
#
|
||||
|
||||
### begin parsing run-time options ###
|
||||
@@ -283,6 +284,7 @@ while($one_day_interval > 0)
|
||||
@DBIPqueue_priority=@MT;
|
||||
@DBIPuse_custom_cid=@MT;
|
||||
@DBIPcid_group_id=@MT;
|
||||
@DBIPcid_group_id_two=@MT;
|
||||
|
||||
$active_line_counter=0;
|
||||
$camp_counter=0;
|
||||
@@ -370,7 +372,7 @@ while($one_day_interval > 0)
|
||||
|
||||
### grab the dial_level and multiply by active agents to get your goalcalls
|
||||
$DBIPadlevel[$camp_CIPct]=0;
|
||||
$stmtA = "SELECT dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,omit_phone_code,auto_alt_dial,queue_priority,use_custom_cid,cid_group_id,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container FROM vicidial_campaigns where campaign_id='$DBfill_campaign[$camp_CIPct]';";
|
||||
$stmtA = "SELECT dial_timeout,dial_prefix,campaign_cid,active,campaign_vdad_exten,omit_phone_code,auto_alt_dial,queue_priority,use_custom_cid,cid_group_id,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container,cid_group_id_two FROM vicidial_campaigns where campaign_id='$DBfill_campaign[$camp_CIPct]';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -391,6 +393,7 @@ while($one_day_interval > 0)
|
||||
$DBIPcid_group_id[$camp_CIPct] = $aryA[9];
|
||||
$DBIPscheduled_callbacks_auto_reschedule[$camp_CIPct] = $aryA[10];
|
||||
$DBIPdial_timeout_lead_container[$camp_CIPct] = $aryA[11];
|
||||
$DBIPcid_group_id_two[$camp_CIPct] =$aryA[12];
|
||||
|
||||
if ($omit_phone_code =~ /Y/) {$DBIPomitcode[$camp_CIPct] = 1;}
|
||||
else {$DBIPomitcode[$camp_CIPct] = 0;}
|
||||
@@ -960,7 +963,7 @@ while($one_day_interval > 0)
|
||||
$stmtA = "DELETE FROM vicidial_hopper where lead_id='$lead_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
$CCID_on=0; $CCID='';
|
||||
$CCID_on=0; $CCID=''; $CCIDtype='';
|
||||
$local_DEF = 'Local/';
|
||||
$local_AMP = '@';
|
||||
$Local_out_prefix = '9';
|
||||
@@ -972,8 +975,8 @@ while($one_day_interval > 0)
|
||||
if (length($DBIPvdadexten[$camp_CIPct]) > 0) {$VDAD_dial_exten = "$DBIPvdadexten[$camp_CIPct]";}
|
||||
else {$VDAD_dial_exten = "$answer_transfer_agent";}
|
||||
|
||||
if (length($DBIPcampaigncid[$camp_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$camp_CIPct]"; $CCID_on++;}
|
||||
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
|
||||
if (length($DBIPcampaigncid[$camp_CIPct]) > 6) {$CCID = "$DBIPcampaigncid[$camp_CIPct]"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
if (length($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
else
|
||||
{
|
||||
if ($DBIPuse_custom_cid[$camp_CIPct] =~ /Y/)
|
||||
@@ -981,7 +984,7 @@ while($one_day_interval > 0)
|
||||
$temp_CID = $security_phrase;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='CUSTOM_CID';}
|
||||
}
|
||||
$CIDG_set=0;
|
||||
if ($DBIPcid_group_id[$camp_CIPct] !~ /\-\-\-DISABLED\-\-\-/)
|
||||
@@ -1043,7 +1046,69 @@ while($one_day_interval > 0)
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP';}
|
||||
}
|
||||
}
|
||||
if ( ($DBIPcid_group_id_two[$camp_CIPct] !~ /\-\-\-DISABLED\-\-\-/) && ($CIDG_set < 1) )
|
||||
{
|
||||
$stmtA = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$DBIPcid_group_id_two[$camp_CIPct]';";
|
||||
$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;
|
||||
$cid_group_type = $aryA[0];
|
||||
$temp_CID='';
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type =~ /AREACODE/)
|
||||
{
|
||||
$temp_ac_two = substr("$phone_number", 0, 2);
|
||||
$temp_ac_three = substr("$phone_number", 0, 3);
|
||||
$temp_ac_four = substr("$phone_number", 0, 4);
|
||||
$temp_ac_five = substr("$phone_number", 0, 5);
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$DBIPcid_group_id_two[$camp_CIPct]' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /STATE/)
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$DBIPcid_group_id_two[$camp_CIPct]' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$DBIPcid_group_id_two[$camp_CIPct]' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$act=0;
|
||||
while ($sthArows > $act)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$temp_vcca = $aryA[0];
|
||||
$temp_ac = $aryA[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$sthA->finish();
|
||||
$stmtA="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$DBIPcid_group_id_two[$camp_CIPct]' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
if ($cid_group_type =~ /NONE/)
|
||||
{
|
||||
$stmtA="UPDATE vicidial_cid_groups set cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$DBIPcid_group_id_two[$camp_CIPct]';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
}
|
||||
}
|
||||
else
|
||||
{$sthA->finish();}
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP_TWO';}
|
||||
}
|
||||
}
|
||||
if ( ($DBIPuse_custom_cid[$camp_CIPct] =~ /AREACODE/) && ($CIDG_set < 1) )
|
||||
@@ -1078,7 +1143,7 @@ while($one_day_interval > 0)
|
||||
$temp_CID = $temp_vcca;
|
||||
$temp_CID =~ s/\D//gi;
|
||||
if (length($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='AC_CID';}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1135,10 +1200,10 @@ while($one_day_interval > 0)
|
||||
}
|
||||
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DB_camp_server_server_ip[$server_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','','','','VDACnote: $DBfill_campaign[$camp_CIPct]|$lead_id|$phone_code|$phone_number|OUTBALANCE|$alt_dial|$DBIPqueue_priority[$camp_CIPct]|$server_ip')";
|
||||
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$DB_camp_server_server_ip[$server_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','','','','VDACnote: $DBfill_campaign[$camp_CIPct]|$lead_id|$phone_code|$phone_number|OUTBALANCE|$alt_dial|$DBIPqueue_priority[$camp_CIPct]|$server_ip|$CCIDtype')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
$event_string = "| number call dialed|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|$DB_camp_server_server_ip[$server_CIPct]|$DB_camp_server_asterisk_version[$server_CIPct]";
|
||||
$event_string = "| number call dialed|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$stmtA|$gmt_offset_now|$alt_dial|$DB_camp_server_server_ip[$server_CIPct]|$DB_camp_server_asterisk_version[$server_CIPct]|$CCIDtype";
|
||||
&event_logger;
|
||||
|
||||
### insert a SENT record to the vicidial_auto_calls table
|
||||
@@ -1157,11 +1222,11 @@ while($one_day_interval > 0)
|
||||
else
|
||||
{
|
||||
##### create dummy records to have their server_ip filled in at the stagger section
|
||||
$vm_inserts[$staggered_ct] = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','XXXXXXXXXXXXXXX','','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','','','','VDACnote: $DBfill_campaign[$camp_CIPct]|$lead_id|$phone_code|$phone_number|OUTBALANCE|$alt_dial|$DBIPqueue_priority[$camp_CIPct]|$server_ip')";
|
||||
$vm_inserts[$staggered_ct] = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','XXXXXXXXXXXXXXX','','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','','','','VDACnote: $DBfill_campaign[$camp_CIPct]|$lead_id|$phone_code|$phone_number|OUTBALANCE|$alt_dial|$DBIPqueue_priority[$camp_CIPct]|$server_ip|$CCIDtype')";
|
||||
|
||||
$vac_inserts[$staggered_ct] = "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('XXXXXXXXXXXXXXX','$DBfill_campaign[$camp_CIPct]','SENT','$lead_id','$VqueryCID','$phone_code','$phone_number','$SQLdate','OUTBALANCE','$alt_dial','$DBIPqueue_priority[$camp_CIPct]')";
|
||||
|
||||
$st_logged[$staggered_ct] = "$phone_number|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$gmt_offset_now|$alt_dial|";
|
||||
$st_logged[$staggered_ct] = "$phone_number|$DBfill_campaign[$camp_CIPct]|$VqueryCID|$gmt_offset_now|$alt_dial|$CCIDtype|";
|
||||
|
||||
$vddl_inserts[$staggered_ct] = "INSERT INTO vicidial_dial_log SET caller_code='$VqueryCID',lead_id='$lead_id',server_ip='XXXXXXXXXXXXXXX',call_date='$SQLdate',extension='$VDAD_dial_exten',channel='$local_DEF$Ndialstring$local_AMP$ext_context',timeout='$Local_dial_timeout',outbound_cid='$CIDstring',context='$ext_context';";
|
||||
|
||||
|
||||
@@ -530,6 +530,7 @@ type - (IN)inbound, (OUT)outbound or (ALL) calls. defauls is (OUT) calls
|
||||
|
||||
NOTES-
|
||||
There is a hard limit of 100000 results
|
||||
The 'phone_number' field is not indexed by default. If you plan to use this function you may want to have your system admin add indexes on that field in the vicidial_log and vicidial_closer_log tables.
|
||||
|
||||
Example URL strings for API calls:
|
||||
http://server/vicidial/non_agent_api.php?source=test&function=phone_number_log&stage=pipe&user=6666&pass=1234&phone_number=3125551212,9998887112
|
||||
|
||||
@@ -1076,7 +1076,8 @@ transfer_no_dispo ENUM('DISABLED','EXTERNAL_ONLY','LOCAL_ONLY','LEAVE3WAY_ONLY',
|
||||
call_limit_24hour_method ENUM('DISABLED','PHONE_NUMBER','LEAD') default 'DISABLED',
|
||||
call_limit_24hour_scope ENUM('SYSTEM_WIDE','CAMPAIGN_LISTS') default 'SYSTEM_WIDE',
|
||||
call_limit_24hour TINYINT(3) UNSIGNED default '0',
|
||||
call_limit_24hour_override VARCHAR(40) default 'DISABLED'
|
||||
call_limit_24hour_override VARCHAR(40) default 'DISABLED',
|
||||
cid_group_id_two VARCHAR(20) default '---DISABLED---'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -5005,4 +5006,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1639',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1640',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -1778,3 +1778,7 @@ ALTER TABLE system_settings ADD call_limit_24hour ENUM('0','1') default '0';
|
||||
ALTER TABLE system_settings ADD call_limit_24hour_reset DATETIME default '2000-01-01 00:00:01';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1639',db_schema_update_date=NOW() where db_schema_version < 1639;
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD cid_group_id_two VARCHAR(20) default '---DISABLED---';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1640',db_schema_update_date=NOW() where db_schema_version < 1640;
|
||||
|
||||
@@ -515,10 +515,11 @@
|
||||
# 210713-1344 - Added call_limit_24hour feature support
|
||||
# 210718-0936 - Fixes for 24-Hour Call Count Limits with standard Auto-Alt-Dialing
|
||||
# 210719-1120 - Added new state override options for 24-Hour Call Count Limits
|
||||
# 210729-2136 - Added cid_group_id_two campaign setting
|
||||
#
|
||||
|
||||
$version = '2.14-408';
|
||||
$build = '210719-1120';
|
||||
$version = '2.14-409';
|
||||
$build = '210729-2136';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=865;
|
||||
@@ -2196,6 +2197,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$MT[0]='';
|
||||
$row=''; $rowx='';
|
||||
$override_dial_number='';
|
||||
$CCIDtype='';
|
||||
$channel_live=1;
|
||||
$MDF_search_flag='MAIN';
|
||||
$lead_id = preg_replace("/[^0-9]/","",$lead_id);
|
||||
@@ -4405,7 +4407,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ( (strlen($preview)<1) or ($preview == 'NO') or (strlen($dial_ingroup) > 1) )
|
||||
{
|
||||
$use_custom_cid='N';
|
||||
$stmt = "SELECT use_custom_cid,manual_dial_hopper_check,start_call_url,manual_dial_filter,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,cid_group_id,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container,manual_dial_cid,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$stmt = "SELECT use_custom_cid,manual_dial_hopper_check,start_call_url,manual_dial_filter,use_internal_dnc,use_campaign_dnc,use_other_campaign_dnc,cid_group_id,scheduled_callbacks_auto_reschedule,dial_timeout_lead_container,manual_dial_cid,daily_call_count_limit,daily_limit_manual,call_limit_24hour_method,call_limit_24hour_scope,call_limit_24hour,call_limit_24hour_override,cid_group_id_two FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00313',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -4430,6 +4432,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$call_limit_24hour_scope = $row[14];
|
||||
$call_limit_24hour = $row[15];
|
||||
$call_limit_24hour_override = $row[16];
|
||||
$cid_group_id_two = $row[17];
|
||||
}
|
||||
|
||||
### BEGIN check for Dial Timeout Lead Override ###
|
||||
@@ -4523,7 +4526,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
if ($DTL_override > 4) {$Local_dial_timeout = $DTL_override;}
|
||||
$Local_dial_timeout = ($Local_dial_timeout * 1000);
|
||||
if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";}
|
||||
if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;}
|
||||
if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
### check for custom cid use
|
||||
|
||||
if ($no_hopper_dialing_used > 0)
|
||||
@@ -4532,7 +4535,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
manual_dnc_check($agent_dialed_number, $no_hopper_dialing_used, 0);
|
||||
}
|
||||
|
||||
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
|
||||
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
else
|
||||
{
|
||||
if ($uccid_ct > 0)
|
||||
@@ -4541,7 +4544,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
{
|
||||
$temp_CID = preg_replace("/\D/",'',$security_phrase);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='CUSTOM_CID';}
|
||||
}
|
||||
if ( (preg_match('/^USER_CUSTOM/', $use_custom_cid)) and ($cid_lock < 1) )
|
||||
{
|
||||
@@ -4564,7 +4567,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vu);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='USER_CID';}
|
||||
}
|
||||
$CIDG_set=0;
|
||||
if ( ($cid_group_id != '---DISABLED---') and ($cid_lock < 1) )
|
||||
@@ -4628,8 +4631,72 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP';}
|
||||
}
|
||||
if ( ($cid_group_id_two != '---DISABLED---') and ($cid_lock < 1) and ($CIDG_set < 1) )
|
||||
{
|
||||
$stmt = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$cid_group_id_two';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cidg_ct = mysqli_num_rows($rslt);
|
||||
if ($cidg_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$cid_group_type = $row[0];
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type == 'AREACODE')
|
||||
{
|
||||
$temp_ac_two = substr("$agent_dialed_number", 0, 2);
|
||||
$temp_ac_three = substr("$agent_dialed_number", 0, 3);
|
||||
$temp_ac_four = substr("$agent_dialed_number", 0, 4);
|
||||
$temp_ac_five = substr("$agent_dialed_number", 0, 5);
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id_two' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'STATE')
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id_two' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id_two' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$vcca_ct = mysqli_num_rows($rslt);
|
||||
$act=0;
|
||||
while ($vcca_ct > $act)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$temp_vcca = $row[0];
|
||||
$temp_ac = $row[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_campaign_cid_areacodes SET call_count_today=(call_count_today + 1) where campaign_id='$cid_group_id_two' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt="UPDATE vicidial_cid_groups SET cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$cid_group_id_two';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP_TWO';}
|
||||
}
|
||||
|
||||
if ( ($use_custom_cid == 'AREACODE') and ($cid_lock < 1) and ($CIDG_set < 1) )
|
||||
{
|
||||
$temp_vcca='';
|
||||
@@ -4661,7 +4728,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='AC_CID';}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4752,7 +4819,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$dial_ingroup_cid = $row[0];
|
||||
$IN_start_call_url = $row[1];
|
||||
}
|
||||
if (strlen($dial_ingroup_cid) > 6) {$CCID = "$dial_ingroup_cid"; $CCID_on++;}
|
||||
if (strlen($dial_ingroup_cid) > 6) {$CCID = "$dial_ingroup_cid"; $CCID_on++; $CCIDtype='INGROUP_CID';}
|
||||
|
||||
$preset_name='DIG';
|
||||
$MqueryCID = "Y$CIDdate$PADlead_id";
|
||||
@@ -4820,7 +4887,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
}
|
||||
$PHONEoutbound_cid = preg_replace("/\D/",'',$PHONEoutbound_cid);
|
||||
if (strlen($PHONEoutbound_cid) > 6)
|
||||
{$CCID = "$PHONEoutbound_cid"; $CCID_on++;}
|
||||
{$CCID = "$PHONEoutbound_cid"; $CCID_on++; $CCIDtype='PHONE_CID';}
|
||||
}
|
||||
#### END check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE'
|
||||
|
||||
@@ -4829,7 +4896,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
{
|
||||
$FORCEoutbound_cid = preg_replace("/\D/",'',$campaign_cid);
|
||||
if (strlen($FORCEoutbound_cid) > 6)
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++;}
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++; $CCIDtype='API_CID';}
|
||||
}
|
||||
#### END check for API forced CID override ####
|
||||
|
||||
@@ -5689,7 +5756,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
echo "HOPPER EMPTY\n";
|
||||
}
|
||||
}
|
||||
$stage .= "|$agent_log_id|$vla_status|$agent_dialed_type|$agent_dialed_number|";
|
||||
$stage .= "|$agent_log_id|$vla_status|$agent_dialed_type|$agent_dialed_number|$CCIDtype|";
|
||||
}
|
||||
|
||||
|
||||
@@ -5814,6 +5881,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
{
|
||||
$MT[0]='';
|
||||
$row=''; $rowx='';
|
||||
$CCIDtype='';
|
||||
$channel_live=1;
|
||||
$MDF_search_flag='MAIN';
|
||||
if ( (strlen($conf_exten)<1) || (strlen($campaign)<1) || (strlen($ext_context)<1) || (strlen($phone_number)<1) || (strlen($lead_id)<1) )
|
||||
@@ -6186,7 +6254,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
if ($DTL_override > 4) {$Local_dial_timeout = $DTL_override;}
|
||||
$Local_dial_timeout = ($Local_dial_timeout * 1000);
|
||||
if (strlen($dial_prefix) > 0) {$Local_out_prefix = "$dial_prefix";}
|
||||
if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++;}
|
||||
if (strlen($campaign_cid) > 6) {$CCID = "$campaign_cid"; $CCID_on++; $CCIDtype='CAMPAIGN_CID';}
|
||||
if (preg_match("/x/i",$dial_prefix)) {$Local_out_prefix = '';}
|
||||
$campaign_cid_override='';
|
||||
### check if there is a list_id override
|
||||
@@ -6225,12 +6293,12 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
}
|
||||
|
||||
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++;}
|
||||
if (strlen($campaign_cid_override) > 6) {$CCID = "$campaign_cid_override"; $CCID_on++; $CCIDtype='LIST_CID';}
|
||||
else
|
||||
{
|
||||
### check for custom cid use
|
||||
$use_custom_cid='N';
|
||||
$stmt = "SELECT use_custom_cid,manual_dial_hopper_check,cid_group_id,manual_dial_cid FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$stmt = "SELECT use_custom_cid,manual_dial_hopper_check,cid_group_id,manual_dial_cid,cid_group_id_two FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00314',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -6242,11 +6310,12 @@ if ($ACTION == 'manDiaLonly')
|
||||
$manual_dial_hopper_check = $row[1];
|
||||
$cid_group_id = $row[2];
|
||||
$manual_dial_cid = $row[3];
|
||||
$cid_group_id_two = $row[4];
|
||||
if ($use_custom_cid == 'Y')
|
||||
{
|
||||
$temp_CID = preg_replace("/\D/",'',$security_phrase);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='CUSTOM_CID';}
|
||||
}
|
||||
if ( (preg_match('/^USER_CUSTOM/', $use_custom_cid)) and ($cid_lock < 1) )
|
||||
{
|
||||
@@ -6269,7 +6338,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vu);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='USER_CID';}
|
||||
}
|
||||
$CIDG_set=0;
|
||||
if ( ($cid_group_id != '---DISABLED---') and ($cid_lock < 1) )
|
||||
@@ -6333,8 +6402,73 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP';}
|
||||
}
|
||||
|
||||
if ( ($cid_group_id_two != '---DISABLED---') and ($cid_lock < 1) and ($CIDG_set < 1) )
|
||||
{
|
||||
$stmt = "SELECT cid_group_type FROM vicidial_cid_groups where cid_group_id='$cid_group_id_two';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$cidg_ct = mysqli_num_rows($rslt);
|
||||
if ($cidg_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$cid_group_type = $row[0];
|
||||
$temp_vcca='';
|
||||
$temp_ac='';
|
||||
|
||||
if ($cid_group_type == 'AREACODE')
|
||||
{
|
||||
$temp_ac_two = substr("$agent_dialed_number", 0, 2);
|
||||
$temp_ac_three = substr("$agent_dialed_number", 0, 3);
|
||||
$temp_ac_four = substr("$agent_dialed_number", 0, 4);
|
||||
$temp_ac_five = substr("$agent_dialed_number", 0, 5);
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id_two' and areacode IN('$temp_ac_two','$temp_ac_three','$temp_ac_four','$temp_ac_five') and active='Y' order by CAST(areacode as SIGNED INTEGER) asc, call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'STATE')
|
||||
{
|
||||
$temp_state = $state;
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id_two' and areacode IN('$temp_state') and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt = "SELECT outbound_cid,areacode FROM vicidial_campaign_cid_areacodes where campaign_id='$cid_group_id_two' and active='Y' order by call_count_today desc limit 100000;";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$vcca_ct = mysqli_num_rows($rslt);
|
||||
$act=0;
|
||||
while ($vcca_ct > $act)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$temp_vcca = $row[0];
|
||||
$temp_ac = $row[1];
|
||||
$act++;
|
||||
}
|
||||
if ($act > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_campaign_cid_areacodes set call_count_today=(call_count_today + 1) where campaign_id='$cid_group_id_two' and areacode='$temp_ac' and outbound_cid='$temp_vcca';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
if ($cid_group_type == 'NONE')
|
||||
{
|
||||
$stmt="UPDATE vicidial_cid_groups SET cid_auto_rotate_calls=(cid_auto_rotate_calls + 1) where cid_group_id='$cid_group_id_two';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CIDG_set++; $CCIDtype='CID_GROUP_TWO';}
|
||||
}
|
||||
|
||||
if ( ($use_custom_cid == 'AREACODE') and ($cid_lock < 1) and ($CIDG_set < 1) )
|
||||
{
|
||||
$temp_vcca='';
|
||||
@@ -6366,7 +6500,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
|
||||
$temp_CID = preg_replace("/\D/",'',$temp_vcca);
|
||||
if (strlen($temp_CID) > 6)
|
||||
{$CCID = "$temp_CID"; $CCID_on++;}
|
||||
{$CCID = "$temp_CID"; $CCID_on++; $CCIDtype='AC_CID';}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6387,7 +6521,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
$PHONEoutbound_cid = preg_replace("/\D/",'',$PHONEoutbound_cid);
|
||||
if (strlen($PHONEoutbound_cid) > 6)
|
||||
{$CCID = "$PHONEoutbound_cid"; $CCID_on++;}
|
||||
{$CCID = "$PHONEoutbound_cid"; $CCID_on++; $CCIDtype='PHONE_CID';}
|
||||
}
|
||||
#### END check for manual_dial_cid == 'AGENT_PHONE_OVERRIDE'
|
||||
|
||||
@@ -6396,7 +6530,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
{
|
||||
$FORCEoutbound_cid = preg_replace("/\D/",'',$campaign_cid);
|
||||
if (strlen($FORCEoutbound_cid) > 6)
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++;}
|
||||
{$CCID = "$FORCEoutbound_cid"; $CCID_on++; $CCIDtype='API_CID';}
|
||||
}
|
||||
#### END check for API forced CID override ####
|
||||
|
||||
@@ -7196,7 +7330,7 @@ if ($ACTION == 'manDiaLonly')
|
||||
}
|
||||
### END start_call_url processing ###
|
||||
|
||||
$stage .= "|$agent_dialed_type|$agent_dialed_number|";
|
||||
$stage .= "|$agent_dialed_type|$agent_dialed_number|$CCIDtype|";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
# version: 20210719084501
|
||||
# version: 20210729211501
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N.</QXZ>
|
||||
@@ -241,8 +241,9 @@ campaigns-manual_dial_prefix Manual Dial Prefix <QXZ>This optional field allows
|
||||
campaigns-omit_phone_code Omit Phone Code <QXZ>This field allows you to leave out the phone_code field while dialing within the system. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dial plan extensions.conf to place calls instead of 44 then 10 digits. Default is N.</QXZ>
|
||||
campaigns-campaign_cid Campaign CallerID <QXZ>This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service -RBS- circuits. This will also work through most VOIP -SIP or IAX trunks- providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID.</QXZ><QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-use_custom_cid Custom CallerID <QXZ>When set to Y, this option allows you to use the security_phrase field in the list table as the CallerID to send out when placing for each specific lead. If this field has no CID in it then the Campaign CallerID defined above will be used instead. This option will disable the list CallerID Override if there is a CID present in the security_phrase field. Default is N. When set to AREACODE you have the ability to go into the AC-CID submenu and define multiple callerids to be used per areacode. For MANUAL and INBOUND_MAN dial methods only, and agent manual dial calls in other dial methods, you can use one of the USER_CUSTOM selections to take a CallerID number put into one of the User Custom fields in the User Modify admin screen and use that for outbound manual dial calls placed by an agent. For more information on CallerID priority, see below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id CID Group <QXZ>If set to something other than ---DISABLED---, the selected CID Group will override all other campaign CID settings above and will use the state or areacode based CIDs that are defined in the CID Group. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_priority CALLERID PRIORITY <QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id CID Group <QXZ>If set to something other than ---DISABLED---, the selected CID Group will override all other campaign CID settings above and will use the state or areacode based CIDs that are defined in the CID Group. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry(CID Group Failover) <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_group_id_two CID Group Failover <QXZ>If set to something other than ---DISABLED---, the selected CID Group will be used if the main CID Group set above does not have a matching areacode or state entry for the phone number being called. Default is ---DISABLED---. For more information on CallerID priority, see the CALLERID PRIORITY entry below.<BR>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry(CID Group Failover) <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-cid_priority CALLERID PRIORITY <QXZ>If all of the CallerID options are enabled, this is the priority in which each type of CallerID will be used, 1 is top priority - <BR>1 - List CallerID Override <BR>2 - CID Group entry(CID Group Failover) <BR>3 - AC-CID AREACODE entry <BR>4 - Custom CallerID, Security Phrase <BR>5 - USER_CUSTOM CallerID <BR>6 - Campaign CID <BR></QXZ>
|
||||
campaigns-opensips_cid_name Campaign CID Name <QXZ>If your system is set up to send CallerID Name, you can define it here for all outbound calls placed through this campaign. Default is blank for disabled.</QXZ>
|
||||
campaigns-campaign_rec_exten Campaign Rec extension <QXZ>This field allows for a custom recording extension to be used with the system. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for up to one hour. Another option included in the examples is 8310 which will record in GSM format for up to one hour. The recording time can be lengthened by raising the setting in the Server Modification screen in the Admin section.</QXZ>
|
||||
campaigns-campaign_recording Campaign Recording <QXZ>This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and reduce system load.</QXZ>
|
||||
|
||||
Reference in New Issue
Block a user