From 06a8a9bd233185a4429d07f209b4bf83d2c1401e Mon Sep 17 00:00:00 2001 From: nagyrobi Date: Thu, 19 Sep 2013 14:46:45 +0200 Subject: Update asterisk_calls.php Added utf8_decode to the cells of the From column of the table, as Asterisk saves these names in UTF-8 encoding. --- config/asterisk/asterisk_calls.php | 43 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'config/asterisk') diff --git a/config/asterisk/asterisk_calls.php b/config/asterisk/asterisk_calls.php index 77131d8d..7fd75274 100644 --- a/config/asterisk/asterisk_calls.php +++ b/config/asterisk/asterisk_calls.php @@ -4,12 +4,11 @@ status_asterisk_calls.php part of pfSense Copyright (C) 2009 Scott Ullrich . - Copyright (C) 2012 robreg@zsurob.hu + Copyright (C) 2013 robi All rights reserved. originally part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2005 Manuel Kasper . - Copyright (C) 2012 robreg@zsurob.hu All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41,7 +40,7 @@ ##|*IDENT=page-status-asterisk ##|*NAME=Status: Asterisk Calls page ##|*DESCR=Allow access to the 'Status: Asterisk Calls' page. -##|*MATCH=status_asterisk_calls.php* +##|*MATCH=asterisk_calls.php* ##|-PRIV require_once("guiconfig.inc"); @@ -54,7 +53,6 @@ $callog = "/var/log/asterisk/cdr-csv/Master.csv"; /* Data input processing */ $cmd = $_GET['cmd']; -//$cmd = str_replace("+", " ", $cmd); $file = $_SERVER["SCRIPT_NAME"]; $break = Explode('/', $file); @@ -73,7 +71,7 @@ if (file_exists($callog)) case "download": // session_cache_limiter('none'); //*Use before session_start() // session_start(); - + header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename='.basename($callog)); @@ -110,23 +108,21 @@ if (file_exists($callog))
/tmp/trimmed.csv; rm '$callog'; mv /tmp/trimmed.csv '$callog'"); - //print $trimres . "Last 50 calls:
"; if (file_exists($callog)) $file_handle = fopen($callog, "r"); ?> - - - - - - - - - - - - +
Last 50 Asterisk calls
+ + + + + + + + + + + " . $out; - $out = "" . $out; + $out = "" . $out; $out = "" . $out; } } @@ -160,6 +156,13 @@ if (file_exists($callog))

+ +This log is lost when rebooting the system."; +?> + + -- cgit v1.2.3
Last 50 Asterisk calls
" . str_replace('"', '', $lin[4]) . "" . $lin[2] . "" . $lin[9] . "" . $lin[11] . "" . gmdate("G:i:s", $lin[12]) . "" . $lin[14] . "" . utf8_decode(str_replace('"', '', $lin[4])) . "" . $lin[2] . "" . $lin[9] . "" . $lin[11] . "" . gmdate("G:i:s", $lin[12]) . "" . $lin[14] . "