Project

General

Profile

Feature #1602

BSC side of LCLS (local call local switching) as per the 3GPP specs

Added by laforge over 5 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
-
Start date:
02/23/2016
Due date:
% Done:

100%

Spec Reference:
Tags:

Description

Some deployments use OsmoBSC with its support to connect to multiple MSCs simultaneously in order to have local call switching.

Let's study the 3GPP LCLS feature and see how that can help us in that regard, maybe it has a better/cleaner/more standard way to do it?


Checklist

  • LCLS implementation in OsmoBSC
  • test suite to test LCLS in OsmoBSC
  • jenkins / CI integration of test suite
  • wireshark support
  • prevent LCLS enabling on calls of different codecs
  • add vty/config command to enable/disable LCLS on per-MSC basis
  • logging of related BSSMAP messages, not just FSM auto-logging

Related issues

Related to OsmoMSC - Feature #2487: MSC side of LCLS (local call local switching) as per the 3GPP specsIn Progress09/03/2017

Related to OsmoBSC - Feature #3586: support LCLS for inter-BSC handoverNew09/24/2018

Related to OsmoBSC - Feature #3659: handover during LCLS directly between BTSsStalled10/17/2018

Associated revisions

Revision c997ceb7 (diff)
Added by laforge over 3 years ago

Add initial 3GPP LCLS support to OsmoBSC

This code contains the following code:
  • receive/parse/interpret LCLS specific BSSMAP IEs and PDUs
  • osmo_fsm handling the various states and their transitions
  • call leg correlation (finding the other subscr_conn with same GCR)
  • communication between the two call-leg LCLS FSMs
  • detection of supported / unsupported LCLS configurations
  • display of GCR / LCLS information in "show conns"
  • switch the media streams locally using MDCX to the MGW

Closes: OS#1602
Change-Id: I614fade62834def5cafc94c4d2578cd747a3f9f7

Revision 1f1c56c6 (diff)
Added by laforge over 3 years ago

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

Revision 48338570 (diff)
Added by dexter about 3 years ago

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

Revision bf39996d (diff)
Added by dexter about 3 years ago

LCLS: fix codec mismatch detection

gsm_subscriber_connection.user_plane.chan_mode and .full_rate were unused
since and forgotten to be removed in:

commit 31f525e7560ad13e32cfc5e0b5f1862c0efcb991
Date Mon May 14 18:14:15 2018 +0200
"large refactoring: use FSMs for lchans; add inter-BSC HO"

Instead of above unused struct members, use lchan->{full_rate,tch_mode}.

When not explicitly allowed via VTY settings, the LCLS mechanisms will
avoid to locally switch connections with different codecs/rates. For
example GSM HR and GSM FR would not be locally switched.

Change-Id: Idd7117092b1f170d5029303ae5ba0a49e02a8bfb
Related: OS#1602

Revision 8b742126 (diff)
Added by Neels Hofmeyr about 3 years ago

fix LCLS during Assignment: actually use new TCH lchan

In assignment_success(), don't trigger lcls_apply_config() before the
conn->lchan points at the actual new voice lchan. The entire LCLS code relies
on conn->lchan.

The assignment FSM wants to point conn->lchan to the new lchan only after it is
sure that sending the Assignment Complete to the MSC was successful. However, a
failure is a) very unlikely and b) if sending to the MSC fails we might as well
tear the whole conn down anyway. Now, if sending to the MSC fails, release the
lchan and the conn should clean itself up.

Related: OS#1602
Change-Id: I8dd561d744d8081b5ac5ffa7635f17ac19bcda45

Revision 0d4a98ae (diff)
Added by dexter about 3 years ago

lcls: log channel type and lchan names on LCLS codec mismatch

When a codec mismatch (lchan type or tch_mode does not match) occurs, we
do not know which of the two lchan had which type or tch_mode. Lets
print that information as well to make debugging easier.

Change-Id: I3fd22fef50d8944ca8c003c6114fdda37417b2ea
Related: OS#1602

Revision beb74814 (diff)
Added by Neels Hofmeyr about 3 years ago

fix LCLS during Assignment: actually use new TCH lchan

In assignment_success(), don't trigger lcls_apply_config() before the
conn->lchan points at the actual new voice lchan. The entire LCLS code relies
on conn->lchan.

The assignment FSM wants to point conn->lchan to the new lchan only after it is
sure that sending the Assignment Complete to the MSC was successful. However, a
failure is a) very unlikely and b) if sending to the MSC fails we might as well
tear the whole conn down anyway. Now, if sending to the MSC fails, release the
lchan and the conn should clean itself up.

Related: OS#1602
Change-Id: I8dd561d744d8081b5ac5ffa7635f17ac19bcda45

History

#1 Updated by laforge almost 5 years ago

  • Assignee set to wirelesss
  • Priority changed from Low to Normal

please review the specs (or other information you can find online) regarding LCLS and try to summarize how it works in a small set of slides you can show to the team.

#2 Updated by wirelesss almost 5 years ago

  • Status changed from New to In Progress

I have started to read and collect information about local call local switching.

#3 Updated by laforge over 4 years ago

  • Status changed from In Progress to New
  • Assignee changed from wirelesss to laforge

#4 Updated by laforge about 4 years ago

  • Project changed from OsmoNITB to OsmoBSC
  • Assignee deleted (laforge)

#5 Updated by laforge about 4 years ago

  • Related to Feature #2487: MSC side of LCLS (local call local switching) as per the 3GPP specs added

#6 Updated by laforge about 4 years ago

  • Subject changed from Investigate LCLS (local call local switching) as per the 3GPP specs to BSC side of LCLS (local call local switching) as per the 3GPP specs

#7 Updated by laforge about 4 years ago

  • Checklist item LCLS implementation in OsmoBSC added
  • Checklist item test suite to test LCLS in OsmoBSC added
  • Checklist item jenkins / CI integration of test suite added

#8 Updated by laforge almost 4 years ago

  • Target version set to 3GPP LCLS

#9 Updated by laforge over 3 years ago

  • Priority changed from Normal to High

#10 Updated by laforge over 3 years ago

  • Assignee set to neels

#11 Updated by laforge over 3 years ago

  • Tags set to LCLS

#12 Updated by laforge over 3 years ago

  • Status changed from New to In Progress
  • Assignee changed from neels to laforge
  • % Done changed from 0 to 20
I've been making some headway on this in the laforge/lcls branches:

both need quite some more work, but I think I've figured out the state machine with all of its transitions by now.

#13 Updated by laforge over 3 years ago

I've made significant progress on the testing side, although I hit a Titan compiler bug (see https://www.eclipse.org/forums/index.php/t/1093530/) as well as some shortcomings in our *_Emulation components, see https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/9403/

#14 Updated by laforge over 3 years ago

  • Checklist item wireshark support added
  • % Done changed from 20 to 30

during the first tests, it became apparent that wireshark wasn't able to decode LCLS specific PDUs. I've created a patch and submitted it at https://code.wireshark.org/review/#/c/27941/

#15 Updated by laforge over 3 years ago

  • Checklist item prevent LCLS enabling on calls of different codecs added
  • % Done changed from 30 to 70

the tests for LCLS related signaling are rather complete now, and they all pass with my latest version of the OsmoBSC LCLS FSM.

The only missing bit now is to actually implement the body of the functions that enable/disable the local switching of the voice, i.e. that issue the MGCP commands.

Thinking about it:

  • enable LCLS for a given call
    • Issue MGCP MDCX on MSC-side connection on MGCP endpoint of call A to point to IP/Port of call B
    • Issue MGCP MDCX on MSC-side connection on MGCP endpoint of call B to point to IP/Port of call A
  • disable LCLS for a given call
    • Issue MGCP MDCX on MSC-side connection on MGCP endpoint of call A to point back to MSC/MGW
    • Issue MGCP MDCX on MSC-side connection on MGCP endpoint of call B to point back to MSC/MGW

So we have to cache the ip/port information of the MGW/MSC during ongoing local switching, as we don't receive that information [again] once we switch back.

Known limitation: Until the MGW can perform transcoding, calls with mis-matching codecs will break. We should add some provision into OsmoBSC that would prevent activating LCLS on two calls of different codecs until the MGW can transcode.

There will also be LCLS implications at the time we do inter-BSC hand-over. This will have to be looked into once inter-BSC HO is merged.

#16 Updated by laforge over 3 years ago

laforge wrote:

during the first tests, it became apparent that wireshark wasn't able to decode LCLS specific PDUs. I've created a patch and submitted it at https://code.wireshark.org/review/#/c/27941/

wireshark patch is already accepted / merged to master.

#17 Updated by laforge over 3 years ago

  • Checklist item add vty/config command to enable/disable LCLS on per-MSC basis added
  • Checklist item logging of related BSSMAP messages, not just FSM auto-logging added

#18 Updated by laforge over 3 years ago

  • % Done changed from 70 to 90

https://gerrit.osmocom.org/#/c/osmo-bsc/+/9416 has been updated. It now actually performs local switching via MGCP MDCX re-configuration of OsmoMGW.

The test suite in https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/9412 has equally been extended to verify the actual MGCP user plane switching functionality.

#19 Updated by laforge over 3 years ago

  • Checklist item LCLS implementation in OsmoBSC set to Done
  • Checklist item test suite to test LCLS in OsmoBSC set to Done
  • Checklist item logging of related BSSMAP messages, not just FSM auto-logging set to Done

#20 Updated by laforge over 3 years ago

  • Checklist item add vty/config command to enable/disable LCLS on per-MSC basis set to Done

bsc code + testsuite has been merged to respective master branch, and VTY config option to enable/disalbe LCLS has been added. Working on CI execution of tests now.

#21 Updated by laforge over 3 years ago

  • Checklist item jenkins / CI integration of test suite set to Done

#22 Updated by laforge over 3 years ago

  • Assignee changed from laforge to dexter

the only remaining bit is to ensure LCLS is not enabled on calls that have different codecs on both legs (at least until we have working transcoding in osmo-mgw).

As I'm leaving on holidays soon, it would be good if dexter could take care of this last missing bit, including related TTCN3 tests

#23 Updated by dexter over 3 years ago

I have now added a check that tests the two call legs for different codec/rate. If codec/rate is different, then LCLS will be avoided. However, I am a bit unsure about the status codes here. At the moment the status code I see is LCLS_STS_not_yet_ls. I am not sure if this is right, but it must be the same as with the other conditions in lcls_enable_possible()

See also:
https://gerrit.osmocom.org/#/c/osmo-bsc/+/9940 lcls: do not LCLS call legs with different codecs
https://gerrit.osmocom.org/#/c/osmo-ttcn3-hacks/+/9941 BSC_Tests_LCLS: try call legs with different codec/rate

#24 Updated by dexter over 3 years ago

  • Checklist item prevent LCLS enabling on calls of different codecs set to Done

#25 Updated by dexter about 3 years ago

  • % Done changed from 90 to 100

#26 Updated by laforge about 3 years ago

  • Status changed from In Progress to Resolved

if it's at 100%, it can be resolved.

#27 Updated by dexter about 3 years ago

  • % Done changed from 100 to 90

Its not fully done yet. There is one patch that is still in review: https://gerrit.osmocom.org/#/c/osmo-bsc/+/9940/

#28 Updated by dexter about 3 years ago

  • % Done changed from 90 to 100

The patch is through. I think we are now done here.

#29 Updated by dexter about 3 years ago

  • Status changed from Resolved to In Progress
  • % Done changed from 100 to 90

The TTCN3 test (TC_lcls_gcr_bway_codec_mismatch) that tests this still does not pass, we need to check why.

#30 Updated by dexter about 3 years ago

The reason why TC_lcls_gcr_bway_codec_mismatch does not pass anymore is because there were API changes and LCLSs was using abandoned struct members. This is now fixed.

See also: https://gerrit.osmocom.org/#/c/osmo-bsc/+/10905

#31 Updated by dexter about 3 years ago

The patch is through, but on jenkins one can see that now the following LCLS related tests are failing:

TC_lcls_connect_break
TC_lcls_connect_clear
TC_lcls_gcr_bway_connect
TC_lcls_gcr_bway_connect_hr

This might be unrelated to this issue, but we certainly must check this. It is also very suspicious that just when TC_lcls_gcr_bway_codec_mismatch stops failing the others start to fail.

#32 Updated by neels about 3 years ago

  • Related to Feature #3586: support LCLS for inter-BSC handover added

#33 Updated by laforge about 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

I'll close this issue as LCLS support is implemented. That fact that either our test suite or the implementation still has a bug doesn't change that fact.

#34 Updated by dexter about 3 years ago

Yes, lets close it. The TTCN3 tests also pass fine now.

#35 Updated by msuraev almost 3 years ago

  • Related to Feature #3659: handover during LCLS directly between BTSs added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)