in ran_msg, return gsm0808_speech_codec (intra-MSC)
Do not convert to enum mgcp_codecs, but directly pass the
gsm0808_speech_codec IE from the A interface to codecs handling.
For Iu:
- RAN side: use ran_infra.force_mgw_codecs_to_ran to keep the MGW
endpoint towards RAN on IUFP.
- CN side: introduce flag ran_msg.assignment_complete.codec_with_iuup,
so to decide whether to forward IUFP towards CN, we don't need to test
the RAN type, but use the flag from the ran_msg implementation.
In msc_vlr_tests, use the SDP codec string instead of enum
mgcp_codecs.
So far limit to intra-MSC related messaging, adjusting inter-MSC
handover follows in a separate patch.
Change-Id: Ia666cb697fbd140d7239089628faed93860ce671
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 45b97a2..646633c 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -1014,15 +1014,19 @@
g_msub = NULL;
}
-void ms_sends_assignment_complete(enum mgcp_codecs assigned_codec)
+void ms_sends_assignment_complete(const char *sdp_codec_name)
{
struct ran_msg ran_dec;
+ const struct codec_mapping *m = codec_mapping_by_subtype_name(sdp_codec_name);
+ OSMO_ASSERT(m);
+ OSMO_ASSERT(m->has_gsm0808_speech_codec);
ran_dec = (struct ran_msg){
.msg_type = RAN_MSG_ASSIGNMENT_COMPLETE,
.assignment_complete = {
.codec_present = true,
- .codec = assigned_codec,
+ .codec = m->gsm0808_speech_codec,
+ .codec_with_iuup = (rx_from_ran == OSMO_RAT_UTRAN_IU),
},
};
osmo_sockaddr_str_from_str(&ran_dec.assignment_complete.remote_rtp, "1.2.3.4", 1234);