neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27914 )
Change subject: emerg call: send BSSMAP Clear Req cause as preemption ......................................................................
emerg call: send BSSMAP Clear Req cause as preemption
After the lchan release, the gscon would go into the Clear dance with an arbitrary cause value. Instead, explicitly ask for a Clear upon pre-emption, with the proper cause value.
Related: OS#5535 Change-Id: I20108f7b4769400b89b7b0d65c8dab883bf87c46 --- M include/osmocom/bsc/bsc_subscr_conn_fsm.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/bsc_subscr_conn_fsm.c 3 files changed, 7 insertions(+), 2 deletions(-)
Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h b/include/osmocom/bsc/bsc_subscr_conn_fsm.h index 0e495aa..0ab4843 100644 --- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h +++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h @@ -66,6 +66,7 @@ void gscon_submit_rsl_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, int link_id, int allow_sacch); int gscon_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb *msg); +void gscon_bssmap_clear(struct gsm_subscriber_connection *conn, enum gsm0808_cause cause);
struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct gsm_subscriber_connection *conn, uint16_t msc_assigned_cic, struct gsm_lchan *for_lchan); diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index c50cfeb..627af11 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2058,6 +2058,11 @@ "CHAN RQD/EMERGENCY-PRIORITY: inducing termination of lchan %s (state:%s) in favor of incoming EMERGENCY CALL!\n", gsm_lchan_name(release_lchan), osmo_fsm_inst_state_name(release_lchan->fi));
+ /* Make sure the Clear Request to the MSC has the proper cause */ + if (release_lchan->conn) + gscon_bssmap_clear(release_lchan->conn, GSM0808_CAUSE_PREEMPTION); + /* The gscon FSM would only release the lchan after the MSC responds with a Clear Command. + * But we need it released right now. Also with the right RR cause. */ lchan_release(release_lchan, !!(release_lchan->conn), true, GSM48_RR_CAUSE_PREMPTIVE_REL, gscon_last_eutran_plmn(release_lchan->conn));
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index bb96aeb..428d200 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -144,8 +144,7 @@ return rc; }
-static void gscon_bssmap_clear(struct gsm_subscriber_connection *conn, - enum gsm0808_cause cause) +void gscon_bssmap_clear(struct gsm_subscriber_connection *conn, enum gsm0808_cause cause) { /* already clearing? */ switch (conn->fi->state) {