diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-06-03 12:24:27 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-06-03 12:26:42 +0200 |
commit | 1f1c56c62279bbe4203f8d8a8e8e4a771f3b4eda (patch) | |
tree | ad69f871346d1fe9b25b9d728d8355a6601c9a68 /src | |
parent | c997ceb750a67baef1a05590febe1c678b287d8f (diff) |
LCLS: add VTY config to enable/disable LCLS on per-MSC basis
The user might not want to enable LCLS support for administrative
reasons. So let's keep it disabled by default, until somebody
explicitly enables it with "lcls-mode mgw-loop".
In the future, we may want to introduce a "lcls-mode bts-loop" where we
don't loop at the BSC-colocated MGW, but where we instruct the BTSs to
feed the RTP directly to each other. This would require a
falt/transparent IP routing between the BTSs in the RAN.
Change-Id: Ied7985056c8cd182bf16119007a08cc5be14459b
Related: OS#1602
Diffstat (limited to 'src')
-rw-r--r-- | src/libbsc/osmo_bsc_lcls.c | 6 | ||||
-rw-r--r-- | src/osmo-bsc/osmo_bsc_vty.c | 21 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/libbsc/osmo_bsc_lcls.c b/src/libbsc/osmo_bsc_lcls.c index e32376d43..c2b076090 100644 --- a/src/libbsc/osmo_bsc_lcls.c +++ b/src/libbsc/osmo_bsc_lcls.c @@ -286,6 +286,12 @@ static void lcls_no_lcls_fn(struct osmo_fsm_inst *fi, uint32_t event, void *data /* we're just starting and cannot yet have a correlated call */ OSMO_ASSERT(conn->lcls.other == NULL); + if (conn->sccp.msc->lcls_mode == BSC_LCLS_MODE_DISABLED) { + LOGPFSML(fi, LOGL_DEBUG, "LCLS disabled for this MSC, ignoring %s\n", + osmo_fsm_event_name(fi->fsm, event)); + return; + } + /* If there's no GCR set, we can never leave this state */ if (conn->lcls.global_call_ref_len == 0) { LOGPFSML(fi, LOGL_NOTICE, "No GCR set, ignoring %s\n", diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index 34080c0d1..e6df7b351 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -38,6 +38,12 @@ #define IPA_STR "IP.ACCESS specific\n" +static const struct value_string bsc_lcls_mode_names[] = { + { BSC_LCLS_MODE_DISABLED, "disabled" }, + { BSC_LCLS_MODE_MGW_LOOP, "mgw-loop" }, + { 0, NULL } +}; + static struct osmo_bsc_data *osmo_bsc_data(struct vty *vty) { return bsc_gsmnet->bsc_data; @@ -175,6 +181,8 @@ static void write_msc(struct vty *vty, struct bsc_msc_data *msc) msc->a.msc_addr_name, VTY_NEWLINE); } vty_out(vty, " asp-protocol %s%s", osmo_ss7_asp_protocol_name(msc->a.asp_proto), VTY_NEWLINE); + vty_out(vty, " lcls-mode %s%s", get_value_string(bsc_lcls_mode_names, msc->lcls_mode), + VTY_NEWLINE); /* write MGW configuration */ mgcp_client_config_write(vty, " "); @@ -628,6 +636,18 @@ DEFUN(cfg_msc_cs7_asp_proto, return CMD_SUCCESS; } +DEFUN(cfg_net_msc_lcls_mode, + cfg_net_msc_lcls_mode_cmd, + "lcls-mode (disabled|mgw-loop)", + "Configure 3GPP LCLS (Local Call, Local Switch)\n" + "Disable LCLS for all calls of this MSC\n" + "Enable LCLS with loopping traffic in MGW\n") +{ + struct bsc_msc_data *data = bsc_msc_data(vty); + data->lcls_mode = get_string_value(bsc_lcls_mode_names, argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_net_bsc_mid_call_text, cfg_net_bsc_mid_call_text_cmd, "mid-call-text .TEXT", @@ -903,6 +923,7 @@ int bsc_vty_init_extra(void) install_element(MSC_NODE, &cfg_net_msc_amr_5_90_cmd); install_element(MSC_NODE, &cfg_net_msc_amr_5_15_cmd); install_element(MSC_NODE, &cfg_net_msc_amr_4_75_cmd); + install_element(MSC_NODE, &cfg_net_msc_lcls_mode_cmd); install_element(MSC_NODE, &cfg_msc_acc_lst_name_cmd); install_element(MSC_NODE, &cfg_msc_no_acc_lst_name_cmd); install_element(MSC_NODE, &cfg_msc_cs7_bsc_addr_cmd); |