aboutsummaryrefslogtreecommitdiffstats
path: root/config/siproxd.inc
diff options
context:
space:
mode:
Diffstat (limited to 'config/siproxd.inc')
-rw-r--r--config/siproxd.inc14
1 files changed, 13 insertions, 1 deletions
diff --git a/config/siproxd.inc b/config/siproxd.inc
index c99514fc..1fb5f4b2 100644
--- a/config/siproxd.inc
+++ b/config/siproxd.inc
@@ -69,6 +69,12 @@ function siproxd_generate_rules($type) {
return;
}
+ /* proxy is turned off in package settings */
+ if($siproxd_conf['sipenable'] == "0") {
+ log_error("WARNING: siproxd proxy has not been enabled. Not installing rules.");
+ return "\n";
+ }
+
$ifaces = explode(",", $siproxd_conf['if_inbound']);
$ifaces = array_map('convert_friendly_interface_to_real_interface_name', $ifaces);
$rtplower = ($siproxd_conf['rtplower'] ? $siproxd_conf['rtplower'] : 7070);
@@ -120,6 +126,12 @@ function sync_package_siproxd() {
fwrite($fout, "# This file was automatically generated by the pfSense\n");
fwrite($fout, "# package management system.\n\n");
+ /* proxy is turned off in package settings */
+ if($siproxd_conf['sipenable'] == "0") {
+ fclose($fout);
+ return;
+ }
+
if($siproxd_conf['if_inbound'] != "") {
fwrite($fout, "if_inbound = " . convert_friendly_interface_to_real_interface_name($siproxd_conf['if_inbound']) . "\n");
}
@@ -150,7 +162,7 @@ function sync_package_siproxd() {
if($siproxd_conf['rtpenable'] != "") {
fwrite($fout, "rtp_proxy_enable = " . $siproxd_conf['rtpenable'] . "\n");
} else {
- fwrite($fout, "rtp_proxy_enable = 1\n");
+ fwrite($fout, "rtp_proxy_enable = 0\n");
}
if(($siproxd_conf['rtplower'] != "") && ($siproxd_conf['rtpupper'] != "")) {