Module: sems
Branch: 1.4
Commit: 2faaa4f4fa4653e2fc42b2cfd7097099e274841d
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=2faaa4f4fa4653e2fc42b2cfd7097099e274841d

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Sun May 22 15:40:46 2011 +0200

aligned help in sems.conf.sample with the code in AmConfig.

---

 core/AmConfig.cpp         |    8 +-------
 core/etc/sems.conf.sample |   22 +++++++++++++++-------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/core/AmConfig.cpp b/core/AmConfig.cpp
index 15e393f..3f31930 100644
--- a/core/AmConfig.cpp
+++ b/core/AmConfig.cpp
@@ -575,7 +575,7 @@ static int readInterface(AmConfigReader& cfg, const string& 
i_name)
     intf.LocalIP = cfg.getParameter("media_ip" + suffix);
   }
   else if(!intf.LocalSIPIP.empty()) {
-    DBG("media_ip%s parameter is missing: using same as sip_ip%s",
+    WARN("media_ip%s parameter is missing: using same as sip_ip%s",
        suffix.c_str(),suffix.c_str());
     intf.LocalIP = intf.LocalSIPIP;
   }
@@ -759,12 +759,6 @@ static string getLocalIP(const string& dev_name)
     }
   }
 
-  if(ifr.ifr_flags & IFF_LOOPBACK){
-    WARN("Media advertising using loopback address!\n"
-         "Try to use another network interface if your SEMS "
-         "should be accessible from the rest of the world.\n");
-  }
-
  error:
   close(sd);
   return local_ip;
diff --git a/core/etc/sems.conf.sample b/core/etc/sems.conf.sample
index a574046..d8af7f0 100644
--- a/core/etc/sems.conf.sample
+++ b/core/etc/sems.conf.sample
@@ -21,8 +21,10 @@
 # optional parameter: media_ip=<ip_address>|<device>
 # 
 # - this informs SEMS about the IP address or interface that 
-#   SEMS uses to send and receive media.  If not set, defaults 
-#   to first non-loopback interface.
+#   SEMS uses to send and receive media.  
+# - If neither 'media_ip' nor 'sip_ip' are set, defaults 
+#   to first non-loopback interface. If 'sip_ip' is set,
+#   'media_ip' defaults to 'sip_ip.
 #
 # Examples: 
 #  media_ip=10.0.0.34
@@ -33,8 +35,10 @@
 # - this informs SEMS about the SIP IP where its SIP stack is 
 #   bound to or should be bound to. This also sets 
 #   the value used for contact header in outgoing calls and 
-#   registrations. If not set, defaults to first non-loopback
-#   interface.
+#   registrations.
+# - If neither 'media_ip' nor 'sip_ip' are set, defaults 
+#   to first non-loopback interface. If 'media_ip' is set,
+#   'sip_ip' defaults to 'media_ip.
 #
 # Example:
 #  sip_ip=10.0.0.34
@@ -125,11 +129,15 @@ rtp_high_port=60000
 #   additional_interfaces = <list of interfaces>
 #
 # For each additional interface, a set of parameters
-# suffixed with the interface name should be defined.
+# suffixed with the interface name should be listed
+# with the 'additional_interfaces' parameter.
 #
 # Please note that for each additional interface,
-# 'sip_ip' is mandatory. The other
-# parameters are optional.
+# 'sip_ip_[if_name]' is mandatory. The other
+# parameters are optional. 'media_ip_[if_name]'
+# is derived from 'sip_ip_[if_name]' if not set.
+# 'public_ip_[ip_name]' is also based on 'sip_ip_[if_name]'
+# if not set explicitly.
 # 
 # Example:
 #  additional_interfaces=intern,extern

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to