Browse code

c/f: fix outbound interface evaluation

Stefan Sayer authored on 21/12/2013 22:38:03
Showing 1 changed files
... ...
@@ -835,7 +835,23 @@ bool SBCCallProfile::evaluate(ParamReplacerCtx& ctx,
835 835
 
836 836
 
837 837
 bool SBCCallProfile::evaluateOutboundInterface() {
838
-  REPLACE_IFACE_SIP(outbound_interface, outbound_interface_value);
838
+  if (outbound_interface == "default") {
839
+    outbound_interface_value = 0;
840
+  } else {
841
+    map<string,unsigned short>::iterator name_it =
842
+      AmConfig::SIP_If_names.find(outbound_interface);
843
+    if (name_it != AmConfig::RTP_If_names.end()) {
844
+      outbound_interface_value = name_it->second;
845
+    } else {
846
+      ERROR("selected outbound_interface '%s' does not exist as a signaling"
847
+	    " interface. "
848
+	    "Please check the 'additional_interfaces' "
849
+	    "parameter in the main configuration file.",
850
+	    outbound_interface.c_str());
851
+      return false;
852
+    }
853
+  }
854
+
839 855
   return true;
840 856
 }
841 857