aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/msc_a.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2022-01-13 21:38:35 +0100
committerneels <nhofmeyr@sysmocom.de>2023-03-14 22:41:52 +0000
commite276ae9bc727559943189dfbaf75c474626f4349 (patch)
treeec542ee26b7bf353eb3e9930405ec20f17755488 /src/libmsc/msc_a.c
parent4c57bb0476b1c14a9f7c9858e7f21d478296107f (diff)
[codecs filter] store BSS codec list from Compl L3
The initial Compl L3 happens long before we establish a CC transaction. Remember the Codec List (BSS Supported), so that we can feed the new codecs filter with it. Subsequent patches implement feeding the filter. Related: SYS#5066 Change-Id: I7cdc348218433141a43d2e42750af02591688240
Diffstat (limited to 'src/libmsc/msc_a.c')
-rw-r--r--src/libmsc/msc_a.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index e74a425eb..d9a73410b 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -46,6 +46,7 @@
#include <osmocom/msc/call_leg.h>
#include <osmocom/msc/rtp_stream.h>
#include <osmocom/msc/msc_ho.h>
+#include <osmocom/msc/codec_mapping.h>
#define MSC_A_USE_WAIT_CLEAR_COMPLETE "wait-Clear-Complete"
@@ -1443,6 +1444,18 @@ int msc_a_ran_dec_from_msc_i(struct msc_a *msc_a, struct msc_a_ran_dec_data *d)
};
gsm0808_cell_id_to_cgi(&msc_a->via_cell, msg->compl_l3.cell_id);
+ /* If a codec list was sent along in the RAN_MSG_COMPL_L3, remember it for any upcoming codec
+ * resolution. */
+ if (msg->compl_l3.codec_list_bss_supported) {
+ msc_a->cc.compl_l3_codec_list_bss_supported = *msg->compl_l3.codec_list_bss_supported;
+ if (log_check_level(msc_a->c.ran->log_subsys, LOGL_DEBUG)) {
+ struct sdp_audio_codecs ac = {};
+ sdp_audio_codecs_from_speech_codec_list(&ac, &msc_a->cc.compl_l3_codec_list_bss_supported);
+ LOG_MSC_A(msc_a, LOGL_DEBUG, "Complete Layer 3: Codec List (BSS Supported): %s\n",
+ sdp_audio_codecs_to_str(&ac));
+ }
+ }
+
/* Submit the Complete Layer 3 Information DTAP */
rc = msc_a_up_l3(msc_a, msg->compl_l3.msg);
if (!rc) {