aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-11-26 13:24:37 -0500
committerjim-p <jimp@pfsense.org>2010-11-26 13:24:37 -0500
commitadb7299d9d00989bd2a01348dbe6e59b4e42630c (patch)
tree7b649ae59199d7b262eff294be72f589087d22da
parent614531ee9c99126263cc3e1623221e395e0347d1 (diff)
downloadpfsense-packages-adb7299d9d00989bd2a01348dbe6e59b4e42630c.tar.gz
pfsense-packages-adb7299d9d00989bd2a01348dbe6e59b4e42630c.tar.bz2
pfsense-packages-adb7299d9d00989bd2a01348dbe6e59b4e42630c.zip
Add settings for default target, bogus via, and stun settings. Add section breaks to make the settings more readable.
-rw-r--r--config/siproxd.inc31
-rw-r--r--config/siproxd.xml94
2 files changed, 121 insertions, 4 deletions
diff --git a/config/siproxd.inc b/config/siproxd.inc
index 37a98bdd..0c5c1bb6 100644
--- a/config/siproxd.inc
+++ b/config/siproxd.inc
@@ -197,6 +197,30 @@ function sync_package_siproxd() {
if ($siproxd_conf['tcp_keepalive'] != "")
fwrite($fout, "tcp_keepalive = " . $siproxd_conf['tcp_keepalive'] . "\n");
+ fwrite($fout, "plugindir=/usr/local/lib/siproxd/\n");
+ fwrite($fout, "load_plugin=plugin_logcall.la\n");
+
+ if ($siproxd_conf['plugin_defaulttarget'] != "")
+ fwrite($fout, "load_plugin=plugin_defaulttarget.la\n");
+ if (($siproxd_conf['plugin_defaulttarget'] != "") && ($siproxd_conf['plugin_defaulttarget_log'] != ""))
+ fwrite($fout, "plugin_defaulttarget_log = 1\n");
+ if (($siproxd_conf['plugin_defaulttarget'] != "") && ($siproxd_conf['plugin_defaulttarget_target'] != ""))
+ fwrite($fout, "plugin_defaulttarget_target = " . $siproxd_conf['plugin_defaulttarget_target'] . "\n");
+
+ if ($siproxd_conf['plugin_fix_bogus_via'] != "")
+ fwrite($fout, "load_plugin=plugin_fix_bogus_via.la\n");
+ if (($siproxd_conf['plugin_fix_bogus_via'] != "") && ($siproxd_conf['plugin_fix_bogus_via_networks'] != ""))
+ fwrite($fout, "plugin_fix_bogus_via_networks = " . $siproxd_conf['plugin_fix_bogus_via_networks'] . "\n");
+
+ if ($siproxd_conf['plugin_stun'] != "")
+ fwrite($fout, "load_plugin=plugin_stun.la\n");
+ if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_server'] != ""))
+ fwrite($fout, "plugin_stun_server = " . $siproxd_conf['plugin_stun_server'] . "\n");
+ if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_port'] != ""))
+ fwrite($fout, "plugin_stun_port = " . $siproxd_conf['plugin_stun_port'] . "\n");
+ if (($siproxd_conf['plugin_stun'] != "") && ($siproxd_conf['plugin_stun_period'] != ""))
+ fwrite($fout, "plugin_stun_period = " . $siproxd_conf['plugin_stun_period'] . "\n");
+
fclose($fout);
write_rcfile(array(
@@ -245,6 +269,13 @@ function validate_form_siproxd($post, $input_errors) {
$input_errors[] = '"TCP Connect Timeout" must be numeric and greater than 0.';
if ($post['tcp_keepalive'] && (!is_numeric($post['tcp_keepalive']) || ($post['tcp_keepalive'] < 0)))
$input_errors[] = '"TCP Keepalive" must be numeric and greater than 0.';
+ if ($post['plugin_stun_server'] && (!is_hostname($post['plugin_stun_server']) && !is_ipaddr($post['plugin_stun_server'])))
+ $input_errors[] = 'Invalid hostname or IP address entered for "STUN Server".';
+ if ($post['plugin_stun_port'] && !is_port($post['plugin_stun_port']))
+ $input_errors[] = 'Invalid port entered for "STUN Port".';
+ if ($post['plugin_stun_period'] && (!is_numeric($post['plugin_stun_period']) || ($post['plugin_stun_period'] < 0)))
+ $input_errors[] = '"STUN Period" must be numeric and greater than 0.';
+
}
?>
diff --git a/config/siproxd.xml b/config/siproxd.xml
index 1041a1df..1bf2d80a 100644
--- a/config/siproxd.xml
+++ b/config/siproxd.xml
@@ -93,6 +93,16 @@
<type>input</type>
</field>
<field>
+ <fielddescr>Default expiration timeout</fielddescr>
+ <fieldname>defaulttimeout</fieldname>
+ <description>If a REGISTER request dose not contain an Expires header or expires= parameter, this number of seconds will be used and reported back to the UA in the answer.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <name>RTP Settings</name>
+ <type>listtopic</type>
+ </field>
+ <field>
<fielddescr>Enable RTP proxy</fielddescr>
<fieldname>rtpenable</fieldname>
<description>Enable or disable the RTP proxy. (default is enabled)</description>
@@ -127,10 +137,8 @@
<type>input</type>
</field>
<field>
- <fielddescr>Default expiration timeout</fielddescr>
- <fieldname>defaulttimeout</fieldname>
- <description>If a REGISTER request dose not contain an Expires header or expires= parameter, this number of seconds will be used and reported back to the UA in the answer.</description>
- <type>input</type>
+ <name>Dejittering Settings</name>
+ <type>listtopic</type>
</field>
<field>
<fielddescr>Input Dejitter</fielddescr>
@@ -145,6 +153,10 @@
<type>input</type>
</field>
<field>
+ <name>SIP over TCP Settings</name>
+ <type>listtopic</type>
+ </field>
+ <field>
<fielddescr>TCP inactivity timeout</fielddescr>
<fieldname>tcp_timeout</fieldname>
<description>Inactivity timeout (seconds). After that an idling TCP connection is disconnected. NOTE: Making this too short may cause multiple parallel registrations for the same phone. This timeout must be set larger than the used registration interval.</description>
@@ -163,6 +175,10 @@
<type>input</type>
</field>
<field>
+ <name>Proxy Settings</name>
+ <type>listtopic</type>
+ </field>
+ <field>
<fielddescr>Enable proxy authentication</fielddescr>
<fieldname>authentication</fieldname>
<description>If this is checked, clients will be forced to authenticate themselves at the proxy (for registration only).</description>
@@ -181,6 +197,10 @@
<type>input</type>
</field>
<field>
+ <name>DSCP Settings</name>
+ <type>listtopic</type>
+ </field>
+ <field>
<fielddescr>Expedited RTP Forwarding</fielddescr>
<fieldname>expeditedforwarding</fieldname>
<description>This service is designed to allow ISPs to offer a service with attributes similar to a "leased line". This service offers the ULTIMATE IN LOW LOSS, LOW LATENCY AND LOW JITTER by ensuring that there is always sufficient room in output queues for the contracted expedited forwarding traffic.
@@ -193,6 +213,72 @@
<description>This service is designed to allow ISPs to offer a service with attributes similar to a "leased line". This service offers the ULTIMATE IN LOW LOSS, LOW LATENCY AND LOW JITTER by ensuring that there is always sufficient room in output queues for the contracted expedited forwarding traffic.</description>
<type>checkbox</type>
</field>
+ <field>
+ <name>Plugin Settings - Default Target</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <fielddescr>Enable Default Target Plugin</fielddescr>
+ <fieldname>plugin_defaulttarget</fieldname>
+ <description>Redirect unknown calls to a specified target.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Log redirected calls</fielddescr>
+ <fieldname>plugin_defaulttarget_log</fieldname>
+ <description>Log redirected calls.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Default Target</fielddescr>
+ <fieldname>plugin_defaulttarget_target</fieldname>
+ <description>Target must be a full SIP URI with the syntax sip:user@host[:port]</description>
+ <type>input</type>
+ </field>
+ <field>
+ <name>Plugin Settings - Bogus VIA Networks</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <fielddescr>Enable Fix Bogus Via Networks Plugin</fielddescr>
+ <fieldname>plugin_fix_bogus_via</fieldname>
+ <description>Incoming (from public network) SIP messages are checked for broken SIP Via headers. If the IP address in the latest Via Header is part of the list below, it will be replaced by the IP where the SIP message has been received from.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>Bogus Via Networks</fielddescr>
+ <fieldname>plugin_fix_bogus_via_networks</fieldname>
+ <description>Comma separated list of networks which should have their via headers rewritten. Example: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16</description>
+ <type>input</type>
+ </field>
+ <field>
+ <name>Plugin Settings - STUN</name>
+ <type>listtopic</type>
+ </field>
+ <field>
+ <fielddescr>Enable STUN Plugin</fielddescr>
+ <fieldname>plugin_stun</fieldname>
+ <description>Uses an external STUN server to determine the public IP address of siproxd. Useful for "in-front-of-NAT-router" scenarios.</description>
+ <type>checkbox</type>
+ </field>
+ <field>
+ <fielddescr>STUN Hostname</fielddescr>
+ <fieldname>plugin_stun_server</fieldname>
+ <description>External STUN server hostname.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>STUN Port</fielddescr>
+ <fieldname>plugin_stun_port</fieldname>
+ <description>External STUN server port.</description>
+ <type>input</type>
+ </field>
+ <field>
+ <fielddescr>STUN Period</fielddescr>
+ <fieldname>plugin_stun_period</fieldname>
+ <description>Period in seconds to request IP info from STUN server.</description>
+ <type>input</type>
+ </field>
</fields>
<custom_php_global_functions>
</custom_php_global_functions>