Added the ability to have multiple "No Agent Call URL" entries for a single Campaign/In-Group/List
git-svn-id: svn://192.168.202.10@3680 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -743,6 +743,11 @@ OTHER CHANGES:
|
||||
208. Added instructions and scripts for creating a Gateway Recording server
|
||||
See the GATEWAY_RECORDING_SERVER.txt doc for more info.
|
||||
|
||||
209. Added the ability to have multiple "No Agent Call URL" entries for a
|
||||
single Campaign/In-Group/List, by putting "ALT" in the No Agent Call URL
|
||||
field on the Campaign, In-Group, List modify screen. Just like how it
|
||||
works with Dispo Call URL currently.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
|
||||
#exten => _99909*.,3,Hangup
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 70828-0924 - First Build
|
||||
@@ -250,6 +250,7 @@
|
||||
# 210911-2008 - Added populate_lead_owner in-group option
|
||||
# 211106-1523 - Added in_queue_nanque options
|
||||
# 221116-1050 - Fix for long in-group dialstring extensions
|
||||
# 230204-0015 - Fix for vicidial_log_extended entries for multiple in-group calls in succession
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -1885,7 +1886,7 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
|
||||
|
||||
if ($VLEcount < 1)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',custom_call_id='$custom_call_id';";
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',custom_call_id='$custom_call_id' ON DUPLICATE KEY UPDATE start_url_processed='N',dispo_url_processed='N',multi_alt_processed='N',noanswer_processed='N',call_date='$now_date',caller_code='$NACqueryCID',custom_call_id='$custom_call_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02145'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- AH VLE insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
|
||||
@@ -2466,7 +2467,7 @@ if ($AGILOG) {$agi_string = "-- VDCL : |$insert_lead_id|$insert_xfer_id|$inse
|
||||
|
||||
if ($VLEcount < 1)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$callerid',custom_call_id='$custom_call_id';";
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$callerid',custom_call_id='$custom_call_id' ON DUPLICATE KEY UPDATE start_url_processed='N',dispo_url_processed='N',multi_alt_processed='N',noanswer_processed='N',call_date='$now_date',caller_code='$callerid',custom_call_id='$custom_call_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02147'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- ENTER QUEUE VLE insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
|
||||
@@ -4902,7 +4903,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
|
||||
if ($VLEcount < 1)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',custom_call_id='$custom_call_id';";
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',custom_call_id='$custom_call_id' ON DUPLICATE KEY UPDATE start_url_processed='N',dispo_url_processed='N',multi_alt_processed='N',noanswer_processed='N',call_date='$now_date',caller_code='$NACqueryCID',custom_call_id='$custom_call_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02146'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- ACFLTR VLE insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
|
||||
@@ -8859,7 +8860,7 @@ sub no_agent_no_queue_process
|
||||
|
||||
if ($VLEcount < 1)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',custom_call_id='$custom_call_id';";
|
||||
$stmtA = "INSERT INTO vicidial_log_extended set uniqueid='$uniqueid',server_ip='$VARserver_ip',call_date='$now_date',lead_id = '$insert_lead_id',caller_code='$NACqueryCID',custom_call_id='$custom_call_id' ON DUPLICATE KEY UPDATE start_url_processed='N',dispo_url_processed='N',multi_alt_processed='N',noanswer_processed='N',call_date='$now_date',caller_code='$NACqueryCID',custom_call_id='$custom_call_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02146'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- NANQUE VLE insert: |$affected_rows|\n|$stmtA|"; &agi_output;}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
# It is good practice to keep this program running by placing the associated
|
||||
# KEEPALIVE script running every minute to ensure this program is always running
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGELOG:
|
||||
# 50125-1201 - Changed dial timeout to 120 seconds from 180 seconds
|
||||
@@ -152,9 +152,10 @@
|
||||
# 220328-1310 - Small change made per Issue #1337
|
||||
# 220623-1621 - Added List dial_prefix override
|
||||
# 221221-2135 - Added enhanced_disconnect_logging=3 support, issue #1367
|
||||
# 230204-2144 - Added ability to use ALT na_call_url entries
|
||||
#
|
||||
|
||||
$build='220328-1310';
|
||||
$build='230204-2144';
|
||||
$script='AST_VDauto_dial';
|
||||
### begin parsing run-time options ###
|
||||
if (length($ARGV[0])>1)
|
||||
@@ -4508,7 +4509,7 @@ while($one_day_interval > 0)
|
||||
}
|
||||
$NCUcamp_loop++;
|
||||
}
|
||||
if (length($NCUncurl_value) > 10)
|
||||
if ( (length($NCUncurl_value) > 10) || ($NCUncurl_value =~ /^ALT$/) )
|
||||
{
|
||||
$event_string = " NCU url defined, launching web GET: $NCUcallerid[$vle_count]|$NCUstatus[$vle_count]";
|
||||
&event_logger;
|
||||
@@ -4528,10 +4529,13 @@ while($one_day_interval > 0)
|
||||
$launch .= " --alt_dial=" . $NCUaltdial[$vle_count];
|
||||
$launch .= " --call_id=" . $NCUcallerid[$vle_count];
|
||||
$launch .= " --list_id=" . $NCUlist[$vle_count];
|
||||
$launch .= " --status=" . $NCUstatus[$vle_count];
|
||||
$launch .= " --function=NA_CALL_URL";
|
||||
|
||||
system($launch . ' &');
|
||||
|
||||
if ($DBX > 0) {print " NCU debugX: |$NCUlist[$vle_count]|$NCUcampaign[$vle_count]|$launch|$NCUncurl_value|\n";}
|
||||
|
||||
$event_string = " NCU url sent processed: $NCUcallerid[$vle_count]|$NCUcampaign[$vle_count]|$NCUuser[$vle_count]";
|
||||
&event_logger;
|
||||
}
|
||||
|
||||
+298
-139
@@ -8,7 +8,7 @@
|
||||
# This script is also used for the Add-Lead-URL feature in In-groups and for
|
||||
# QM socket-send as well as from call menus using a settings container.
|
||||
#
|
||||
# Copyright (C) 2021 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 100622-0929 - First Build
|
||||
@@ -29,6 +29,7 @@
|
||||
# 180520-2002 - Added ENTER_INGROUP_URL function
|
||||
# 180601-0929 - Added full_name and launch_user variable options
|
||||
# 210519-2208 - Added DB disconnect and reconnect to save DB connections on long response time URLs
|
||||
# 230204-2145 - Added ability to use ALT na_call_url entries, added status input
|
||||
#
|
||||
|
||||
$|++;
|
||||
@@ -49,7 +50,7 @@ $now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
|
||||
### Initialize run-time variables ###
|
||||
my ($CLOhelp, $SYSLOG,$DB, $DBX);
|
||||
my ($campaign, $lead_id, $phone_number, $call_type, $user, $uniqueid, $alt_dial, $call_id, $function, $container);
|
||||
my ($campaign, $lead_id, $phone_number, $call_type, $user, $uniqueid, $alt_dial, $call_id, $status, $function, $container);
|
||||
my $FULL_LOG = 1;
|
||||
$url_function = 'other';
|
||||
$US='_';
|
||||
@@ -67,6 +68,7 @@ if (scalar @ARGV) {
|
||||
'alt_dial=s' => \$alt_dial,
|
||||
'call_id=s' => \$call_id,
|
||||
'list_id:s' => \$list_id,
|
||||
'status:s' => \$status,
|
||||
'function=s' => \$function,
|
||||
'container=s' => \$container,
|
||||
'debug!' => \$DB,
|
||||
@@ -81,7 +83,7 @@ if (scalar @ARGV) {
|
||||
print "\n----- SUPER-DUPER DEBUGGING -----\n\n" if ($DBX);
|
||||
print " SYSLOG: $SYSLOG\n" if ($SYSLOG);
|
||||
print " campaign: $campaign\n" if ($campaign);
|
||||
print " lead_id: $lead_id\n" if ($lead_id);
|
||||
print " lead_id: $lead_id\n" if ($lead_id);
|
||||
print " phone_number: $phone_number\n" if ($phone_number);
|
||||
print " call_type: $call_type\n" if ($call_type);
|
||||
print " user: $user\n" if ($user);
|
||||
@@ -89,6 +91,7 @@ if (scalar @ARGV) {
|
||||
print " alt_dial: $alt_dial\n" if ($alt_dial);
|
||||
print " call_id: $call_id\n" if ($call_id);
|
||||
print " list_id: $list_id\n" if ($list_id);
|
||||
print " status: $status\n" if ($status);
|
||||
print " function: $function\n" if ($function);
|
||||
print " container: $container\n" if ($container);
|
||||
print " compat_url: $compat_url\n" if ($compat_url);
|
||||
@@ -109,12 +112,15 @@ if (scalar @ARGV) {
|
||||
print " [--alt_dial] = label of the phone number dialed\n";
|
||||
print " [--call_id] = call_id or caller_code of the call\n";
|
||||
print " [--list_id] = list_id of the lead on the call\n";
|
||||
print " [--status] = status of the call at the time of the URL trigger\n";
|
||||
print " [--compat_url] = full compatible URL to send\n";
|
||||
print " [--container] = settings container to use if function is SC_CALL_URL\n";
|
||||
print " [--function] = which function is to be run, default is REMOTE_AGENT_START_CALL_URL\n";
|
||||
print " *REMOTE_AGENT_START_CALL_URL - performs a Start Call URL get for Remote Agent Calls\n";
|
||||
print " *INGROUP_ADD_LEAD_URL - performs an Add Lead URL get for In-Groups when a lead is added\n";
|
||||
print " *QM_SOCKET_SEND - performs a queue_log socket send url function\n";
|
||||
print " *NA_CALL_URL - performs a na_call_url send url function\n";
|
||||
print " *SC_CALL_URL - performs a settings container send url function\n";
|
||||
print "\n";
|
||||
print "You may prefix an option with 'no' to disable it.\n";
|
||||
print " ie. --noSYSLOG or --noFULLLOG\n";
|
||||
@@ -197,9 +203,17 @@ if (length($lead_id) > 0)
|
||||
$sthA->finish();
|
||||
|
||||
if ($call_type =~ /IN/)
|
||||
{$stmtG = "SELECT start_call_url,add_lead_url,na_call_url,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url FROM vicidial_inbound_groups where group_id='$campaign';";}
|
||||
{
|
||||
$stmtG = "SELECT start_call_url,add_lead_url,na_call_url,waiting_call_url_on,waiting_call_url_off,enter_ingroup_url FROM vicidial_inbound_groups where group_id='$campaign';";
|
||||
$alt_type = 'ingroup';
|
||||
$alt_id = $campaign;
|
||||
}
|
||||
else
|
||||
{$stmtG = "SELECT start_call_url,'NONE',na_call_url,'NONE','NONE','NONE' FROM vicidial_campaigns where campaign_id='$campaign';";}
|
||||
{
|
||||
$stmtG = "SELECT start_call_url,'NONE',na_call_url,'NONE','NONE','NONE' FROM vicidial_campaigns where campaign_id='$campaign';";
|
||||
$alt_type = 'campaign';
|
||||
$alt_id = $campaign;
|
||||
}
|
||||
$sthA = $dbhA->prepare($stmtG) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtG ", $dbhA->errstr;
|
||||
$start_url_ct=$sthA->rows;
|
||||
@@ -241,12 +255,15 @@ if (length($lead_id) > 0)
|
||||
$sthA = $dbhA->prepare($stmtH) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtH ", $dbhA->errstr;
|
||||
$list_nacu_url_ct=$sthA->rows;
|
||||
if ($DBX) {print "DEBUG: $list_nacu_url_ct|$stmtH\n";}
|
||||
if ($list_nacu_url_ct > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if (length($aryA[0])>3)
|
||||
if ( (length($aryA[0]) > 3) || ($aryA[0] =~ /^ALT$/) )
|
||||
{
|
||||
$na_call_url = $aryA[0];
|
||||
$alt_type = 'list';
|
||||
$alt_id = $list_id;
|
||||
}
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -286,6 +303,7 @@ if (length($lead_id) > 0)
|
||||
$VAR_alt_dial = $alt_dial;
|
||||
$VAR_call_id = $call_id;
|
||||
$VAR_list_id = $list_id;
|
||||
$VAR_status = $status;
|
||||
$VAR_phone_code = '';
|
||||
$VAR_vendor_lead_code = '';
|
||||
$VAR_did_id = '';
|
||||
@@ -653,153 +671,294 @@ if (length($lead_id) > 0)
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($na_call_url =~ /--A--user_custom_|--A--full_name--B--/)
|
||||
### BEGIN section if na_call_url is set to ALT ###
|
||||
if ($na_call_url =~ /^ALT$/)
|
||||
{
|
||||
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group,full_name from vicidial_users where user='$user';";
|
||||
$stmtA="SELECT url_rank,url_statuses,url_address,url_lists,url_call_length from vicidial_url_multi where campaign_id='$alt_id' and entry_type='$alt_type' and url_type='noagent' and active='Y' order by url_rank limit 1000;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
$naALTsthArows=$sthA->rows;
|
||||
$naALT=0;
|
||||
while ($naALTsthArows > $naALT)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VAR_user_custom_one = $aryA[0];
|
||||
$VAR_user_custom_two = $aryA[1];
|
||||
$VAR_user_custom_three = $aryA[2];
|
||||
$VAR_user_custom_four = $aryA[3];
|
||||
$VAR_user_custom_five = $aryA[4];
|
||||
$VAR_user_group = $aryA[5];
|
||||
$VAR_full_name = $aryA[6];
|
||||
}
|
||||
}
|
||||
|
||||
if ($na_call_url =~ /--A--did_/)
|
||||
{
|
||||
$stmtA = "SELECT did_id,extension FROM vicidial_did_log where uniqueid='$uniqueid';";
|
||||
$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;
|
||||
$VAR_did_id = $aryA[0];
|
||||
$VAR_did_extension = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT did_pattern,did_description FROM vicidial_inbound_dids where did_id='$VAR_did_id';";
|
||||
$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;
|
||||
$VAR_did_pattern = $aryA[0];
|
||||
$VAR_did_description = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
if ($na_call_url =~ /--A--closecallid--B--/)
|
||||
{
|
||||
$stmtA = "SELECT closecallid FROM vicidial_closer_log where uniqueid='$uniqueid' order by closecallid limit 1;";
|
||||
$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;
|
||||
$VAR_closecallid = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
if ( (length($VAR_list_id) > 1) && ( ( (length($list_name) < 1) && ($na_call_url =~ /--A--list_name--B--/) ) || ( (length($list_description) < 1) && ($na_call_url =~ /--A--list_description--B--/) ) ) )
|
||||
{
|
||||
$stmtH = "SELECT list_name,list_description FROM vicidial_lists where list_id='$VAR_list_id';";
|
||||
$sthA = $dbhA->prepare($stmtH) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtH ", $dbhA->errstr;
|
||||
$list_name_ct=$sthA->rows;
|
||||
if ($list_name_ct > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if (length($aryA[0])>0)
|
||||
$naALT_url_rank[$naALT] = $aryA[0];
|
||||
$naALT_url_statuses[$naALT] = " $aryA[1] ";
|
||||
$naALT_url_address[$naALT] = $aryA[2];
|
||||
$naALT_url_lists[$naALT] = $aryA[3];
|
||||
$naALT_url_call_length[$naALT] = $aryA[4];
|
||||
$naALT_url_failed[$naALT] = 0;
|
||||
if ( ($naALT_url_statuses[$naALT] != '---ALL---') && ($naALT_url_statuses[$naALT] !~ / $status /i) )
|
||||
{
|
||||
$list_name = $aryA[0];
|
||||
if ($DBX) {print " No-Agent Call URL entry $naALT failed status qualifier: |$status|$naALT_url_statuses[$naALT]|\n";}
|
||||
$naALT_url_failed[$naALT]++;
|
||||
}
|
||||
if (length($aryA[1])>0)
|
||||
if ( ($naALT_url_lists[$naALT] > 2) && ($naALT_url_lists[$naALT] !~ / $list_id /i) )
|
||||
{
|
||||
$list_description = $aryA[1];
|
||||
if ($DBX) {print " No-Agent Call URL entry $naALT failed list qualifier: |$list_id|$naALT_url_lists[$naALT]|\n";}
|
||||
$naALT_url_failed[$naALT]++;
|
||||
}
|
||||
$naALT++;
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
else
|
||||
{
|
||||
$naALT_url_rank[0] = 1;
|
||||
$naALT_url_statuses[0] = '---ALL---';
|
||||
$naALT_url_address[0] = $na_call_url;
|
||||
$naALT_url_lists[0] = '';
|
||||
$naALT_url_call_length[0] = 0;
|
||||
$naALT_url_failed[0] = 0;
|
||||
$naALTsthArows=1;
|
||||
$naALT++;
|
||||
}
|
||||
### END section if na_call_url is set to ALT ###
|
||||
if ($DBX) {print "DEBUG: NCU - $naALT|$alt_type|$alt_id|$na_call_url|\n";}
|
||||
|
||||
$na_call_url =~ s/^VAR//gi;
|
||||
$na_call_url =~ s/--A--lead_id--B--/$VAR_lead_id/gi;
|
||||
$na_call_url =~ s/--A--entry_date--B--/$VAR_entry_date/gi;
|
||||
$na_call_url =~ s/--A--modify_date--B--/$VAR_modify_date/gi;
|
||||
$na_call_url =~ s/--A--status--B--/$VAR_status/gi;
|
||||
$na_call_url =~ s/--A--dispo--B--/$VAR_status/gi;
|
||||
$na_call_url =~ s/--A--user--B--/$VAR_user/gi;
|
||||
$na_call_url =~ s/--A--vendor_id--B--/$VAR_vendor_lead_code/gi;
|
||||
$na_call_url =~ s/--A--vendor_lead_code--B--/$VAR_vendor_lead_code/gi;
|
||||
$na_call_url =~ s/--A--source_id--B--/$VAR_source_id/gi;
|
||||
$na_call_url =~ s/--A--list_id--B--/$VAR_list_id/gi;
|
||||
$na_call_url =~ s/--A--list_name--B--/$list_name/gi;
|
||||
$na_call_url =~ s/--A--list_description--B--/$list_description/gi;
|
||||
$na_call_url =~ s/--A--phone_code--B--/$VAR_phone_code/gi;
|
||||
$na_call_url =~ s/--A--phone_number--B--/$VAR_phone_number/gi;
|
||||
$na_call_url =~ s/--A--title--B--/$VAR_title/gi;
|
||||
$na_call_url =~ s/--A--first_name--B--/$VAR_first_name/gi;
|
||||
$na_call_url =~ s/--A--middle_initial--B--/$VAR_middle_initial/gi;
|
||||
$na_call_url =~ s/--A--last_name--B--/$VAR_last_name/gi;
|
||||
$na_call_url =~ s/--A--address1--B--/$VAR_address1/gi;
|
||||
$na_call_url =~ s/--A--address2--B--/$VAR_address2/gi;
|
||||
$na_call_url =~ s/--A--address3--B--/$VAR_address3/gi;
|
||||
$na_call_url =~ s/--A--city--B--/$VAR_city/gi;
|
||||
$na_call_url =~ s/--A--state--B--/$VAR_state/gi;
|
||||
$na_call_url =~ s/--A--province--B--/$VAR_province/gi;
|
||||
$na_call_url =~ s/--A--postal_code--B--/$VAR_postal_code/gi;
|
||||
$na_call_url =~ s/--A--country_code--B--/$VAR_country_code/gi;
|
||||
$na_call_url =~ s/--A--gender--B--/$VAR_gender/gi;
|
||||
$na_call_url =~ s/--A--date_of_birth--B--/$VAR_date_of_birth/gi;
|
||||
$na_call_url =~ s/--A--alt_phone--B--/$VAR_alt_phone/gi;
|
||||
$na_call_url =~ s/--A--email--B--/$VAR_email/gi;
|
||||
$na_call_url =~ s/--A--security_phrase--B--/$VAR_security_phrase/gi;
|
||||
$na_call_url =~ s/--A--comments--B--/$VAR_comments/gi;
|
||||
$na_call_url =~ s/--A--called_count--B--/$VAR_called_count/gi;
|
||||
$na_call_url =~ s/--A--last_local_call_time--B--/$VAR_last_local_call_time/gi;
|
||||
$na_call_url =~ s/--A--rank--B--/$VAR_rank/gi;
|
||||
$na_call_url =~ s/--A--owner--B--/$VAR_owner/gi;
|
||||
$na_call_url =~ s/--A--dialed_number--B--/$VAR_phone_number/gi;
|
||||
$na_call_url =~ s/--A--dialed_label--B--/$VAR_alt_dial/gi;
|
||||
$na_call_url =~ s/--A--user_custom_one--B--/$VAR_user_custom_one/gi;
|
||||
$na_call_url =~ s/--A--user_custom_two--B--/$VAR_user_custom_two/gi;
|
||||
$na_call_url =~ s/--A--user_custom_three--B--/$VAR_user_custom_three/gi;
|
||||
$na_call_url =~ s/--A--user_custom_four--B--/$VAR_user_custom_four/gi;
|
||||
$na_call_url =~ s/--A--user_custom_five--B--/$VAR_user_custom_five/gi;
|
||||
$na_call_url =~ s/--A--full_name--B--/$VAR_full_name/gi;
|
||||
$na_call_url =~ s/--A--launch_user--B--/$user/gi;
|
||||
$na_call_url =~ s/--A--did_id--B--/$VAR_did_id/gi;
|
||||
$na_call_url =~ s/--A--did_extension--B--/$VAR_did_extension/gi;
|
||||
$na_call_url =~ s/--A--did_pattern--B--/$VAR_did_pattern/gi;
|
||||
$na_call_url =~ s/--A--did_description--B--/$VAR_did_description/gi;
|
||||
$na_call_url =~ s/--A--closecallid--B--/$VAR_closecallid/gi;
|
||||
$na_call_url =~ s/--A--uniqueid--B--/$VAR_uniqueid/gi;
|
||||
$na_call_url =~ s/--A--call_id--B--/$VAR_call_id/gi;
|
||||
$na_call_url =~ s/--A--user_group--B--/$VAR_user_group/gi;
|
||||
$na_call_url =~ s/--A--campaign--B--/$VAR_campaign_id/gi;
|
||||
$na_call_url =~ s/--A--campaign_id--B--/$VAR_campaign_id/gi;
|
||||
$na_call_url =~ s/--A--group--B--/$VAR_campaign_id/gi;
|
||||
$na_call_url =~ s/--A--function--B--/$function/gi;
|
||||
$na_call_url =~ s/--A--SQLdate--B--/$now_date/gi;
|
||||
$na_call_url =~ s/ /+/gi;
|
||||
$na_call_url =~ s/&/\\&/gi;
|
||||
$parse_url = $na_call_url;
|
||||
$naALT=0;
|
||||
while ($naALTsthArows > $naALT)
|
||||
{
|
||||
if ($naALT_url_failed[$naALT] < 1)
|
||||
{
|
||||
if ($DB) {print "Runnning No-Agent Call URL entry $naALT:\n";}
|
||||
|
||||
$url_function = 'na_callurl';
|
||||
##### END NA Call URL function #####
|
||||
if ($naALT_url_address[$naALT] =~ /--A--user_custom_|--A--full_name--B--/)
|
||||
{
|
||||
$stmtA = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,user_group,full_name from vicidial_users where user='$user';";
|
||||
$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;
|
||||
$VAR_user_custom_one = $aryA[0];
|
||||
$VAR_user_custom_two = $aryA[1];
|
||||
$VAR_user_custom_three = $aryA[2];
|
||||
$VAR_user_custom_four = $aryA[3];
|
||||
$VAR_user_custom_five = $aryA[4];
|
||||
$VAR_user_group = $aryA[5];
|
||||
$VAR_full_name = $aryA[6];
|
||||
}
|
||||
}
|
||||
|
||||
if ($naALT_url_address[$naALT] =~ /--A--did_/)
|
||||
{
|
||||
$stmtA = "SELECT did_id,extension FROM vicidial_did_log where uniqueid='$uniqueid';";
|
||||
$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;
|
||||
$VAR_did_id = $aryA[0];
|
||||
$VAR_did_extension = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT did_pattern,did_description FROM vicidial_inbound_dids where did_id='$VAR_did_id';";
|
||||
$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;
|
||||
$VAR_did_pattern = $aryA[0];
|
||||
$VAR_did_description = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
if ($naALT_url_address[$naALT] =~ /--A--closecallid--B--/)
|
||||
{
|
||||
$stmtA = "SELECT closecallid FROM vicidial_closer_log where uniqueid='$uniqueid' order by closecallid limit 1;";
|
||||
$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;
|
||||
$VAR_closecallid = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
if ( (length($VAR_list_id) > 1) && ( ( (length($list_name) < 1) && ($naALT_url_address[$naALT] =~ /--A--list_name--B--/) ) || ( (length($list_description) < 1) && ($naALT_url_address[$naALT] =~ /--A--list_description--B--/) ) ) )
|
||||
{
|
||||
$stmtH = "SELECT list_name,list_description FROM vicidial_lists where list_id='$VAR_list_id';";
|
||||
$sthA = $dbhA->prepare($stmtH) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtH ", $dbhA->errstr;
|
||||
$list_name_ct=$sthA->rows;
|
||||
if ($list_name_ct > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if (length($aryA[0])>0)
|
||||
{
|
||||
$list_name = $aryA[0];
|
||||
}
|
||||
if (length($aryA[1])>0)
|
||||
{
|
||||
$list_description = $aryA[1];
|
||||
}
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$naALT_url_address[$naALT] =~ s/^VAR//gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--lead_id--B--/$VAR_lead_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--entry_date--B--/$VAR_entry_date/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--modify_date--B--/$VAR_modify_date/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--status--B--/$status/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--dispo--B--/$status/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user--B--/$VAR_user/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--vendor_id--B--/$VAR_vendor_lead_code/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--vendor_lead_code--B--/$VAR_vendor_lead_code/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--source_id--B--/$VAR_source_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--list_id--B--/$VAR_list_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--list_name--B--/$list_name/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--list_description--B--/$list_description/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--phone_code--B--/$VAR_phone_code/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--phone_number--B--/$VAR_phone_number/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--title--B--/$VAR_title/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--first_name--B--/$VAR_first_name/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--middle_initial--B--/$VAR_middle_initial/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--last_name--B--/$VAR_last_name/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--address1--B--/$VAR_address1/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--address2--B--/$VAR_address2/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--address3--B--/$VAR_address3/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--city--B--/$VAR_city/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--state--B--/$VAR_state/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--province--B--/$VAR_province/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--postal_code--B--/$VAR_postal_code/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--country_code--B--/$VAR_country_code/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--gender--B--/$VAR_gender/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--date_of_birth--B--/$VAR_date_of_birth/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--alt_phone--B--/$VAR_alt_phone/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--email--B--/$VAR_email/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--security_phrase--B--/$VAR_security_phrase/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--comments--B--/$VAR_comments/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--called_count--B--/$VAR_called_count/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--last_local_call_time--B--/$VAR_last_local_call_time/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--rank--B--/$VAR_rank/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--owner--B--/$VAR_owner/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--dialed_number--B--/$VAR_phone_number/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--dialed_label--B--/$VAR_alt_dial/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user_custom_one--B--/$VAR_user_custom_one/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user_custom_two--B--/$VAR_user_custom_two/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user_custom_three--B--/$VAR_user_custom_three/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user_custom_four--B--/$VAR_user_custom_four/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user_custom_five--B--/$VAR_user_custom_five/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--full_name--B--/$VAR_full_name/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--launch_user--B--/$user/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--did_id--B--/$VAR_did_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--did_extension--B--/$VAR_did_extension/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--did_pattern--B--/$VAR_did_pattern/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--did_description--B--/$VAR_did_description/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--closecallid--B--/$VAR_closecallid/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--uniqueid--B--/$VAR_uniqueid/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--call_id--B--/$VAR_call_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--user_group--B--/$VAR_user_group/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--campaign--B--/$VAR_campaign_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--campaign_id--B--/$VAR_campaign_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--group--B--/$VAR_campaign_id/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--function--B--/$function/gi;
|
||||
$naALT_url_address[$naALT] =~ s/--A--SQLdate--B--/$now_date/gi;
|
||||
$naALT_url_address[$naALT] =~ s/ /+/gi;
|
||||
$naALT_url_address[$naALT] =~ s/&/\\&/gi;
|
||||
$parse_url = $naALT_url_address[$naALT];
|
||||
|
||||
$url_function = 'na_callurl';
|
||||
|
||||
### insert a new url log entry
|
||||
$SQL_log = "$parse_url";
|
||||
$SQL_log =~ s/;|\||\\//gi;
|
||||
$stmtA = "INSERT INTO vicidial_url_log SET uniqueid='$uniqueid',url_date='$now_date',url_type='$url_function',url='$SQL_log',url_response='';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$url_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$url = $parse_url;
|
||||
$url =~ s/'/\\'/gi;
|
||||
$url =~ s/"/\\"/gi;
|
||||
|
||||
my $secW = time();
|
||||
|
||||
# disconnect from the database to free up the DB connection
|
||||
$dbhA->disconnect();
|
||||
|
||||
# request the web URL
|
||||
`$wgetbin --no-check-certificate --output-document=/tmp/ASUBtmpD$US$url_id$US$secX --output-file=/tmp/ASUBtmpF$US$url_id$US$secX $url `;
|
||||
|
||||
# reconnect to the database to log response and response time
|
||||
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
$event_string="$function|$wgetbin --no-check-certificate --output-document=/tmp/ASUBtmpD$US$url_id$US$secX --output-file=/tmp/ASUBtmpF$US$url_id$US$secX $url|";
|
||||
&event_logger;
|
||||
|
||||
my $secY = time();
|
||||
my $response_sec = ($secY - $secW);
|
||||
|
||||
open(Wdoc, "/tmp/ASUBtmpD$US$url_id$US$secX") || die "can't open /tmp/ASUBtmpD$US$url_id$US$secX: $!\n";
|
||||
@Wdoc = <Wdoc>;
|
||||
close(Wdoc);
|
||||
$i=0;
|
||||
$Wdocline_cat='';
|
||||
foreach(@Wdoc)
|
||||
{
|
||||
$Wdocline = $Wdoc[$i];
|
||||
$Wdocline =~ s/\n|\r/!/gi;
|
||||
$Wdocline =~ s/ |\t|\'|\`//gi;
|
||||
$Wdocline_cat .= "$Wdocline";
|
||||
$i++;
|
||||
}
|
||||
if (length($Wdocline_cat)<1)
|
||||
{$Wdocline_cat='<RESPONSE EMPTY>';}
|
||||
|
||||
open(Wfile, "/tmp/ASUBtmpF$US$url_id$US$secX") || die "can't open /tmp/ASUBtmpF$US$url_id$US$secX: $!\n";
|
||||
@Wfile = <Wfile>;
|
||||
close(Wfile);
|
||||
$i=0;
|
||||
$Wfileline_cat='';
|
||||
foreach(@Wfile)
|
||||
{
|
||||
$Wfileline = $Wfile[$i];
|
||||
$Wfileline =~ s/\n|\r/!/gi;
|
||||
$Wfileline =~ s/ |\t|\'|\`//gi;
|
||||
$Wfileline_cat .= "$Wfileline";
|
||||
$i++;
|
||||
}
|
||||
if (length($Wfileline_cat)<1)
|
||||
{$Wfileline_cat='<HEADER EMPTY>';}
|
||||
|
||||
|
||||
### update url log entry
|
||||
$stmtA = "UPDATE vicidial_url_log SET url_response='$Wdocline_cat|$Wfileline_cat',response_sec='$response_sec' where url_log_id='$url_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($DB) {print "$affected_rows|$stmtA\n";}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($DB) {print "Not runnning No-Agent Call URL entry $naALT, it failed qualifiers\n";}
|
||||
}
|
||||
$naALT++;
|
||||
}
|
||||
my $secZ = time();
|
||||
my $script_time = ($secZ - $secX);
|
||||
if ($DB) {print "DONE execute time: $script_time seconds\n";}
|
||||
|
||||
exit 0;
|
||||
}
|
||||
##### END NA Call URL function #####
|
||||
|
||||
elsif ($function =~ /SC_CALL_URL/)
|
||||
{
|
||||
$talk_sec=0; $dead_sec=0; $dispo_epoch=time(); $now_epoch=time();
|
||||
|
||||
@@ -520,7 +520,7 @@ if ($match_found > 0)
|
||||
$SQL_log = "$stmt|$stmtB|$CBaffected_rows|";
|
||||
$SQL_log = preg_replace('/;/','',$SQL_log);
|
||||
$SQL_log = addslashes($SQL_log);
|
||||
$stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$user',function='deactivate_lead',value='$lead_id',result='$affected_rows',result_reason='$lead_id',source='vdc',data='$SQL_log',api_date='$NOW_TIME',api_script='$api_script';";
|
||||
$stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$user',function='lead_move_list',value='$lead_id',result='$affected_rows',result_reason='$lead_id',source='vdc',data='$SQL_log',api_date='$NOW_TIME',api_script='$api_script';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
$MESSAGE = _QXZ("DONE: %1s match found, %2s updated to %3s with %4s status",0,'',$search_count,$affected_rows,$new_list_id,$dispo);
|
||||
|
||||
@@ -0,0 +1,304 @@
|
||||
<?php
|
||||
# dispo_reset_lead.php
|
||||
#
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed to be used in the "Dispo URL" field of a campaign
|
||||
# or in-group (although it can also be used in the "No Agent Call URL" field).
|
||||
# It should take in the lead_id to check for the same lead_id
|
||||
# in order to change it's called_since_last_reset to 'N'. The
|
||||
# sale_status field is a list of statuses separated by three dashes each '---'
|
||||
# which contain the statuses for which the process should be run.
|
||||
#
|
||||
# This script is part of the API group and any modifications of data are
|
||||
# logged to the vicidial_api_log table.
|
||||
#
|
||||
# This script limits the number of altered leads to 1 per instance and it will
|
||||
# not run if the search field of the lead is empty.
|
||||
#
|
||||
# Example of what to put in the Dispo URL field:
|
||||
# VARhttp://192.168.1.1/agc/dispo_reset_lead.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=--A--user--B--&pass=--A--pass--B--9&sale_status=SALE---SSALE---XSALE&log_to_file=1
|
||||
#
|
||||
# Another example of what to put in the Dispo URL field(using status exclude with talk trigger):
|
||||
# VARhttp://192.168.1.1/agc/dispo_reset_lead.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&called_count=--A--called_count--B--&user=--A--user--B--&pass=--A--pass--B--&sale_status=DNC---BILLNW---POST&exclude_status=Y&called_count_trigger=1-3&log_to_file=1
|
||||
#
|
||||
# Example of what to put in the No Agent Call URL field:
|
||||
# (IMPORTANT: user needs to be NOAGENTURL and pass needs to be set to the call_id)
|
||||
# VARhttp://192.168.1.1/agc/dispo_reset_lead.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=NOAGENTURL&pass=--A--call_id--B--&sale_status=SALE---SSALE---XSALE&log_to_file=1
|
||||
#
|
||||
# Definable Fields: (other fields should be left as they are)
|
||||
# - log_to_file - (0,1) if set to 1, will create a log file in the agc directory
|
||||
# - sale_status - (SALE---XSALE) a triple-dash "---" delimited list of the statuses that are to be moved
|
||||
# - exclude_status - (Y,N) if set to Y, will trigger for all statuses EXCEPT for those listed in sale_status, default is N
|
||||
# - called_count_trigger - (1,2,3,1-4,...) if set to number or range greater than 0, will only trigger for called_count at or above set number or within the range ddefined, default is 0
|
||||
|
||||
#
|
||||
# CHANGES
|
||||
# 230204-0812 - First Build
|
||||
#
|
||||
|
||||
$api_script = 'resetlead';
|
||||
$php_script = 'dispo_reset_lead.php';
|
||||
|
||||
require_once("dbconnect_mysqli.php");
|
||||
require_once("functions.php");
|
||||
|
||||
$filedate = date("Ymd");
|
||||
$filetime = date("H:i:s");
|
||||
$IP = getenv ("REMOTE_ADDR");
|
||||
$BR = getenv ("HTTP_USER_AGENT");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];}
|
||||
elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];}
|
||||
if (isset($_GET["sale_status"])) {$sale_status=$_GET["sale_status"];}
|
||||
elseif (isset($_POST["sale_status"])) {$sale_status=$_POST["sale_status"];}
|
||||
if (isset($_GET["exclude_status"])) {$exclude_status=$_GET["exclude_status"];}
|
||||
elseif (isset($_POST["exclude_status"])) {$exclude_status=$_POST["exclude_status"];}
|
||||
if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];}
|
||||
elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];}
|
||||
if (isset($_GET["called_count"])) {$called_count=$_GET["called_count"];}
|
||||
elseif (isset($_POST["called_count"])) {$called_count=$_POST["called_count"];}
|
||||
if (isset($_GET["called_count_trigger"])) {$called_count_trigger=$_GET["called_count_trigger"];}
|
||||
elseif (isset($_POST["called_count_trigger"])) {$called_count_trigger=$_POST["called_count_trigger"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["pass"])) {$pass=$_GET["pass"];}
|
||||
elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
if (isset($_GET["log_to_file"])) {$log_to_file=$_GET["log_to_file"];}
|
||||
elseif (isset($_POST["log_to_file"])) {$log_to_file=$_POST["log_to_file"];}
|
||||
|
||||
$DB=preg_replace("/[^0-9a-zA-Z]/","",$DB);
|
||||
|
||||
#$DB = '1'; # DEBUG override
|
||||
$US = '_';
|
||||
$TD = '---';
|
||||
$STARTtime = date("U");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$original_sale_status = $sale_status;
|
||||
$sale_status = "$TD$sale_status$TD";
|
||||
$search_value='';
|
||||
$match_found=0;
|
||||
$primary_match_found=0;
|
||||
$age_trigger=0;
|
||||
$k=0;
|
||||
|
||||
# filter variables
|
||||
$user=preg_replace("/\'|\"|\\\\|;| /","",$user);
|
||||
$pass=preg_replace("/\'|\"|\\\\|;| /","",$pass);
|
||||
|
||||
# if options file exists, use the override values for the above variables
|
||||
# see the options-example.php file for more information
|
||||
if (file_exists('options.php'))
|
||||
{
|
||||
require_once('options.php');
|
||||
}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,enable_languages,language_method,allow_web_debug FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
#if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$SSenable_languages = $row[1];
|
||||
$SSlanguage_method = $row[2];
|
||||
$SSallow_web_debug = $row[3];
|
||||
}
|
||||
if ($SSallow_web_debug < 1) {$DB=0;}
|
||||
|
||||
$VUselected_language = '';
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$user';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$sl_ct = mysqli_num_rows($rslt);
|
||||
if ($sl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VUselected_language = $row[0];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
$lead_id = preg_replace('/[^_0-9]/', '', $lead_id);
|
||||
$log_to_file = preg_replace('/[^-_0-9a-zA-Z]/', '', $log_to_file);
|
||||
$called_count = preg_replace('/[^-_0-9a-zA-Z]/', '', $called_count);
|
||||
$called_count_trigger = preg_replace('/[^-_0-9a-zA-Z]/', '', $called_count_trigger);
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$user=preg_replace("/[^-_0-9a-zA-Z]/","",$user);
|
||||
$pass=preg_replace("/[^-\.\+\/\=_0-9a-zA-Z]/","",$pass);
|
||||
$exclude_status = preg_replace('/[^-_0-9a-zA-Z]/', '', $exclude_status);
|
||||
$sale_status = preg_replace('/[^-_0-9a-zA-Z]/', '', $sale_status);
|
||||
$dispo = preg_replace('/[^-_0-9a-zA-Z]/', '', $dispo);
|
||||
}
|
||||
else
|
||||
{
|
||||
$user = preg_replace('/[^-_0-9\p{L}]/u','',$user);
|
||||
$pass = preg_replace('/[^-\.\+\/\=_0-9\p{L}]/u','',$pass);
|
||||
$exclude_status = preg_replace('/[^-_0-9\p{L}]/u', '', $exclude_status);
|
||||
$sale_status = preg_replace('/[^-_0-9\p{L}]/u', '', $sale_status);
|
||||
$dispo = preg_replace('/[^-_0-9\p{L}]/u', '', $dispo);
|
||||
}
|
||||
|
||||
if ($DB>0) {echo "$lead_id|$sale_status|$exclude_status|$dispo|$user|$pass|$DB|$log_to_file|$called_count|$called_count_trigger|\n";}
|
||||
|
||||
$called_count_trigger_range_check=0;
|
||||
$called_count_trigger_range_match=0;
|
||||
$called_count_trigger_minimum_check=0;
|
||||
$called_count_trigger_minimum_match=0;
|
||||
if (preg_match("/\d-\d/",$called_count_trigger))
|
||||
{
|
||||
$called_count_trigger_range_check=1;
|
||||
$called_count_triggerARY = explode('-',$called_count_trigger);
|
||||
if ( (strlen($called_count) > 0) and ($called_count >= $called_count_triggerARY[0]) and ($called_count <= $called_count_triggerARY[1]) )
|
||||
{$called_count_trigger_range_match=1;}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strlen($called_count_trigger) > 0)
|
||||
{
|
||||
$called_count_trigger_minimum_check=1;
|
||||
if ( ($called_count >= $called_count_trigger) or ($called_count_trigger < 1) )
|
||||
{$called_count_trigger_minimum_match=1;}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($called_count_trigger_range_check < 1) or ( ($called_count_trigger_range_check > 0) and ($called_count_trigger_range_match > 0) ) )
|
||||
{
|
||||
if ( ($called_count_trigger_minimum_check < 1) or ( ($called_count_trigger_minimum_check > 0) and ($called_count_trigger_minimum_match > 0) ) )
|
||||
{
|
||||
if ( ( (preg_match("/$TD$dispo$TD/",$sale_status)) and ($exclude_status!='Y') ) or ( (!preg_match("/$TD$dispo$TD/",$sale_status)) and ($exclude_status=='Y') ) )
|
||||
{
|
||||
$primary_match_found=1;
|
||||
if ($DB>0) {echo "primary match found: |$primary_match_found|\n";}
|
||||
}
|
||||
}
|
||||
}
|
||||
$first_pass_vars = "$sale_status|$exclude_status$called_count_trigger|";
|
||||
|
||||
|
||||
if ($primary_match_found > 0)
|
||||
{$match_found=1;}
|
||||
else
|
||||
{
|
||||
$sale_status='';
|
||||
$exclude_status='';
|
||||
$called_count_trigger='';
|
||||
}
|
||||
if ($match_found > 0)
|
||||
{
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$user=preg_replace("/[^-_0-9a-zA-Z]/","",$user);
|
||||
# $pass=preg_replace("/[^-_0-9a-zA-Z]/","",$pass);
|
||||
}
|
||||
|
||||
if (preg_match("/NOAGENTURL/",$user))
|
||||
{
|
||||
$PADlead_id = sprintf("%010s", $lead_id);
|
||||
if ( (strlen($pass) > 15) and (preg_match("/$PADlead_id$/",$pass)) )
|
||||
{
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_log_extended where caller_code='$pass' and call_date > \"$four_hours_ago\";";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$authlive=$row[0];
|
||||
$auth=$row[0];
|
||||
if ($authlive < 1)
|
||||
{
|
||||
echo _QXZ("Call Not Found:")." 2|$user|$pass|$authlive|\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo _QXZ("Invalid Call ID:")." 1|$user|$pass|$PADlead_id|\n";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$auth=0;
|
||||
$auth_message = user_authorization($user,$pass,'',0,0,0,0,'dispo_move_list');
|
||||
if ($auth_message == 'GOOD')
|
||||
{$auth=1;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_live_agents where user='$user';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$authlive=$row[0];
|
||||
}
|
||||
|
||||
if ( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) or ($authlive==0))
|
||||
{
|
||||
echo _QXZ("Invalid Username/Password:")." |$user|$pass|$auth|$authlive|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if (strlen($lead_id) > 0)
|
||||
{
|
||||
$search_count=0;
|
||||
$stmt = "SELECT count(*) FROM vicidial_list where lead_id='$lead_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$sc_ct = mysqli_num_rows($rslt);
|
||||
if ($sc_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$search_count = $row[0];
|
||||
}
|
||||
|
||||
if ($search_count > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_list SET called_since_last_reset='N' where lead_id='$lead_id' limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
|
||||
$SQL_log = "$stmt|$affected_rows|";
|
||||
$SQL_log = preg_replace('/;/','',$SQL_log);
|
||||
$SQL_log = addslashes($SQL_log);
|
||||
$stmt="INSERT INTO vicidial_api_log set user='$user',agent_user='$user',function='lead_reset',value='$lead_id',result='$affected_rows',result_reason='$lead_id',source='vdc',data='$SQL_log',api_date='$NOW_TIME',api_script='$api_script';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
$MESSAGE = _QXZ("DONE: %1s match found, %2s update to lead %3s",0,'',$search_count,$affected_rows,$lead_id);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: no match found for lead %1s",0,'',$lead_id);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: lead %1s is not populated",0,'',$lead_id);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$MESSAGE = _QXZ("DONE: no conditional match found(%1s): %2s",0,'',$original_sale_status,$dispo);
|
||||
echo "$MESSAGE\n";
|
||||
}
|
||||
|
||||
if ($log_to_file > 0)
|
||||
{
|
||||
$fp = fopen ("./dispo_reset_lead.txt", "w");
|
||||
# fwrite ($fp, "$NOW_TIME|$k|$lead_id|$dispo|$user|XXXX|$DB|$log_to_file|$called_count|$first_pass_vars|$original_sale_status|$exclude_status|$called_count_trigger|$MESSAGE|\n");
|
||||
fwrite ($fp, "$NOW_TIME|\n");
|
||||
fclose($fp);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vdc_db_query.php
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed to exchange information between vicidial.php and the database server for various actions
|
||||
#
|
||||
@@ -529,10 +529,11 @@
|
||||
# 220831-1654 - Added User Group script override option
|
||||
# 221116-1052 - Fix for long in-group dialstring extensions
|
||||
# 221202-1645 - Change in CIDname prefix for clearing session command to differentiate from other processes
|
||||
# 230204-1618 - Small fix for dispo url processed logging
|
||||
#
|
||||
|
||||
$version = '2.14-422';
|
||||
$build = '221202-1645';
|
||||
$version = '2.14-423';
|
||||
$build = '230204-1618';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=902;
|
||||
@@ -15435,7 +15436,7 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
}
|
||||
|
||||
$stmt="UPDATE vicidial_log_extended set dispo_url_processed='Y' where uniqueid='$uniqueid';";
|
||||
$stmt="UPDATE vicidial_log_extended set dispo_url_processed='Y' where uniqueid='$uniqueid' and caller_code='$MDnextCID';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00423',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -15969,7 +15970,7 @@ if ($ACTION == 'DEADtriggerURL')
|
||||
}
|
||||
}
|
||||
|
||||
$stmt="UPDATE vicidial_log_extended set dispo_url_processed='Y' where uniqueid='$uniqueid';";
|
||||
$stmt="UPDATE vicidial_log_extended set dispo_url_processed='Y' where uniqueid='$uniqueid' and caller_code='$MDnextCID';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00754',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
+70
-6
@@ -5968,12 +5968,13 @@ if ($SSscript_remove_js > 0)
|
||||
# 221214-1153 - Added $HTMLcolors validation for color form entry fields
|
||||
# 221230-2231 - Added Postal Codes Cities display
|
||||
# 230117-0838 - Added Agent Call Hangup Routing options, changed year to 2023
|
||||
# 230204-1642 - Added No Agent Call URL "ALT" multi-url options
|
||||
#
|
||||
|
||||
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
|
||||
|
||||
$admin_version = '2.14-872a';
|
||||
$build = '230117-0838';
|
||||
$admin_version = '2.14-873a';
|
||||
$build = '230204-1642';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -28323,7 +28324,23 @@ if ($ADD==31)
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dispo Call URL").": </td><td align=left><input type=text name=dispo_call_url size=70 maxlength=5000 value=\"$dispo_call_url\">$NWB#campaigns-dispo_call_url$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Call URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#campaigns-na_call_url$NWE</td></tr>\n";
|
||||
if ($na_call_url == 'ALT')
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$campaign_id' and entry_type='campaign' and url_type='noagent';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$vum_to_print = mysqli_num_rows($rslt);
|
||||
if ($vum_to_print > 0)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$vum_count = $rowx[0];
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right><a href=\"admin_url_multi.php?DB=$DB&campaign_id=$campaign_id&entry_type=campaign&url_type=noagent\">"._QXZ("No Agent Call URL")."</a>: </td><td align=left><input type=text name=na_call_url size=10 maxlength=5000 value=\"$na_call_url\">$NWB#campaigns-na_call_url$NWE <a href=\"admin_url_multi.php?DB=$DB&campaign_id=$campaign_id&entry_type=campaign&url_type=noagent\"> "._QXZ("Alternate No Agent URLs Defined").": $vum_count</a></td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Call URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#campaigns-na_call_url$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Extension Append CID").": </td><td align=left><select size=1 name=extension_appended_cidname><option value='Y'>"._QXZ("Y")."</option><option value='N'>"._QXZ("N")."</option><option value='Y_USER'>"._QXZ("Y_USER")."</option><option value='Y_WITH_CAMPAIGN'>"._QXZ("Y_WITH_CAMPAIGN")."</option><option value='Y_USER_WITH_CAMPAIGN'>"._QXZ("Y_USER_WITH_CAMPAIGN")."</option><option value='$extension_appended_cidname' SELECTED>"._QXZ("$extension_appended_cidname")."</option></select>$NWB#campaigns-extension_appended_cidname$NWE</td></tr>\n";
|
||||
|
||||
@@ -31585,7 +31602,23 @@ if ($ADD==311)
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("Web Form Three").": </td><td align=left><input type=text name=web_form_address_three size=70 maxlength=9999 value=\"$web_form_address_three\">$NWB#lists-web_form_address$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row3_background><td align=right>"._QXZ("No Agent Call URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=9999 value=\"$na_call_url\">$NWB#lists-na_call_url$NWE</td></tr>\n";
|
||||
if ($na_call_url == 'ALT')
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$list_id' and entry_type='list' and url_type='noagent';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$vum_to_print = mysqli_num_rows($rslt);
|
||||
if ($vum_to_print > 0)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$vum_count = $rowx[0];
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right><a href=\"admin_url_multi.php?DB=$DB&campaign_id=$list_id&entry_type=list&url_type=noagent\">"._QXZ("No Agent Call URL")."</a>: </td><td align=left><input type=text name=na_call_url size=10 maxlength=5000 value=\"$na_call_url\">$NWB#lists-na_call_url$NWE <a href=\"admin_url_multi.php?DB=$DB&campaign_id=$list_id&entry_type=list&url_type=noagent\"> "._QXZ("Alternate No Agent URLs Defined").": $vum_count</a></td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Call URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#lists-na_call_url$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Auto Alt Threshold Override").": </td><td align=left><input type=text name=auto_alt_threshold size=3 maxlength=3 value=\"$auto_alt_threshold\"><i>"._QXZ("number only")."</i> $NWB#lists-auto_alt_threshold$NWE</td></tr>\n";
|
||||
|
||||
@@ -33900,8 +33933,23 @@ if ($ADD==3111)
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dispo Call URL").": </td><td align=left><input type=text name=dispo_call_url size=70 maxlength=5000 value=\"$dispo_call_url\">$NWB#inbound_groups-dispo_call_url$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Call URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#inbound_groups-na_call_url$NWE</td></tr>\n";
|
||||
if ($na_call_url == 'ALT')
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='noagent';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$vum_to_print = mysqli_num_rows($rslt);
|
||||
if ($vum_to_print > 0)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$vum_count = $rowx[0];
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right><a href=\"admin_url_multi.php?DB=$DB&campaign_id=$group_id&entry_type=ingroup&url_type=noagent\">"._QXZ("No Agent Call URL")."</a>: </td><td align=left><input type=text name=na_call_url size=10 maxlength=5000 value=\"$na_call_url\">$NWB#inbound_groups-na_call_url$NWE <a href=\"admin_url_multi.php?DB=$DB&campaign_id=$group_id&entry_type=ingroup&url_type=noagent\"> "._QXZ("Alternate No Agent URLs Defined").": $vum_count</a></td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Call URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#inbound_groups-na_call_url$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right nowrap>"._QXZ("Waiting Call URL On").": </td><td align=left><input type=text name=waiting_call_url_on size=70 maxlength=5000 value=\"$waiting_call_url_on\">$NWB#inbound_groups-waiting_call_url_on$NWE</td></tr>\n";
|
||||
|
||||
@@ -35650,7 +35698,23 @@ if ($ADD==3911)
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("Dispo Chat URL").": </td><td align=left><input type=text name=dispo_call_url size=70 maxlength=5000 value=\"$dispo_call_url\">$NWB#inbound_groups-dispo_chat_url$NWE</td></tr>\n";
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Chat URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#inbound_groups-na_chat_url$NWE</td></tr>\n";
|
||||
if ($na_call_url == 'ALT')
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_url_multi where campaign_id='$group_id' and entry_type='ingroup' and url_type='noagent';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$vum_to_print = mysqli_num_rows($rslt);
|
||||
if ($vum_to_print > 0)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$vum_count = $rowx[0];
|
||||
}
|
||||
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right><a href=\"admin_url_multi.php?DB=$DB&campaign_id=$group_id&entry_type=ingroup&url_type=noagent\">"._QXZ("No Agent Chat URL")."</a>: </td><td align=left><input type=text name=na_call_url size=10 maxlength=5000 value=\"$na_call_url\">$NWB#inbound_groups-na_chat_url$NWE <a href=\"admin_url_multi.php?DB=$DB&campaign_id=$group_id&entry_type=ingroup&url_type=noagent\"> "._QXZ("Alternate No Agent URLs Defined").": $vum_count</a></td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>"._QXZ("No Agent Chat URL").": </td><td align=left><input type=text name=na_call_url size=70 maxlength=5000 value=\"$na_call_url\">$NWB#inbound_groups-na_chat_url$NWE</td></tr>\n";
|
||||
}
|
||||
/*
|
||||
echo "<tr bgcolor=#$SSstd_row4_background><td align=right>Extension Append CID: </td><td align=left><select size=1 name=extension_appended_cidname><option>"._QXZ("Y")."</option><option>N</option><option SELECTED>$extension_appended_cidname</option></select>$NWB#inbound_groups-extension_appended_cidname$NWE</td></tr>\n";
|
||||
*/
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# just needs to enter the leadID and then they can view and modify the
|
||||
# information in the record for that lead
|
||||
#
|
||||
# Copyright (C) 2022 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2023 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
#
|
||||
@@ -111,6 +111,7 @@
|
||||
# 220312-0953 - Added vicidial_dial_cid_log data
|
||||
# 220427-1132 - Fixes for lead not found, Issue #1358
|
||||
# 220520-1319 - Fix for admin hide phone data issue #1359
|
||||
# 230204-0011 - Fix for inbound Call ID display
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -2075,7 +2076,7 @@ else
|
||||
$VDLserver_ip = $rowA[1];
|
||||
}
|
||||
$caller_code='';
|
||||
$stmtA="SELECT caller_code,server_ip FROM vicidial_log_extended WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid='$row[18]';";
|
||||
$stmtA="SELECT caller_code,server_ip FROM vicidial_inbound_caller_codes WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid='$row[18]' and group_id='$row[3]';";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$cc_to_print = mysqli_num_rows($rsltA);
|
||||
if ($cc_to_print > 0)
|
||||
@@ -2303,7 +2304,7 @@ else
|
||||
$VDLserver_ip = $rowA[1];
|
||||
}
|
||||
$caller_code='';
|
||||
$stmtA="SELECT caller_code,server_ip FROM vicidial_log_extended_archive WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid='$row[18]';";
|
||||
$stmtA="SELECT caller_code,server_ip FROM vicidial_inbound_caller_codes_archive WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid='$row[18]' and group_id='$row[3]';";
|
||||
$rsltA=mysql_to_mysqli($stmtA, $link);
|
||||
$cc_to_print = mysqli_num_rows($rsltA);
|
||||
if ($cc_to_print > 0)
|
||||
|
||||
@@ -283,6 +283,17 @@ else
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($url_type == 'dispo')
|
||||
{$url_type_text='Dispo Call';}
|
||||
elseif ($url_type == 'start')
|
||||
{$url_type_text='Start Call';}
|
||||
elseif ($url_type == 'noagent')
|
||||
{$url_type_text='No Agent Call';}
|
||||
elseif ($url_type == 'addlead')
|
||||
{$url_type_text='Add Lead';}
|
||||
else
|
||||
{$url_type_text='Error';}
|
||||
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
@@ -314,7 +325,7 @@ require("admin_header.php");
|
||||
|
||||
if ($camp_multi < 1)
|
||||
{
|
||||
echo _QXZ("This URL is not set ALT")."$entry_type|$url_type\n";
|
||||
echo _QXZ("This URL is not set ALT")."$entry_type|$url_type|$url_type_text\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -452,7 +463,7 @@ if ($action == "BLANK")
|
||||
echo "<br>"._QXZ("Alternate URL Form");
|
||||
echo "<center><TABLE width=1020 cellspacing=3>\n";
|
||||
echo "<tr><td align=center colspan=2>\n";
|
||||
echo "<br><b>"._QXZ("Alternate %1s URLs for %2s",0,'',$url_type,$entry_type).": <a href=\"./admin.php?$mod_link$campaign_id\">$campaign_id</a></b> $NWB#alt_multi_urls$NWE\n";
|
||||
echo "<br><b>"._QXZ("Alternate %1s URLs for %2s",0,'',$url_type_text,$entry_type).": <a href=\"./admin.php?$mod_link$campaign_id\">$campaign_id</a></b> $NWB#alt_multi_urls$NWE\n";
|
||||
|
||||
echo "<TABLE width=1000 cellspacing=3>\n";
|
||||
echo "<tr><td><font size=2><b>#</td><td NOWRAP><font size=1>URL ID</td><td><font size=2><b>"._QXZ("ACTIVE")."</td><td><font size=2><b>"._QXZ("RANK")."</td><td><font size=2><b>"._QXZ("STATUSES")."</td><td><font size=2><b>"._QXZ("LISTS")."</td><td><font size=2><b>"._QXZ("MIN LENGTH")."</td><td><font size=2><b>"._QXZ("DESCRIPTION")."</td><td><font size=2><b>"._QXZ("SUBMIT")."</td></tr>\n";
|
||||
@@ -513,7 +524,7 @@ if ($action == "BLANK")
|
||||
echo "</table></center><br>\n";
|
||||
|
||||
|
||||
echo "<br>"._QXZ("Add a new %1s URL",0,'',$url_type).":<br>";
|
||||
echo "<br>"._QXZ("Add a new %1s URL",0,'',$url_type_text).":<br>";
|
||||
echo "</td></tr>\n";
|
||||
|
||||
echo "<TABLE width=700 cellspacing=3>\n";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# version: 20230202080201
|
||||
# version: 20230203164401
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 20 digits in length, Must be at least 2 characters in length. We strongly recommend not reusing user accounts for different users, for reporting accuracy. To disable a user account, set the Active option to -N-.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. Only letters and numbers are allowed in user passwords. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-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>
|
||||
@@ -403,7 +403,7 @@ campaigns-crm_popup_login CRM Popup Login <QXZ>If set to Y, the CRM Popup Addres
|
||||
campaigns-crm_login_address CRM Popup Address <QXZ>The web address of a CRM login page, it can have variables populated just like the web form address, with the VAR in the front and using --A--user_custom_one--B-- to define variables.</QXZ>
|
||||
campaigns-start_call_url Start Call URL <QXZ>This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. This URL can NOT be a relative path. For Manual dial calls, the Start Call URL will be sent when the call is placed. Default is blank.</QXZ>
|
||||
campaigns-dispo_call_url Dispo Call URL <QXZ>This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo, callback_lead_status, talk_time and term_reason are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call as well as how the call was ended. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>If you put ALT into this field and submit this form, you will be able to go to a separate page where you can define multiple URLs for this action as well as specific statuses that will trigger them.</QXZ>
|
||||
campaigns-na_call_url No Agent Call URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a call that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. dispo can be used to retrieve the system-defined disposition for the call. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature.</QXZ>
|
||||
campaigns-na_call_url No Agent Call URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a call that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. --A--dispo--B-- can be used to retrieve the system-defined disposition for the call. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature. If you put ALT into this field and submit this form, you will be able to go to a separate page where you can define multiple URLs for this action as well as specific statuses that will trigger them.</QXZ>
|
||||
campaigns-agent_allow_group_alias Group Alias Allowed <QXZ>If you want to allow your agents to use group aliases then you need to set this to Y. Group Aliases are explained more in the Admin section, they allow agents to select different callerIDs for outbound manual calls that they may place. Default is N.</QXZ>
|
||||
campaigns-default_group_alias Default Group Alias <QXZ>If you have allowed Group Aliases then this is the group alias that is selected first by default when the agent chooses to use a Group Alias for an outbound manual call. Default is NONE or empty.</QXZ>
|
||||
campaigns-calls_inqueue_count Calls In Queue Count Display <QXZ>This setting, if set to a valid CALLS_IN_QUEUE_COUNT type Settings Container, will change the display at the top of the agent screen to a specific filtered count of the calls in queue, replacing the default display of the count of every call waiting in queue that the agent has permissions to handle. If both of these settings are enabled, the first one will display before the second one. If you use an EXCEPT option, the exception container cannot also use an EXCEPT option. Default is ---DISABLED---. The CALLS_IN_QUEUE_COUNT type Settings Container should have -HEADING=>Display Name- as its first line, without the dashes, and then either a list of In-Groups and Campaigns, or one of the following special options,<BR>--ALL-IN-GROUP-CALLS--<BR>--ALL-CAMPAIGN-CALLS--<BR>--ALL-CALLS--<BR>--ALL-IN-GROUP-CALLS-EXCEPT=container_id<BR>--ALL-CAMPAIGN-CALLS-EXCEPT=container_id<BR>--ALL-CALLS-EXCEPT=container_id</QXZ>
|
||||
@@ -445,7 +445,7 @@ lists-am_message_exten_override Answering Machine Message Override <QXZ>If this
|
||||
lists-drop_inbound_group_override Drop Inbound Group Override <QXZ>If this field is set, this in-group will be used for outbound calls within this list that drop from the outbound campaign instead of the drop in-group set in the campaign detail screen. Default is not set.</QXZ>
|
||||
lists-status_group_id Status Group Override <QXZ>If this field is set, this Status Group will be used instead of the campaign statuses for calls handled by agents from this list. This does not affect System Statuses which will always be shown. Statuses defined within this status group will not be available with Campaign HotKeys unless they are defined in Campaign Statuses. Default is not set.</QXZ>
|
||||
lists-web_form_address Web Form Override <QXZ>This is the custom address that clicking on the WEB FORM button in the agent screen will take you to for calls that come in on this list. If you want to use custom fields in a web form address, you need to add &CF_uses_custom_fields=Y as part of your URL.</QXZ>
|
||||
lists-na_call_url No Agent Call URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a call that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. dispo can be used to retrieve the system-defined disposition for the call. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature.</QXZ>
|
||||
lists-na_call_url No Agent Call URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a call that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. --A--dispo--B-- can be used to retrieve the system-defined disposition for the call. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature. If you put ALT into this field and submit this form, you will be able to go to a separate page where you can define multiple URLs for this action as well as specific statuses that will trigger them.</QXZ>
|
||||
lists-auto_alt_threshold Auto Alt Threshold Override <QXZ>If Auto Alt-Number Dialing is enabled, and not set to MULTI_LEAD, then this setting will specify the number of call attempts to the lead after which the Auto Alt dialing will no longer place alternate number calls for a specific lead, if the lead is called after this number of attempts then only the main phone number will be called. This option overrides the campaign setting for this feature. Default is -1 for the override being disabled.</QXZ>
|
||||
lists-dial_prefix Dial Prefix Override <QXZ>This setting will override the campaign Dial Prefix, the campaign Manual Dial Prefix and API dial prefix for calls placed in that campaign to leads within this list. Default is -blank- for disabled.</QXZ>
|
||||
lists-xferconf_a_dtmf Xfer-Conf Number Override <QXZ>These five fields allow for you to override the Transfer Conference number presets when the lead is from this list. Default is blank.</QXZ>
|
||||
@@ -639,7 +639,7 @@ inbound_groups-answer_sec_pct_rt_stat_one Stats Percent of Calls Answered Within
|
||||
inbound_groups-enter_ingroup_url Enter In-Group URL <QXZ>This web URL address is called every time a call enters the queue, right before the system looks for an agent to send the call to. If the call leaves the In-Group before that time, such as for No-Agent No-Queue, Max Calls, After Hours, etc..., this URL will not be called. Default is blank.</QXZ>
|
||||
inbound_groups-start_call_url Start Call URL <QXZ>This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. Default is blank.</QXZ>
|
||||
inbound_groups-dispo_call_url Dispo Call URL <QXZ>This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo, talk_time and term_reason are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call as well as how the call was ended. Default is blank.</QXZ> <QXZ>If you put ALT into this field and submit this form, you will be able to go to a separate page where you can define multiple URLs for this action as well as specific statuses that will trigger them.</QXZ> <QXZ>If you want the campaign Dispo Call URL to be used for inbound calls, then put CAMP into this field.</QXZ>
|
||||
inbound_groups-na_call_url No Agent Call URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a call that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. dispo can be used to retrieve the system-defined disposition for the call. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature. If the Wait time, On-Hold Prompt or other settings are not set properly in this In-Group, then this feature may not function properly.</QXZ>
|
||||
inbound_groups-na_call_url No Agent Call URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a call that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. --A--dispo--B-- can be used to retrieve the system-defined disposition for the call. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature. If the Wait time, On-Hold Prompt or other settings are not set properly in this In-Group, then this feature may not function properly. If you put ALT into this field and submit this form, you will be able to go to a separate page where you can define multiple URLs for this action as well as specific statuses that will trigger them.</QXZ>
|
||||
inbound_groups-waiting_call_url_on Waiting Call URL On <QXZ>This feature allows you to trigger a URL when there are calls waiting in this In-Group. The -On- URL will be sent the first time a call is waiting, and no more will be sent as long as there are still calls from this In-Group waiting in the queue. The -Off- URL will be sent as soon as there are no calls waiting for this In-Group anymore. This feature was created to allow for a remote power switch to be triggered to light up a flashing light to notify agents in a call center room that there were calls waiting for them. For this feature to work, both the -On- and -Off- URLs must be filled in. Default is -empty- for disabled.</QXZ>
|
||||
inbound_groups-add_lead_url Add Lead URL <QXZ>This web URL address is not seen by the agent, but it is called every time a lead is added to the system through the inbound process. Default is blank. You must begin this URL with VAR if you want to use variables, and of course --A-- and --B-- around the actual variable in the URL where you want to use it. Here is the list of variables that are available for this function. lead_id, vendor_lead_code, list_id, phone_number, phone_code, did_id, did_extension, did_pattern, did_description, uniqueid</QXZ>
|
||||
inbound_groups-add_lead_timezone Add Lead Timezone <QXZ>This is the method that the system will use to determine the current timezone when a lead is created when a call is being routed through this in-group. SERVER will use the current timezone of the server. PHONE_CODE_AREACODE will look up the timezone based on the phone code set in the lead and the areacode of the phone number. Default is SERVER.</QXZ>
|
||||
@@ -1398,7 +1398,7 @@ cb-bulk-newlist Transfer to List ID <QXZ>The list ID to which all callbacks will
|
||||
cb-bulk-newstatus New Status <QXZ>The new vicidial_list status the selected callbacks will be updated to. This affects the vicidial_list table ONLY.</QXZ>
|
||||
cb-export Callbacks export <QXZ>This page is used to view and download a list of all scheduled callbacks based on the campaigns selected and the dates the callbacks are scheduled to be contacted.</QXZ>
|
||||
cb-export-cb-dates Scheduled callback dates <QXZ>The date the leads are scheduled to be called back.</QXZ>
|
||||
alt_multi_urls Alternate Multi URLs <QXZ>This page allows you to define Alternate URLs with conditions in place of the simple URL option for Dispo, Start, Add Lead or No Agent URLs. The RANK field will define the order in which the URLs are requested, this is important because if you have a URL that may take a few seconds to run ranked as 1, that will mean that any URLs ranked after it will have to wait to be run until that first URL request receives a response. The ACTIVE field will determine whether the specific URL is run. The STATUSES field only works for the Dispo URLs and will determine which disposition statuses will trigger the URL being run, if you want to run the entry for all statuses just fill in ---ALL--- in this field, if you want only a few statuses, separate them by spaces. If populated, the LISTS field will limit the calls that the URL is run from to only the list IDs listed in this field. To have it run for all lists, leave the field blank, if you want only a few lists, separate them by spaces. The MIN LENGTH field will limit the calls that the URL is run for to only calls that are this minimum length in seconds and higher, default is 0. The URL field works the same as it would in the URL option in campaigns, in-groups and lists, and it is also limited to 2000 characters in length. If you want to delete a URL, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that URL entry.</QXZ>
|
||||
alt_multi_urls Alternate Multi URLs <QXZ>This page allows you to define Alternate URLs with conditions in place of the simple URL option for Dispo, Start, Add Lead or No Agent URLs. The RANK field will define the order in which the URLs are requested, this is important because if you have a URL that may take a few seconds to run ranked as 1, that will mean that any URLs ranked after it will have to wait to be run until that first URL request receives a response. The ACTIVE field will determine whether the specific URL is run. The STATUSES field only works for the Dispo URLs and will determine which disposition statuses will trigger the URL being run, if you want to run the entry for all statuses just fill in ---ALL--- in this field, if you want only a few statuses, separate them by spaces. If populated, the LISTS field will limit the calls that the URL is run from to only the list IDs listed in this field. To have it run for all lists, leave the field blank, if you want only a few lists, separate them by spaces. The MIN LENGTH field will limit the calls that the URL is run for to only calls that are this minimum length in seconds and higher, default is 0. The min length option does not work for No Agent Call URLs. The URL field works the same as it would in the URL option in campaigns, in-groups and lists, and it is also limited to 2000 characters in length. If you want to delete a URL, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that URL entry.</QXZ>
|
||||
amm_multi AM Message Wildcards <QXZ>This page allows you to define Am Message Wildcards that will check lead data from the defined lead fields for matches in the defined order specified on this page. For example, if you add a wildcard with the word -vacation- tied to the vendor_lead_code field, and the lead being played a message has -vacation- in that field, then it will hear the message defined in that AM Message Wildcard record. If you want to delete a wildcard, it must first be set to not active, then you can click on the DELETE link below the SUBMIT button for that wildcard entry</QXZ>
|
||||
user_list_new_limits User List New Lead Limits <QXZ>If the system setting for New Leads Per List Limit is enabled, then this page allows for the setting of per-user per-list new lead limit overrides to those List limits. This feature will only work properly if the campaign is set to either the MANUAL or INBOUND_MAN Dial Method and No Hopper dialing is enabled.</QXZ>
|
||||
custom_reports_admin-report_name Report Name <QXZ>The report name that the report will be referred to as in the system for purposes of user group access and slave server use in the system settings. The report name may not be the same as any other custom report, nor may it be the same name as one of the standard system reports.</QXZ>
|
||||
@@ -1407,7 +1407,7 @@ custom_reports_admin-path_name Path name <QXZ>The path on the domain where the r
|
||||
custom_reports_admin-constants Preset constants <QXZ>Here is where a user can define a preset value to pass to the report when it is accessed from the custom report link. This is useful if the user is viewing a report that accepts multiple variables that change the report output and there is a certain set of report parameters the user frequently uses and they wish to save time by coming to the report with those values already set.</QXZ><BR><B><QXZ>Variable name</QXZ> -</B><QXZ>The enters the variable name here. Names allow alphanumeric characters, underscores, and to a limited extent brackets. Brackets are used to pass an array to the report and should be placed at the end of the variable name, such as 'var_name[]'. The interface will condense brackets by removing any characters within a pair of them, and will also remove unmatched brackets.</QXZ><BR><B><QXZ>Value</QXZ> -</B><QXZ>Then, the user enters a variable value in the 'Value' field, either by selecting a pre-defined variable value or a custom value. With the exception of 'datetime' and 'filedatetime', all pre-defined variables are dates in yyyy-mm-dd format. The predefined values are: 'today' for today's date, 'yesterday' for yesterday's date, 'datetime' which is a timestamp in the format of 'yyyy-mm-dd hh:ii:ss', 'filedatetime' which is an all-numeric timestamp in the format 'yyyymmddhhiiss', and 6/7/8/13/14/15/30days, all of which are the date 6/7/etc days ago. If the user would like to define their own value for the variable, they can set the value to 'Custom Value', then fill out the custom value in the field to the right. Click 'ADD' to add the variable name/value pair to the presets to include in the report. Values will be URL-encoded prior to being entered in the database.</QXZ>
|
||||
custom_reports_admin-current_constants Current constants <QXZ>Any report constant the user has entered to add to the report is displayed here. They are not editable, but they can be removed by clicking 'REMOVE' and then re-entered.</QXZ>
|
||||
custom_reports_admin-preset_constants Preset constants <QXZ>This textarea field is where presets for the current custom reports are displayed and can be edited. The name/value pairs are displayed per-line and are fully editable. Users can also remove variables simply by deleting the line they are displayed on, or can enter new name/value pairs per line. Variables can also be separated by an ampersand as in the typical URL GET display - the dialer interface will make the necessary adjustments to display them properly in this textarea field.</QXZ>
|
||||
inbound_groups-na_chat_url No Agent Chat URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a chat that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. dispo can be used to retrieve the system-defined disposition for the chat. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature.</QXZ>
|
||||
inbound_groups-na_chat_url No Agent Chat URL <QXZ>This web URL address is not seen by the agent, but if it is populated it is called every time a chat that is not handled by an agent is hung up or transferred. Uses the same variables as the web form fields and scripts. --A--dispo--B-- can be used to retrieve the system-defined disposition for the chat. This URL can NOT be a relative path. Default is blank.</QXZ> <QXZ>Custom Fields are not available with this feature.</QXZ>
|
||||
inbound_groups-next_agent_chat Next Agent Chat <QXZ>This determines which agent receives the next chat that is available:</QXZ><BR> - <QXZ>random: orders by the random update value in the live_agents table</QXZ><BR> - <QXZ>oldest_call_start: orders by the last time an agent was sent a call/chat. Results in agents receiving about the same number of calls/chats overall.</QXZ><BR> - <QXZ>oldest_call_finish: orders by the last time an agent finished a call/chat. AKA agent waiting longest receives first call.</QXZ><BR> - <QXZ>oldest_inbound_call_start: orders by the last time an agent was sent an inbound call. Results in agents receiving about the same number of calls/chats overall.</QXZ><BR> - <QXZ>oldest_inbound_call_finish: orders by the last time an agent finished an inbound call. AKA agent waiting longest receives first call.</QXZ><BR> - <QXZ>oldest_inbound_filtered_call_start: orders by the last time an agent was sent an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> - <QXZ>oldest_inbound_filtered_call_finish: orders by the last time an agent finished an inbound call that was not of a filtered-out status, in-group or length.</QXZ><BR> - <QXZ>overall_user_level: orders by the user_level of the agent as defined in the users table a higher user_level will receive more calls/chats.</QXZ><BR> - <QXZ>inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest.</QXZ><BR> - <QXZ>campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest.</QXZ><BR> - <QXZ>ingroup_grade_random: gives a higher probability of getting a call/chat to the higher graded agents by in-group.</QXZ><BR> - <QXZ>campaign_grade_random: gives a higher probability of getting a call/chat to the higher graded agents by campaign.</QXZ><BR> - <QXZ>fewest_calls: orders by the number of calls/chats received by an agent for that specific inbound group. Least calls/chats first.</QXZ><BR> - <QXZ>fewest_calls_campaign: orders by the number of calls/chats received by an agent for the campaign. Least calls/chats first.</QXZ><BR> - <QXZ>longest_wait_time: orders by the amount of time agent has been actively waiting for a call/chat.</QXZ><BR> - <QXZ>ring_all: rings all available agents until one picks up the phone.</QXZ><BR> <QXZ>NOTES: For ring_all, the agents that are using phones that have On Hook Agent enabled will have their phones ring and the first one to answer will receive the call and the information on the agent screen. Since ring_all ignores agent wait time and ranking and will call every agent that is available for the queue, we do not recommend using this method for large queues. When using ring_all, agents logged with phones that have the On Hook Agent disabled will have to use the Calls In Queue panel and click on the TAKE CALL link to take calls in queue. The amount of time the agents phone will ring for ring_all is set to the On-Hook Ring Time setting or the shortest ring time of the phones that will be called. We do not recommend using ring_all on high call volume queues, or queues with many agents. The ring_all method is intended to be used with only a few agents and on low call volume in-groups.</QXZ>
|
||||
inbound_groups-group_emaildate In-Group Email Date <QXZ>This is the last date and time that an email was directed to this inbound group.</QXZ>
|
||||
inbound_groups-group_chatdate In-Group Chat Date <QXZ>This is the last date and time that a chat was directed to this inbound group.</QXZ>
|
||||
|
||||
Reference in New Issue
Block a user