From 3186b38d1a36ac4c983c621e6f4b825cc1060761 Mon Sep 17 00:00:00 2001 From: mattf Date: Sun, 9 Jun 2019 14:50:51 +0000 Subject: [PATCH] Added reporting for SIP event logging git-svn-id: svn://192.168.202.10@3111 3d104415-ff17-0410-8863-d5cf3c621b8a --- docs/SIP_EVENT_LOGGING.txt | 10 +- www/vicidial/AST_SIP_event_report.php | 908 ++++++++++++++++++++++++++ www/vicidial/admin.php | 10 +- www/vicidial/admin_modify_lead.php | 105 ++- 4 files changed, 1023 insertions(+), 10 deletions(-) create mode 100644 www/vicidial/AST_SIP_event_report.php diff --git a/docs/SIP_EVENT_LOGGING.txt b/docs/SIP_EVENT_LOGGING.txt index ca556352..ce4089ad 100644 --- a/docs/SIP_EVENT_LOGGING.txt +++ b/docs/SIP_EVENT_LOGGING.txt @@ -1,4 +1,4 @@ -SIP EVENT LOGGING DOC Started: 2019-05-30 Updated: 2019-05-31 +SIP EVENT LOGGING DOC Started: 2019-05-30 Updated: 2019-06-09 !!!! THIS IS AN EXPERIMENTAL FEATURE, PLEASE READ ALL IMPORTANT NOTES !!!! @@ -7,7 +7,11 @@ SIP EVENT LOGGING DOC Started: 2019-05-30 Updated: 2019-05-31 This document will go over the details of the new SIP event logging features that were added to VICIdial for use with patched versions of Asterisk 13 -The purpose of this SIP event logging is to hopefully help to be able to better identify FAS(False Answer Supervision) and PDD(Post Dial Delay), as well as manual dial call progress updates to the agent. For phase 1 of this project, which is all that is completed at this time, the basic framework of logging the SIP messages on all outbound calls is complete, as well as extended logging of answered calls. The maintenance of all involved new database log tables is also complete. +The purpose of this SIP event logging is to hopefully help to be able to better identify FAS(False Answer Supervision) and PDD(Post Dial Delay), as well as manual dial call progress updates to the agent. + +For phase 1 of this project, the basic framework of logging the SIP messages on all outbound calls is complete, as well as extended logging of answered calls. The maintenance of all involved new database log tables is also complete. + +For phase 2 of this project, we added some basic reporting(AST_SIP_event_report.php) which can show the summary details of every Answered call on the system with pop-up displays for all of the SIP events that happened on each call as well as a link to the modify lead page where you can also see the SIP events for every call to that lead(the SIP events are only stored for 7 days). @@ -76,6 +80,8 @@ Scripts modified/added: - bin/ADMIN_update_server_ip.pl - bin/AST_flush_DBqueue.pl - bin/ADMIN_archive_log_tables.pl +- www/vicidial/AST_SIP_event_report.php +- www/vicidial/admin_modify_lead.php - install.pl diff --git a/www/vicidial/AST_SIP_event_report.php b/www/vicidial/AST_SIP_event_report.php new file mode 100644 index 00000000..6c2e034b --- /dev/null +++ b/www/vicidial/AST_SIP_event_report.php @@ -0,0 +1,908 @@ + LICENSE: AGPLv2 +# +# CHANGES +# +# 190607-1522 - First build +# + +$startMS = microtime(); + +require("dbconnect_mysqli.php"); +require("functions.php"); + +$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER']; +$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW']; +$PHP_SELF=$_SERVER['PHP_SELF']; +if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];} + elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];} +if (isset($_GET["query_date_D"])) {$query_date_D=$_GET["query_date_D"];} + elseif (isset($_POST["query_date_D"])) {$query_date_D=$_POST["query_date_D"];} +if (isset($_GET["query_date_T"])) {$query_date_T=$_GET["query_date_T"];} + elseif (isset($_POST["query_date_T"])) {$query_date_T=$_POST["query_date_T"];} +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["shift"])) {$shift=$_GET["shift"];} + elseif (isset($_POST["shift"])) {$shift=$_POST["shift"];} +if (isset($_GET["stage"])) {$stage=$_GET["stage"];} + elseif (isset($_POST["stage"])) {$stage=$_POST["stage"];} +if (isset($_GET["color"])) {$color=$_GET["color"];} + elseif (isset($_POST["color"])) {$color=$_POST["color"];} +if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];} + elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];} +if (isset($_GET["DB"])) {$DB=$_GET["DB"];} + elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];} +if (isset($_GET["submit"])) {$submit=$_GET["submit"];} + elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];} +if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];} + elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];} +if (isset($_GET["report_display_type"])) {$report_display_type=$_GET["report_display_type"];} + elseif (isset($_POST["report_display_type"])) {$report_display_type=$_POST["report_display_type"];} +if (isset($_GET["search_archived_data"])) {$search_archived_data=$_GET["search_archived_data"];} + elseif (isset($_POST["search_archived_data"])) {$search_archived_data=$_POST["search_archived_data"];} + +$query_date = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$query_date); +$query_date_D = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$query_date_D); +$query_date_T = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$query_date_T); +$group = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$group); +$shift = preg_replace('/[^0-9]/','',$shift); +$stage = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$stage); +$file_download = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$file_download); +$color = preg_replace('/[^0-9a-zA-Z]/','',$color); +$DB = preg_replace('/[^0-9a-zA-Z]/','',$DB); +$report_display_type = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$report_display_type); +$search_archived_data = preg_replace('/[^- \.\:\/\@\_0-9a-zA-Z]/','',$search_archived_data); +if (strlen($color)<1) {$color='E6E6E6';} +$report_name = 'SIP Event Report'; +$db_source = 'M'; +$JS_text="\n"; + echo "\n"; + echo "\n"; + require("chart_button.php"); + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo ""._QXZ("$report_name")."\n"; + echo ""; + + $short_header=1; + + require("admin_header.php"); + + echo "\n"; + echo "\n"; + echo ""._QXZ("$report_name")." $NWB#single_agent_daily$NWE\n"; + echo "
";
+	}
+
+if (strlen($query_date) < 1)
+	{
+	echo "";
+	echo _QXZ("PLEASE SELECT A DATE AND TIME RANGE BELOW AND CLICK SUBMIT")."\n";
+	}
+
+else
+	{
+	$SIProws_ct=0;
+	$stmt="SELECT count(*) from ".$vicidial_log_extended_table." where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN';";
+	$rslt=mysql_to_mysqli($stmt, $link);
+	if ($DB > 1) {echo "$stmt\n";}
+	$VLEXrows_to_print = mysqli_num_rows($rslt);
+	if ($VLEXrows_to_print > 0)
+		{
+		$row=mysqli_fetch_row($rslt);
+		$SIProws_ct =		$row[0];
+		}
+
+	if ($file_download < 1)
+		{
+		$ASCII_text.=_QXZ("SIP Event Report",24).":    "._QXZ("Total Records").": $SIProws_ct    "._QXZ("Starting Record").": $shift                  $NOW_TIME ($db_source)\n";
+		$ASCII_text.=_QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
+		}
+	else
+		{
+		$file_output .= _QXZ("SIP Event Report",24).":    "._QXZ("Total Records").": $SIProws_ct    "._QXZ("Starting Record").": $shift                  $NOW_TIME ($db_source)\n";
+		$file_output .= _QXZ("Time range").": $query_date_BEGIN "._QXZ("to")." $query_date_END\n\n";
+		}
+
+	$ASCII_text_table='';
+	$statuses='-';
+	$statusesTXT='';
+	$statusesHEAD='';
+	$statusesHTML='';
+	$statusesFILE='';
+	$statusesARY[0]='';
+	$j=0;
+	$dates='-';
+	$datesARY[0]='';
+	$date_namesARY[0]='';
+	$k=0;
+
+	$stmt="SELECT call_date,caller_code,invite_to_ring,ring_to_final,invite_to_final,last_event_code from ".$vicidial_log_extended_sip_table." where call_date <= '$query_date_END' and call_date >= '$query_date_BEGIN' order by $group limit $shiftSQL;";
+	$rslt=mysql_to_mysqli($stmt, $link);
+	if ($DB) {echo "$stmt\n";}
+	$rows_to_print = mysqli_num_rows($rslt);
+	$i=0;
+	while ($i < $rows_to_print)
+		{
+		$row=mysqli_fetch_row($rslt);
+		$SIPcall_date[$i] =			$row[0];
+		$SIPcaller_code[$i] =		$row[1];
+		$SIPinvite_to_ring[$i] =	$row[2];
+		$SIPring_to_final[$i] =		$row[3];
+		$SIPinvite_to_final[$i] =	$row[4];
+		$SIPlast_event_code[$i] =	$row[5];
+
+		$i++;
+		}
+
+
+	### loop through every call, pick up details from other tables and put in display variable to be printed
+	$i=0;
+	while ($i < $rows_to_print)
+		{
+		$stmt="SELECT uniqueid,server_ip,lead_id from ".$vicidial_log_extended_table." where caller_code = '$SIPcaller_code[$i]' order by call_date desc limit 1;";
+		$rslt=mysql_to_mysqli($stmt, $link);
+		if ($DB > 1) {echo "$stmt\n";}
+		$VLErows_to_print = mysqli_num_rows($rslt);
+		if ($VLErows_to_print > 0)
+			{
+			$row=mysqli_fetch_row($rslt);
+			$SIPuniqueid[$i] =		$row[0];
+			$SIPserver_ip[$i] =		$row[1];
+			$SIPlead_id[$i] =		$row[2];
+			}
+
+		$stmt="SELECT length_in_sec,status,phone_number,called_count,user from ".$vicidial_log_table." where lead_id = '$SIPlead_id[$i]' and uniqueid='$SIPuniqueid[$i]' order by call_date desc limit 1;";
+		$rslt=mysql_to_mysqli($stmt, $link);
+		if ($DB > 1) {echo "$stmt\n";}
+		$VLrows_to_print = mysqli_num_rows($rslt);
+		if ($VLrows_to_print > 0)
+			{
+			$row=mysqli_fetch_row($rslt);
+			$SIPlength_in_sec[$i] =	$row[0];
+			$SIPstatus[$i] =		$row[1];
+			$SIPphone_number[$i] =	$row[2];
+			$SIPcalled_count[$i] =	$row[3];
+			$SIPuser[$i] =			$row[4];
+			}
+
+
+		$ASCII_text_table.="| ".sprintf("%-27s", $SIPcall_date[$i]);
+		$ASCII_text_table.=" | ".sprintf("%-20s", $SIPcaller_code[$i])."";
+		$ASCII_text_table.=" | ".sprintf("%12s", $SIPinvite_to_ring[$i]);
+		$ASCII_text_table.=" | ".sprintf("%12s", $SIPring_to_final[$i]);
+		$ASCII_text_table.=" | ".sprintf("%12s", $SIPinvite_to_final[$i]);
+		$ASCII_text_table.=" | ".sprintf("%20s", $SIPuniqueid[$i]);
+		$ASCII_text_table.=" | ".sprintf("%15s", $SIPserver_ip[$i]);
+		$ASCII_text_table.=" | ".sprintf("%9s", $SIPlead_id[$i])."";
+		$ASCII_text_table.=" | ".sprintf("%5s", $SIPlength_in_sec[$i]);
+		$ASCII_text_table.=" | ".sprintf("%10s", $SIPphone_number[$i]);
+		$ASCII_text_table.=" | ".sprintf("%6s", $SIPstatus[$i]);
+		$ASCII_text_table.=" | ".sprintf("%6s", $SIPcalled_count[$i]);
+		$ASCII_text_table.=" |\n";
+
+		$i++;
+		}
+
+	$ASCII_text.=_QXZ("Displaying Records").": $i                                       ";
+
+	if ($shift > 999)
+		{
+		$ASCII_text.=""._QXZ("PREV")."   ";
+		}
+	if ($i > 999)
+		{
+		$ASCII_text.=""._QXZ("NEXT")."   ";
+		}
+	$ASCII_text.="\n";
+	$ASCII_text.="+-----------------------------+----------------------+--------------+--------------+--------------+----------------------+-----------------+-----------+-------+------------+--------+--------+\n";
+	$ASCII_text.="| "._QXZ("Date Time Microseconds",27);
+	$ASCII_text.=" | "._QXZ("Caller Code",20);
+	$ASCII_text.=" | "._QXZ("Post-Dial",12);
+	$ASCII_text.=" | "._QXZ("Ring-Time",12);
+	$ASCII_text.=" | "._QXZ("Total-Dial",12);
+	$ASCII_text.=" | "._QXZ("UniqueID",20);
+	$ASCII_text.=" | "._QXZ("Server IP",15);
+	$ASCII_text.=" | "._QXZ("Lead ID",9);
+	$ASCII_text.=" | "._QXZ("sec",5);
+	$ASCII_text.=" | "._QXZ("Phone",10);
+	$ASCII_text.=" | "._QXZ("Status",6);
+	$ASCII_text.=" |"._QXZ("Call Ct",8);
+	$ASCII_text.="|\n";
+	$ASCII_text.="+-----------------------------+----------------------+--------------+--------------+--------------+----------------------+-----------------+-----------+-------+------------+--------+--------+\n";
+	$ASCII_text.="$ASCII_text_table";
+	$ASCII_text.="+----------------------------------------------------+--------------+--------------+--------------+----------------------+-----------------+-----------+-------+------------+--------+--------+\n";
+	$ASCII_text.="|                                                    |              |              |              |\n";
+
+	}
+
+
+if ($file_download > 0)
+	{
+	$US='_';
+	$FILE_TIME = date("Ymd-His");
+	$CSVfilename = "SIP_EVENT_$US$FILE_TIME.csv";
+
+	// We'll be outputting a TXT file
+	header('Content-type: application/octet-stream');
+
+	// It will be called LIST_101_20090209-121212.txt
+	header("Content-Disposition: attachment; filename=\"$CSVfilename\"");
+	header('Expires: 0');
+	header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
+	header('Pragma: public');
+	ob_clean();
+	flush();
+
+	echo "$file_output";
+
+	if ($db_source == 'S')
+		{
+		mysqli_close($link);
+		$use_slave_server=0;
+		$db_source = 'M';
+		require("dbconnect_mysqli.php");
+		}
+
+	$endMS = microtime();
+	$startMSary = explode(" ",$startMS);
+	$endMSary = explode(" ",$endMS);
+	$runS = ($endMSary[0] - $startMSary[0]);
+	$runM = ($endMSary[1] - $startMSary[1]);
+	$TOTALrun = ($runS + $runM);
+
+	$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
+	if ($DB) {echo "|$stmt|\n";}
+	$rslt=mysql_to_mysqli($stmt, $link);
+
+	exit;
+	}
+
+$JS_onload.="}\n";
+if ($report_display_type=='HTML') {$JS_text.=$JS_onload;}
+$JS_text.="\n";
+
+echo "
"; +echo "
"._QXZ("Date").":
"; +echo "\n"; +echo ""; + +?> + +
"; +echo "
"._QXZ("to")."
"; + +echo "
"; +#echo _QXZ("Display as").":   
"; +#echo "\n

"; +echo "
"._QXZ("Sort").":
"; +echo "
\n"; + +if ($archives_available=="Y") + { + echo ""._QXZ("Search archived data")."\n"; + } + +echo "

\n"; +echo "
        "; +echo ""; +echo ""._QXZ("REPORTS")." \n"; +echo "
"; + +echo "
"; + +if ($report_display_type=="HTML") + { + echo $GRAPH_text; + echo $JS_text; + } +else + { + echo $ASCII_text; + } + + +echo "\n"; + +if ($report_display_type=="TEXT" || !$report_display_type) + { + echo "\n"; + echo "
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
+
+	$m=0;
+	while ($m < $k)
+		{
+		$sort_split = explode("-----",$TOPsort[$m]);
+		$i = $sort_split[1];
+		$sort_order[$m] = "$i";
+
+		if ( ($TOPsortTALLY[$i] < 1) or ($TOPsortMAX < 1) )
+			{echo "              \n";}
+		else
+			{
+			echo "              ";
+			$TOPsortPLOT = ( MathZDC($TOPsortTALLY[$i], $TOPsortMAX) * 120 );
+			$h=0;
+			while ($h <= $TOPsortPLOT)
+				{
+				echo " ";
+				$h++;
+				}
+			echo "\n";
+			}
+		$m++;
+		}
+
+	echo "\n";
+	}
+
+if ($db_source == 'S')
+	{
+	mysqli_close($link);
+	$use_slave_server=0;
+	$db_source = 'M';
+	require("dbconnect_mysqli.php");
+	}
+
+$endMS = microtime();
+$startMSary = explode(" ",$startMS);
+$endMSary = explode(" ",$endMS);
+$runS = ($endMSary[0] - $startMSary[0]);
+$runM = ($endMSary[1] - $startMSary[1]);
+$TOTALrun = ($runS + $runM);
+
+$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
+if ($DB) {echo "|$stmt|\n";}
+$rslt=mysql_to_mysqli($stmt, $link);
+
+
+?>
+
+
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index 5336907b..4ceb5dd9 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -120,9 +120,9 @@ $PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
 $PHP_SELF=$_SERVER['PHP_SELF'];
 $QUERY_STRING = getenv("QUERY_STRING");
 
-$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary, Real-Time Whiteboard Report, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound DID Summary Report, Agent DID Report, Inbound IVR Report, Inbound Forecasting Report, Advanced Forecasting Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Callmenu Survey Report, Outbound Lead Source Report, Fronter - Closer Report, Fronter - Closer Detail Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Inbound Status Summary, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Group Hourly Report, User Group Detail Hourly Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Carrier Log Report, Campaign Debug, Asterisk Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report, Agent Debug Log Report, Agent Parked Call Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report, Real-Time Monitoring Log Report, AMD Log Report';
+$Vreports = 'NONE, Real-Time Main Report, Real-Time Campaign Summary, Real-Time Whiteboard Report, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound DID Summary Report, Agent DID Report, Inbound IVR Report, Inbound Forecasting Report, Advanced Forecasting Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Callmenu Survey Report, Outbound Lead Source Report, Fronter - Closer Report, Fronter - Closer Detail Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Inbound Status Summary, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Group Hourly Report, User Group Detail Hourly Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Carrier Log Report, Campaign Debug, Asterisk Debug, Hangup Cause Report, Lists Pass Report, Called Counts List IDs Report, Agent Debug Log Report, Agent Parked Call Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report, Real-Time Monitoring Log Report, AMD Log Report, SIP Event Report';
 
-$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary, Real-Time Whiteboard Report, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound DID Summary Report, Agent DID Report, Inbound Email Report, Inbound Chat Report, Inbound IVR Report, Inbound Forecasting Report, Advanced Forecasting Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Callmenu Survey Report, Outbound Lead Source Report, Fronter - Closer Report, Fronter - Closer Detail Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Inbound Status Summary, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Group Hourly Report, User Group Detail Hourly Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report, Front Page System Summary, Report Page Servers Summary, Admin Utilities Page, Agent Debug Log Report, Agent Parked Call Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report, Real-Time Monitoring Log Report, AMD Log Report';
+$UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summary, Real-Time Whiteboard Report, Inbound Report, Inbound Report by DID, Inbound Service Level Report, Inbound Summary Hourly Report, Inbound Daily Report, Inbound DID Report, Inbound DID Summary Report, Agent DID Report, Inbound Email Report, Inbound Chat Report, Inbound IVR Report, Inbound Forecasting Report, Advanced Forecasting Report, Outbound Calling Report, Outbound Summary Interval Report, Outbound IVR Report, Callmenu Survey Report, Outbound Lead Source Report, Fronter - Closer Report, Fronter - Closer Detail Report, Lists Campaign Statuses Report, Lists Statuses Report, Campaign Status List Report, Export Calls Report, Export Leads Report, Agent Time Detail, Agent Status Detail, Agent Inbound Status Summary, Agent Performance Detail, Team Performance Detail, Performance Comparison Report, Single Agent Daily, Single Agent Daily Time, User Group Login Report, User Group Hourly Report, User Group Detail Hourly Report, User Timeclock Report, User Group Timeclock Status Report, User Timeclock Detail Report, Server Performance Report, Administration Change Log, List Update Stats, User Stats, User Time Sheet, Download List, Dialer Inventory Report, Custom Reports Links, CallCard Search, Maximum System Stats, Maximum Stats Detail, Search Leads Logs, Email Log Report, Lists Pass Report, Called Counts List IDs Report, Front Page System Summary, Report Page Servers Summary, Admin Utilities Page, Agent Debug Log Report, Agent Parked Call Report, Agent-Manager Chat Log, Recording Access Log Report, API Log Report, Real-Time Monitoring Log Report, AMD Log Report, SIP Event Report';
 
 $Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
 
@@ -4505,12 +4505,13 @@ else
 # 190414-0924 - Added user_admin_redirect system setting and user option
 # 190530-1014 - Added list_status_modification_confirmation feature
 # 190530-1715 - Added sip_event_logging system setting
+# 190607-1525 - Added SIP Event Report link
 #
 
 # 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-710a';
-$build = '190530-1715';
+$admin_version = '2.14-711a';
+$build = '190607-1525';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -41911,6 +41912,7 @@ if ($ADD==999994)
 		echo "
  • "._QXZ("Dial Log Report")."\n"; echo "
  • "._QXZ("Carrier Log Report")."\n"; echo "
  • "._QXZ("Hangup Cause Report")."\n"; + echo "
  • "._QXZ("SIP Event Report")."\n"; echo "
  • "._QXZ("AMD Log Report")."\n"; echo "
  • "._QXZ("Asterisk Debug Page")."\n"; echo "
  • "._QXZ("Export Calls Report Carrier")."\n"; diff --git a/www/vicidial/admin_modify_lead.php b/www/vicidial/admin_modify_lead.php index 67053523..bda2c260 100644 --- a/www/vicidial/admin_modify_lead.php +++ b/www/vicidial/admin_modify_lead.php @@ -95,6 +95,7 @@ # 180807-0957 - Added new diff logging code # 190310-2223 - Added indication of muted recordings by agent # 190329-1917 - Added display of AMD log info when CIDdisplay=Yes is set +# 190609-0927 - Added sip_event_logging support # require("dbconnect_mysqli.php"); @@ -243,7 +244,7 @@ if ($nonselectable_statuses > 0) ############################################# ##### START SYSTEM_SETTINGS LOOKUP ##### -$stmt = "SELECT use_non_latin,custom_fields_enabled,webroot_writable,allow_emails,enable_languages,language_method,active_modules,log_recording_access,admin_screen_colors,enable_gdpr_download_deletion,source_id_display,mute_recordings FROM system_settings;"; +$stmt = "SELECT use_non_latin,custom_fields_enabled,webroot_writable,allow_emails,enable_languages,language_method,active_modules,log_recording_access,admin_screen_colors,enable_gdpr_download_deletion,source_id_display,mute_recordings,sip_event_logging FROM system_settings;"; $rslt=mysql_to_mysqli($stmt, $link); if ($DB) {echo "$stmt\n";} $qm_conf_ct = mysqli_num_rows($rslt); @@ -262,6 +263,7 @@ if ($qm_conf_ct > 0) $enable_gdpr_download_deletion = $row[9]; $SSsource_id_display = $row[10]; $SSmute_recordings = $row[11]; + $SSsip_event_logging = $row[12]; } ##### END SETTINGS LOOKUP ##### ########################################### @@ -877,6 +879,9 @@ if ($scb_count_to_print > 0) if (strlen($row[0])>0) {$scheduled_callback = $row[0];} } +$search_archived_data=''; +if ($archive_log == 'Yes') {$search_archived_data='checked';} + $vdc_form_display = 'vdc_form_display.php'; if (preg_match("/cf_encrypt/",$active_modules)) {$vdc_form_display = 'vdc_form_display_encrypt.php';} @@ -952,8 +957,86 @@ function UpdateCallback(callback_id) { document.getElementById('vsn').action="?appointment_date="+appointment_date+"&appointment_time="+appointment_time+"&CBstatus="+CBstatus+"&CBchangeUSERtoANY="+CBchangeUSERtoANY+"&CBchangeANYtoUSER="+CBchangeANYtoUSER+"&CBuser="+CBuser+"&comments="+comments+"&callback_id="+callback_id; document.vsn.submit(); } - 0) ) + { + echo "\n"; + echo "
    \n"; + echo "\n"; echo "\n"; echo ""; @@ -1385,7 +1468,14 @@ else $outbound_cid = $rowA[0]; $outbound_cid = preg_replace("/\".*\" /",'',$outbound_cid); } - $call_log .= "  $outbound_cid $caller_code  $row[0]\n"; + if ($SSsip_event_logging > 0) + { + $call_log .= "  $outbound_cid $caller_code  $row[0]\n"; + } + else + { + $call_log .= "  $outbound_cid $caller_code  $row[0]\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';"; $rsltA=mysql_to_mysqli($stmtA, $link); @@ -1559,7 +1649,14 @@ else $outbound_cid = $rowA[0]; $outbound_cid = preg_replace("/\".*\" /",'',$outbound_cid); } - $call_log .= "  $outbound_cid $caller_code  $row[0]\n"; + if ($SSsip_event_logging > 0) + { + $call_log .= "  $outbound_cid $caller_code  $row[0]\n"; + } + else + { + $call_log .= "  $outbound_cid $caller_code  $row[0]\n"; + } } $call_log .= "\n";