aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/siproxd.inc10
-rw-r--r--config/siproxd.xml8
2 files changed, 13 insertions, 5 deletions
diff --git a/config/siproxd.inc b/config/siproxd.inc
index 13254a42..a34f5b34 100644
--- a/config/siproxd.inc
+++ b/config/siproxd.inc
@@ -70,8 +70,8 @@ function siproxd_generate_rules($type) {
}
/* proxy is turned off in package settings */
- if($siproxd_conf['rtpenable'] == "0") {
- log_error("WARNING: siproxd RTP proxy has not been enabled. Not installing rules.");
+ if($siproxd_conf['sipenable'] == "0") {
+ log_error("WARNING: siproxd proxy has not been enabled. Not installing rules.");
return "\n";
}
@@ -95,7 +95,9 @@ function siproxd_generate_rules($type) {
if($iface <> "") {
$rules .= "# allow SIP signaling and RTP traffic\n";
$rules .= "pass in on {$iface} proto udp from any to any port = {$port}\n";
- $rules .= "pass in on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n";
+ if($siproxd_conf['rtpenable'] == "1") {
+ $rules .= "pass in on {$iface} proto udp from any to any port {$rtplower}:{$rtpupper}\n";
+ }
}
}
break;
@@ -125,7 +127,7 @@ function sync_package_siproxd() {
fwrite($fout, "# package management system.\n\n");
/* proxy is turned off in package settings */
- if($siproxd_conf['rtpenable'] == "0") {
+ if($siproxd_conf['sipenable'] == "0") {
fclose($fout);
return;
}
diff --git a/config/siproxd.xml b/config/siproxd.xml
index 1176a423..1e16a9ea 100644
--- a/config/siproxd.xml
+++ b/config/siproxd.xml
@@ -84,6 +84,12 @@
</additional_files_needed>
<fields>
<field>
+ <fielddescr>Enable siproxd</fielddescr>
+ <fieldname>sipenable</fieldname>
+ <description>Enable or disable siproxd</description>
+ <type>checkbox</type>
+ </field>
+ <field>
<fielddescr>Inbound interface</fielddescr>
<fieldname>if_inbound</fieldname>
<description>Select the inbound interface.</description>
@@ -335,4 +341,4 @@
<custom_php_validation_command>
validate_form_siproxd($_POST, &amp;$input_errors);
</custom_php_validation_command>
-</packagegui> \ No newline at end of file
+</packagegui>