aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch
diff options
context:
space:
mode:
Diffstat (limited to 'config/freeswitch')
-rw-r--r--config/freeswitch/freeswitch.inc39
-rw-r--r--config/freeswitch/freeswitch_status.tmp23
2 files changed, 41 insertions, 21 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index fd962df9..2ef39a8c 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -1778,30 +1778,33 @@ function create_lan_sip_profile()
//create the LAN profile if it doesn't exist
if (!file_exists('/usr/local/freeswitch/conf/sip_profiles/lan.xml')) {
$lan_ip = $config['interfaces']['lan']['ipaddr'];
-
- $filename = "/usr/local/freeswitch/conf/sip_profiles/lan.xml";
- $handle = fopen($filename,"rb");
- $contents = fread($handle, filesize($filename));
- fclose($handle);
-
- $handle = fopen($filename,"w");
- $contents = str_replace("<profile name=\"internal\">", "<profile name=\"lan\">", $contents);
- $contents = str_replace("<alias name=\"default\"/>", "", $contents);
- $contents = str_replace("<X-PRE-PROCESS cmd=\"include\" data=\"internal/*.xml\"/>", "<X-PRE-PROCESS cmd=\"include\" data=\"lan/*.xml\"/>", $contents);
- $contents = str_replace("<param name=\"rtp-ip\" value=\"$${local_ip_v4}\"/>", "<param name=\"rtp-ip\" value=\"".$lan_ip."\"/>", $contents);
- $contents = str_replace("<param name=\"sip-ip\" value=\"$${local_ip_v4}\"/>", "<param name=\"sip-ip\" value=\"".$lan_ip."\"/>", $contents);
- fwrite($handle, $contents);
- unset($contents);
- fclose($handle);
- unset($filename);
+ if (strlen($lan_ip) > 0) {
+ exec("cp /usr/local/freeswitch/conf/sip_profiles/internal.xml /usr/local/freeswitch/conf/sip_profiles/lan.xml");
+
+ $filename = "/usr/local/freeswitch/conf/sip_profiles/lan.xml";
+ $handle = fopen($filename,"rb");
+ $contents = fread($handle, filesize($filename));
+ fclose($handle);
+
+ $handle = fopen($filename,"w");
+ $contents = str_replace("<profile name=\"internal\">", "<profile name=\"lan\">", $contents);
+ $contents = str_replace("<alias name=\"default\"/>", "", $contents);
+ $contents = str_replace("<X-PRE-PROCESS cmd=\"include\" data=\"internal/*.xml\"/>", "<X-PRE-PROCESS cmd=\"include\" data=\"lan/*.xml\"/>", $contents);
+ $contents = str_replace("<param name=\"rtp-ip\" value=\"$${local_ip_v4}\"/>", "<param name=\"rtp-ip\" value=\"".$lan_ip."\"/>", $contents);
+ $contents = str_replace("<param name=\"sip-ip\" value=\"$${local_ip_v4}\"/>", "<param name=\"sip-ip\" value=\"".$lan_ip."\"/>", $contents);
+ fwrite($handle, $contents);
+ unset($contents);
+ fclose($handle);
+ unset($filename);
+ }
}
-
+
}
function freeswitch_php_install_command()
{
global $config;
- $freeswitch_package_version = "0.8.7";
+ $freeswitch_package_version = "0.8.7.1";
$freeswitch_build_version = "1.0.4 pre 6";
$freeswitch_build_revision = "13238";
diff --git a/config/freeswitch/freeswitch_status.tmp b/config/freeswitch/freeswitch_status.tmp
index ea08b738..ceccd89a 100644
--- a/config/freeswitch/freeswitch_status.tmp
+++ b/config/freeswitch/freeswitch_status.tmp
@@ -115,6 +115,23 @@ if (!pkg_is_service_running('freeswitch')) {
sleep(7);
}
?>
+
+<script language="Javascript" type="text/javascript" src="/edit_area/edit_area_full.js"></script>
+<script language="Javascript" type="text/javascript">
+ // initialisation
+ editAreaLoader.init({
+ id: "log" // id of the textarea to transform
+ ,start_highlight: false
+ ,allow_toggle: true
+ ,display: "later"
+ ,language: "en"
+ ,syntax: "html"
+ ,toolbar: "search, go_to_line,|, fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, change_smooth_selection, highlight, reset_highlight, |, help"
+ ,syntax_selection_allow: "css,html,js,php,xml,c,cpp,sql"
+ ,show_line_colors: true
+ });
+</script>
+
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
@@ -305,9 +322,9 @@ echo "</table>\n";
echo "<br /><br />\n\n";
-echo "<b>tail -n 100 /usr/local/freeswitch/log/freeswitch.log</b><br />\n";
-echo "<textarea cols='85' rows='30' wrap='off'>\n";
-echo system("tail -n 100 /usr/local/freeswitch/log/freeswitch.log");
+echo "<b>tail -n 500 /usr/local/freeswitch/log/freeswitch.log</b><br />\n";
+echo "<textarea id='log' name='log' cols='93' rows='30' wrap='off'>\n";
+echo system("tail -n 500 /usr/local/freeswitch/log/freeswitch.log");
echo "</textarea>\n";
echo "<br /><br />\n\n";