diff --git a/core/AmConfig.cpp b/core/AmConfig.cpp index 15e393f2..3f31930c 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 a574046b..d8af7f0e 100644 --- a/core/etc/sems.conf.sample +++ b/core/etc/sems.conf.sample @@ -21,8 +21,10 @@ # optional parameter: media_ip=| # # - 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 = # # 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