[codecs filter] apply BSS codecs from Assignment Complete
Codec List (BSS Supported) is received once in Complete Layer 3 and
again in Assignment Complete messages. Use the most recent one, i.e. the
one from Assignment Complete, when it occurs.
Related: SYS#5066
Change-Id: I5e66ecc7987fa926f39d8be8eaf5799b931ab20a
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index d9a7341..4c7f763 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -47,6 +47,7 @@
#include <osmocom/msc/rtp_stream.h>
#include <osmocom/msc/msc_ho.h>
#include <osmocom/msc/codec_mapping.h>
+#include <osmocom/msc/codec_filter.h>
#define MSC_A_USE_WAIT_CLEAR_COMPLETE "wait-Clear-Complete"
@@ -1353,6 +1354,10 @@
rtp_stream_commit(rtps_to_ran);
+ /* Remember the Codec List (BSS Supported) */
+ if (ac->assignment_complete.codec_list_bss_supported)
+ codec_filter_set_bss(&cc_trans->cc.codecs, ac->assignment_complete.codec_list_bss_supported);
+
/* Setup CN side endpoint CI:
* Now that
* - the first CI has been created and a definitive endpoint name is assigned to the call_leg's MGW