diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php index 56786433..2ba23dec 100644 --- a/www/agc/manager_send.php +++ b/www/agc/manager_send.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2017 Matt Florell LICENSE: AGPLv2 # # This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server # This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table @@ -134,10 +134,11 @@ # 161102-1043 - Fixed QM partition problem # 161117-0622 - Fixes for recording_log issue where filename is non-unique # 161217-0823 - Added parked_calls_recent table entries for better handling of parked calls +# 170317-2214 - Added more debugging output # -$version = '2.14-81'; -$build = '161217-0823'; +$version = '2.14-82'; +$build = '170317-2214'; $php_script = 'manager_send.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=142; @@ -997,6 +998,7 @@ if ($ACTION=="RedirectToPark") echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n"; echo _QXZ("parkedby %1s must be set",0,'',$parkedby)."\n\n"; echo _QXZ("RedirectToPark Action not sent")."\n"; + $stage .= " ERROR $channel $queryCID $exten $ext_context $extenName $ext_priority $parkedby"; } else { @@ -1102,6 +1104,7 @@ if ($ACTION=="RedirectFromPark") echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n"; echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n"; echo _QXZ("RedirectFromPark Action not sent")."\n"; + $stage .= " ERROR $channel $queryCID $exten $ext_context $ext_priority"; } else { @@ -1239,6 +1242,7 @@ if ($ACTION=="RedirectToParkIVR") echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n"; echo _QXZ("parkedby %1s must be set",0,'',$parkedby)."\n"; echo _QXZ("RedirectToPark Action not sent")."\n"; + $stage .= " ERROR $channel $queryCID $exten $ext_context $extenName $ext_priority $parkedby"; } else { @@ -1348,6 +1352,7 @@ if ($ACTION=="RedirectFromParkIVR") echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n"; echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n"; echo _QXZ("RedirectFromPark Action not sent")."\n"; + $stage .= " ERROR $channel $queryCID $exten $ext_context $ext_priority"; } else { @@ -1490,6 +1495,7 @@ if ($ACTION=="RedirectToParkXfer") echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n"; echo _QXZ("parkedby %1s must be set",0,'',$parkedby)."\n"; echo _QXZ("RedirectToParkXfer Action not sent")."\n"; + $stage .= " ERROR $channel $queryCID $exten $ext_context $extenName $ext_priority $parkedby"; } else { @@ -1521,6 +1527,7 @@ if ($ACTION=="RedirectFromParkXfer") echo _QXZ("ext_context %1s must be set",0,'',$ext_context)."\n"; echo _QXZ("ext_priority %1s must be set",0,'',$ext_priority)."\n\n"; echo _QXZ("RedirectFromParkXfer Action not sent")."\n"; + $stage .= " ERROR $channel $queryCID $exten $ext_context $ext_priority"; } else { diff --git a/www/agc/vdc_script_display.php b/www/agc/vdc_script_display.php index 4642d211..a7efaf2b 100644 --- a/www/agc/vdc_script_display.php +++ b/www/agc/vdc_script_display.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2017 Matt Florell LICENSE: AGPLv2 # # This script is designed display the contents of the SCRIPT tab in the agent interface # @@ -33,10 +33,11 @@ # 150725-1622 - Added entry_date variable # 150923-2028 - Added DID custom variables # 160818-1226 - Added MANUALDIALLINK option +# 170317-2315 - Fixed in-group list script override issue, added debug # -$version = '2.12-27'; -$build = '160818-1226'; +$version = '2.14-28'; +$build = '170317-2315'; require_once("dbconnect_mysqli.php"); require_once("functions.php"); @@ -232,6 +233,10 @@ if (isset($_GET["did_custom_four"])) {$did_custom_four=$_GET["did_custom_four" elseif (isset($_POST["did_custom_four"])) {$did_custom_four=$_POST["did_custom_four"];} if (isset($_GET["did_custom_five"])) {$did_custom_five=$_GET["did_custom_five"];} elseif (isset($_POST["did_custom_five"])) {$did_custom_five=$_POST["did_custom_five"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["inOUT"])) {$inOUT=$_GET["inOUT"];} + elseif (isset($_POST["inOUT"])) {$inOUT=$_POST["inOUT"];} header ("Content-type: text/html; charset=utf-8"); @@ -332,17 +337,20 @@ else {$call_script = $in_script;} $ignore_list_script_override='N'; -$stmt = "SELECT ignore_list_script_override FROM vicidial_inbound_groups where group_id='$group';"; -$rslt=mysql_to_mysqli($stmt, $link); -if ($DB) {echo "$stmt\n";} -$ilso_ct = mysqli_num_rows($rslt); -if ($ilso_ct > 0) +if ($inOUT == 'IN') { - $row=mysqli_fetch_row($rslt); - $ignore_list_script_override = $row[0]; + $stmt = "SELECT ignore_list_script_override FROM vicidial_inbound_groups where group_id='$group';"; + $rslt=mysql_to_mysqli($stmt, $link); + if ($DB) {echo "$stmt\n";} + $ilso_ct = mysqli_num_rows($rslt); + if ($ilso_ct > 0) + { + $row=mysqli_fetch_row($rslt); + $ignore_list_script_override = $row[0]; + } + if ($ignore_list_script_override=='Y') + {$ignore_list_script=1;} } -if ($ignore_list_script_override=='Y') - {$ignore_list_script=1;} if ($ignore_list_script < 1) { diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 6289905e..4f0da7ea 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -545,10 +545,11 @@ # 170303-1206 - Expanded required custom fields types # 170309-0705 - Small fix for INBOUND_MAN agent logging issue # 170309-1215 - Added agent_xfer_validation option +# 170317-2342 - Fix for script tab ignore list script override # -$version = '2.14-515c'; -$build = '170309-1215'; +$version = '2.14-516c'; +$build = '170317-2342'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=87; $one_mysql_log=0; @@ -7764,9 +7765,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) document.getElementById("XfeRGrouPLisT").innerHTML = ""; if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} if ( (dialed_label.length < 2) || (dialed_label=='NONE') ) {dialed_label='MAIN';} if (hide_gender < 1) @@ -9834,7 +9835,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (xmlhttp) { - NeWscript_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&called_count=" + document.vicidial_form.called_count.value + "&script_override=" + script_override + "&ScrollDIV=1&" + web_form_vars; + NeWscript_query = "server_ip=" + server_ip + "&inOUT=" + inOUT + "&camp_script=" + campaign_script + '' + "&in_script=" + CalL_ScripT_id + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&called_count=" + document.vicidial_form.called_count.value + "&script_override=" + script_override + "&ScrollDIV=1&" + web_form_vars; + // alert(NeWscript_query); xmlhttp.open('POST', 'vdc_script_display.php'); xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); xmlhttp.send(NeWscript_query); @@ -10488,9 +10490,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} if ( (dialed_label.length < 2) || (dialed_label=='NONE') ) {dialed_label='MAIN';} if (hide_gender < 1) @@ -11230,9 +11232,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} if ( (dialed_label.length < 2) || (dialed_label=='NONE') ) {dialed_label='MAIN';} if (hide_gender < 1) @@ -11414,9 +11416,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) var webvars_refresh=0; if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} if ( (dialed_label.length < 2) || (dialed_label=='NONE') ) {dialed_label='MAIN';} if (submittask != 'YES') @@ -11459,9 +11461,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) function WebFormTwoRefresH(taskrefresh,submittask) { if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} if ( (dialed_label.length < 2) || (dialed_label=='NONE') ) {dialed_label='MAIN';} if (submittask != 'YES') @@ -11504,9 +11506,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) function WebFormThreeRefresH(taskrefresh,submittask) { if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} if ( (dialed_label.length < 2) || (dialed_label=='NONE') ) {dialed_label='MAIN';} if (submittask != 'YES') @@ -11836,9 +11838,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else { if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} var form_cust_channel = document.getElementById("callchannel").innerHTML; var form_cust_serverip = document.vicidial_form.callserverip.value; var customer_channel = lastcustchannel; @@ -12781,9 +12783,9 @@ function set_length(SLnumber,SLlength_goal,SLdirection) if (DSPclick=='YES') {button_click_log = button_click_log + "" + SQLdate + "-----DispoSelect_submit---|";} if (VDCL_group_id.length > 1) - {var group = VDCL_group_id;} + {group = VDCL_group_id;} else - {var group = campaign;} + {group = campaign;} leaving_threeway=0; blind_transfer=0; CheckDEADcallON=0;