aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-07-25 04:57:31 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2023-07-25 18:55:58 +0700
commitcc8743c05b2824705df0d716cdcbf4760e4a9f8e (patch)
tree46c379e98a1d2b4108d4db351913c568c0b9e16e
parent9d696557299be03fe684245e71c0a82f8dad016b (diff)
ran_a_channel_type_to_speech_codec_list(): set PI/PT for CSD
As per 3GPP TS 48.008, section 3.2.2.103, the Codec Type is valid if at least one of FI, PI or PT is set to '1'. Otherwise the Speech Codec Element is considered invalid and shall be ignored. Change-Id: Ibc452d37d4215c961a7946eef3ba2e7efdba078b Related: OS#6110, OS#4394
-rw-r--r--src/libmsc/ran_msg_a.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index 37888055d..8cf6bfab0 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -1349,7 +1349,12 @@ static int ran_a_channel_type_to_speech_codec_list(struct gsm0808_speech_codec_l
switch (ct->ch_indctr) {
case GSM0808_CHAN_DATA:
- scl->codec[0].type = GSM0808_SCT_CSD;
+ scl->codec[0] = (struct gsm0808_speech_codec) {
+ .pi = true, /* PI indicates CSDoIP is supported */
+ .pt = false, /* PT indicates CSDoTDM is not supported */
+ .type = GSM0808_SCT_CSD,
+ .cfg = 0, /* R2/R3 not set (redundancy not supported) */
+ };
scl->len = 1;
break;
case GSM0808_CHAN_SPEECH: