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
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 2890076..4cce289 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -1218,7 +1218,11 @@
return ran_a_make_assignment_command(caller_fi, &ran_enc_msg->assignment_command);
case RAN_MSG_COMMON_ID:
- return gsm0808_create_common_id(ran_enc_msg->common_id.imsi, NULL, NULL);
+ return gsm0808_create_common_id(ran_enc_msg->common_id.imsi, NULL,
+ ran_enc_msg->common_id.last_eutran_plmn_present ?
+ &ran_enc_msg->common_id.last_eutran_plmn :
+ NULL
+ );
case RAN_MSG_CIPHER_MODE_COMMAND:
return ran_a_make_cipher_mode_command(caller_fi, &ran_enc_msg->cipher_mode_command);