diff options
author | Oliver Smith <osmith@sysmocom.de> | 2023-08-22 13:28:18 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2023-08-23 16:42:24 +0200 |
commit | cfa37cb70b8722261247dca077d40cb2ecbe0c12 (patch) | |
tree | b664ffae414a63e6018a09e124d9918ce5480206 | |
parent | 6de3d6cbaed00cfcee2f8b4b73d60957b2a72ce0 (diff) |
msc_ho_send_handover_request: support CSD
Related: OS#4394
Change-Id: I5fea299bdc19d2979b5c222d8dd265dac2068307
-rw-r--r-- | src/libmsc/msc_ho.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index 9e4417fa4..9748ed9d5 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -413,12 +413,29 @@ static void msc_ho_send_handover_request(struct msc_a *msc_a) : "-"); if (cc_trans) { - if (sdp_audio_codecs_to_gsm0808_channel_type(&channel_type, - &cc_trans->cc.local.audio_codecs)) { - msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, - "Failed to determine Channel Type for Handover Request message\n"); + switch (cc_trans->bearer_cap.transfer) { + case GSM48_BCAP_ITCAP_SPEECH: + if (sdp_audio_codecs_to_gsm0808_channel_type(&channel_type, + &cc_trans->cc.local.audio_codecs)) { + msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, + "Failed to determine Channel Type for Handover Request message (speech)\n"); + return; + } + break; + case GSM48_BCAP_ITCAP_UNR_DIG_INF: + if (csd_bs_list_to_gsm0808_channel_type(&channel_type, &cc_trans->cc.local.bearer_services)) { + msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, + "Failed to determine Channel Type for Handover Request message (CSD)\n"); + return; + } + break; + default: + msc_ho_failed(msc_a, GSM0808_CAUSE_EQUIPMENT_FAILURE, "Failed to create" + " Handover Request message for information transfer capability %d\n", + cc_trans->bearer_cap.transfer); return; } + ran_enc_msg.handover_request.geran.channel_type = &channel_type; ran_enc_msg.handover_request.call_id_present = true; ran_enc_msg.handover_request.call_id = cc_trans->call_id; |