|
@@ -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") {
|