aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-04-16 20:01:47 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-19 07:26:28 +0000
commit6c548dc615543a8b33306185f111329ffb31d6d0 (patch)
treecf72070afb02899c4d75bc799aee7c33bfc4532a /src
parentbad82d31a9aa4016c37e25be3022442e541004f6 (diff)
vty: Add option to enable osmux towards MSC
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/osmo_bsc_vty.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c
index 78196cfc4..4591ad19a 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 @@ static void write_msc(struct vty *vty, struct bsc_msc_data *msc)
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 @@ DEFUN(cfg_msc_no_mgw_x_osmo_ign,
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 @@ int bsc_vty_init_extra(void)
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;
}