[sr-dev] git:master:75021d64: Revert "rtpengine: Add rtpengine_allow_op modparam"

Victor Seva linuxmaniac at torreviejawireless.org
Mon Nov 23 12:05:23 CET 2015


Module: kamailio
Branch: master
Commit: 75021d6475ac924252d5ac99a88d9876f50cbb29
URL: https://github.com/kamailio/kamailio/commit/75021d6475ac924252d5ac99a88d9876f50cbb29

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date: 2015-11-23T12:04:38+01:00

Revert "rtpengine: Add rtpengine_allow_op modparam"

This reverts commit 69c156f9c2d2c40faf61e2ebde9f98b933b87baf.

---

Modified: modules/rtpengine/doc/rtpengine_admin.xml
Modified: modules/rtpengine/rtpengine.c

---

Diff:  https://github.com/kamailio/kamailio/commit/75021d6475ac924252d5ac99a88d9876f50cbb29.diff
Patch: https://github.com/kamailio/kamailio/commit/75021d6475ac924252d5ac99a88d9876f50cbb29.patch

---

diff --git a/modules/rtpengine/doc/rtpengine_admin.xml b/modules/rtpengine/doc/rtpengine_admin.xml
index 34e197f..96a490d 100644
--- a/modules/rtpengine/doc/rtpengine_admin.xml
+++ b/modules/rtpengine/doc/rtpengine_admin.xml
@@ -210,30 +210,6 @@ modparam("rtpengine", "rtpengine_tout_ms", 2000)
 </programlisting>
 		</example>
 	</section>
-	<section id="rtpengine.p.rtpengine_allow_op">
-		<title><varname>rtpengine_allow_op</varname> (integer)</title>
-		<para>
-		Enable this to allow finishing the current sessions while denying new sessions for the
-		<emphasis>manually deactivated nodes </emphasis> via kamctl command i.e. "disabled(permanent)" nodes.
-		Probably the manually deactivated machine is still running(did not crash).
-		</para>
-		<para>
-		This is <emphasis>useful</emphasis> when deactivating a node for maintanance and reject new sessions but allow current ones to finish.
-		</para>
-		<para>
-		<emphasis>
-		Default value is <quote>0</quote> to keep the current behaviour.
-		</emphasis>
-		</para>
-		<example>
-		<title>Set <varname>rtpengine_allow_op</varname> parameter</title>
-		<programlisting format="linespecific">
-...
-modparam("rtpengine", "rtpengine_allow_op", 1)
-...
-</programlisting>
-		</example>
-	</section>
 	<section id="rtpengine.p.queried_nodes_limit">
 		<title><varname>queried_nodes_limit</varname> (integer)</title>
 		<para>
diff --git a/modules/rtpengine/rtpengine.c b/modules/rtpengine/rtpengine.c
index 042c477..b3ca011 100644
--- a/modules/rtpengine/rtpengine.c
+++ b/modules/rtpengine/rtpengine.c
@@ -227,7 +227,6 @@ static struct mi_root* mi_show_hash_total(struct mi_root* cmd_tree, void* param)
 
 
 static int rtpengine_disable_tout = 60;
-static int rtpengine_allow_op = 0;
 static int rtpengine_retr = 5;
 static int rtpengine_tout_ms = 1000;
 static int queried_nodes_limit = MAX_RTPP_TRIED_NODES;
@@ -335,7 +334,6 @@ static param_export_t params[] = {
 	{"rtpengine_disable_tout",INT_PARAM, &rtpengine_disable_tout },
 	{"rtpengine_retr",        INT_PARAM, &rtpengine_retr         },
 	{"rtpengine_tout_ms",     INT_PARAM, &rtpengine_tout_ms      },
-	{"rtpengine_allow_op",    INT_PARAM, &rtpengine_allow_op     },
 	{"queried_nodes_limit",   INT_PARAM, &queried_nodes_limit    },
 	{"db_url",                PARAM_STR, &rtpp_db_url },
 	{"table_name",            PARAM_STR, &rtpp_table_name },
@@ -2371,7 +2369,7 @@ select_rtpp_node_new(str callid, int do_test, int op)
 }
 
 /*
- * lookup the hastable (key=callid value=node) and get the old node (e.g. for answer/delete)
+ * lookup the hastable (key=callid value=node) and get the old node
  */
 static struct rtpp_node *
 select_rtpp_node_old(str callid, int do_test, int op)
@@ -2398,22 +2396,11 @@ select_rtpp_node_old(str callid, int do_test, int op)
 			node->rn_url.len, node->rn_url.s, callid.len, callid.len, callid.s);
 	}
 
-	// if node enabled, return it
+	// if node broke, don't send any message
 	if (!node->rn_disabled) {
 		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) {
-			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;
-		}
-		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",
+		LM_DBG("rtpengine hash table lookup find node=%.*s for calllen=%d callid=%.*s, which is disabled!\n",
 			node->rn_url.len, node->rn_url.s, callid.len, callid.len, callid.s);
 	}
 




More information about the sr-dev mailing list