aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2023-03-01 03:47:45 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2023-03-05 02:35:23 +0100
commit8b51741c6573d26a88f086ced8665d0b17d53649 (patch)
tree057769a4a035f852c7b1deb85212c192ec272ce7
parent07e73c193ff4c1b3a3cdfeb55e326a019bec4396 (diff)
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
-rw-r--r--include/osmocom/msc/ran_msg.h3
-rw-r--r--src/libmsc/msc_a.c37
-rw-r--r--src/libmsc/ran_msg_a.c5
-rw-r--r--src/libmsc/ran_msg_iu.c10
-rw-r--r--tests/msc_vlr/msc_vlr_test_call.c10
-rw-r--r--tests/msc_vlr/msc_vlr_test_call.err35
-rw-r--r--tests/msc_vlr/msc_vlr_tests.c8
-rw-r--r--tests/msc_vlr/msc_vlr_tests.h2
8 files changed, 67 insertions, 43 deletions
diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h
index 32b24a01f..d6b1e75ac 100644
--- a/include/osmocom/msc/ran_msg.h
+++ b/include/osmocom/msc/ran_msg.h
@@ -240,7 +240,8 @@ struct ran_msg {
struct {
struct osmo_sockaddr_str remote_rtp;
bool codec_present;
- enum mgcp_codecs codec;
+ struct gsm0808_speech_codec codec;
+ bool codec_with_iuup;
const struct gsm0808_speech_codec_list *codec_list_bss_supported;
bool osmux_present;
uint8_t osmux_cid;
diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c
index bcd4830f6..9c44b6702 100644
--- a/src/libmsc/msc_a.c
+++ b/src/libmsc/msc_a.c
@@ -1325,8 +1325,8 @@ static void msc_a_up_call_assignment_complete(struct msc_a *msc_a, const struct
{
struct gsm_trans *cc_trans = msc_a->cc.active_trans;
struct rtp_stream *rtps_to_ran = msc_a->cc.call_leg ? msc_a->cc.call_leg->rtp[RTP_TO_RAN] : NULL;
- const enum mgcp_codecs *codec_if_known = ac->assignment_complete.codec_present ?
- &ac->assignment_complete.codec : NULL;
+ const struct gsm0808_speech_codec *codec_if_known = ac->assignment_complete.codec_present ?
+ &ac->assignment_complete.codec : NULL;
const struct codec_mapping *codec_cn = NULL;
if (!rtps_to_ran) {
@@ -1346,16 +1346,33 @@ static void msc_a_up_call_assignment_complete(struct msc_a *msc_a, const struct
}
if (codec_if_known) {
- codec_cn = codec_mapping_by_mgcp_codec(*codec_if_known);
- if (!codec_cn) {
- LOG_TRANS(cc_trans, LOGL_ERROR, "Unknown codec in Assignment Complete: %s\n",
- osmo_mgcpc_codec_name(*codec_if_known));
- call_leg_release(msc_a->cc.call_leg);
- return;
+ if (ac->assignment_complete.codec_with_iuup) {
+ /* FUTURE: soon, we want to tell the MGW to decapsulate IuUP to plain AMR-FR/RTP. So far,
+ * continue to forward IuUP to the CN.
+ *
+ * ran_msg_iu now returns AMR-FR as the assigned codec. If we use that directly, that will
+ * instruct the MGW to decapsulate IuUP into plain RTP. Let's keep this change to an explicit
+ * patch, while various codecs patches are still being applied.
+ *
+ * So instruct MGW to forward IuUP to CN:
+ */
+ codec_cn = codec_mapping_by_subtype_name("VND.3GPP.IUFP");
+ OSMO_ASSERT(codec_cn);
+ } else {
+ codec_cn = codec_mapping_by_gsm0808_speech_codec_type(codec_if_known->type);
+ /* TODO: use codec_mapping_by_gsm0808_speech_codec() to also match on codec_if_known->cfg */
+ if (!codec_cn) {
+ LOG_TRANS(cc_trans, LOGL_ERROR, "Unknown codec in Assignment Complete: %s\n",
+ gsm0808_speech_codec_type_name(codec_if_known->type));
+ call_leg_release(msc_a->cc.call_leg);
+ return;
+ }
}
- /* Update RAN-side endpoint CI from Assignment result */
- rtp_stream_set_one_codec(rtps_to_ran, &codec_cn->sdp);
+ /* Update RAN-side endpoint CI from Assignment result -- unless it is forced by the ran_infra, in which
+ * case it remains unchanged as passed to the earlier call of call_leg_ensure_ci(). */
+ if (msc_a->c.ran->force_mgw_codecs_to_ran.count == 0)
+ rtp_stream_set_one_codec(rtps_to_ran, &codec_cn->sdp);
/* Update codec filter with Assignment result, for the CN side */
cc_trans->cc.codecs.assignment = codec_cn->sdp;
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index c9a13a27a..56252f1d0 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -276,7 +276,6 @@ static int ran_a_decode_assignment_complete(struct ran_dec *ran_dec, struct msgb
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 @@ static int ran_a_decode_assignment_complete(struct ran_dec *ran_dec, struct msgb
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) {
diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c
index ee1d0a5c2..eb7fc9377 100644
--- a/src/libmsc/ran_msg_iu.c
+++ b/src/libmsc/ran_msg_iu.c
@@ -153,8 +153,16 @@ static int ran_iu_decode_rab_assignment_response_decode_setup_ies(struct ran_dec
.msg_type = RAN_MSG_ASSIGNMENT_COMPLETE,
.msg_name = "RANAP RAB Assignment Response",
.assignment_complete = {
+ /* For codec compatibility resolution, indicate AMR-FR */
.codec_present = true,
- .codec = CODEC_IUFP,
+ .codec = {
+ .fi = true,
+ .type = GSM0808_SCT_FR3,
+ .cfg = GSM0808_SC_CFG_DEFAULT_FR_AMR,
+ },
+ /* Indicate that (at least) the first MGW endpoint towards RAN needs to expect VND.3GPP.IUFP
+ * that encapsulates the AMR-FR RTP payload. */
+ .codec_with_iuup = true,
},
};
if (osmo_sockaddr_str_from_str(&ran_dec_msg->assignment_complete.remote_rtp, addr, port)) {
diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c
index a547935b2..06602f7bc 100644
--- a/tests/msc_vlr/msc_vlr_test_call.c
+++ b/tests/msc_vlr/msc_vlr_test_call.c
@@ -227,7 +227,7 @@ static void test_call_mo()
btw("Assignment succeeds, triggering CRCX to CN");
expect_crcx(RTP_TO_CN);
- ms_sends_assignment_complete(CODEC_AMR_8000_1);
+ ms_sends_assignment_complete("AMR");
OSMO_ASSERT(got_crcx);
btw("CN RTP address is available, trigger MNCC_RTP_CREATE");
@@ -339,7 +339,7 @@ static void test_call_mt()
btw("Assignment completes, triggering CRCX to CN");
expect_crcx(RTP_TO_CN);
- ms_sends_assignment_complete(CODEC_AMR_8000_1);
+ ms_sends_assignment_complete("AMR");
OSMO_ASSERT(got_crcx);
btw("When the CN side RTP address is known, send MNCC_RTP_CREATE");
@@ -442,7 +442,7 @@ static void test_call_mt2()
btw("Assignment completes, triggering CRCX to CN");
expect_crcx(RTP_TO_CN);
- ms_sends_assignment_complete(CODEC_AMR_8000_1);
+ ms_sends_assignment_complete("AMR");
OSMO_ASSERT(got_crcx);
btw("When the CN side RTP address is known, send MNCC_RTP_CREATE");
@@ -539,7 +539,7 @@ static void test_call_mo_to_unknown()
btw("Assignment succeeds, triggering CRCX to CN");
expect_crcx(RTP_TO_CN);
- ms_sends_assignment_complete(CODEC_AMR_8000_1);
+ ms_sends_assignment_complete("AMR");
OSMO_ASSERT(got_crcx);
btw("CN RTP address is available, trigger MNCC_RTP_CREATE");
@@ -635,7 +635,7 @@ static void test_call_mo_to_unknown_timeout()
btw("Assignment succeeds, triggering CRCX to CN");
expect_crcx(RTP_TO_CN);
- ms_sends_assignment_complete(CODEC_AMR_8000_1);
+ ms_sends_assignment_complete("AMR");
OSMO_ASSERT(got_crcx);
btw("CN RTP address is available, trigger MNCC_RTP_CREATE");
diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err
index 1cfbbcc94..e3127ef4a 100644
--- a/tests/msc_vlr/msc_vlr_test_call.err
+++ b/tests/msc_vlr/msc_vlr_test_call.err
@@ -314,13 +314,12 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE
DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
- Assignment succeeds, triggering CRCX to CN
DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_RAN:no-CI:local-10-23-23-1-23:remote-1-2-3-4-1234){UNINITIALIZED}: Not committing: no MGW endpoint CI set up
- MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000001 codecs=AMR:octet-align=1#112
+ MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000001 codecs=VND.3GPP.IUFP/16000#96
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483649:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to VND.3GPP.IUFP/16000#96
- CN RTP address is available, trigger MNCC_RTP_CREATE
MGW --CRCX OK to RTP_TO_CN--> MSC
DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
@@ -804,13 +803,12 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RES
DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
- Assignment completes, triggering CRCX to CN
DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23:remote-1-2-3-4-1234){UNINITIALIZED}: Not committing: no MGW endpoint CI set up
- MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x423 codecs=AMR:octet-align=1#112
+ MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x423 codecs=VND.3GPP.IUFP/16000#96
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: Allocated
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP)
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to VND.3GPP.IUFP/16000#96
- When the CN side RTP address is known, send MNCC_RTP_CREATE
MGW --CRCX OK to RTP_TO_CN--> MSC
DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
@@ -1276,13 +1274,12 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RES
DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
- Assignment completes, triggering CRCX to CN
DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_RAN:no-CI:local-10-23-23-1-23:remote-1-2-3-4-1234){UNINITIALIZED}: Not committing: no MGW endpoint CI set up
- MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x423 codecs=AMR:octet-align=1#112
+ MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x423 codecs=VND.3GPP.IUFP/16000#96
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: Allocated
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP)
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP:trans-0:call-1059:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to VND.3GPP.IUFP/16000#96
- When the CN side RTP address is known, send MNCC_RTP_CREATE
MGW --CRCX OK to RTP_TO_CN--> MSC
DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
@@ -1686,13 +1683,12 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE
DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
- Assignment succeeds, triggering CRCX to CN
DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_RAN:no-CI:local-10-23-23-1-23:remote-1-2-3-4-1234){UNINITIALIZED}: Not committing: no MGW endpoint CI set up
- MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000002 codecs=AMR:octet-align=1#112
+ MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000002 codecs=VND.3GPP.IUFP/16000#96
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483650:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to VND.3GPP.IUFP/16000#96
- CN RTP address is available, trigger MNCC_RTP_CREATE
MGW --CRCX OK to RTP_TO_CN--> MSC
DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
@@ -2115,13 +2111,12 @@ DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE
DMSC dummy_msc_i(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){0}: Received Event MSC_I_EV_FROM_A_FORWARD_ACCESS_SIGNALLING_REQUEST
- Assignment succeeds, triggering CRCX to CN
DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){MSC_A_ST_COMMUNICATING}: RAN decode: ASSIGNMENT_COMPLETE
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI){UNINITIALIZED}: setting remote addr to 1.2.3.4:1234
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_RAN:no-CI:local-10-23-23-1-23:remote-1-2-3-4-1234){UNINITIALIZED}: Not committing: no MGW endpoint CI set up
- MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000003 codecs=AMR:octet-align=1#112
+ MGW <--CRCX to RTP_TO_CN-- MSC: callref=0x80000003 codecs=VND.3GPP.IUFP/16000#96
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: Allocated
DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){UNINITIALIZED}: is child of call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ)
-DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to AMR:octet-align=1#112
+DCC rtp_stream(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ:trans-8:call-2147483651:RTP_TO_CN:no-CI){UNINITIALIZED}: setting codecs to VND.3GPP.IUFP/16000#96
- CN RTP address is available, trigger MNCC_RTP_CREATE
MGW --CRCX OK to RTP_TO_CN--> MSC
DCC call_leg(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:CM_SERVICE_REQ){ESTABLISHING}: Received Event CALL_LEG_EV_RTP_STREAM_ADDR_AVAILABLE
diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 45b97a27a..646633ca2 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -1014,15 +1014,19 @@ void ms_sends_security_mode_complete(uint8_t utran_encryption)
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);
diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h
index 1f83013b0..1a57101a7 100644
--- a/tests/msc_vlr/msc_vlr_tests.h
+++ b/tests/msc_vlr/msc_vlr_tests.h
@@ -186,7 +186,7 @@ void ms_sends_msg(const char *hex);
void ms_sends_classmark_update(const struct osmo_gsm48_classmark *classmark);
void ms_sends_ciphering_mode_complete(const char *inner_nas_msg);
void ms_sends_security_mode_complete(uint8_t utran_encryption);
-void ms_sends_assignment_complete(enum mgcp_codecs assigned_codec);
+void ms_sends_assignment_complete(const char *sdp_codec_name);
void gsup_rx(const char *rx_hex, const char *expect_tx_hex);
void send_sms(struct vlr_subscr *receiver,
struct vlr_subscr *sender,