Răsfoiți Sursa

adding debconf option for enabling/disabling rtp proxy

Pavel Kasparek 17 ani în urmă
părinte
comite
5fdc47b111

+ 2 - 0
etc/ser-oob.cfg

@@ -245,7 +245,9 @@ session_timer.min_se = "90" desc "minimum session interval (in s)"
 # "detect" -- detect whether the UAC or the UAS is behind NAT,
 #             and enable the rtp proxy when necessary
 #
+#DEBCONF-RTP_ENABLE-START
 rtp_proxy.enable = "detect" desc "indicates whether the RTP Proxy is enabled or not (0/1/detect)"
+#DEBCONF-RTP_ENABLE-END
 
 # ------------------ Module Loading -----------------------------------------
 

+ 3 - 0
pkg/debian/ser-oob.config

@@ -46,6 +46,9 @@ db_go
 db_input medium ser-oob/RTTPPROXY || true
 db_go
 
+db_input medium ser-oob/RTP_ENABLE || true
+db_go
+
 db_input medium ser-oob/NATPING_INTERVAL || true
 db_go
 

+ 7 - 0
pkg/debian/ser-oob.postinst

@@ -199,6 +199,13 @@ modparam("nathelper", "rtpproxy_sock", "$RET")
 +++
 fi
 
+db_get ser-oob/RTP_ENABLE
+if test "$RET" != "!" ; then
+  fn_config_replace $CONFIGFILE RTP_ENABLE <<+++
+rtp_proxy.enable = "$RET" desc "indicates whether the RTP Proxy is enabled or not (0/1/detect)"
++++
+fi
+
 db_get ser-oob/NATPING_INTERVAL
 if test "$RET" != "!" ; then
   fn_config_replace $CONFIGFILE NATPING_INTERVAL <<+++

+ 13 - 1
pkg/debian/ser-oob.templates

@@ -114,6 +114,18 @@ Description: RTP proxy control socket
  .
  Enter "!" to not modify this option.
 
+Template: ser-oob/RTP_ENABLE
+Type: select
+Choices: 0, 1, detect, !
+Default: detect
+Description: Enable or disable the rtp proxy
+ Select whether to enable or disable using of 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.
+ .
+ Use "!" to not modify this option.
+
 Template: ser-oob/NATPING_INTERVAL
 Type: select
 Choices: 0, 15, !
@@ -121,7 +133,7 @@ Default: 15
 Description: NAT ping interval
  Set NAT ping interval.
  .
- Enter "!" to not modify this option.
+ Use "!" to not modify this option.
 
 Template: ser-oob/DBMODE
 Type: select