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/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9940 ) Change subject: lcls: do not LCLS call legs with different codecs ...................................................................... lcls: do not LCLS call legs with different codecs It is theoretically possible to LCLS two legs that use different codecs. However, this requires transcoding capabilities on the local MGW. If the local MGW lacks transcoding features such a local circuit should be avoided. Enabeling LCLS under such coditions should be optional (VTY) - Add check to avoid LCLS on different codec/rate - Add VTY-Option to optionally override the check (MGW is able to transcode) Change-Id: I157549129a40c64364dc126f67195759e5f1d60f Related: OS#1602 --- M include/osmocom/bsc/bsc_msc_data.h M src/osmo-bsc/osmo_bsc_lcls.c M src/osmo-bsc/osmo_bsc_vty.c 3 files changed, 36 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h index 79d2eca..7ec3442 100644 --- a/include/osmocom/bsc/bsc_msc_data.h +++ b/include/osmocom/bsc/bsc_msc_data.h @@ -87,6 +87,7 @@ struct gsm_audio_support **audio_support; int audio_length; enum bsc_lcls_mode lcls_mode; + bool lcls_codec_mismatch_allow; /* ussd welcome text */ char *ussd_welcome_txt; diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index 4639c4e..6aeccb3 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -274,6 +274,18 @@ return false; } + if (conn->user_plane.full_rate != conn->lcls.other->user_plane.full_rate + && conn->sccp.msc->lcls_codec_mismatch_allow == false) { + LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismiatch (channel rate)\n"); + return false; + } + + if (conn->user_plane.chan_mode != conn->lcls.other->user_plane.chan_mode + && conn->sccp.msc->lcls_codec_mismatch_allow == false) { + LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismiatch (channel mode)\n"); + return false; + } + return true; } diff --git a/src/osmo-bsc/osmo_bsc_vty.c b/src/osmo-bsc/osmo_bsc_vty.c index f6f1b8a..efa12e0 100644 --- a/src/osmo-bsc/osmo_bsc_vty.c +++ b/src/osmo-bsc/osmo_bsc_vty.c @@ -184,6 +184,11 @@ vty_out(vty, " lcls-mode %s%s", get_value_string(bsc_lcls_mode_names, msc->lcls_mode), VTY_NEWLINE); + if (msc->lcls_codec_mismatch_allow) + vty_out(vty, " lcls-codec-mismatch allowed%s", VTY_NEWLINE); + else + vty_out(vty, " lcls-codec-mismatch forbidden%s", VTY_NEWLINE); + /* write MGW configuration */ mgcp_client_config_write(vty, " "); } @@ -650,6 +655,23 @@ return CMD_SUCCESS; } +DEFUN(cfg_net_msc_lcls_mismtch, + cfg_net_msc_lcls_mismtch_cmd, + "lcls-codec-mismatch (allowed|forbidden)", + "Allow 3GPP LCLS (Local Call, Local Switch) when call legs use different codec/rate\n" + "Allow LCLS only only for calls that use the same codec/rate on both legs\n" + "Do not Allow LCLS for calls that use a different codec/rate on both legs\n") +{ + struct bsc_msc_data *data = bsc_msc_data(vty); + + if (strcmp(argv[0], "allowed") == 0) + data->lcls_codec_mismatch_allow = true; + else + data->lcls_codec_mismatch_allow = false; + + return CMD_SUCCESS; +} + DEFUN(cfg_net_bsc_mid_call_text, cfg_net_bsc_mid_call_text_cmd, "mid-call-text .TEXT", @@ -938,6 +960,7 @@ 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_net_msc_lcls_mismtch_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); -- To view, visit https://gerrit.osmocom.org/9940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I157549129a40c64364dc126f67195759e5f1d60f Gerrit-Change-Number: 9940 Gerrit-PatchSet: 4 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-Assignee: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180813/681c3062/attachment.htm>