Change in osmo-bsc[master]: vty: Add option to enable osmux towards MSC

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed May 8 17:05:22 UTC 2019


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13922


Change subject: vty: Add option to enable osmux towards MSC
......................................................................

vty: Add option to enable osmux towards MSC

Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74
---
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/bsc_msc_data.h
A include/osmocom/bsc/osmux.h
M src/osmo-bsc/osmo_bsc_vty.c
4 files changed, 36 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/22/13922/1

diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 89323c0..f44e7fc 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -41,6 +41,7 @@
 	osmo_bsc_rf.h \
 	osmo_bsc_sigtran.h \
 	bsc_msc_data.h \
+	osmux.h \
 	paging.h \
 	pcu_if.h \
 	pcuif_proto.h \
diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index debd240..271bdd4 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -30,6 +30,7 @@
 
 #include "debug.h"
 #include "osmo_bsc_lcls.h"
+#include "osmux.h"
 
 #include <osmocom/core/timer.h>
 #include <osmocom/gsm/protocol/gsm_04_08.h>
@@ -129,6 +130,9 @@
 
 	uint32_t x_osmo_ign;
 	bool x_osmo_ign_configured;
+
+	/* Whether we want to use Osmux against this MSC. Controlled via VTY */
+	enum osmux_usage use_osmux;
 };
 
 /*
diff --git a/include/osmocom/bsc/osmux.h b/include/osmocom/bsc/osmux.h
new file mode 100644
index 0000000..aa3d1ab
--- /dev/null
+++ b/include/osmocom/bsc/osmux.h
@@ -0,0 +1,7 @@
+#pragma once
+
+enum osmux_usage {
+	OSMUX_USAGE_OFF = 0,
+	OSMUX_USAGE_ON = 1,
+	OSMUX_USAGE_ONLY = 2,
+};
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 78196cf..4591ad1 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -26,6 +26,7 @@
 #include <osmocom/bsc/bsc_subscriber.h>
 #include <osmocom/bsc/debug.h>
 #include <osmocom/bsc/bsc_msg_filter.h>
+#include <osmocom/bsc/osmux.h>
 
 #include <osmocom/core/talloc.h>
 #include <osmocom/gsm/gsm48.h>
@@ -197,6 +198,11 @@
 		else
 			vty_out(vty, " mgw x-osmo-ign call-id%s", VTY_NEWLINE);
 	}
+
+	if (msc->use_osmux != OSMUX_USAGE_OFF) {
+		vty_out(vty, " osmux %s%s", msc->use_osmux == OSMUX_USAGE_ON ? "on" : "only",
+			VTY_NEWLINE);
+	}
 }
 
 static int config_write_msc(struct vty *vty)
@@ -708,6 +714,23 @@
 	return CMD_SUCCESS;
 }
 
+#define OSMUX_STR "RTP multiplexing\n"
+DEFUN(cfg_msc_osmux,
+      cfg_msc_osmux_cmd,
+      "osmux (on|off|only)",
+       OSMUX_STR "Enable OSMUX\n" "Disable OSMUX\n" "Only use OSMUX\n")
+{
+	struct bsc_msc_data *msc = bsc_msc_data(vty);
+	if (strcmp(argv[0], "off") == 0)
+		msc->use_osmux = OSMUX_USAGE_OFF;
+	else if (strcmp(argv[0], "on") == 0)
+		msc->use_osmux = OSMUX_USAGE_ON;
+	else if (strcmp(argv[0], "only") == 0)
+		msc->use_osmux = OSMUX_USAGE_ONLY;
+
+	return CMD_SUCCESS;
+}
+
 DEFUN(cfg_net_bsc_mid_call_text,
       cfg_net_bsc_mid_call_text_cmd,
       "mid-call-text .TEXT",
@@ -1045,6 +1068,7 @@
 	mgcp_client_vty_init(net, MSC_NODE, net->mgw.conf);
 	install_element(MSC_NODE, &cfg_msc_mgw_x_osmo_ign_cmd);
 	install_element(MSC_NODE, &cfg_msc_no_mgw_x_osmo_ign_cmd);
+	install_element(MSC_NODE, &cfg_msc_osmux_cmd);
 
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/13922
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I30c485c022f2d55e0a004f69b2503da7f91ecb74
Gerrit-Change-Number: 13922
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190508/be26afe7/attachment.htm>


More information about the gerrit-log mailing list