aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_lcls.c
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-07-10 09:32:27 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2018-08-08 13:02:58 +0200
commit48338570e1035825e9a5f6f100509cc82ea6d28c (patch)
treedf23c2951980d6f785e17df9f6a474b5b3c10878 /src/osmo-bsc/osmo_bsc_lcls.c
parent628a05e738b5f37e2fecd544780240e56db54036 (diff)
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
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_lcls.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_lcls.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c
index 4639c4e36..6aeccb3bb 100644
--- a/src/osmo-bsc/osmo_bsc_lcls.c
+++ b/src/osmo-bsc/osmo_bsc_lcls.c
@@ -274,6 +274,18 @@ static bool lcls_enable_possible(struct gsm_subscriber_connection *conn)
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;
}