Преглед изворни кода

modules/outbound: moved the check for "Supported: outbound" to after the checks on the Route: header

- In the scenario when a call comes from a non-outbound end-point to an
  outbound end-point the outbound options-tag will not be present, but outbound
  should still be used on the final leg between the edge-proxy and the
  end-point.
Peter Dunkley пре 12 година
родитељ
комит
a1136bf809
1 измењених фајлова са 8 додато и 8 уклоњено
  1. 8 8
      modules/outbound/ob_mod.c

+ 8 - 8
modules/outbound/ob_mod.c

@@ -341,14 +341,6 @@ static int use_outbound_non_reg(struct sip_msg *msg)
 	int ret;
 	struct receive_info *rcv = NULL;
 
-	/* Check if Supported: outbound is included */
-	if (parse_supported(msg) == 0) {
-                if (!(get_supported(msg) & F_OPTION_TAG_OUTBOUND)) {
-		        LM_DBG("outbound is not supported and thus not used\n");
-		        return 0;
-		}
-	}
-
 	/* Check to see if the top Route-URI is me and has a ;ob parameter */
 	if (msg->route
 		|| (parse_headers(msg, HDR_ROUTE_F, 0) != -1 && msg->route))
@@ -408,6 +400,14 @@ static int use_outbound_non_reg(struct sip_msg *msg)
 		}
 	}
 
+	/* Check if Supported: outbound is included */
+	if (parse_supported(msg) == 0) {
+                if (!(get_supported(msg) & F_OPTION_TAG_OUTBOUND)) {
+		        LM_DBG("outbound is not supported and thus not used\n");
+		        return 0;
+		}
+	}
+
 	/* Check there is a single Via: */
 	if (!(parse_headers(msg, HDR_VIA2_F, 0) == -1 || msg->via2 == 0
 		|| msg->via2->error != PARSE_OK))