Added parked_hangup code for agent interface so calls that hang up while on hold have a proper term reason of CALLER. Issue #781

git-svn-id: svn://192.168.202.10@2206 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2014-11-25 06:38:10 +00:00
parent 3ca06bef17
commit 176c5f9457
2 changed files with 22 additions and 8 deletions
+12 -5
View File
@@ -365,10 +365,11 @@
# 141118-1231 - Formatting changes for QXZ output
# 141123-0933 - Added dispo_comments option input
# 141124-1136 - Added cbcomment_comments option input
# 141125-0059 - Added parked_hangup code
#
$version = '2.10-261';
$build = '141124-1136';
$version = '2.10-262';
$build = '141125-0059';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=597;
$one_mysql_log=0;
@@ -609,6 +610,8 @@ if (isset($_GET["dispo_comments"])) {$dispo_comments=$_GET["dispo_comments"];
elseif (isset($_POST["dispo_comments"])) {$dispo_comments=$_POST["dispo_comments"];}
if (isset($_GET["cbcomment_comments"])) {$cbcomment_comments=$_GET["cbcomment_comments"];}
elseif (isset($_POST["cbcomment_comments"])) {$cbcomment_comments=$_POST["cbcomment_comments"];}
if (isset($_GET["parked_hangup"])) {$parked_hangup=$_GET["parked_hangup"];}
elseif (isset($_POST["parked_hangup"])) {$parked_hangup=$_POST["parked_hangup"];}
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
@@ -8701,6 +8704,10 @@ if ($ACTION == 'updateDISPO')
$log_dispo_choice = $dispo_choice;
if (strlen($CallBackLeadStatus) > 0) {$log_dispo_choice = $CallBackLeadStatus;}
$term_reasonSQL = '';
if ($parked_hangup=='1')
{$term_reasonSQL = ",term_reason='CALLER'";}
$stmt = "SELECT count(*) from vicidial_inbound_groups where group_id='$stage';";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
@@ -8709,7 +8716,7 @@ if ($ACTION == 'updateDISPO')
if ($row[0] > 0)
{
$call_type='IN';
$stmt = "UPDATE vicidial_closer_log set status='$log_dispo_choice' where lead_id='$lead_id' and user='$user' order by closecallid desc limit 1;";
$stmt = "UPDATE vicidial_closer_log set status='$log_dispo_choice' $term_reasonSQL where lead_id='$lead_id' 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,'00144',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8745,7 +8752,7 @@ if ($ACTION == 'updateDISPO')
$row=mysqli_fetch_row($rslt);
if ($row[0] > 0)
{
$stmt="UPDATE vicidial_log set status='$log_dispo_choice',user='$user' where lead_id='$lead_id' and call_date > \"$four_hours_ago\" and called_count='$called_count' order by uniqueid desc limit 1;";
$stmt="UPDATE vicidial_log set status='$log_dispo_choice',user='$user' $term_reasonSQL where lead_id='$lead_id' and call_date > \"$four_hours_ago\" and called_count='$called_count' order by uniqueid desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
@@ -8863,7 +8870,7 @@ if ($ACTION == 'updateDISPO')
}
else
{
$stmt="UPDATE vicidial_log set status='$log_dispo_choice' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
$stmt="UPDATE vicidial_log set status='$log_dispo_choice' $term_reasonSQL where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
if ($format=='debug') {echo "\n<!-- $stmt -->";}
$rslt=mysql_to_mysqli($stmt, $link);
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
+10 -3
View File
@@ -454,10 +454,11 @@
# 141124-2146 - Added show_previous_callback campaign option
# 141124-2217 - Fix for issue #798
# 141124-2234 - Added clear_script campaign option
# 141125-0100 - Added parked_hangup code
#
$version = '2.10-425c';
$build = '141124-2234';
$version = '2.10-426c';
$build = '141125-0100';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=80;
$one_mysql_log=0;
@@ -3950,6 +3951,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var OtherTab='0';
var show_previous_callback='<?php echo $show_previous_callback ?>';
var clear_script='<?php echo $clear_script ?>';
var parked_hangup='0';
var DiaLControl_auto_HTML = "<img src=\"./images/<?php echo _QXZ("vdc_LB_pause_OFF.gif") ?>\" border=\"0\" alt=\" Pause \" /><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_resume.gif") ?>\" border=\"0\" alt=\"Resume\" /></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><img src=\"./images/<?php echo _QXZ("vdc_LB_pause.gif") ?>\" border=\"0\" alt=\" Pause \" /></a><img src=\"./images/<?php echo _QXZ("vdc_LB_resume_OFF.gif") ?>\" border=\"0\" alt=\"Resume\" />";
var DiaLControl_auto_HTML_OFF = "<img src=\"./images/<?php echo _QXZ("vdc_LB_pause_OFF.gif") ?>\" border=\"0\" alt=\" Pause \" /><img src=\"./images/<?php echo _QXZ("vdc_LB_resume_OFF.gif") ?>\" border=\"0\" alt=\"Resume\" />";
@@ -5123,6 +5125,10 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
customer_3way_hangup_counter_trigger=1;
customer_3way_hangup_counter=1;
}
if (customerparked==1)
{
parked_hangup='1';
}
}
}
if (InGroupChange > 0)
@@ -10840,7 +10846,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
if (xmlhttp)
{
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&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 + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&dispo_comments=" + encodeURIComponent(document.vicidial_form.dispo_comments.value) + "&cbcomment_comments=" + encodeURIComponent(document.vicidial_form.cbcomment_comments.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value;
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&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 + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&dispo_comments=" + encodeURIComponent(document.vicidial_form.dispo_comments.value) + "&cbcomment_comments=" + encodeURIComponent(document.vicidial_form.cbcomment_comments.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename + "&called_count=" + document.vicidial_form.called_count.value + "&parked_hangup=" + parked_hangup;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(DSupdate_query);
@@ -11038,6 +11044,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
ViewComments('OFF','OFF');
if (clear_script == 'ENABLED')
{document.getElementById("ScriptContents").innerHTML = '';}
parked_hangup='0';
AgentDispoing = 0;