Change in osmo-bsc[master]: lcls: do not LCLS call legs with different codecs

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

dexter gerrit-no-reply at lists.osmocom.org
Tue Jul 10 13:17:46 UTC 2018


dexter has uploaded this change for review. ( 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, 31 insertions(+), 0 deletions(-)



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

diff --git a/include/osmocom/bsc/bsc_msc_data.h b/include/osmocom/bsc/bsc_msc_data.h
index 7235fba..4b39526 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -92,6 +92,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 b197e66..ab00418 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -273,6 +273,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..709e783 100644
--- a/src/osmo-bsc/osmo_bsc_vty.c
+++ b/src/osmo-bsc/osmo_bsc_vty.c
@@ -650,6 +650,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 +955,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: newchange
Gerrit-Change-Id: I157549129a40c64364dc126f67195759e5f1d60f
Gerrit-Change-Number: 9940
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180710/338083d3/attachment.htm>


More information about the gerrit-log mailing list