Commit Graph

70 Commits

Author SHA1 Message Date
Neels Hofmeyr c19f8fe917 fixup for re-est: do not succeed on acceptance fail
Fix a bug introduced in commit
 implement CM Re-Establish for voice calls
 ae98b97382
 Neels Hofmeyr <neels@hofmeyr.de>
 Thu Jul 29 22:40:59 2021 +0200
 I6fa37d6ca9fcb1637742b40e37b68d67664c9b60

We should only succeed when conn_accepted == true!

Related: SYS#5130
Change-Id: I3679162143e8d7d8c0878de2102faa11eadfccfc
2024-04-03 20:56:10 +02:00
Neels Hofmeyr 72ef7d8bb0 invalidate vsub->msc_conn_ref when msc_a is discarded
We have an msc_conn_ref pointer from vlr_subscr to an active msc_a
instance. So far, we just keep it pointing at discarded memory. Instead,
make sure it goes back to NULL when the msc_a instance deallocates.

This way the VLR can reliably tell whether a given VLR entry still has
an active connection or is just inactively caching the subscriber.

Related: SYS#6860 OS#4721
Change-Id: Ic63d01d220b63453976fe06a7c6b606f97172c99
2024-03-26 03:20:00 +01:00
Vadim Yanitskiy b03001199a msc_a_up_call_assignment_complete(): handle all CSD modes
Change-Id: I92f7ab11ebc2e53700b27c38e91679c2c6f72050
2024-03-01 07:11:47 +00:00
Neels Hofmeyr bd8ac51b60 cosmetic: move check for CSD further above
Currently the CSD check is in the middle of figuring out the voice codec
for normal voice calls. Rather do the CSD check first, and then do voice
in one coherent section.

(prep for upcoming change in this code, to support AMR rate selection.)

Change-Id: Ibd21f0bb46c66a406904105564ce961a8760cbe7
2024-02-08 23:42:17 +01:00
Neels Hofmeyr 1a07bcd1bb fix misnomer in msc_a.c: codec_cn -> codec_assigned
Before the codec filter, it would have been the CN side codec, but now
it is only the codec that the RAN reports as assigned, fed into the
codecs filter.

(prep for upcoming change in this code, to support AMR rate selection.)

Change-Id: Ie7966099c5565013018734b0c2028484c24341a7
2024-02-08 23:42:17 +01:00
Neels Hofmeyr d767c73a1f implement re-assignment to match codecs
This is the last missing piece that allows osmo-msc to make good TFO
codecs choices.

Since the codec_filter, osmo-msc properly gathers codec options and
limitations. But the MO call leg still assigns a voice channel before
getting a response from the MT call leg, and is then stuck with that.

Add the capability to adjust the MO call leg's codec in case the MT side
needs a different codec for TFO.

This is only relevant for 2G; on 3G we always have AMR/IuUP.

For inter-MSC handover, keep the behavior unchanged: offer only the
currently assigned codec to the remote side. Codec-changing HO should be
equally trivial to implement, but that is for another day.

msc_vlr_test_call's codec tests are adjusted to test the new feature in
Ib933554f826c1b4347dfa3f6c4f6fe086be8b133. For now, avoid change in
these tests by validating the first codec in SDP lists only.

Related: OS#6258
Related: osmo-ttcn3-hacks I402ed0523a2a87b83f29c5577b2c828102005d53
Change-Id: I8760feaa8598047369ef8c3ab2673013bac8ac8a
2023-12-13 01:52:22 +00:00
Manawyrm 1ed12eac93 libmsc: add 3k1_AUDIO and FAX_G3 bearer cap
Bearer capability 3k1_AUDIO and FAX_G3 are only important
for the interworking function, the MSC should handle
these calls the same as CSD calls with unrestricted digital
bearer capability.

Change-Id: I198aa867a8f236b8ddd05d3b2356f64b876fd4c1
2023-10-14 17:23:04 +02:00
Oliver Smith f3941518dc msc_a_up_call_assignment_complete: check CSD codec
Reject any other codec than GSM0808_SCT_CSD in Assignment Complete from
RAN, if OsmoMSC is preparing a CSD call.

Related: OS#4394
Change-Id: I94de84df41bcd050d0e7b4e4fea1c6a6551ef7d3
2023-08-23 17:15:58 +02:00
Andreas Eversberg 23b53e544f ASCI: Receive messages from MSC-A role related to VGCS/VBS
Voice group call and voice broadcast call messages as well as assignment
result are forwarded to VGCS/VBS call control.

Change-Id: Ie68eedb8fcb064a55cd71b58630d7a8c8b5f29ad
Related: OS#4854
2023-07-21 11:16:16 +00:00
Andreas Eversberg cd8bd45b3b ASCI: Add option to switch on or off ASCI support
Switching ASCI support is controled via VTY. This added in a later
patch. (Chg-Id: I5bd034a62fc8b483f550d29103c2f7587198f590)

Change-Id: Id68deb69f7395f0f8f50b3820e9d51052a34f753
Related: OS#4854
2023-07-19 08:23:23 +00:00
Andreas Eversberg f7c6f1424f ASCI: Add decoder for VGCS/VBS messages to msc_a.c
VGCS/VBS messages from BSS are decoded and a receiver funktion for
the GCC/BCC (VGCS/VBS call control) is selected.

Change-Id: Ief6259ba3914eeaceb063b562a0bcbc48349ce60
Related: OS#4854
2023-07-17 12:29:42 +00:00
Andreas Eversberg 456c6f7e4d ASCI: Add two new transaction types for VGCS and VBS
- TRANS_GCC is used for the voice group call.
- TRANS_BCC for the voice broadcast call.

This also includes the use counters for transaction and CM service
request usage:
- MSC_A_USE_GCC
- MSC_A_USE_BCC
- MSC_A_USE_CM_SERVICE_BCC
- MSC_A_USE_CM_SERVICE_GCC

Change-Id: Iddd11f813582ac2ac2bdee91cc3a525986deb514
Related: OS#4854
2023-07-09 07:41:33 +00:00
Andreas Eversberg 712b28e695 ASCI: Use a unique call-id for RTP streams
The MGCP protocol features the 'C' (call-id) to identify which
connections belong to the same call. They may be used by MGW for
accounting or management procedures.

So far we sent the MNCC callref as call-id. Instead, add a separate
unique call_id number space. Assign a unique call_id to each
transaction.

Change-Id: I36c5f159fa0b54fb576ff8bd279928b895554793
Related: OS#4854
2023-07-09 07:41:33 +00:00
Oliver Smith 1063213b38 Add initial CSD support with external MNCC
Implement and use CSD bearer service logic (with similar audio codec code):
* csd_filter (codec_filter)
* csd_bs (sdp_audio_codec)
* csd_bs_list (sdp_audio_codecs)

Related: OS#4394
Change-Id: Ide8b8321e0401dcbe35da2ec9cee0abca821d99a
2023-06-20 12:47:05 +02:00
Oliver Smith c63c3a0cc5 transaction: move cc.codecs.result -> cc.local
Prepare for CSD where this will be used too.

Related: OS#4394
Change-Id: Iaf954be0455625faa06a64c19905b79b7045f8e4
2023-06-15 15:06:46 +02:00
Oliver Smith 593cd88535 transaction: move cc.codecs.remote -> cc.remote
Move remote out of codecs, as it will be used by CSD code as well.
Otherwise we would need to store it twice (in cc.codecs.remote and
cc.csd.remote).

Related: OS#4394
Change-Id: I5d2e078db3b3437cb6feae40d8955912d7a297e4
2023-06-15 15:06:46 +02:00
Oliver Smith ceca8e6d2d codec_filter_run: prepare for CSD
Related: OS#4394
Change-Id: I18b396193ad25a3905cc8c1853c9680dab0a2d44
2023-06-15 15:06:46 +02:00
Vadim Yanitskiy 999a593efb copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
Change-Id: I81687235fedcbbb686db7def59318e891e00ced7
2023-05-18 17:22:26 +07:00
Neels Hofmeyr 388d7c9374 3G: decapsulate IuUP to AMR at the MGW; allow 3G<-AMR->2G
For all 3G calls, convert IuUP <-> plain AMR/RTP on the MSC's MGW hop
like this:

Before this patch:

 hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@msc <--IuUP--> other call leg

After this patch:

 hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@msc <--AMR--> other call leg
                                                    ^

This allows, in principle, 2G to 3G calls without expensive transcoding,
like this:

 hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@msc <--AMR--> MGW@msc <--AMR--> MGW@bsc <--AMR--> 2G-BTS
                                                    ^
(So far only proven to work with AMR-FR at 12k2.)

3G to 3G calls now look like this:

 hNodeB <--IuUP--> MGW@hnbgw <--IuUP--> MGW@MSC <--AMR--> MGW@MSC <--IuUP--> MGW@hnbgw <--IuUP--> hNodeB
                                                    ^

Implementatino: get rid of the shim that was put in place to still send
IuUP (VND.3GPP.IUFP) to the CN. So now, for all 3G voice, the IuUP gets
decapsulated to plain AMR/RTP at the MSC's MGW hop.

What is proven to work with this patch:
successful voice call between 2G and 3G with these conditions:
- a hNodeB that stubbornly accepts only 12k2 AMR;
- a 2G BTS configured to use only TCH/F and only FR3, with only 12k2 as
  allowed AMR rate.

We have not yet seen a call working for TCH/H HR3 <-> 3G, because of the
lab hNodeB's limitation to 12k2.

Future work we probably need:
- properly request and negotiate AMR rates via SDP fmtp:mode-set.
- request more RFCIs in our RANAP RAB Assignment requests
  (see I61e0e9e75e3239662846fd797532acdefa9f73dc).
- Convert IuUP to AMR already at the HNBGW's MGW?
Solving this is not part of this patch.

Related: SYS#5092
Change-Id: I386a6a426c318040b019ab5541689c67e94672a1
2023-04-05 13:47:46 +00:00
Neels Hofmeyr bd5f8e900b do CN CRCX first
In order to send the MSC's RTP endpoint IP address+port in the initial
SDP, move the MGCP CRCX up to an earlier point in the sequence of
establishing a voice call.

Update the voice call sequence chart to show the effects.

Though the semantic change is rather simple, the patch is rather huge --
things have to happen in a different order, and async waits have to
happen at different times.

The new codec filter helps to carry codec resolution information across
the newly arranged code paths.

Related: SYS#5066
Change-Id: Ie433db1ba0c46d4b97538a969233c155cefac21c
2023-03-18 03:05:34 +01:00
Neels Hofmeyr 11a746acd3 [codecs filter] use codecs filter on crcx ok
Change-Id: I03753df567d1dc24852e6fbb681fbba81d2a545d
2023-03-18 03:05:34 +01:00
Neels Hofmeyr 8dd1646f0b [codecs filter] send + receive SDP via MNCC
Transmit and receive full SDP information via MNCC, to accurately pass
codecs choices between the call legs.

In msc_vlr_test_call.c test_call_mt(), show that when receiving MNCC,
the codec information in SDP overrules the Bearer Cap codec information
-- we expect to still receive inaccurate Bearer Cap from e.g.
osmo-sip-connector, because we have chosen to add SDP to MNCC instead of
trying to fix the codecs represented in Bearer Cap.

For internal MNCC, the MT call leg now knows which codec the MO has
chosen and assigned.

For external MNCC, osmo-sip-connector receives SDP about our codecs
choices and sends it in SIP messages, and we also receive the full SDP
information from the remote SIP leg.

Update the SDP in codec_filter every time it is received, to always have
the latest SDP information from the remote leg.

 CC              MNCC
 | ---ALERTING--> |     add local side SDP to MNCC msg
 | <--ALERTING--- |     store remote side SDP
 | <--SETUP-RESP- |     store remote side SDP
 | --SETUP-CNF--> |     add local side SDP to MNCC msg
 | -RTP-CREATE--> |     use codec_filter, add local side SDP to MNCC msg
 | <-RTP-CONNECT- |     store remote side SDP

There still is one problem: when initiating MNCC, we do not yet know the
RTP address and port to be used for the CN side, because the CN CRCX
happens later. So far we send 0.0.0.0:0 as RTP endpoint in the SDP,
until the CN CRCX is done. A subsequent patch moves CN CRCX to an
earlier time, adding proper RTP information right from the start.

Related: SYS#5066
Change-Id: Ie0668c0e079ec69da1532b52d00621efe114fc2c
2023-03-18 03:05:34 +01:00
Neels Hofmeyr cec51b340e in ran_msg, return gsm0808_speech_codec (intra-MSC)
Do not convert to enum mgcp_codecs, but directly pass the
gsm0808_speech_codec IE from the A interface to codecs handling.

For Iu:
- RAN side: use ran_infra.force_mgw_codecs_to_ran to keep the MGW
  endpoint towards RAN on IUFP.
- CN side: introduce flag ran_msg.assignment_complete.codec_with_iuup,
  so to decide whether to forward IUFP towards CN, we don't need to test
  the RAN type, but use the flag from the ran_msg implementation.

In msc_vlr_tests, use the SDP codec string instead of enum
mgcp_codecs.

So far limit to intra-MSC related messaging, adjusting inter-MSC
handover follows in a separate patch.

Change-Id: Ia666cb697fbd140d7239089628faed93860ce671
2023-03-18 03:05:34 +01:00
Neels Hofmeyr 62bfa37eae rtp_stream: allow multiple codecs / use codec filter from Assignment
Allow configuring MGW conns with multiple codecs. The new codecs filter
can have multiple results, and MGCP can configure multiple codecs. Get
rid of this bottleneck, that so far limits to a single codec to MGW.

On Assignment Complete, set codec_filter.assignment to the assigned
codec, and use that to set the resulting codec (possibly multiple codecs
in the future) to create the CN side MGW endpoint.

Related: SYS#5066
Change-Id: If9c67b298b30f893ec661f84c9fc622ad01b5ee5
2023-03-18 03:05:34 +01:00
Neels Hofmeyr 1dc3961a0a add ran_infra.force_mgw_codecs_to_ran
Indicate in the ran_infra data structure whether a RAN needs specific
codecs to be set up on the RAN facing MGW endpoint.

This allows setting forced RAN codecs as first-class citizen in the
ran_infra data structure, instead of special cases in the code (for IuUP
on IuCS).

Will be used in subsequent commit
I37f65c36af2679ecba1040a11a9aa0eb9481d817, submitted separately for
easier readability.

Change-Id: I37f65c36af2679ecba1040a11a9aa0eb9481d817
2023-03-18 03:05:34 +01:00
Neels Hofmeyr 2d57d6eaa9 [codecs filter] apply BSS codecs from Assignment Complete
Codec List (BSS Supported) is received once in Complete Layer 3 and
again in Assignment Complete messages. Use the most recent one, i.e. the
one from Assignment Complete, when it occurs.

Related: SYS#5066
Change-Id: I5e66ecc7987fa926f39d8be8eaf5799b931ab20a
2023-03-14 22:41:52 +00:00
Neels Hofmeyr e276ae9bc7 [codecs filter] store BSS codec list from Compl L3
The initial Compl L3 happens long before we establish a CC transaction.
Remember the Codec List (BSS Supported), so that we can feed the new
codecs filter with it. Subsequent patches implement feeding the filter.

Related: SYS#5066
Change-Id: I7cdc348218433141a43d2e42750af02591688240
2023-03-14 22:41:52 +00:00
Neels Hofmeyr a818153967 IuCS: remove IuUP LOOPBACK hack
Since osmo-mgw now supports IuUP properly, and since we indicate IUFP in
the MGCP CRCX towars an IuCS RAN [1], we should no longer place the MGW
endpoint in loopback mode to hack up an IuUP Initialization.

This hack should have been removed along with [1].

[1] IUFP sent to MGW since this commit:
commit 3a02d29804
Refs: 1.8.0-13-g3a02d2980
Announce IuFP audio codec for UTRAN conns in CRCX towards MGW
I7aca671e00ed27ac03f0d106b5a6b665a9bed4c1

Change-Id: I6446c64421e3e13e2b829293d031c98b99cd39a7
2023-03-04 03:58:30 +01:00
Neels Hofmeyr ede9083946 comment: clarify L3 Info processing
Related: SYS#5066
Change-Id: Ia9180eeb88b31a2cf7dea72b43affd0c7b239ccb
2023-03-04 03:58:30 +01:00
Neels Hofmeyr 2ea7264b86 msc_a,vlr: add is_ciphering_required (accurately named)
For establishing Layer 3, pass a flag from msc_a to VLR that indicates
to fail if encryption is not possible.

An earlier patch [1] renamed a previously existing flag
require_ciphering to is_ciphering_to_be_attempted, because the naming
was not accurate. This new flag now indicates what its name suggests.

This new flag is needed for upcoming patch [2] to distinguish between
optional and mandatory encryption.

[1] Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
[2] I5feda196fa481dd8a46b0e4721c64b7c6600f0d1

Related: OS#4830
Change-Id: I52090c5f5db997030da7c2ed9beca9c51f55f4cf
2022-10-27 23:54:00 +02:00
Neels Hofmeyr d99a607ac9 msc_a,vlr: rename ciphering_required to is_ciphering_to_be_attempted
Clarify the name to avoid confusion in upcoming patches.

This function actually returns whether any ciphering mode besides A5/0
is enabled, and does not imply that ciphering is mandatory. A5/0 may
well be allowed when this function returns true.

Related: OS#4830
Change-Id: Ia55085e3b36feb275bcf92fc91a4be7d1c24a6b9
2022-10-27 23:30:30 +02:00
Neels Hofmeyr 550506aaf1 err log: fix reverse statement in msc_a call handling
Change-Id: I937abe25ba87d0fcddc3351ac391cf6e7e776de6
2022-07-22 19:11:18 +02:00
Neels Hofmeyr 5d53c6001d fix crash on CM Serv Rej: fix use count mismatch
With comments, clarify the code paths where a CM Service use count has
not yet been placed on the conn (just send CM Service Reject) and where
the use count is placed (decrement count on CM Service Reject).

Place the CM Service use count slightly earlier:
- it is then correctly present when checking the mobile identity in
  cm_serv_reuse_conn(), avoiding the crash reported in OS#5532.
- there is only one place incrementing the use count instead of two.

Related: OS#5532
Change-Id: I6c735b79b67108bcaadada3f01c7046e262f939b
2022-05-04 23:43:11 +02:00
Pau Espin 9de384a28c Avoid setting audio codec if not available during assignment_complete (MDCX)
RAB Assignment Complete contains no codec info, hence
assignment_complete.codec is not set and
assignment_complete.codec_present is false.
As a result a wrong value is passed to rtp_stream_set_codec.

This fixes osmo-msc sending "a=rtpmap:112 AMR/8000/1" during MDCX in the
RAT-side connection of the call leg after having properly sent
VND.3GPP.IUFP/16000 in CRCX.

Change-Id: Ic028d35893d29f7d72f22f82ef89695229c9b01b
2022-01-07 18:50:15 +01:00
Pau Espin 3a02d29804 Announce IuFP audio codec for UTRAN conns in CRCX towards MGW
This way the MGW knows it has to handle IuUP in that connection (answer
IuUP Initialization, etc.).

Depends: osmo-mgw.git 1de5ed6f979bd4c1380789c9a82f8e396f05c5f8
Change-Id: I7aca671e00ed27ac03f0d106b5a6b665a9bed4c1
2022-01-05 13:58:15 +01:00
Vadim Yanitskiy c44342b88c libmsc: fix memory leak (struct msgb) in msc_i_ran_enc()
Function msc_i_ran_enc() calls msc_role_ran_encode(), but unlike the
other callers of this function it does not free() the encoded message.

A simple solution would be to call msgb_free(), like it's done in
the other places.  But a more elegant solution is to modify function
msc_role_ran_encode(), so that it attaches the msgb to OTC_SELECT.
This way there is no need to call msgb_free() here and there.

This change fixes a memleak observed while running ttcn3-msc-test.

Change-Id: I741e082badc32ba9a97c1495c894e1d22e122e3a
Related: OS#5340
2021-12-07 18:43:00 +03:00
Alexander Couzens 2c5e46104e libmsc/gsm_04_08: refactor require ciphering into an own function
Make it more readable.

Change-Id: I9e407f65b282e645feabe714f7f4c3e44fae21e9
2021-11-27 04:39:34 +01:00
Alexander Couzens 2aaff7513b Validate the choosen UTRAN encryption algorithm
RANAP Security Command can include an encryption IE. If it includes
it the RNC can still ignore it (e.g. unsupported encryption) and
return the Security Command Complete with an choosen encryption IE:
"no encryption".
Validate the encryption element and ensure the encryption is included in
the encryption mask.

Closes: OS#4144
Change-Id: Icfc135c8b8ae862defe7114db492af600c26407f
2021-11-05 01:29:05 +01:00
Harald Welte 505a94a610 Make UTRAN encryption algorithms configurable
Allow the user fine-grained control over which UMTS encryption
algorithms are permitted, rather than always permitting UEA1 and UEA2
or neither.

This brings the handling of UEA in line with the handling of A5 for
GERAN.

Change-Id: I91f9e50f9c1439aa19528f887b83ae9de628fcfd
Closes: OS#4144
Depends: osmo-iuh.git I6d2d033b0427bdc84fee61e0f3cb7b29935214bf
2021-11-05 01:29:05 +01:00
Harald Welte 274b70f1a8 Fix enabling of UMTS UEA encryption
The existing code allowed the user to configure UMTS encryption in the
vty, but we never actually passed this information down to RANAP.  As a
result, the RAN had no chance of ever enabling encryption on the air
interface.

Change-Id: Ieaaa6b23b7337b7edb902fad8031e195e0c5e9d2
Related: OS#4144
2021-11-05 01:29:05 +01:00
Keith Whyte a1a70be593 Add support for LCLS to the MSC
This commit is largely based on work by
Max <msuraev@sysmocom.de>

Adds LCLS parameters for A-interface transactions
This commit also adds a vty option to facilitate globally
disabling LCLS for all calls on this MSC.

Add a global call reference (GCR) to MNCC and therefore
bump the MNCC version to version 8. (This commit has to be
merged at the same time as the corresponing commit in the
osmo-sip-connector for mncc-external use.)

Depends: osmo-sip-connector Id40d7e0fed9356f801b3627c118150055e7232b1
Change-Id: I705c860e51637b4537cad65a330ecbaaca96dd5b
2021-10-25 10:07:48 +00:00
Neels Hofmeyr ae98b97382 implement CM Re-Establish for voice calls
Related: SYS#5130
Change-Id: I6fa37d6ca9fcb1637742b40e37b68d67664c9b60
2021-07-29 22:40:59 +02:00
Pau Espin e53ecde83e msc_a.c: Allow MSC_A_EV_CN_CLOSE in state MSC_A_ST_RELEASING
As seen in a running osmo-msc:
"vlr_access_req_fsm.c:153
msc_a(IMSI-....:MSISDN-...:TMSI-0x...:GERAN-A-8:CM_SERVICE_REQ){MSC_A_ST_RELEASING}:
Event MSC_A_EV_CN_CLOSE not permitted"

Also seen in several unit tests, which need update.

The action event handler for that state is actually already
expecting/handling the event by ignoring it, so we should allow it.

Change-Id: I4d30cffab693529aab3ba736419dec116a4dd7ef
2021-07-12 16:37:24 +02:00
Neels Hofmeyr 73d093a806 improve logging on encryption, for Ciphering and HO
log the algorithm and all keys instead of just Kc.

Change-Id: If7871dedda2b1fb115e6f00da1379ff2e3d68a10
2021-06-24 01:44:20 +02:00
Neels Hofmeyr 6ce2edcac1 support A5/4 in Cipher Mode Command
Related: SYS#5324
Change-Id: I780a739b9bfbefd4f58be051794fe1a491823e67
2021-06-24 01:27:47 +02:00
Vadim Yanitskiy 435f67f43c msc_tx_common_id(): fix potential NULL pointer dereference
Reported by GCC 11.1.0.  msc_a_vsub() may return NULL.

Change-Id: Iebdd6399e819a03258398e6b7b453bda37e45a20
2021-06-06 15:50:42 +02:00
Pau Espin 2e21a68e83 Use new osmo stat items/ctr APIs
Generated using several semantinc patches with spatch.

Change-Id: I3ee853539949a763a309856bf2e7196415b23741
2021-06-04 16:53:16 +02:00
Pau Espin 6710670cb1 Fill Last Used E-UTRAN PLMN Id when in CSFB
Since recently, osmo-bsc behaves strictly as per specs, meaning it will
only send the "Cell selection indicator after release of all TCH and SDCCH IE"
in RR Channel Release iff:
* "Last Used E-UTRAN PLMN Id" was received in the CommonID sent MSC->BSC
* "Last Used E-UTRAN PLMN Id" was received insider "old BSS to new BSS Information"
  in the HandoverRequest sent MSC->BSC.
On the other hand, CSFB_Indicator from ClearCommand MSC->BSC is nw
ignored and not taken into account.

Hence, let's update osmo-msc to also behave correctly by sending the
Last Used E-UTRAN PLMN ID at CommonID tx time to avoid regressions in
CSFB support when running against newer osmo-bsc.

Let's keep sending the CSFB Indicator in ClearCommand as we used too, in
order to keep compatibility with older BSCs (as per spec).

Related: SYS#5337
Change-Id: Ic5f175b179973d0a50d94f00e15f5a3e332605fc
2021-04-29 14:22:33 +02:00
Neels Hofmeyr d9fe7110ea Clear Command: set cause value to "Call Control"
So far, by failing to initialize the cause value, we always send a Clear
Command cause == 0, which actually means "Radio Interface Message Failure".
This is seen in all my logged network traces of osmo-msc lab testing.

"Call Control" seems to be the only cause value that remotely fits a normal
release procedure, even if it was not voice call related, see 3GPP TS 48.008
3.2.1.21.

Related: OS#4664
Change-Id: I1347ed72ae7d7ea73a557b866e764819c5ef8c42
2020-07-28 18:29:58 +02:00
Neels Hofmeyr 83cf10c8a6 propagate Compl L3 Info Cell ID to the VLR subscriber record
As soon as the subscriber is authenticated, update the VLR entry with the
MSC-A's full CGI, including the Cell Id received from the Complete Layer 3
Information.

Thus the Cell Id will be shown by vty 'show subscriber cache' and 'show
connection'.

This is tested by osmo-ttcn3-hacks Ie410714a96353f74a52a104c56fa0a08683e0004.

Related: OS#4627
Change-Id: Iee1781985fb25b21ce27526c6a3768bf70d4dc9a
2020-06-24 19:22:30 +02:00