* Changes "listen" sems.conf variable to "media_ip".

* Added printing of "outbound_proxy" value (if any) in sems
  configuration at startup.


git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@994 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Juha Heinanen 18 years ago
parent 5ae3065ba9
commit 79219d71ab

@ -171,19 +171,21 @@ int AmConfig::readConfiguration()
if(!ModConfigPath.empty() && (ModConfigPath[ModConfigPath.length()-1] != '/'))
ModConfigPath += '/';
// local_ip
LocalIP = cfg.getParameter("listen");
// listen, sip_ip, sip_port, and media_ip
if(cfg.hasParameter("sip_ip")) {
LocalSIPIP = cfg.getParameter("sip_ip");
}
if(cfg.hasParameter("sip_port")){
if(!setSIPPort(cfg.getParameter("sip_port").c_str())){
ERROR("invalid sip port specified\n");
return -1;
}
}
if(cfg.hasParameter("media_ip")) {
LocalIP = cfg.getParameter("media_ip");
}
if(cfg.hasParameter("sip_ip"))
LocalSIPIP = cfg.getParameter("sip_ip");
// public_ip
if(cfg.hasParameter("public_ip")){
string p_ip = cfg.getParameter("public_ip");
DBG("Setting public_ip parameter to %s.\n", p_ip.c_str());

@ -149,17 +149,14 @@ media_processor_threads=1
# Example:
# session_limit="1000;503;Server overload"
# optional parameter: listen=<ip_address>|<device>
# optional parameter: media_ip=<ip_address>|<device>
#
# - this informs SEMS about the interface where its SER is
# bound to. SEMS needs this information to correctly set
# the contact header in outgoing calls and registrations.
# Should be set to equal the 'listen' configuration option
# in ser_sems.cfg.
# If not set, this defaults to the interface SEMS binds to.
# - 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.
# Examples:
# listen=10.0.0.34
# listen=eth0
# media_ip=10.0.0.34
# media_ip=eth0
# optional parameter: sip_ip=<ip_address>
#
@ -167,15 +164,12 @@ media_processor_threads=1
# bound to or should be bound to. If 'sipctrl' SIP stack is used,
# the SIP stack will bind to this address. This also sets
# the value used for contact header in outgoing calls and
# registrations.
# It defaults to the value of 'listen' (see above).
# registrations. If not set, defaults to first non-loopback
# interface.
#
# Example:
# sip_ip=10.0.0.34
#
# default: <listen ip address>
#
#sip_ip=10.0.0.34
# optional parameter: public_ip=<ip_address>
#
@ -221,10 +215,8 @@ sip_port=5080
#
# default: empty
#
# example:
# Example:
# outbound_proxy=sip:proxy.mydomain.net
#
#outbound_proxy=sip:192.168.0.1
# optional parameter: dead_rtp_time=<unsigned int>
#

@ -257,6 +257,7 @@ int main(int argc, char* argv[])
" public media IP: %s\n"
" local SIP port: %i\n"
" local media IP: %s\n"
" outbound proxy: %s\n"
" application: %s\n"
"\n",
AmConfig::ConfigurationFile.c_str(),
@ -266,6 +267,7 @@ int main(int argc, char* argv[])
AmConfig::PublicIP.c_str(),
AmConfig::LocalSIPPort,
AmConfig::LocalIP.c_str(),
AmConfig::OutboundProxy.c_str(),
AmConfig::Application.empty()?
"<not set>":AmConfig::Application.c_str()
);

Loading…
Cancel
Save