aboutsummaryrefslogtreecommitdiffstats
path: root/config/asterisk
diff options
context:
space:
mode:
authorRenato Botelho <garga@pfSense.org>2013-09-27 05:32:47 -0700
committerRenato Botelho <garga@pfSense.org>2013-09-27 05:32:47 -0700
commit7b9cde457ac7278c4a719b2e122d3fa4cb04dcc7 (patch)
tree60015319470e1b321ad8d08a1f267d4b6adf07ec /config/asterisk
parent9d6047d53cc8cb7d6286ca5683415ac807220d18 (diff)
parent318f8871db3f93f5338b60e65ba02c8e93919b74 (diff)
downloadpfsense-packages-7b9cde457ac7278c4a719b2e122d3fa4cb04dcc7.tar.gz
pfsense-packages-7b9cde457ac7278c4a719b2e122d3fa4cb04dcc7.tar.bz2
pfsense-packages-7b9cde457ac7278c4a719b2e122d3fa4cb04dcc7.zip
Merge pull request #509 from nagyrobi/patch-18
Update asterisk_calls.php
Diffstat (limited to 'config/asterisk')
-rw-r--r--config/asterisk/asterisk_calls.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/config/asterisk/asterisk_calls.php b/config/asterisk/asterisk_calls.php
index 7fd75274..6a4f973e 100644
--- a/config/asterisk/asterisk_calls.php
+++ b/config/asterisk/asterisk_calls.php
@@ -61,11 +61,13 @@ $pfile = $break[count($break) - 1];
if (file_exists($callog))
switch ($cmd){
case "trim":
- $trimres=shell_exec("tail -50 '$callog' > /tmp/trimmed.csv; rm '$callog'; mv /tmp/trimmed.csv '$callog'; chmod 666 '$callog'");
+ $trimres=shell_exec("tail -50 '$callog' > /tmp/trimmed_asterisk.csv && rm '$callog' && mv /tmp/trimmed_asterisk.csv '$callog' && chown asterisk:asterisk '$callog' && chmod g+w '$callog'");
+ header( 'Location: asterisk_calls.php?savemsg=Calls+log+trimmed.') ;
break;
case "clear":
- $trimres=shell_exec("rm '$callog'; touch '$callog'; chmod 666 '$callog'");
+ $trimres=shell_exec("rm '$callog' && touch '$callog' && chown asterisk:asterisk '$callog' && chmod g+w '$callog'");
+ header( 'Location: asterisk_calls.php?savemsg=Calls+log+cleared.') ;
break;
case "download":
@@ -91,6 +93,12 @@ if (file_exists($callog))
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
+ <?php
+ $savemsg = $_GET["savemsg"];
+ if ($savemsg) {
+ print_info_box($savemsg);
+ }
+ ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
@@ -159,7 +167,7 @@ if (file_exists($callog))
<?
if ($g['platform'] == "nanobsd")
- echo "<br>This log is lost when rebooting the system.";
+ echo "<br>This log may be lost when rebooting the system.";
?>