diff --git a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php index 27495eeb..0c195d62 100644 --- a/agc_2-X/trunk/www/vicidial/admin_modify_lead.php +++ b/agc_2-X/trunk/www/vicidial/admin_modify_lead.php @@ -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) 2025 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2026 Matt Florell LICENSE: AGPLv2 # # CHANGES # @@ -122,6 +122,7 @@ # 250129-0921 - Fix for closer call notes display, Issue #1534 # 250913-0837 - Added Stereo Call Recording indicator # 251010-1140 - Added DTMF count and muting recording log indicator columns +# 260716-1638 - Added SIP response data to extended outbound call log display # require("dbconnect_mysqli.php"); @@ -1918,7 +1919,7 @@ else $VLEserver_ip = $rowA[1]; } $outbound_cid=''; $VDLcall_date='0'; - $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code' order by call_date limit 1;"; + $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code,sip_hangup_cause,sip_hangup_reason FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code' order by call_date limit 1;"; if (!preg_match("/^M|^V/",$caller_code)) { $temp_uniqueid = explode('.',$uniqueid); @@ -1927,7 +1928,7 @@ else $temp_uniqueid_after = ($temp_uniqueid[1] + 1); $temp_uniqueidSQL = "'$temp_uniqueid_epoch.$temp_uniqueid_before','$uniqueid','$temp_uniqueid_epoch.$temp_uniqueid_after'"; - $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid IN($temp_uniqueidSQL) order by call_date limit 1;"; + $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code,sip_hangup_cause,sip_hangup_reason FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid IN($temp_uniqueidSQL) order by call_date limit 1;"; } $rsltA=mysql_to_mysqli($stmtA, $link); $cid_to_print = mysqli_num_rows($rsltA); @@ -1941,6 +1942,8 @@ else $VDLcall_date = $rowA[2]; if (strlen($rowA[3]) > 0) {$uniqueid = $rowA[3];} $caller_code = $rowA[4]; + $sip_cause = $rowA[5]; + $sip_reason = $rowA[6]; } $outbound_cid_num=''; $outbound_cid_type=''; $stmtA="SELECT outbound_cid,outbound_cid_type FROM vicidial_dial_cid_log WHERE call_date='$VDLcall_date' and caller_code='$caller_code' limit 1;"; @@ -1956,11 +1959,11 @@ else if ($SSsip_event_logging > 0) { - $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip\n"; + $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip    $sip_cause - $sip_reason\n"; } else { - $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip\n"; + $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip    $sip_cause - $sip_reason\n"; } $AMDSTATUS=''; $AMDRESPONSE=''; $stmtA="SELECT AMDSTATUS,AMDRESPONSE FROM vicidial_amd_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code';"; @@ -2218,7 +2221,7 @@ else $VLEserver_ip = $rowA[1]; } $outbound_cid=''; $VDLcall_date='0'; - $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code FROM vicidial_dial_log_archive WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code' order by call_date limit 1;"; + $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code,sip_hangup_cause,sip_hangup_reason FROM vicidial_dial_log_archive WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and caller_code='$caller_code' order by call_date limit 1;"; if (!preg_match("/^M|^V/",$caller_code)) { $temp_uniqueid = explode('.',$uniqueid); @@ -2227,7 +2230,7 @@ else $temp_uniqueid_after = ($temp_uniqueid[1] + 1); $temp_uniqueidSQL = "'$temp_uniqueid_epoch.$temp_uniqueid_before','$uniqueid','$temp_uniqueid_epoch.$temp_uniqueid_after'"; - $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid IN($temp_uniqueidSQL) order by call_date limit 1;"; + $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code,sip_hangup_cause,sip_hangup_reason FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid IN($temp_uniqueidSQL) order by call_date limit 1;"; } $rsltA=mysql_to_mysqli($stmtA, $link); $cid_to_print = mysqli_num_rows($rsltA); @@ -2241,6 +2244,8 @@ else $VDLcall_date = $rowA[2]; if (strlen($rowA[3]) > 0) {$uniqueid = $rowA[3];} $caller_code = $rowA[4]; + $sip_cause = $rowA[5]; + $sip_reason = $rowA[6]; } $outbound_cid_num=''; $outbound_cid_type=''; $stmtA="SELECT outbound_cid,outbound_cid_type FROM vicidial_dial_cid_log_archive WHERE call_date='$VDLcall_date' and caller_code='$caller_code' limit 1;"; @@ -2256,11 +2261,11 @@ else if ($SSsip_event_logging > 0) { - $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip\n"; + $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip    $sip_cause - $sip_reason\n"; } else { - $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip\n"; + $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip    $sip_cause - $sip_reason\n"; } } $call_log .= "\n"; @@ -2481,7 +2486,7 @@ else $VLEserver_ip = $rowA[1]; } $outbound_cid=''; $VDLcall_date='0'; - $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code FROM vicidial_dial_log_archive WHERE lead_id='" . mysqli_real_escape_string($linkCS, $lead_id) . "' and caller_code='$caller_code' order by call_date limit 1;"; + $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code,sip_hangup_cause,sip_hangup_reason FROM vicidial_dial_log_archive WHERE lead_id='" . mysqli_real_escape_string($linkCS, $lead_id) . "' and caller_code='$caller_code' order by call_date limit 1;"; if (!preg_match("/^M|^V/",$caller_code)) { $temp_uniqueid = explode('.',$uniqueid); @@ -2490,7 +2495,7 @@ else $temp_uniqueid_after = ($temp_uniqueid[1] + 1); $temp_uniqueidSQL = "'$temp_uniqueid_epoch.$temp_uniqueid_before','$uniqueid','$temp_uniqueid_epoch.$temp_uniqueid_after'"; - $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid IN($temp_uniqueidSQL) order by call_date limit 1;"; + $stmtA="SELECT outbound_cid,server_ip,call_date,uniqueid,caller_code,sip_hangup_cause,sip_hangup_reason FROM vicidial_dial_log WHERE lead_id='" . mysqli_real_escape_string($link, $lead_id) . "' and uniqueid IN($temp_uniqueidSQL) order by call_date limit 1;"; } $rsltA=mysql_to_mysqli($stmtA, $linkCS); $cid_to_print = mysqli_num_rows($rsltA); @@ -2504,6 +2509,8 @@ else $VDLcall_date = $rowA[2]; if (strlen($rowA[3]) > 0) {$uniqueid = $rowA[3];} $caller_code = $rowA[4]; + $sip_cause = $rowA[5]; + $sip_reason = $rowA[6]; } $outbound_cid_num=''; $outbound_cid_type=''; $stmtA="SELECT outbound_cid,outbound_cid_type FROM vicidial_dial_cid_log_archive WHERE call_date='$VDLcall_date' and caller_code='$caller_code' limit 1;"; @@ -2519,11 +2526,11 @@ else if ($SSsip_event_logging > 0) { - $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip\n"; + $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip    $sip_cause - $sip_reason\n"; } else { - $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip\n"; + $call_log .= "  $outbound_cid $caller_code $outbound_cid_type  $uniqueid  $VDLserver_ip    $sip_cause - $sip_reason\n"; } } $call_log .= "\n"; @@ -3525,10 +3532,10 @@ else echo ""._QXZ("CALLS TO THIS LEAD").":\n"; if ($CIDdisplay=="Yes") { - $out_log_width=1300; - if ($AMDcount > 0) {$out_log_width=1500;} + $out_log_width=1600; + if ($AMDcount > 0) {$out_log_width=1800;} echo "\n"; - echo ""; + echo ""; if ($AMDcount > 0) {echo "";} echo "\n";
# "._QXZ("DATE/TIME")." "._QXZ("LENGTH")." "._QXZ("STATUS")." "._QXZ("TSR")." "._QXZ("CAMPAIGN")." "._QXZ("LIST")." "._QXZ("LEAD")." "._QXZ("HANGUP REASON")." "._QXZ("PHONE")." "._QXZ("CALLER ID")." "._QXZ("UNIQUEID")." "._QXZ("SERVER IP")."
# "._QXZ("DATE/TIME")." "._QXZ("LENGTH")." "._QXZ("STATUS")." "._QXZ("TSR")." "._QXZ("CAMPAIGN")." "._QXZ("LIST")." "._QXZ("LEAD")." "._QXZ("HANGUP REASON")." "._QXZ("PHONE")." "._QXZ("CALLER ID")." "._QXZ("UNIQUEID")." "._QXZ("SERVER IP")." "._QXZ("SIP Response")." "._QXZ("AMD STATUS")." "._QXZ("AMD RESPONSE")."