Module: sems Branch: master Commit: 51044735f19bd5f28e333dcb5ee3c4b150375ada URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=51044735f19bd5f28e333dcb5ee3c4b150375ada
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Sat Dec 21 23:38:03 2013 +0100 c/f: fix outbound interface evaluation --- apps/sbc/SBCCallProfile.cpp | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/apps/sbc/SBCCallProfile.cpp b/apps/sbc/SBCCallProfile.cpp index ec6b41e..e39dc11 100644 --- a/apps/sbc/SBCCallProfile.cpp +++ b/apps/sbc/SBCCallProfile.cpp @@ -835,7 +835,23 @@ bool SBCCallProfile::evaluate(ParamReplacerCtx& ctx, bool SBCCallProfile::evaluateOutboundInterface() { - REPLACE_IFACE_SIP(outbound_interface, outbound_interface_value); + if (outbound_interface == "default") { + outbound_interface_value = 0; + } else { + map<string,unsigned short>::iterator name_it = + AmConfig::SIP_If_names.find(outbound_interface); + if (name_it != AmConfig::RTP_If_names.end()) { + outbound_interface_value = name_it->second; + } else { + ERROR("selected outbound_interface '%s' does not exist as a signaling" + " interface. " + "Please check the 'additional_interfaces' " + "parameter in the main configuration file.", + outbound_interface.c_str()); + return false; + } + } + return true; } _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
