Added campaign features for Dead Call Trigger. Allowing an audio alert to be sent to an agent and/or a back-end URL to be submitted when an agent has been in a dead call for X number of seconds.
git-svn-id: svn://192.168.202.10@2999 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -325,6 +325,10 @@ OTHER CHANGES:
|
||||
88. Added Manual Dial Routing Initiated Recording, must enable setting at the
|
||||
campaign level and have a 0 recording delay.
|
||||
|
||||
89. Added campaign features for Dead Call Trigger. Allowing an audio alert to be
|
||||
sent to an agent and/or a back-end URL to be submitted when an agent has
|
||||
been in a dead call for X number of seconds.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1002,7 +1002,12 @@ inbound_no_agents_no_dial_container VARCHAR(40) default '---DISABLED---',
|
||||
inbound_no_agents_no_dial_threshold SMALLINT(5) default '0',
|
||||
cid_group_id VARCHAR(20) default '---DISABLED---',
|
||||
pause_max_dispo VARCHAR(6) default 'PAUSMX',
|
||||
script_top_dispo ENUM('Y', 'N') default 'N'
|
||||
script_top_dispo ENUM('Y', 'N') default 'N',
|
||||
dead_trigger_seconds SMALLINT(5) default '0',
|
||||
dead_trigger_action ENUM('DISABLED','AUDIO','URL','AUDIO_AND_URL') default 'DISABLED',
|
||||
dead_trigger_repeat ENUM('NO','REPEAT_ALL','REPEAT_AUDIO','REPEAT_URL') default 'NO',
|
||||
dead_trigger_filename TEXT,
|
||||
dead_trigger_url TEXT
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -3944,6 +3949,21 @@ help_title text COLLATE utf8_unicode_ci,
|
||||
help_text text COLLATE utf8_unicode_ci
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
CREATE TABLE vicidial_ccc_log (
|
||||
call_date DATETIME,
|
||||
remote_call_id VARCHAR(30) default '',
|
||||
local_call_id VARCHAR(30) default '',
|
||||
lead_id INT(9) UNSIGNED,
|
||||
uniqueid VARCHAR(20) default '',
|
||||
channel VARCHAR(100) default '',
|
||||
server_ip VARCHAR(60) NOT NULL,
|
||||
list_id BIGINT(14) UNSIGNED,
|
||||
container_id VARCHAR(40) default '',
|
||||
index (call_date),
|
||||
index (local_call_id),
|
||||
index (lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -4231,4 +4251,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='1548',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1549',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -655,3 +655,26 @@ UPDATE system_settings SET db_schema_version='1547',db_schema_update_date=NOW()
|
||||
ALTER TABLE vicidial_inbound_groups ADD enter_ingroup_url TEXT;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1548',db_schema_update_date=NOW() where db_schema_version < 1548;
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD dead_trigger_seconds SMALLINT(5) default '0';
|
||||
ALTER TABLE vicidial_campaigns ADD dead_trigger_action ENUM('DISABLED','AUDIO','URL','AUDIO_AND_URL') default 'DISABLED';
|
||||
ALTER TABLE vicidial_campaigns ADD dead_trigger_repeat ENUM('NO','REPEAT_ALL','REPEAT_AUDIO','REPEAT_URL') default 'NO';
|
||||
ALTER TABLE vicidial_campaigns ADD dead_trigger_filename TEXT;
|
||||
ALTER TABLE vicidial_campaigns ADD dead_trigger_url TEXT;
|
||||
|
||||
CREATE TABLE vicidial_ccc_log (
|
||||
call_date DATETIME,
|
||||
remote_call_id VARCHAR(30) default '',
|
||||
local_call_id VARCHAR(30) default '',
|
||||
lead_id INT(9) UNSIGNED,
|
||||
uniqueid VARCHAR(20) default '',
|
||||
channel VARCHAR(100) default '',
|
||||
server_ip VARCHAR(60) NOT NULL,
|
||||
list_id BIGINT(14) UNSIGNED,
|
||||
container_id VARCHAR(40) default '',
|
||||
index (call_date),
|
||||
index (local_call_id),
|
||||
index (lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1549',db_schema_update_date=NOW() where db_schema_version < 1549;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# dispo_send_email.php
|
||||
#
|
||||
# Copyright (C) 2017 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2018 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. It will send out an email to a fixed email address as defined
|
||||
@@ -13,6 +13,10 @@
|
||||
# Examples of what to put in the Dispo URL field:
|
||||
# VARhttp://192.168.1.1/agc/dispo_send_email.php?container_id=TEST_CONTAINER&lead_id=--A--lead_id--B--&call_id=--A--call_id--B--&dispo=--A--dispo--B--&user=--A--user--B--&pass=--A--pass--B--&sale_status=SALE---SSALE---XSALE&log_to_file=1
|
||||
# VARhttp://192.168.1.1/agc/dispo_send_email.php?container_id=TEST_CONTAINER&lead_id=--A--lead_id--B--&call_id=--A--call_id--B--&dispo=--A--dispo--B--&user=--A--user--B--&pass=--A--pass--B--&sale_status=ALL-STATUSES&called_count=--A--called_count--B--&called_count_trigger=40&log_to_file=1
|
||||
#
|
||||
#
|
||||
# Example of what to put in Dead Trigger URL campaign setting field:
|
||||
# VARhttp://192.168.1.1/agc/dispo_send_email.php?container_id=TEST_CONTAINER&lead_id=--A--lead_id--B--&call_id=--A--call_id--B--&dispo=DEAD&user=NOAGENTURL--A--user--B--&pass=--A--call_id--B--&sale_status=ALL-STATUSES&called_count=--A--called_count--B--&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
|
||||
@@ -30,6 +34,7 @@
|
||||
# 171120-0910 - Added ALL-STATUSES option and called_count_trigger option
|
||||
# 171120-1535 - Added additional_notes option and email attachments options(1-5)
|
||||
# 171207-0659 - Added option of up to 20 attachments
|
||||
# 180611-1703 - Added instructions for Dead Trigger URL
|
||||
#
|
||||
|
||||
$api_script = 'send_email';
|
||||
@@ -219,6 +224,7 @@ if ($match_found > 0)
|
||||
|
||||
if (preg_match("/NOAGENTURL/",$user))
|
||||
{
|
||||
if (strlen($user) > 11) {$user = preg_replace("/NOAGENTURL/",'',$user);}
|
||||
$PADlead_id = sprintf("%010s", $lead_id);
|
||||
if ( (strlen($pass) > 15) and (preg_match("/$PADlead_id$/",$pass)) )
|
||||
{
|
||||
|
||||
+467
-5
@@ -457,13 +457,14 @@
|
||||
# 180512-2227 - Added support for users-max_hopper_calls features
|
||||
# 180520-1031 - Added use of screen labels in search results, Issue #1104
|
||||
# 180522-1920 - Added Routing Initiated Recording ability for manual dial calls
|
||||
# 180610-2308 - Added code for Dead Call Trigger features
|
||||
#
|
||||
|
||||
$version = '2.14-351';
|
||||
$build = '180522-1920';
|
||||
$version = '2.14-352';
|
||||
$build = '180610-2308';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=742;
|
||||
$mysql_log_count=756;
|
||||
$one_mysql_log=0;
|
||||
$DB=0;
|
||||
$VD_login=0;
|
||||
@@ -751,7 +752,8 @@ if (isset($_GET["MgrApr_pass"])) {$MgrApr_pass=$_GET["MgrApr_pass"];}
|
||||
elseif (isset($_POST["MgrApr_pass"])) {$MgrApr_pass=$_POST["MgrApr_pass"];}
|
||||
if (isset($_GET["routing_initiated_recording"])) {$routing_initiated_recording=$_GET["routing_initiated_recording"];}
|
||||
elseif (isset($_POST["routing_initiated_recording"])) {$routing_initiated_recording=$_POST["routing_initiated_recording"];}
|
||||
|
||||
if (isset($_GET["dead_time"])) {$dead_time=$_GET["dead_time"];}
|
||||
elseif (isset($_POST["dead_time"])) {$dead_time=$_POST["dead_time"];}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||
@@ -1080,7 +1082,7 @@ $wrapup = preg_replace("/\'|\"|\\\\|;/","",$wrapup);
|
||||
$url_link = preg_replace("/\'|\"|\\\\|;/","",$url_link);
|
||||
$user_group = preg_replace('/[^-_0-9a-zA-Z]/','',$user_group);
|
||||
$routing_initiated_recording = preg_replace('/[^-_0-9a-zA-Z]/','',$routing_initiated_recording);
|
||||
|
||||
$dead_time = preg_replace('/[^0-9]/','',$dead_time);
|
||||
|
||||
# default optional vars if not set
|
||||
if (!isset($format)) {$format="text";}
|
||||
@@ -13561,6 +13563,466 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
### DEADtriggerURL - Send a URL request based upon a deac call trigger from the
|
||||
### agent screen
|
||||
################################################################################
|
||||
if ($ACTION == 'DEADtriggerURL')
|
||||
{
|
||||
$stmt = "SELECT dead_trigger_url,vc.campaign_id,agent_log_id from vicidial_campaigns vc,vicidial_live_agents vla where vla.campaign_id=vc.campaign_id and vla.user='$user';";
|
||||
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00743',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VC_dcu_ct = mysqli_num_rows($rslt);
|
||||
if ($VC_dcu_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$dead_trigger_url = $row[0];
|
||||
$DUcampaign_id = $row[1];
|
||||
$DUentry_type = 'campaign';
|
||||
$CALL_agent_log_id = $row[2];
|
||||
}
|
||||
|
||||
$user_group='';
|
||||
$stmt = "SELECT user_group FROM vicidial_users where user='$user';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00744',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VUinfo_ct = mysqli_num_rows($rslt);
|
||||
if ($VUinfo_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_group = "$row[0]";
|
||||
}
|
||||
|
||||
$talk_time=0;
|
||||
$talk_time_ms=0;
|
||||
$talk_time_min=0;
|
||||
if (strlen($dead_time) < 1) {$dead_time=0;}
|
||||
if ( (preg_match('/--A--user_custom_/i',$dead_trigger_url)) or (preg_match('/--A--fullname/i',$dead_trigger_url)) or (preg_match('/--A--user_group/i',$dead_trigger_url)) )
|
||||
{
|
||||
$stmt = "SELECT custom_one,custom_two,custom_three,custom_four,custom_five,full_name,user_group from vicidial_users where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00745',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VUC_ct = mysqli_num_rows($rslt);
|
||||
if ($VUC_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_custom_one = urlencode(trim($row[0]));
|
||||
$user_custom_two = urlencode(trim($row[1]));
|
||||
$user_custom_three = urlencode(trim($row[2]));
|
||||
$user_custom_four = urlencode(trim($row[3]));
|
||||
$user_custom_five = urlencode(trim($row[4]));
|
||||
$fullname = urlencode(trim($row[5]));
|
||||
$user_group = urlencode(trim($row[6]));
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/--A--talk_time/i',$dead_trigger_url))
|
||||
{
|
||||
$stmt = "SELECT talk_sec from vicidial_agent_log where lead_id='$lead_id' and agent_log_id='$CALL_agent_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00746',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VAL_talk_ct = mysqli_num_rows($rslt);
|
||||
if ($VAL_talk_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$talk_sec = $row[0];
|
||||
$talk_time = ($talk_sec - $dead_sec);
|
||||
if ($talk_time < 1)
|
||||
{
|
||||
$talk_time = 0;
|
||||
$talk_time_ms = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$talk_time_ms = ($talk_time * 1000);
|
||||
$talk_time_min = ceil($talk_time / 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/--A--dialed_/i',$dead_trigger_url))
|
||||
{
|
||||
$dialed_number = $phone_number;
|
||||
$dialed_label = 'NONE';
|
||||
|
||||
if ($call_type=='OUT')
|
||||
{
|
||||
### find the dialed number and label for this call
|
||||
$stmt = "SELECT phone_number,alt_dial from vicidial_log where uniqueid='$uniqueid';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00747',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$vl_dialed_ct = mysqli_num_rows($rslt);
|
||||
if ($vl_dialed_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$dialed_number = $row[0];
|
||||
$dialed_label = $row[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (preg_match('/--A--did_/i',$dead_trigger_url))
|
||||
{
|
||||
$DID_id='';
|
||||
$DID_extension='';
|
||||
$DID_pattern='';
|
||||
$DID_description='';
|
||||
|
||||
$stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' and caller_id_number='$phone_number' order by call_date desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00748',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIDL_ct = mysqli_num_rows($rslt);
|
||||
if ($VDIDL_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$DID_id = $row[0];
|
||||
$DID_extension = $row[1];
|
||||
|
||||
$stmt = "SELECT did_pattern,did_description,custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_inbound_dids where did_id='$DID_id' limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00749',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDIDL_ct = mysqli_num_rows($rslt);
|
||||
if ($VDIDL_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$DID_pattern = urlencode(trim($row[0]));
|
||||
$DID_description = urlencode(trim($row[1]));
|
||||
$DID_custom_one = urlencode(trim($row[2]));
|
||||
$DID_custom_two= urlencode(trim($row[3]));
|
||||
$DID_custom_three= urlencode(trim($row[4]));
|
||||
$DID_custom_four= urlencode(trim($row[5]));
|
||||
$DID_custom_five= urlencode(trim($row[6]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((preg_match('/callid--B--/i',$dead_trigger_url)) or (preg_match('/group--B--/i',$dead_trigger_url)))
|
||||
{
|
||||
$INclosecallid='';
|
||||
$INxfercallid='';
|
||||
$VDADchannel_group=$campaign;
|
||||
$stmt = "SELECT campaign_id,closecallid,xfercallid from vicidial_closer_log where uniqueid='$uniqueid' and user='$user' order by closecallid desc limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00750',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VDCL_mvac_ct = mysqli_num_rows($rslt);
|
||||
if ($VDCL_mvac_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VDADchannel_group = $row[0];
|
||||
$INclosecallid = $row[1];
|
||||
$INxfercallid = $row[2];
|
||||
}
|
||||
}
|
||||
|
||||
##### grab the data from vicidial_list for the lead_id
|
||||
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00751',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysqli_num_rows($rslt);
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$entry_date = urlencode(trim($row[1]));
|
||||
$dispo = urlencode(trim($row[3]));
|
||||
$tsr = urlencode(trim($row[4]));
|
||||
$vendor_id = urlencode(trim($row[5]));
|
||||
$vendor_lead_code = urlencode(trim($row[5]));
|
||||
$source_id = urlencode(trim($row[6]));
|
||||
$list_id = urlencode(trim($row[7]));
|
||||
$gmt_offset_now = urlencode(trim($row[8]));
|
||||
$phone_code = urlencode(trim($row[10]));
|
||||
$phone_number = urlencode(trim($row[11]));
|
||||
$title = urlencode(trim($row[12]));
|
||||
$first_name = urlencode(trim($row[13]));
|
||||
$middle_initial = urlencode(trim($row[14]));
|
||||
$last_name = urlencode(trim($row[15]));
|
||||
$address1 = urlencode(trim($row[16]));
|
||||
$address2 = urlencode(trim($row[17]));
|
||||
$address3 = urlencode(trim($row[18]));
|
||||
$city = urlencode(trim($row[19]));
|
||||
$state = urlencode(trim($row[20]));
|
||||
$province = urlencode(trim($row[21]));
|
||||
$postal_code = urlencode(trim($row[22]));
|
||||
$country_code = urlencode(trim($row[23]));
|
||||
$gender = urlencode(trim($row[24]));
|
||||
$date_of_birth = urlencode(trim($row[25]));
|
||||
$alt_phone = urlencode(trim($row[26]));
|
||||
$email = urlencode(trim($row[27]));
|
||||
$security_phrase = urlencode(trim($row[28]));
|
||||
$comments = urlencode(trim($row[29]));
|
||||
$called_count = urlencode(trim($row[30]));
|
||||
$call_date = urlencode(trim($row[31]));
|
||||
$rank = urlencode(trim($row[32]));
|
||||
$owner = urlencode(trim($row[33]));
|
||||
$entry_list_id = urlencode(trim($row[34]));
|
||||
}
|
||||
|
||||
if (preg_match('/list_name--B--|list_description--B--/i',$dead_trigger_url))
|
||||
{
|
||||
$stmt = "SELECT list_name,list_description from vicidial_lists where list_id='$list_id' limit 1;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00752',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$VL_ln_ct = mysqli_num_rows($rslt);
|
||||
if ($VL_ln_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$list_name = urlencode(trim($row[0]));
|
||||
$list_description = urlencode(trim($row[1]));
|
||||
}
|
||||
}
|
||||
|
||||
$dead_trigger_url = preg_replace('/^VAR/','',$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--lead_id--B--/i',"$lead_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--vendor_id--B--/i',"$vendor_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--vendor_lead_code--B--/i',"$vendor_lead_code",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--list_id--B--/i',"$list_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--list_name--B--/i',"$list_name",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--list_description--B--/i',"$list_description",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--gmt_offset_now--B--/i',"$gmt_offset_now",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--phone_code--B--/i',"$phone_code",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--phone_number--B--/i',"$phone_number",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--title--B--/i',"$title",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--first_name--B--/i',"$first_name",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--middle_initial--B--/i',"$middle_initial",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--last_name--B--/i',"$last_name",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--address1--B--/i',"$address1",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--address2--B--/i',"$address2",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--address3--B--/i',"$address3",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--city--B--/i',"$city",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--state--B--/i',"$state",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--province--B--/i',"$province",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--postal_code--B--/i',"$postal_code",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--country_code--B--/i',"$country_code",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--gender--B--/i',"$gender",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--date_of_birth--B--/i',"$date_of_birth",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--alt_phone--B--/i',"$alt_phone",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--email--B--/i',"$email",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--security_phrase--B--/i',"$security_phrase",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--comments--B--/i',"$comments",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user--B--/i',"$user",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--pass--B--/i',"$orig_pass",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--campaign--B--/i',"$campaign",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--phone_login--B--/i',"$phone_login",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--original_phone_login--B--/i',"$original_phone_login",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--phone_pass--B--/i',"$phone_pass",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--fronter--B--/i',"$fronter",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--closer--B--/i',"$user",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--group--B--/i',"$VDADchannel_group",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--channel_group--B--/i',"$VDADchannel_group",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--SQLdate--B--/i',urlencode(trim($SQLdate)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--epoch--B--/i',"$epoch",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--uniqueid--B--/i',"$uniqueid",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--customer_zap_channel--B--/i',urlencode(trim($customer_zap_channel)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--customer_server_ip--B--/i',"$customer_server_ip",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--server_ip--B--/i',"$server_ip",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--SIPexten--B--/i',urlencode(trim($exten)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--session_id--B--/i',"$conf_exten",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--phone--B--/i',"$phone_number",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--parked_by--B--/i',"$parked_by",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--dispo--B--/i',"$dispo",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--dispo_name--B--/i',"$dispo_name",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--dialed_number--B--/i',"$dialed_number",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--dialed_label--B--/i',"$dialed_label",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--source_id--B--/i',"$source_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--rank--B--/i',"$rank",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--owner--B--/i',"$owner",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--camp_script--B--/i',"$camp_script",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--in_script--B--/i',"$in_script",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--fullname--B--/i',"$fullname",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user_custom_one--B--/i',"$user_custom_one",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user_custom_two--B--/i',"$user_custom_two",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user_custom_three--B--/i',"$user_custom_three",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user_custom_four--B--/i',"$user_custom_four",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user_custom_five--B--/i',"$user_custom_five",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--dead_time--B--/i',"$dead_time",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--talk_time--B--/i',"$talk_time",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--talk_time_ms--B--/i',"$talk_time_ms",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--talk_time_min--B--/i',"$talk_time_min",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--agent_log_id--B--/i',"$CALL_agent_log_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--entry_list_id--B--/i',"$entry_list_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_id--B--/i',urlencode(trim($DID_id)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_extension--B--/i',urlencode(trim($DID_extension)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_pattern--B--/i',urlencode(trim($DID_pattern)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_description--B--/i',urlencode(trim($DID_description)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--closecallid--B--/i',urlencode(trim($INclosecallid)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--xfercallid--B--/i',urlencode(trim($INxfercallid)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--call_id--B--/i',urlencode(trim($MDnextCID)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--user_group--B--/i',urlencode(trim($user_group)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--call_notes--B--/i',"$url_call_notes",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--recording_id--B--/i',"$recording_id",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--recording_filename--B--/i',"$recording_filename",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--entry_date--B--/i',"$entry_date",$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_custom_one--B--/i',urlencode(trim($DID_custom_one)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_custom_two--B--/i',urlencode(trim($DID_custom_two)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_custom_three--B--/i',urlencode(trim($DID_custom_three)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_custom_four--B--/i',urlencode(trim($DID_custom_four)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--did_custom_five--B--/i',urlencode(trim($DID_custom_five)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--agent_email--B--/i',urlencode(trim($agent_email)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--callback_lead_status--B--/i',urlencode(trim($CallBackLeadStatus)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--callback_datetime--B--/i',urlencode(trim($CallBackDatETimE)),$dead_trigger_url);
|
||||
$dead_trigger_url = preg_replace('/--A--called_count--B--/i',"$called_count",$dead_trigger_url);
|
||||
|
||||
|
||||
if (strlen($FORMcustom_field_names)>2)
|
||||
{
|
||||
$custom_field_names = preg_replace("/^\||\|$/",'',$FORMcustom_field_names);
|
||||
$custom_field_names = preg_replace("/\|.*_DUPLICATE_.*\|/",'|',$custom_field_names);
|
||||
$custom_field_names = preg_replace("/\|/",",",$custom_field_names);
|
||||
$custom_field_names_ARY = explode(',',$custom_field_names);
|
||||
$custom_field_names_ct = count($custom_field_names_ARY);
|
||||
$custom_field_names_SQL = $custom_field_names;
|
||||
|
||||
if (preg_match("/cf_encrypt/",$active_modules))
|
||||
{
|
||||
$enc_fields=0;
|
||||
$stmt = "SELECT count(*) from vicidial_lists_fields where field_encrypt='Y' and list_id='$entry_list_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$enc_field_ct = mysqli_num_rows($rslt);
|
||||
if ($enc_field_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$enc_fields = $row[0];
|
||||
}
|
||||
if ($enc_fields > 0)
|
||||
{
|
||||
$stmt = "SELECT field_label from vicidial_lists_fields where field_encrypt='Y' and list_id='$entry_list_id';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$enc_field_ct = mysqli_num_rows($rslt);
|
||||
$r=0;
|
||||
while ($enc_field_ct > $r)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$encrypt_list .= "$row[0],";
|
||||
$r++;
|
||||
}
|
||||
$encrypt_list = ",$encrypt_list";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##### BEGIN grab the data from custom table for the lead_id
|
||||
if ($entry_list_id > 0)
|
||||
{
|
||||
$stmt="SELECT $custom_field_names_SQL FROM custom_$entry_list_id where lead_id='$lead_id' LIMIT 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00753',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$list_lead_ct = mysqli_num_rows($rslt);
|
||||
if ($list_lead_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$o=0;
|
||||
while ($custom_field_names_ct > $o)
|
||||
{
|
||||
$field_name_id = $custom_field_names_ARY[$o];
|
||||
$field_name_tag = "--A--" . $field_name_id . "--B--";
|
||||
if ($enc_fields > 0)
|
||||
{
|
||||
$field_enc=''; $field_enc_all='';
|
||||
if ($DB) {echo "|$column_list|$encrypt_list|\n";}
|
||||
if ( (preg_match("/,$field_name_id,/",$encrypt_list)) and (strlen($row[$o]) > 0) )
|
||||
{
|
||||
exec("../agc/aes.pl --decrypt --text=$row[$o]", $field_enc);
|
||||
$field_enc_ct = count($field_enc);
|
||||
$k=0;
|
||||
while ($field_enc_ct > $k)
|
||||
{
|
||||
$field_enc_all .= $field_enc[$k];
|
||||
$k++;
|
||||
}
|
||||
$field_enc_all = preg_replace("/CRYPT: |\n|\r|\t/",'',$field_enc_all);
|
||||
$row[$o] = base64_decode($field_enc_all);
|
||||
}
|
||||
}
|
||||
$form_field_value = urlencode(trim("$row[$o]"));
|
||||
|
||||
### Check for dispo filter, run if enabled and field matches
|
||||
if ( ($dispo_filter_enabled > 0) and (preg_match("/\|$field_name_id\|/",$df_fields)) )
|
||||
{
|
||||
$dct=0;
|
||||
while ($dispo_filters_ct > $dct)
|
||||
{
|
||||
$temp_df = explode(',',$dispo_filters[$dct]);
|
||||
$lm=0;
|
||||
|
||||
if ( (preg_match("/^$field_name_id$/i",$temp_df[0])) and ($form_field_value == $temp_df[1]) ) {$form_field_value = $temp_df[2]; $lm++;}
|
||||
|
||||
if ($DB) {echo "DF-Debug 3: $dct|$lm|$temp_df[0]($field_name_id)|$temp_df[1]($form_field_value)|$temp_df[2]|\n";}
|
||||
$dct++;
|
||||
}
|
||||
}
|
||||
$dead_trigger_url = preg_replace("/$field_name_tag/i","$form_field_value",$dead_trigger_url);
|
||||
$o++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$stmt="UPDATE vicidial_log_extended set dispo_url_processed='Y' where uniqueid='$uniqueid';";
|
||||
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);}
|
||||
$vle_update = mysqli_affected_rows($link);
|
||||
|
||||
### insert a new url log entry
|
||||
$stmt = "INSERT INTO vicidial_url_log SET uniqueid='$uniqueid',url_date=NOW(),url_type='dead',url='" . mysqli_real_escape_string($link, $dead_trigger_url) . "',url_response='';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00755',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
$url_id = mysqli_insert_id($link);
|
||||
|
||||
$URLstart_sec = date("U");
|
||||
|
||||
### send dispo_call_url ###
|
||||
if ($DB > 0) {echo "$dead_trigger_url<BR>\n";}
|
||||
|
||||
$SCUfile = file("$dead_trigger_url");
|
||||
if ( !($SCUfile) )
|
||||
{
|
||||
$error_array = error_get_last();
|
||||
$error_type = $error_array["type"];
|
||||
$error_message = $error_array["message"];
|
||||
$error_line = $error_array["line"];
|
||||
$error_file = $error_array["file"];
|
||||
}
|
||||
|
||||
if ($DB > 0) {echo "$SCUfile[0]<BR>\n";}
|
||||
|
||||
### update url log entry
|
||||
$URLend_sec = date("U");
|
||||
$URLdiff_sec = ($URLend_sec - $URLstart_sec);
|
||||
if ($SCUfile)
|
||||
{
|
||||
$SCUfile_contents = implode("", $SCUfile);
|
||||
$SCUfile_contents = preg_replace('/;/','',$SCUfile_contents);
|
||||
$SCUfile_contents = addslashes($SCUfile_contents);
|
||||
}
|
||||
else
|
||||
{
|
||||
$SCUfile_contents = "PHP ERROR: Type=$error_type - Message=$error_message - Line=$error_line - File=$error_file";
|
||||
}
|
||||
$stmt = "UPDATE vicidial_url_log SET response_sec='$URLdiff_sec',url_response='$SCUfile_contents' where url_log_id='$url_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00756',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
### RUNurls - update the vicidial_list table to reflect the values that are
|
||||
### in the agents screen at time of call hangup
|
||||
|
||||
+96
-4
@@ -597,10 +597,11 @@
|
||||
# 180512-2226 - Added support for users-max_hopper_calls feature
|
||||
# 180522-1921 - Added Routing Initiated Recording ability for manual dial calls
|
||||
# 180606-0024 - Fixed email transfers bugs, modified transfer-conf panel for same
|
||||
# 180610-2305 - Added dead_trigger_ features
|
||||
#
|
||||
|
||||
$version = '2.14-566c';
|
||||
$build = '180522-1921';
|
||||
$version = '2.14-567c';
|
||||
$build = '180610-2305';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=87;
|
||||
$one_mysql_log=0;
|
||||
@@ -1876,7 +1877,7 @@ else
|
||||
$HKstatusnames = substr("$HKstatusnames", 0, -1);
|
||||
|
||||
##### grab the campaign settings
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,manual_preview_dial,api_manual_dial,manual_dial_call_time_check,my_callback_option,per_call_notes,agent_lead_search,agent_lead_search_method,queuemetrics_phone_environment,auto_pause_precall,auto_pause_precall_code,auto_resume_precall,manual_dial_cid,custom_3way_button_transfer,callback_days_limit,disable_dispo_screen,disable_dispo_status,screen_labels,status_display_fields,pllb_grouping,pllb_grouping_limit,in_group_dial,in_group_dial_select,pause_after_next_call,owner_populate,manual_dial_lead_id,dead_max,dispo_max,pause_max,dead_max_dispo,dispo_max_dispo,max_inbound_calls,manual_dial_search_checkbox,hide_call_log_info,timer_alt_seconds,wrapup_bypass,wrapup_after_hotkey,callback_active_limit,callback_active_limit_override,comments_all_tabs,comments_dispo_screen,comments_callback_screen,qc_comment_history,show_previous_callback,clear_script,manual_dial_search_filter,web_form_address_three,manual_dial_override_field,status_display_ingroup,customer_gone_seconds,agent_display_fields,manual_dial_timeout,manual_auto_next,manual_auto_show,allow_required_fields,dead_to_dispo,agent_xfer_validation,ready_max_logout,callback_display_days,three_way_record_stop,hangup_xfer_record_start,max_inbound_calls_outcome,manual_auto_next_options,agent_screen_time_display,pause_max_dispo,script_top_dispo,routing_initiated_recordings,dead_trigger_seconds,dead_trigger_action,dead_trigger_repeat,dead_trigger_filename FROM vicidial_campaigns where campaign_id = '$VD_campaign';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -2028,6 +2029,10 @@ else
|
||||
$pause_max_dispo = $row[144];
|
||||
$script_top_dispo = $row[145];
|
||||
$routing_initiated_recording=$row[146];
|
||||
$dead_trigger_seconds = $row[147];
|
||||
$dead_trigger_action = $row[148];
|
||||
$dead_trigger_repeat = $row[149];
|
||||
$dead_trigger_filename = $row[150];
|
||||
|
||||
$MI_PAUSE = 0;
|
||||
if (preg_match("/MI_PAUSE/",$max_inbound_calls_outcome))
|
||||
@@ -4719,6 +4724,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
var LOGINvarFIVE='<?php echo $LOGINvarFIVE ?>';
|
||||
var MD_dial_timed_out=0;
|
||||
var routing_initiated_recording='<?php echo $routing_initiated_recording ?>';
|
||||
var dead_trigger_count=0;
|
||||
var dead_trigger_first_ran=0;
|
||||
var dead_trigger_seconds='<?php echo $dead_trigger_seconds ?>';
|
||||
var dead_trigger_action='<?php echo $dead_trigger_action ?>';
|
||||
var dead_trigger_repeat='<?php echo $dead_trigger_repeat ?>';
|
||||
var dead_trigger_filename='<?php echo $dead_trigger_filename ?>';
|
||||
var DiaLControl_auto_HTML = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_paused.gif") ?>\" border=\"0\" alt=\"You are paused\" /></a>";
|
||||
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause','','','','','','','YES');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_active.gif") ?>\" border=\"0\" alt=\"You are active\" /></a>";
|
||||
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_blank_OFF.gif") ?>\" border=\"0\" alt=\"pause button disabled\" />";
|
||||
@@ -9858,6 +9869,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
last_call_date='';
|
||||
inbound_post_call_survey='';
|
||||
inbound_survey_participate='';
|
||||
dead_trigger_first_ran=0;
|
||||
if (manual_dial_preview < 1)
|
||||
{
|
||||
document.vicidial_form.LeadPreview.checked=false;
|
||||
@@ -13387,6 +13399,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
blind_transfer=0;
|
||||
CheckDEADcallON=0;
|
||||
CheckDEADcallCOUNT=0;
|
||||
dead_trigger_count=0;
|
||||
customer_sec=0;
|
||||
currently_in_email_or_chat=0;
|
||||
customer_3way_hangup_counter=0;
|
||||
@@ -13676,6 +13689,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
last_call_date='';
|
||||
inbound_post_call_survey='';
|
||||
inbound_survey_participate='';
|
||||
dead_trigger_first_ran=0;
|
||||
if (manual_auto_next > 0)
|
||||
{manual_auto_next_trigger=1; manual_auto_next_count=manual_auto_next;}
|
||||
if (agent_display_fields.match(adfREGentry_date))
|
||||
@@ -13827,6 +13841,56 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Send AJAX request to trigger the Dead Trigger URL
|
||||
function dead_trigger_url_send()
|
||||
{
|
||||
var VDDCU_recording_id=document.getElementById("RecorDID").innerHTML;
|
||||
var VDDCU_recording_filename=last_recording_filename;
|
||||
var xmlhttp=false;
|
||||
/*@cc_on @*/
|
||||
/*@if (@_jscript_version >= 5)
|
||||
// JScript gives us Conditional compilation, we can cope with old IE versions.
|
||||
// and security blocked creation of the objects.
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
||||
} catch (e) {
|
||||
try {
|
||||
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
} catch (E) {
|
||||
xmlhttp = false;
|
||||
}
|
||||
}
|
||||
@end @*/
|
||||
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
||||
{
|
||||
xmlhttp = new XMLHttpRequest();
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=DEADtriggerURL&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&list_id=" + document.vicidial_form.list_id.value + "&MDnextCID=" + LasTCID + "&stage=" + group + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&dial_method=" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&custom_field_names=" + custom_field_names + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value + "&dead_time=" + CheckDEADcallCOUNT + "&phone_login=" + phone_login + "&agent_email=" + LOGemail + "&conf_exten=" + session_id + "&camp_script=" + campaign_script + '' + "&in_script=" + CalL_ScripT_id + "&customer_server_ip=" + lastcustserverip + "&exten=" + extension + "&original_phone_login=" + original_phone_login + "&phone_pass=" + phone_pass;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(DSupdate_query);
|
||||
xmlhttp.onreadystatechange = function()
|
||||
{
|
||||
// alert(DSupdate_query + "\n" +xmlhttp.responseText);
|
||||
|
||||
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
||||
{
|
||||
// alert(xmlhttp.responseText);
|
||||
var check_dead_trigger = null;
|
||||
check_dead_trigger = xmlhttp.responseText;
|
||||
var check_DT_array=check_dead_trigger.split("\n");
|
||||
|
||||
agent_events('dead_trigger_url_sent', LasTCID, aec); aec++;
|
||||
}
|
||||
}
|
||||
delete xmlhttp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ################################################################################
|
||||
// Submit the URLs
|
||||
function SendURLs(newurlids,newurltype)
|
||||
@@ -17768,7 +17832,35 @@ function phone_number_format(formatphone) {
|
||||
if (CheckDEADcallON > 0 && currently_in_email_or_chat < 1)
|
||||
{
|
||||
CheckDEADcallCOUNT++;
|
||||
// document.getElementById("debugbottomspan").innerHTML = "DEAD CALL SECONDS " + CheckDEADcallCOUNT;
|
||||
dead_trigger_count++;
|
||||
// document.getElementById("debugbottomspan").innerHTML = "DEAD CALL SECONDS " + CheckDEADcallCOUNT + " " + dead_trigger_count;
|
||||
|
||||
if ( (dead_trigger_seconds > 0) && (dead_trigger_count >= dead_trigger_seconds) && (dead_trigger_action != 'DISABLED') )
|
||||
{
|
||||
dead_trigger_first_ran++;
|
||||
|
||||
if ( (dead_trigger_filename.length > 0) && ( (dead_trigger_action == 'AUDIO') || (dead_trigger_action == 'AUDIO_AND_URL') ) )
|
||||
{
|
||||
if ( (dead_trigger_first_ran < 2) || ( (dead_trigger_first_ran > 1) && ( (dead_trigger_repeat=='REPEAT_ALL') || (dead_trigger_repeat=='REPEAT_AUDIO') ) ) )
|
||||
{
|
||||
basic_originate_call(dead_trigger_filename,'NO','YES',session_id,'YES','','1','0','1');
|
||||
agent_events('dead_trigger_audio', CheckDEADcallCOUNT, aec); aec++;
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----DeadTriggerAudio---" + dead_trigger_action + " " + dead_trigger_count + " " + dead_trigger_first_ran + " " + CheckDEADcallCOUNT + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if ( (dead_trigger_action == 'URL') || (dead_trigger_action == 'AUDIO_AND_URL') )
|
||||
{
|
||||
if ( (dead_trigger_first_ran < 2) || ( (dead_trigger_first_ran > 1) && ( (dead_trigger_repeat=='REPEAT_ALL') || (dead_trigger_repeat=='REPEAT_URL') ) ) )
|
||||
{
|
||||
dead_trigger_url_send();
|
||||
|
||||
agent_events('dead_trigger_url', CheckDEADcallCOUNT, aec); aec++;
|
||||
button_click_log = button_click_log + "" + SQLdate + "-----DeadTriggerURL---" + dead_trigger_action + " " + dead_trigger_count + " " + dead_trigger_first_ran + " " + CheckDEADcallCOUNT + "|";
|
||||
}
|
||||
}
|
||||
dead_trigger_count=0;
|
||||
}
|
||||
|
||||
if ( (dead_max > 0) && (CheckDEADcallCOUNT > dead_max) )
|
||||
{
|
||||
|
||||
+40
-9
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
# version: 201805240701
|
||||
# version: 201806102040
|
||||
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. 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. Default is N.</QXZ>
|
||||
@@ -265,6 +265,11 @@ campaigns-wrapup_bypass Wrap Up Bypass <QXZ>If set to ENABLED then the agent wil
|
||||
campaigns-wrapup_after_hotkey Wrap Up After Hotkey <QXZ>If set to ENABLED and the campaign has hotkeys configured and the agent terminates a call with a hotkey, then the wrap up settings will be used after that call. Default is DISABLED.</QXZ>
|
||||
campaigns-disable_dispo_screen Disable Dispo Screen <QXZ>This option allows you to disable the disposition screen in the agent interface. The Disable Dispo Status field below must be filled in for this option to work. Default is DISPO_ENABLED. The DISPO_SELECT_DISABLED option will not disable the dispo screen completely, but will display the dispo screen without any dispositions, this option should only be used if you want to force your agents to use your CRM software which will send the status to the system through the API.</QXZ>
|
||||
campaigns-disable_dispo_status Disable Dispo Status <QXZ>If the Disable Dispo Screen option is set to DISPO_DISABLED, then this field must be filled in. You can use any disposition you want for this field as long as it is 1 to 6 characters in length with only letters and numbers.</QXZ>
|
||||
campaigns-dead_trigger_action Dead Call Trigger Action <QXZ>If you want to trigger an audio message to an agent or send a back-end URL request when an agent has been in a dead call for a set number of seconds, you can enable that here. Default is DISABLED.</QXZ>
|
||||
campaigns-dead_trigger_seconds Dead Call Trigger Seconds <QXZ>If this is set to a number greater than 0, and the Dead Call Trigger Action is not DISABLED, this is the number of seconds an agent is in a dead call that will trigger the Action selected above. Default is 0.</QXZ>
|
||||
campaigns-dead_trigger_repeat Dead Call Trigger Repeat <QXZ>If you want the Dead Call Trigger Action to repeat after the set number of seconds, you can enable that in this setting. Default is NO.</QXZ>
|
||||
campaigns-dead_trigger_filename Dead Call Trigger Audio <QXZ>If the Dead Call Trigger Action is set to use AUDIO, this is where you specify the audio file to be played to the agent when the dead call seconds trigger time has been reached.</QXZ>
|
||||
campaigns-dead_trigger_url Dead Call Trigger URL <QXZ>If the Dead Call Trigger Action is set to use URL, this is where you specify the URL to be requested on the back-end when the dead call seconds trigger time has been reached.</QXZ>
|
||||
campaigns-dead_max Dead Call Max Seconds <QXZ>If this is set to greater than 0, after a customer hangs up and the agent has not clicked on the Hangup Customer button in this number of seconds, the call will automatically be hung up, the status below will be set and the agent will be paused. Default is 0 for disabled.</QXZ>
|
||||
campaigns-dead_max_dispo Dead Call Max Status <QXZ>If Dead Call Max Seconds is enabled, this is the status set for the call when the agent dead call is not hung up past the number of seconds set above. Default is DCMX.</QXZ>
|
||||
campaigns-dead_to_dispo Dead Call to Dispo Only <QXZ>If Dead Call Max Seconds is set greater than 0, this option can be enabled if you want to send the agent to the dispo screen after a dead call without automatically dispositioning it. Default is DISABLED.</QXZ>
|
||||
|
||||
Reference in New Issue
Block a user