[PATCH] openbsc[master]: VTY: add the dyn_ts_allow_tch_f option

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Fri Mar 31 16:33:43 UTC 2017


Review at  https://gerrit.osmocom.org/2190

VTY: add the dyn_ts_allow_tch_f option

This option allows to enable or disable TCH/F allocation on the
TCH/F_TCH/H_PDCH timeslots. Until now, source code modification
was required to enable this feature.

See http://osmocom.org/issues/1778 for details.

Change-Id: Id18cab25844dc854a66b4e2713e90c3f43afa712
---
M openbsc/include/openbsc/gsm_data.h
M openbsc/src/libbsc/bsc_vty.c
M openbsc/src/libcommon-cs/common_cs_vty.c
M openbsc/src/osmo-nitb/bsc_hack.c
4 files changed, 29 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/90/2190/1

diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index e9ba173..284d053 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -384,7 +384,6 @@
 
 	/* Allow or disallow TCH/F on dynamic TCH/F_TCH/H_PDCH; OS#1778 */
 	bool dyn_ts_allow_tch_f;
-	/* TODO: vty for this; related: OS#1781 */
 
 	/* all active subscriber connections. */
 	struct llist_head subscr_conns;
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b1747aa..66b30cd 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -821,6 +821,8 @@
 	vty_out(vty, " timer t3119 %u%s", gsmnet->T3119, VTY_NEWLINE);
 	vty_out(vty, " timer t3122 %u%s", gsmnet->T3122, VTY_NEWLINE);
 	vty_out(vty, " timer t3141 %u%s", gsmnet->T3141, VTY_NEWLINE);
+	vty_out(vty, " dyn_ts_allow_tch_f %d%s",
+		gsmnet->dyn_ts_allow_tch_f ? 1 : 0, VTY_NEWLINE);
 	vty_out(vty, " subscriber-keep-in-ram %d%s",
 		gsmnet->subscr_group->keep_subscr, VTY_NEWLINE);
 	if (gsmnet->tz.override != 0) {
diff --git a/openbsc/src/libcommon-cs/common_cs_vty.c b/openbsc/src/libcommon-cs/common_cs_vty.c
index 08a7581..76336a1 100644
--- a/openbsc/src/libcommon-cs/common_cs_vty.c
+++ b/openbsc/src/libcommon-cs/common_cs_vty.c
@@ -197,6 +197,18 @@
 	return CMD_SUCCESS;
 }
 
+DEFUN(cfg_net_dyn_ts_allow_tch_f,
+      cfg_net_dyn_ts_allow_tch_f_cmd,
+      "dyn_ts_allow_tch_f (0|1)",
+      "Allow or disallow allocating TCH/F on TCH_F_TCH_H_PDCH timeslots\n"
+      "Disallow TCH/F on TCH_F_TCH_H_PDCH (default)\n"
+      "Allow TCH/F on TCH_F_TCH_H_PDCH\n")
+{
+	struct gsm_network *gsmnet = gsmnet_from_vty(vty);
+	gsmnet->dyn_ts_allow_tch_f = atoi(argv[0]) ? true : false;
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_net_subscr_keep,
       cfg_net_subscr_keep_cmd,
       "subscriber-keep-in-ram (0|1)",
@@ -295,6 +307,7 @@
 	install_element(GSMNET_NODE, &cfg_net_timezone_cmd);
 	install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd);
 	install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd);
+	install_element(GSMNET_NODE, &cfg_net_dyn_ts_allow_tch_f_cmd);
 
 	return CMD_SUCCESS;
 }
diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index dd90b8b..73a070f 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -301,6 +301,20 @@
 	} else
 		DEBUGP(DMNCC, "Using internal MNCC handler.\n");
 
+	/*
+	* For osmo-nitb, skip TCH/F for now, because otherwise dyn TS
+	* always imply the possibility to have a mix of TCH/F and
+	* TCH/H channels; if two phones request a TCH/F and a TCH/H,
+	* respectively, they cannot call each other. If we deny TCH/F,
+	* they will both fall back to TCH/H, and dynamic channels are
+	* usable. See http://osmocom.org/issues/1778.
+	*
+	* A third-party MSC may well be able to handle a TCH/H TCH/F
+	* mismatch. Moreover, this option may be overwritten in the
+	* config file or in VTY.
+	*/
+	bsc_gsmnet->dyn_ts_allow_tch_f = false;
+
 	/* Read the config */
 	rc = bsc_network_configure(config_file);
 	if (rc < 0) {
@@ -312,19 +326,6 @@
 	smpp_openbsc_start(bsc_gsmnet);
 #endif
 	bsc_api_init(bsc_gsmnet, msc_bsc_api());
-
-	/*
-	 * For osmo-nitb, skip TCH/F for now, because otherwise dyn TS
-	 * always imply the possibility to have a mix of TCH/F and
-	 * TCH/H channels; if two phones request a TCH/F and a TCH/H,
-	 * respectively, they cannot call each other. If we deny TCH/F,
-	 * they will both fall back to TCH/H, and dynamic channels are
-	 * usable. See http://osmocom.org/issues/1778.
-	 *
-	 * A third-party MSC may well be able to handle a TCH/H TCH/F
-	 * mismatch.
-	 */
-	bsc_gsmnet->dyn_ts_allow_tch_f = false;
 
 	/* start control interface after reading config for
 	 * ctrl_vty_get_bind_addr() */

-- 
To view, visit https://gerrit.osmocom.org/2190
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id18cab25844dc854a66b4e2713e90c3f43afa712
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list