osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/34173 )
Change subject: msc_a_up_call_assignment_complete: check CSD codec ......................................................................
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 --- M src/libmsc/msc_a.c 1 file changed, 22 insertions(+), 0 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 0d8a747..b4776a0 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1483,6 +1483,15 @@ return; }
+ /* Check for unexpected codec with CSD */ + if (cc_trans->bearer_cap.transfer == GSM48_BCAP_ITCAP_UNR_DIG_INF && + codec_if_known->type != GSM0808_SCT_CSD) { + LOG_TRANS(cc_trans, LOGL_ERROR, "Unexpected codec in Assignment Complete for CSD: %s\n", + gsm0808_speech_codec_type_name(codec_if_known->type)); + call_leg_release(msc_a->cc.call_leg); + return; + } + /* Update RAN-side endpoint CI from Assignment result -- unless it is forced by the ran_infra, in which * case it remains unchanged as passed to the earlier call of call_leg_ensure_ci(). */ if (msc_a->c.ran->force_mgw_codecs_to_ran.count == 0)