From: Miklos Tirpak Date: Fri, 12 Sep 2008 11:01:19 +0000 (+0000) Subject: rtp_proxy.enable configuration option is introduced, the following X-Git-Tag: sr_before_modules_merge~199 X-Git-Url: http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff_plain;h=db4a19318ca0e6521af6ed4a9ba96192a578abd1 rtp_proxy.enable configuration option is introduced, the following values are supported: "0" -- disable "1" -- enable "detect" -- detect whether the UAC or the UAS is behind NAT, and enable the RTP Proxy when necessary WARNING: disabling the RTP Proxy runtime may leave the RTP sessions being proxied unmaintained. --- diff --git a/etc/ser-oob.cfg b/etc/ser-oob.cfg index 2444f154e3..915ec7b631 100644 --- a/etc/ser-oob.cfg +++ b/etc/ser-oob.cfg @@ -237,6 +237,15 @@ session_timer.default = "1800" desc "default session interval (in s)" # session_timer.min_se = "90" desc "minimum session interval (in s)" +# RTP Proxy options +# +# Whether to enable or disable the rtp proxy. Possible values are: +# "0" -- always disable +# "1" -- always enable regardless of whether UAC or UAS is behind NAT +# "detect" -- detect whether the UAC or the UAS is behind NAT, +# and enable the rtp proxy when necessary +# +rtp_proxy.enable = "detect" desc "indicates whether the RTP Proxy is enabled or not (0/1/detect)" # ------------------ Module Loading ----------------------------------------- @@ -720,10 +729,19 @@ route[NAT_DETECTION] # route[RTPPROXY] { - # If no NAT is involved we dont have to do here anything. - if (!isflagset(FLAG_NAT)) { + if (@cfg_get.rtp_proxy.enable == "0") { + # RTP Proxy is disabled break; - } + } else if (@cfg_get.rtp_proxy.enable == "detect") { + if (!isflagset(FLAG_NAT)) { + # If no NAT is involved we don't have to do here anything. + break; + } + } else if (@cfg_get.rtp_proxy.enable != "1") { + # This is not a valid setting + xlog("L_ERR", "Unknown option for rtp_proxy.enable: %@cfg_get.rtp_proxy.enable\n"); + break; + } # else rtp proxy is permanently enabled # If the message terminates a dialog turn RTP proxy off. if (method == "BYE" || method == "CANCEL") {