vty: Add option to enable osmux towards BSCs
Change-Id: I6de1be0322ddbdc115074ebb6be2598ebf6c95db
This commit is contained in:
parent
a10d79eab1
commit
4faff9ef86
|
@ -28,6 +28,7 @@ noinst_HEADERS = \
|
|||
msc_t_remote.h \
|
||||
msub.h \
|
||||
neighbor_ident.h \
|
||||
osmux.h \
|
||||
paging.h \
|
||||
ran_conn.h \
|
||||
ran_infra.h \
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <osmocom/msc/neighbor_ident.h>
|
||||
|
||||
#include "gsm_data_shared.h"
|
||||
#include "osmux.h"
|
||||
|
||||
/** annotations for msgb ownership */
|
||||
#define __uses
|
||||
|
@ -231,6 +232,9 @@ struct gsm_network {
|
|||
uint64_t range_end;
|
||||
uint64_t next;
|
||||
} handover_number;
|
||||
|
||||
/* Whether we want to use Osmux against BSCs. Controlled via VTY */
|
||||
enum osmux_usage use_osmux;
|
||||
};
|
||||
|
||||
struct osmo_esme;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
enum osmux_usage {
|
||||
/* MSC won't use Osmux in call legs towards its RAN */
|
||||
OSMUX_USAGE_OFF = 0,
|
||||
/* MSC will use Osmux in call legs towards RAN as long as RAN announced support for it */
|
||||
OSMUX_USAGE_ON = 1,
|
||||
/* MSC will always use Osmux in call legs towards its RAN, and will
|
||||
reject calls for RANs which didn't announce support for it */
|
||||
OSMUX_USAGE_ONLY = 2,
|
||||
};
|
|
@ -59,6 +59,7 @@
|
|||
#include <osmocom/msc/gsm_04_14.h>
|
||||
#include <osmocom/msc/signal.h>
|
||||
#include <osmocom/msc/mncc_int.h>
|
||||
#include <osmocom/msc/osmux.h>
|
||||
#include <osmocom/msc/rrlp.h>
|
||||
#include <osmocom/msc/vlr_sgs.h>
|
||||
#include <osmocom/msc/sgs_vty.h>
|
||||
|
@ -565,6 +566,22 @@ DEFUN(cfg_msc_handover_number_range, cfg_msc_handover_number_range_cmd,
|
|||
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")
|
||||
{
|
||||
if (strcmp(argv[0], "off") == 0)
|
||||
gsmnet->use_osmux = OSMUX_USAGE_OFF;
|
||||
else if (strcmp(argv[0], "on") == 0)
|
||||
gsmnet->use_osmux = OSMUX_USAGE_ON;
|
||||
else if (strcmp(argv[0], "only") == 0)
|
||||
gsmnet->use_osmux = OSMUX_USAGE_ONLY;
|
||||
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
static int config_write_msc(struct vty *vty)
|
||||
{
|
||||
vty_out(vty, "msc%s", VTY_NEWLINE);
|
||||
|
@ -615,6 +632,11 @@ static int config_write_msc(struct vty *vty)
|
|||
gsmnet->handover_number.range_start, gsmnet->handover_number.range_end,
|
||||
VTY_NEWLINE);
|
||||
|
||||
if (gsmnet->use_osmux != OSMUX_USAGE_OFF) {
|
||||
vty_out(vty, " osmux %s%s", gsmnet->use_osmux == OSMUX_USAGE_ON ? "on" : "only",
|
||||
VTY_NEWLINE);
|
||||
}
|
||||
|
||||
mgcp_client_config_write(vty, " ");
|
||||
#ifdef BUILD_IU
|
||||
ranap_iu_vty_config_write(vty, " ");
|
||||
|
@ -1757,6 +1779,7 @@ void msc_vty_init(struct gsm_network *msc_network)
|
|||
install_element(MSC_NODE, &cfg_msc_emergency_msisdn_cmd);
|
||||
install_element(MSC_NODE, &cfg_msc_sms_over_gsup_cmd);
|
||||
install_element(MSC_NODE, &cfg_msc_no_sms_over_gsup_cmd);
|
||||
install_element(MSC_NODE, &cfg_msc_osmux_cmd);
|
||||
install_element(MSC_NODE, &cfg_msc_handover_number_range_cmd);
|
||||
|
||||
neighbor_ident_vty_init(msc_network);
|
||||
|
|
|
@ -45,6 +45,7 @@ OsmoMSC(config-msc)# list
|
|||
emergency-call route-to-msisdn MSISDN
|
||||
sms-over-gsup
|
||||
no sms-over-gsup
|
||||
osmux (on|off|only)
|
||||
handover-number range MSISDN_FIRST MSISDN_LAST
|
||||
neighbor (a|iu) lac <0-65535> (ran-pc|msc-ipa-name) RAN_PC_OR_MSC_IPA_NAME
|
||||
neighbor (a|iu) lac-ci <0-65535> <0-65535> (ran-pc|msc-ipa-name) RAN_PC_OR_MSC_IPA_NAME
|
||||
|
|
Loading…
Reference in New Issue