aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2023-08-22 13:28:18 +0200
committerOliver Smith <osmith@sysmocom.de>2023-08-23 16:42:24 +0200
commitcfa37cb70b8722261247dca077d40cb2ecbe0c12 (patch)
treeb664ffae414a63e6018a09e124d9918ce5480206
parent6de3d6cbaed00cfcee2f8b4b73d60957b2a72ce0 (diff)
msc_ho_send_handover_request: support CSD
-rw-r--r--src/libmsc/msc_ho.c25
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;