Răsfoiți Sursa

rtpengine: Allow op for all deactivated machines

If allow_op modparam enabled, send commands to the disabled machines for the
existing call. So far this was done only for manually deactivated machines.
This is useful because there might be cases of proxy timeout, cases when you
may want to still allow the operations for the existing calls.
Stefan Mititelu 9 ani în urmă
părinte
comite
5a53750614
1 a modificat fișierele cu 7 adăugiri și 9 ștergeri
  1. 7 9
      modules/rtpengine/rtpengine.c

+ 7 - 9
modules/rtpengine/rtpengine.c

@@ -2452,18 +2452,16 @@ select_rtpp_node(str callid, str viabranch, int do_test)
 		return node;
 	}
 
-	// if node _manually_ disabled(e.g kamctl) and proper configuration, return it
-	if (node->rn_recheck_ticks == MI_MAX_RECHECK_TICKS) {
-		if (rtpengine_allow_op) {
+	// if proper configuration and node manually or timeout disabled, return it
+	if (rtpengine_allow_op) {
+		if (node->rn_recheck_ticks == MI_MAX_RECHECK_TICKS) {
 			LM_DBG("node=%.*s for calllen=%d callid=%.*s is disabled(permanent) (probably still UP)! Return it\n",
 				node->rn_url.len, node->rn_url.s, callid.len, callid.len, callid.s);
-			return node;
+		} else {
+			LM_DBG("node=%.*s for calllen=%d callid=%.*s is disabled, either broke or timeout disabled! Return it\n",
+				node->rn_url.len, node->rn_url.s, callid.len, callid.len, callid.s);
 		}
-		LM_DBG("node=%.*s for calllen=%d callid=%.*s is disabled(permanent) (probably still UP)! Return NULL\n",
-			node->rn_url.len, node->rn_url.s, callid.len, callid.len, callid.s);
-	} else {
-		LM_DBG("node=%.*s for calllen=%d callid=%.*s is disabled (probably BROKE)! Return NULL\n",
-			node->rn_url.len, node->rn_url.s, callid.len, callid.len, callid.s);
+		return node;
 	}
 
 	return NULL;