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/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index c9a13a2..56252f1 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -276,7 +276,6 @@
struct tlv_p_entry *ie_codec_list_bss_supported = TLVP_GET(tp, GSM0808_IE_SPEECH_CODEC_LIST);
struct tlv_p_entry *ie_osmux_cid = TLVP_GET(tp, GSM0808_IE_OSMO_OSMUX_CID);
struct sockaddr_storage rtp_addr;
- struct gsm0808_speech_codec sc;
struct gsm0808_speech_codec_list codec_list_bss_supported;
int rc;
struct ran_msg ran_dec_msg = {
@@ -309,14 +308,14 @@
if (ie_speech_codec) {
/* Decode Speech Codec (Chosen) element */
- rc = gsm0808_dec_speech_codec(&sc, ie_speech_codec->val, ie_speech_codec->len);
+ rc = gsm0808_dec_speech_codec(&ran_dec_msg.assignment_complete.codec,
+ ie_speech_codec->val, ie_speech_codec->len);
if (rc < 0) {
LOG_RAN_A_DEC_MSG(LOGL_ERROR, "Assignment Complete: unable to decode IE Speech Codec (Chosen)"
" (rc=%d).\n", rc);
return -EINVAL;
}
ran_dec_msg.assignment_complete.codec_present = true;
- ran_dec_msg.assignment_complete.codec = ran_a_mgcp_codec_from_sc(&sc);
}
if (ie_codec_list_bss_supported) {