From adb7299d9d00989bd2a01348dbe6e59b4e42630c Mon Sep 17 00:00:00 2001 From: jim-p Date: Fri, 26 Nov 2010 13:24:37 -0500 Subject: Add settings for default target, bogus via, and stun settings. Add section breaks to make the settings more readable. --- config/siproxd.inc | 31 ++++++++++++++++++ config/siproxd.xml | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 121 insertions(+), 4 deletions(-) (limited to 'config') 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 @@ -92,6 +92,16 @@ Enter the port on which to listen for SIP traffic (default 5060). Do not change this unless you know what you're doing. input + + Default expiration timeout + defaulttimeout + 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. + input + + + RTP Settings + listtopic + Enable RTP proxy rtpenable @@ -127,10 +137,8 @@ input - Default expiration timeout - defaulttimeout - 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. - input + Dejittering Settings + listtopic Input Dejitter @@ -144,6 +152,10 @@ Artificial delay to be used to de-jitter RTP data streams. This time is in microseconds. 0 - completely disable dejitter (default) input + + SIP over TCP Settings + listtopic + TCP inactivity timeout tcp_timeout @@ -162,6 +174,10 @@ For TCP SIP signalling, if > 0 empty SIP packets will be sent every 'n' seconds to keep the connection alive. Default is off. input + + Proxy Settings + listtopic + Enable proxy authentication authentication @@ -180,6 +196,10 @@ Enter the port of the outbound proxy to send all traffic to. This is only useful if you have multiple masquerading firewalls to cross. input + + DSCP Settings + listtopic + Expedited RTP Forwarding expeditedforwarding @@ -193,6 +213,72 @@ 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. checkbox + + Plugin Settings - Default Target + listtopic + + + Enable Default Target Plugin + plugin_defaulttarget + Redirect unknown calls to a specified target. + checkbox + + + Log redirected calls + plugin_defaulttarget_log + Log redirected calls. + checkbox + + + Default Target + plugin_defaulttarget_target + Target must be a full SIP URI with the syntax sip:user@host[:port] + input + + + Plugin Settings - Bogus VIA Networks + listtopic + + + Enable Fix Bogus Via Networks Plugin + plugin_fix_bogus_via + 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. + checkbox + + + Bogus Via Networks + plugin_fix_bogus_via_networks + 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 + input + + + Plugin Settings - STUN + listtopic + + + Enable STUN Plugin + plugin_stun + Uses an external STUN server to determine the public IP address of siproxd. Useful for "in-front-of-NAT-router" scenarios. + checkbox + + + STUN Hostname + plugin_stun_server + External STUN server hostname. + input + + + STUN Port + plugin_stun_port + External STUN server port. + input + + + STUN Period + plugin_stun_period + Period in seconds to request IP info from STUN server. + input + -- cgit v1.2.3