lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

March 2023

  • 1 participants
  • 3642 discussions
[S] Change in osmo-ttcn3-hacks[master]: msc: f_tc_mt_t310: logging instead of comments
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31709 ) Change subject: msc: f_tc_mt_t310: logging instead of comments ...................................................................... msc: f_tc_mt_t310: logging instead of comments Change-Id: Idccfac50e5f56abab6f8af4c18f7b083fb31b064 --- M msc/MSC_Tests.ttcn 1 file changed, 19 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/09/31709/1 diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 1767761..a0c86d1 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1776,30 +1776,32 @@ /* NOTE: MSC is expected to start T310 here */ interleave { - /* MSC->MGW: CRCX (first) */ [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { + f_logp(MSCVTY, "MSC->MGW: CRCX (first)"); f_handle_crcx(cpars, mgcp_cmd); /* MSC<-MGW: OK */ } - /* BSC->BSC: BSSMAP ASSIGNMENT REQ */ [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, ?)) -> value bssap { + f_logp(MSCVTY, "BSC->BSC: BSSMAP ASSIGNMENT REQ"); BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, aoip := f_ts_BSSMAP_IE_AoIP_TLA(cpars.bss_rtp_ip, cpars.bss_rtp_port), speechCodec := ts_BSSMAP_IE_SpeechCodec({ ts_CodecFR }))); } - /* MSC->MGW: MDCX */ [] MGCP.receive(tr_MDCX) -> value mgcp_cmd { + f_logp(MSCVTY, "MSC->MGW: MDCX"); MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id, sdp := omit)); } - /* MSC->MGW: CRCX (second) */ [] MGCP.receive(tr_CRCX) -> value mgcp_cmd { + f_logp(MSCVTY, "MSC->MGW: CRCX (second)"); f_handle_crcx(cpars, mgcp_cmd); /* MSC<-MGW: OK */ } - [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)); + [] MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref)) { + f_logp(MSCVTY, "MSC->MSCC: RTP CREATE"); + } } /* Reschedule the guard timeout */ @@ -1828,8 +1830,11 @@ } BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id))); + f_logp(MSCVTY, "rx DTAP CC DISC"); BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + f_logp(MSCVTY, "rx DTAP CC REL"); BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_REL_COMPL(cpars.transaction_id, '1'B))); + f_logp(MSCVTY, "tx DTAP CC REL COMPL"); alt { [] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31709 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idccfac50e5f56abab6f8af4c18f7b083fb31b064 Gerrit-Change-Number: 31709 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: msc: detect RTP to CN failure in call tests
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31711 ) Change subject: msc: detect RTP to CN failure in call tests ...................................................................... msc: detect RTP to CN failure in call tests When CN RTP is missing, the X2 timer will fire after all other call signalling looks successful. So far we establish an MT call, wait three seconds and directly disconnect, long before X2 or X2427 can fire. Make X2 shorter. (By means of f_vty_config() from ttcn, so that we don't need to edit various osmo-msc.cfg in various repositories. The short timer is always critical for the test to be accurate.) Add proper function to detect premature disconnect. Otherwise we just get a cryptic message like "Couldn't find MnccExpect for incoming call" because of MNCC messaging after the unexpected release event. Change-Id: I3ccf541360cc8440e664f0e29494b9ce7b6f8943 --- M hnbgw/HNBGW_Tests.ttcn M msc/BSC_ConnectionHandler.ttcn 2 files changed, 54 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/11/31711/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 9b9b94e..8d39550 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -469,6 +469,10 @@ f_vty_transceive(HNBGWVTY, "enable"); /* TODO: CTRL? */ + + /* Configure the MGCP timeout so that a failure to set up all RTP streams triggers within the time that we keep + * an otherwise established call open. */ + f_vty_config(MSCVTY, "msc", "timer mgw X2 3"); } /* global altstep for global guard timer; */ diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index fe9187c..d96ae0b 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -1349,6 +1349,33 @@ setverdict(pass); } +function f_call_keep_open(inout CallParameters cpars, float open_time := 5.0) +runs on BSC_ConnHdlr { + log("Hold the call for some time"); + + timer T := open_time; + T.start; + alt { + [] MNCC.receive(tr_MNCC_DISC_ind(cpars.mncc_callref)); + [] MNCC.receive(tr_MNCC_REL_ind(cpars.mncc_callref)); + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id))); + [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))); + [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND); + [] BSSAP.receive(tr_BSSMAP_ClearCommand); + [] BSSAP.receive(tr_BSSMAP_ClearCommandCSFB); + [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)); + + [] T.timeout { + log("Call stayed open for ", open_time, " seconds, all is well.") + setverdict(pass); + return; + } + } + + setverdict(fail, "An unexpected release event disconnected the active call prematurely"); + mtc.stop; +} + /* Reply to a received CRCX with an OK (or the reply configured in cpars), using the given parameters. * Return true when an OK reply was sent, false otherwise. * Count occurence of Osmux, include Osmux parameters in the reply if necessary. */ @@ -1797,8 +1824,7 @@ f_mt_call_establish(cpars); - log("Hold the call for some time"); - f_sleep(3.0); + f_call_keep_open(cpars); log("Hangup"); f_call_hangup(cpars, true); @@ -1811,8 +1837,7 @@ f_mo_call_establish(cpars); - log("Hold the call for some time"); - f_sleep(3.0); + f_call_keep_open(cpars); log("Hangup"); f_call_hangup(cpars, false); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31711 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I3ccf541360cc8440e664f0e29494b9ce7b6f8943 Gerrit-Change-Number: 31711 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: IuCS: remove IuUP LOOPBACK hack
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31693 ) Change subject: IuCS: remove IuUP LOOPBACK hack ...................................................................... IuCS: remove IuUP LOOPBACK hack Since osmo-mgw now supports IuUP properly, and since we indicate IUFP in the MGCP CRCX towars an IuCS RAN [1], we should no longer place the MGW endpoint in loopback mode to hack up an IuUP Initialization. This hack should have been removed along with [1]. [1] IUFP sent to MGW since this commit: commit 3a02d298049149f126fecc51e8445392cdb3b950 Refs: 1.8.0-13-g3a02d2980 Announce IuFP audio codec for UTRAN conns in CRCX towards MGW I7aca671e00ed27ac03f0d106b5a6b665a9bed4c1 Change-Id: I6446c64421e3e13e2b829293d031c98b99cd39a7 --- M src/libmsc/msc_a.c 1 file changed, 21 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/93/31693/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index a5ab2fb..e74a425 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1755,12 +1755,6 @@ MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, MSC_EV_CALL_LEG_RTP_COMPLETE); OSMO_ASSERT(cl); - - /* HACK: We put the connection in loopback mode at the beginning to - * trick the hNodeB into doing the IuUP negotiation with itself. - * This is a hack we need because osmo-mgw does not support IuUP yet, see OS#2459. */ - if (msc_a->c.ran->type == OSMO_RAT_UTRAN_IU) - cl->crcx_conn_mode[RTP_TO_RAN] = MGCP_CONN_LOOPBACK; } if (net->use_osmux != OSMUX_USAGE_OFF) { -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31693 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I6446c64421e3e13e2b829293d031c98b99cd39a7 Gerrit-Change-Number: 31693 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: comment: clarify L3 Info processing
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31692 ) Change subject: comment: clarify L3 Info processing ...................................................................... comment: clarify L3 Info processing Related: SYS#5066 Change-Id: Ia9180eeb88b31a2cf7dea72b43affd0c7b239ccb --- M src/libmsc/msc_a.c M src/libmsc/ran_msg_a.c 2 files changed, 13 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/92/31692/1 diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index d7e97cd..a5ab2fb 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1442,6 +1442,8 @@ .lai.plmn = msc_a_net(msc_a)->plmn, }; gsm0808_cell_id_to_cgi(&msc_a->via_cell, msg->compl_l3.cell_id); + + /* Submit the Complete Layer 3 Information DTAP */ rc = msc_a_up_l3(msc_a, msg->compl_l3.msg); if (!rc) { struct ran_conn *conn = msub_ran_conn(msc_a->c.msub); diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 24740a7..c9a13a2 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -104,7 +104,7 @@ .id = cil.id_list[0], }; - /* Parse Layer 3 Information element */ + /* Parse Layer 3 Information element; point ran_dec_msg->compl_l3.msg to the L3 Info data */ msg->l3h = (uint8_t*)ie_l3_info->val; msgb_l3trim(msg, ie_l3_info->len); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31692 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ia9180eeb88b31a2cf7dea72b43affd0c7b239ccb Gerrit-Change-Number: 31692 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: sdp_msg.c: fix missing rate in sdp_audio_codecs_add()
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31691 ) Change subject: sdp_msg.c: fix missing rate in sdp_audio_codecs_add() ...................................................................... sdp_msg.c: fix missing rate in sdp_audio_codecs_add() When a new entry is is added by sdp_audio_codecs_add(), also add the proper rate. Change-Id: I17ad8862f662975e2df72a332eb83df7fb048cad --- M src/libmsc/sdp_msg.c 1 file changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/91/31691/1 diff --git a/src/libmsc/sdp_msg.c b/src/libmsc/sdp_msg.c index 49fc5d2..dba1541 100644 --- a/src/libmsc/sdp_msg.c +++ b/src/libmsc/sdp_msg.c @@ -154,6 +154,7 @@ OSMO_STRLCPY_ARRAY(codec->subtype_name, subtype_name); if (fmtp) OSMO_STRLCPY_ARRAY(codec->fmtp, fmtp); + codec->rate = rate; return codec; } -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31691 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I17ad8862f662975e2df72a332eb83df7fb048cad Gerrit-Change-Number: 31691 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-msc[master]: add ran_infra.force_mgw_codecs_to_ran
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31694 ) Change subject: add ran_infra.force_mgw_codecs_to_ran ...................................................................... add ran_infra.force_mgw_codecs_to_ran Indicate in the ran_infra data structure whether a RAN needs specific codecs to be set up on the RAN facing MGW endpoint. This allows setting forced RAN codecs as first-class citizen in the ran_infra data structure, instead of special cases in the code (for IuUP on IuCS). Will be used in subsequent commit I37f65c36af2679ecba1040a11a9aa0eb9481d817, submitted separately for easier readability. Change-Id: I37f65c36af2679ecba1040a11a9aa0eb9481d817 --- M include/osmocom/msc/ran_infra.h M src/libmsc/msc_a.c M src/libmsc/ran_infra.c M tests/msc_vlr/msc_vlr_tests.c 4 files changed, 47 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/94/31694/1 diff --git a/include/osmocom/msc/ran_infra.h b/include/osmocom/msc/ran_infra.h index 38c424f..262a9c8 100644 --- a/include/osmocom/msc/ran_infra.h +++ b/include/osmocom/msc/ran_infra.h @@ -4,6 +4,7 @@ #include <osmocom/gsm/gsup.h> #include <osmocom/msc/sccp_ran.h> #include <osmocom/msc/ran_msg.h> +#include <osmocom/msc/sdp_msg.h> struct osmo_tdef; @@ -25,6 +26,10 @@ const ran_dec_l2_t ran_dec_l2; const ran_encode_t ran_encode; struct sccp_ran_inst *sri; + /* To always set up the MGW endpoint facing the RAN side with specific codecs, list those here. Otherwise leave + * empty (to use the result of codecs filtering). This exists for IuCS, to always set the MGW endpoint facing + * RAN to IUFP, to decapsulate the IuUP headers. */ + struct sdp_audio_codecs force_mgw_codecs_to_ran; }; extern struct ran_infra msc_ran_infra[]; diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index 4c7f763..7db1d0a 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1791,6 +1791,8 @@ return osmo_fsm_inst_dispatch(msc_a->c.fi, MSC_EV_CALL_LEG_RTP_LOCAL_ADDR_AVAILABLE, cl->rtp[RTP_TO_RAN]); if (msc_a->c.ran->type == OSMO_RAT_UTRAN_IU) { + /* FUTURE: ran_infra->force_mgw_codecs_to_ran is intended to be used here instead of the special + * condition on OSMO_RAT_UTRAN_IU and the mgcp_codecs value CODEC_IUFP */ codec = CODEC_IUFP; codec_ptr = &codec; } else { diff --git a/src/libmsc/ran_infra.c b/src/libmsc/ran_infra.c index c0eaa1a..35dfd61 100644 --- a/src/libmsc/ran_infra.c +++ b/src/libmsc/ran_infra.c @@ -108,6 +108,16 @@ .ran_dec_l2 = ran_iu_decode_l2, .ran_encode = ran_iu_encode, #endif + .force_mgw_codecs_to_ran = { + .count = 1, + .codec = { + { + .payload_type = 96, + .subtype_name = "VND.3GPP.IUFP", + .rate = 16000, + }, + }, + }, }, [OSMO_RAT_EUTRAN_SGS] = { .type = OSMO_RAT_EUTRAN_SGS, diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 6b80452..b0c60ed 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -408,6 +408,16 @@ .log_subsys = DIUCS, .tdefs = msc_tdefs_utran, .ran_encode = dont_ran_encode, + .force_mgw_codecs_to_ran = { + .count = 1, + .codec = { + { + .payload_type = 96, + .subtype_name = "VND.3GPP.IUFP", + .rate = 16000, + }, + }, + }, }, }; -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31694 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I37f65c36af2679ecba1040a11a9aa0eb9481d817 Gerrit-Change-Number: 31694 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-msc[master]: in ran_msg, return gsm0808_speech_codec (inter-MSC)
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31696 ) Change subject: in ran_msg, return gsm0808_speech_codec (inter-MSC) ...................................................................... in ran_msg, return gsm0808_speech_codec (inter-MSC) Get rid of enum mgcp_codecs in inter-MSC handover related code. Change-Id: I9c649f98738a55b8637ae600d5cdf81099fd08e5 --- M include/osmocom/msc/msc_ho.h M include/osmocom/msc/ran_msg.h M src/libmsc/msc_ho.c M src/libmsc/msc_t.c M src/libmsc/ran_msg_a.c 5 files changed, 45 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/96/31696/1 diff --git a/include/osmocom/msc/msc_ho.h b/include/osmocom/msc/msc_ho.h index a3f60c7..ca5618e 100644 --- a/include/osmocom/msc/msc_ho.h +++ b/include/osmocom/msc/msc_ho.h @@ -81,7 +81,7 @@ struct osmo_sockaddr_str ran_remote_rtp; /* The codec from Handover Request Acknowledge. */ bool codec_present; - enum mgcp_codecs codec; + struct gsm0808_speech_codec codec; /* Inter-MSC voice forwarding via MNCC, to the remote MSC. The Prepare Handover Response sent us the * Handover Number the remote MSC assigned. This is a call to that Handover Number, via PBX. diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h index d6b1e75..3e0ac60 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -162,7 +162,8 @@ struct osmo_sockaddr_str remote_rtp; bool codec_present; - enum mgcp_codecs codec; + struct gsm0808_speech_codec codec; + bool codec_with_iuup; }; struct ran_handover_command { diff --git a/src/libmsc/msc_ho.c b/src/libmsc/msc_ho.c index d53bb9e..e11abcf 100644 --- a/src/libmsc/msc_ho.c +++ b/src/libmsc/msc_ho.c @@ -681,7 +681,7 @@ msc_a->ho.new_cell.codec = hra->ran_dec->handover_request_ack.codec; if (hra->ran_dec->handover_request_ack.codec_present) { LOG_HO(msc_a, LOGL_DEBUG, "Request Ack contains codec %s\n", - osmo_mgcpc_codec_name(msc_a->ho.new_cell.codec)); + gsm0808_speech_codec_type_name(msc_a->ho.new_cell.codec.type)); } } @@ -728,13 +728,14 @@ /* Switch over to the new peer */ rtp_stream_set_remote_addr(rtp_to_ran, &msc_a->ho.new_cell.ran_remote_rtp); if (msc_a->ho.new_cell.codec_present) { - struct sdp_audio_codecs codecs = {}; - if (!sdp_audio_codecs_add_mgcp_codec(&codecs, msc_a->ho.new_cell.codec)) { - LOG_HO(msc_a, LOGL_ERROR, - "Cannot resolve codec: %s\n", osmo_mgcpc_codec_name(msc_a->ho.new_cell.codec)); - } else { - rtp_stream_set_codecs(rtp_to_ran, &codecs); - } + const struct codec_mapping *m; + m = codec_mapping_by_gsm0808_speech_codec_type(msc_a->ho.new_cell.codec.type); + /* TODO: use codec_mapping_by_gsm0808_speech_codec() to also match on codec.cfg */ + if (!m) + LOG_HO(msc_a, LOGL_ERROR, "Cannot resolve codec: %s\n", + gsm0808_speech_codec_type_name(msc_a->ho.new_cell.codec.type)); + else + rtp_stream_set_one_codec(rtp_to_ran, &m->sdp); } else { LOG_HO(msc_a, LOGL_ERROR, "No codec is set\n"); } diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index 787d736..7f316a7 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -38,6 +38,7 @@ #include <osmocom/msc/vlr.h> #include <osmocom/msc/msc_i.h> #include <osmocom/msc/gsm_data.h> +#include <osmocom/msc/codec_mapping.h> static struct osmo_fsm msc_t_fsm; @@ -448,11 +449,20 @@ LOG_MSC_T(msc_t, LOGL_DEBUG, "No RTP IP:port in Handover Request Ack\n"); } if (r->codec_present) { - LOG_MSC_T(msc_t, LOGL_DEBUG, "From Handover Request Ack, got %s\n", - osmo_mgcpc_codec_name(r->codec)); - rtp_stream_set_codecs_from_mgcp_codec(rtp_ran, r->codec); - if (rtp_cn) - rtp_stream_set_codecs_from_mgcp_codec(rtp_cn, r->codec); + const struct codec_mapping *m = codec_mapping_by_gsm0808_speech_codec_type(r->codec.type); + /* TODO: use codec_mapping_by_gsm0808_speech_codec() to also match on codec.cfg */ + if (!m) { + LOG_MSC_T(msc_t, LOGL_ERROR, "Cannot resolve codec in Handover Request Ack: %s / %s\n", + gsm0808_speech_codec_type_name(r->codec.type), + m ? sdp_audio_codec_to_str(&m->sdp) : "(unknown)"); + } else { + LOG_MSC_T(msc_t, LOGL_DEBUG, "From Handover Request Ack, got codec %s / %s\n", + gsm0808_speech_codec_type_name(r->codec.type), + sdp_audio_codec_to_str(&m->sdp)); + rtp_stream_set_one_codec(rtp_ran, &m->sdp); + if (rtp_cn) + rtp_stream_set_one_codec(rtp_cn, &m->sdp); + } } else { LOG_MSC_T(msc_t, LOGL_DEBUG, "No codec in Handover Request Ack\n"); } diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c index 56252f1..19402bc 100644 --- a/src/libmsc/ran_msg_a.c +++ b/src/libmsc/ran_msg_a.c @@ -671,13 +671,12 @@ } if (ie_chosen_speech_version) { - struct gsm0808_speech_codec sc; ran_dec_msg.handover_request_ack.chosen_speech_version = ie_chosen_speech_version->val[0]; /* the codec may be extrapolated from this Speech Version or below from Speech Codec */ - gsm0808_speech_codec_from_chan_type(&sc, ran_dec_msg.handover_request_ack.chosen_speech_version); - ran_dec_msg.handover_request_ack.codec_present = true; - ran_dec_msg.handover_request_ack.codec = ran_a_mgcp_codec_from_sc(&sc); + if (gsm0808_speech_codec_from_chan_type(&ran_dec_msg.handover_request_ack.codec, + ran_dec_msg.handover_request_ack.chosen_speech_version) == 0) + ran_dec_msg.handover_request_ack.codec_present = true; } if (ie_aoip_transp_addr) { @@ -692,14 +691,12 @@ } if (ie_speech_codec) { - struct gsm0808_speech_codec sc; - if (gsm0808_dec_speech_codec(&sc, ie_speech_codec->val, ie_speech_codec->len) < 0) + /* the codec may be extrapolated from above Speech Version or from this Speech Codec */ + if (gsm0808_dec_speech_codec(&ran_dec_msg.handover_request_ack.codec, + ie_speech_codec->val, ie_speech_codec->len) < 0) LOG_RAN_A_DEC_MSG(LOGL_ERROR, "unable to decode IE Speech Codec (Chosen)\n"); - else { - /* the codec may be extrapolated from above Speech Version or from this Speech Codec */ + else ran_dec_msg.handover_request_ack.codec_present = true; - ran_dec_msg.handover_request_ack.codec = ran_a_mgcp_codec_from_sc(&sc); - } } return ran_decoded(ran_dec, &ran_dec_msg); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9c649f98738a55b8637ae600d5cdf81099fd08e5 Gerrit-Change-Number: 31696 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-msc[master]: [codecs filter] use filter result in MT DTAP CC Setup
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31697 ) Change subject: [codecs filter] use filter result in MT DTAP CC Setup ...................................................................... [codecs filter] use filter result in MT DTAP CC Setup So far, we just forwarded the Bearer Capabilities received in MNCC from the remote MO call leg, and omitted Bearer Cap if the remote call leg did not provide any. Instead, always include Bearer Cap, and compose it from the codecs filter result. Hence the Bearer Cap is now an intersection of MS, BSS and remote call leg, instead of just the remote call leg. Related: SYS#5066 Change-Id: I9586221ef56352b7ce4b2604ae0dc04554145a78 --- M src/libmsc/gsm_04_08_cc.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err 3 files changed, 58 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/97/31697/1 diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index aaec0db..45c7b31 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -639,6 +639,7 @@ struct gsm48_hdr *gh; struct gsm_mncc *setup = arg; int rc, trans_id; + struct gsm_mncc_bearer_cap bearer_cap; gh = (struct gsm48_hdr *) msgb_put(msg, sizeof(*gh)); @@ -703,15 +704,42 @@ codec_filter_run(&trans->cc.codecs); LOG_TRANS(trans, LOGL_DEBUG, "codecs: %s\n", codec_filter_to_str(&trans->cc.codecs)); - /* NEAR FUTURE: upcoming patch will use the codecs filter to determine the Bearer Cap to send to the MS. - * So far just gathering information in the new codecs filter. */ - /* bearer capability */ - if (setup->fields & MNCC_F_BEARER_CAP) { - /* Create a copy of the bearer capability in the transaction struct, so we - * can use this information later */ - memcpy(&trans->bearer_cap, &setup->bearer_cap, sizeof(trans->bearer_cap)); - gsm48_encode_bearer_cap(msg, 0, &setup->bearer_cap); + /* Compose Bearer Capability information that reflects only the codecs (Speech Versions) remaining after + * intersecting MS, BSS and remote call leg restrictions. To store in trans for later use, and to include in + * the outgoing CC Setup message. */ + bearer_cap = (struct gsm_mncc_bearer_cap){ + .speech_ver = { -1 }, + }; + sdp_audio_codecs_to_bearer_cap(&bearer_cap, &trans->cc.codecs.result.audio_codecs); + rc = bearer_cap_set_radio(&bearer_cap); + if (rc) { + LOG_TRANS(trans, LOGL_ERROR, "Error composing Bearer Capability for CC Setup\n"); + trans_free(trans); + msgb_free(msg); + return rc; } + /* Create a copy of the bearer capability in the transaction struct, so we can use this information later */ + /* TODO: we should be able to drop trans->bearer_cap, replaced by the codecs filter. Verify this. + * So far let's just store it there like previous code did. */ + trans->bearer_cap = bearer_cap; + /* If no resulting codecs remain, error out. We cannot find a codec that matches both call legs. If the MGW were + * able to transcode, we could use non-identical codecs on each conn of the MGW endpoint, but we are aiming for + * finding a matching codec. */ + if (bearer_cap.speech_ver[0] == -1) { + LOG_TRANS(trans, LOGL_ERROR, "%s: no codec match possible: %s\n", + get_mncc_name(setup->msg_type), codec_filter_to_str(&trans->cc.codecs)); + + /* incompatible codecs */ + rc = mncc_release_ind(trans->net, trans, trans->callref, + GSM48_CAUSE_LOC_PRN_S_LU, + GSM48_CC_CAUSE_INCOMPAT_DEST /* TODO: correct cause code? */); + trans->callref = 0; + trans_free(trans); + msgb_free(msg); + return rc; + } + gsm48_encode_bearer_cap(msg, 0, &bearer_cap); + /* facility */ if (setup->fields & MNCC_F_FACILITY) gsm48_encode_facility(msg, 0, &setup->facility); diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index 06602f7..6c7a8ad 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -316,7 +316,7 @@ VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d"); btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup"); - dtap_expect_tx("0305" /* CC: Setup */); + dtap_expect_tx("0305" /* CC: Setup */ "04 07 60 04 05 0b 06 08 87" /* Bearer Cap */); ms_sends_security_mode_complete(1); btw("MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND"); @@ -419,7 +419,7 @@ VERBOSE_ASSERT(security_mode_ctrl_sent, == true, "%d"); btw("MS sends SecurityModeControl acceptance, VLR accepts, sends CC Setup"); - dtap_expect_tx("0305" /* CC: Setup */); + dtap_expect_tx("0305" /* CC: Setup */ "04 07 60 04 05 0b 06 08 87" /* Bearer Cap */); ms_sends_security_mode_complete(1); btw("MS confirms call, we create a RAN-side RTP and forward MNCC_CALL_CONF_IND"); diff --git a/tests/msc_vlr/msc_vlr_test_call.err b/tests/msc_vlr/msc_vlr_test_call.err index e3127ef..f5a6540 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -765,7 +765,7 @@ DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) new state NULL -> CALL_PRESENT DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Sending DTAP: CC GSM48_MT_CC_SETUP DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN encode: DTAP on UTRAN-Iu -- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 0305 +- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 030504076004050b060887 - DTAP matches expected message 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 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - Paging: now used by 3 (attached,CC,active-conn) @@ -1236,7 +1236,7 @@ DCC trans(CC:NULL IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP callref-0x423 tid-0) new state NULL -> CALL_PRESENT DIUCS msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: Sending DTAP: CC GSM48_MT_CC_SETUP DMSC msc_a(IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100:UTRAN-Iu:PAGING_RESP){MSC_A_ST_COMMUNICATING}: RAN encode: DTAP on UTRAN-Iu -- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 0305 +- DTAP --UTRAN-Iu--> MS: GSM48_MT_CC_SETUP: 030504076004050b060887 - DTAP matches expected message 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 DREF VLR subscr IMSI-901700000010650:MSISDN-42342:TMSI-0x03020100 - Paging: now used by 3 (attached,CC,active-conn) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31697 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I9586221ef56352b7ce4b2604ae0dc04554145a78 Gerrit-Change-Number: 31697 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-msc[master]: msc_vlr_tests: confirm crcx by RAN/CN side separately
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31699 ) Change subject: msc_vlr_tests: confirm crcx by RAN/CN side separately ...................................................................... msc_vlr_tests: confirm crcx by RAN/CN side separately Upcoming patch 'do CN CRCX first' changes the ordering of MGCP. To properly show the change in behavior in the msc_vlr_test_call, first clarify which side is expected to do MGCP when. Related: SYS#5066 Change-Id: I972e7426006e5b62f81ccfe4fa224ee9eed7a7ac --- M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 3 files changed, 40 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/99/31699/1 diff --git a/tests/msc_vlr/msc_vlr_test_call.c b/tests/msc_vlr/msc_vlr_test_call.c index ab92433..84614dc 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -218,7 +218,7 @@ btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN"); expect_crcx(RTP_TO_RAN); mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN)); btw("MGW acknowledges the CRCX, triggering Assignment"); expect_iu_rab_assignment(); @@ -228,7 +228,7 @@ btw("Assignment succeeds, triggering CRCX to CN"); expect_crcx(RTP_TO_CN); ms_sends_assignment_complete("AMR"); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_CN)); btw("CN RTP address is available, trigger MNCC_RTP_CREATE"); cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); @@ -351,7 +351,7 @@ "0406600402000581" /* Bearer Capability */ "15020100" /* Call Control Capabilities */ "40080402600400021f00" /* Supported Codec List */); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN)); OSMO_ASSERT(cc_to_mncc_tx_confirmed); btw("MNCC sends MNCC_RTP_CREATE"); @@ -365,7 +365,7 @@ btw("Assignment completes, triggering CRCX to CN"); expect_crcx(RTP_TO_CN); ms_sends_assignment_complete("AMR"); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_CN)); btw("When the CN side RTP address is known, send MNCC_RTP_CREATE"); cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); @@ -472,7 +472,7 @@ "0406600402000581" /* Bearer Capability */ "15020100" /* Call Control Capabilities */ "40080402600400021f00" /* Supported Codec List */); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN)); OSMO_ASSERT(cc_to_mncc_tx_confirmed); btw("MNCC sends MNCC_RTP_CREATE"); @@ -486,7 +486,7 @@ btw("Assignment completes, triggering CRCX to CN"); expect_crcx(RTP_TO_CN); ms_sends_assignment_complete("AMR"); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_CN)); btw("When the CN side RTP address is known, send MNCC_RTP_CREATE"); cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); @@ -573,7 +573,7 @@ btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN"); expect_crcx(RTP_TO_RAN); mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN)); btw("MGW acknowledges the CRCX, triggering Assignment"); expect_iu_rab_assignment(); @@ -583,7 +583,7 @@ btw("Assignment succeeds, triggering CRCX to CN"); expect_crcx(RTP_TO_CN); ms_sends_assignment_complete("AMR"); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_CN)); btw("CN RTP address is available, trigger MNCC_RTP_CREATE"); cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); @@ -669,7 +669,7 @@ btw("MNCC replies with MNCC_RTP_CREATE, causing MGW endpoint CRCX to RAN"); expect_crcx(RTP_TO_RAN); mncc_sends_to_cc(MNCC_RTP_CREATE, &mncc); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_RAN)); btw("MGW acknowledges the CRCX, triggering Assignment"); expect_iu_rab_assignment(); @@ -679,7 +679,7 @@ btw("Assignment succeeds, triggering CRCX to CN"); expect_crcx(RTP_TO_CN); ms_sends_assignment_complete("AMR"); - OSMO_ASSERT(got_crcx); + OSMO_ASSERT(crcx_scheduled(RTP_TO_CN)); btw("CN RTP address is available, trigger MNCC_RTP_CREATE"); cc_to_mncc_expect_tx("", MNCC_RTP_CREATE); diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c index 646633c..2300319 100644 --- a/tests/msc_vlr/msc_vlr_tests.c +++ b/tests/msc_vlr/msc_vlr_tests.c @@ -85,8 +85,8 @@ bool cc_to_mncc_tx_confirmed = false; uint32_t cc_to_mncc_tx_got_callref = 0; -enum rtp_direction expecting_crcx = -1; -bool got_crcx = false; +bool expecting_crcx[2] = {}; +bool got_crcx[2] = {}; extern int ran_dec_dtap_undup_pdisc_ctr_bin(uint8_t pdisc); @@ -651,8 +651,8 @@ osmo_gettimeofday_override = false; - expecting_crcx = -1; - got_crcx = false; + memset(expecting_crcx, 0, sizeof(expecting_crcx)); + memset(got_crcx, 0, sizeof(got_crcx)); bssap_assignment_expected = false; bssap_assignment_sent = false; @@ -846,9 +846,14 @@ void expect_crcx(enum rtp_direction towards) { - OSMO_ASSERT(expecting_crcx == -1); - expecting_crcx = towards; - got_crcx = false; + OSMO_ASSERT(!expecting_crcx[towards]); + expecting_crcx[towards] = true; + got_crcx[towards] = false; +} + +bool crcx_scheduled(enum rtp_direction towards) +{ + return got_crcx[towards]; } /* override, requires '-Wl,--wrap=call_leg_ensure_ci' */ @@ -863,9 +868,9 @@ log("MGW <--CRCX to %s-- MSC: callref=0x%x codecs=%s", rtp_direction_name(dir), call_id, codecs_if_known ? sdp_audio_codecs_to_str(codecs_if_known) : "unset"); - OSMO_ASSERT(expecting_crcx == dir); - expecting_crcx = -1; - got_crcx = true; + OSMO_ASSERT(expecting_crcx[dir]); + expecting_crcx[dir] = false; + got_crcx[dir] = true; call_leg_ensure_rtp_alloc(cl, dir, call_id, for_trans); if (codecs_if_known) diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 1a57101..737541a 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -275,5 +275,5 @@ #define EUSE_TO_MSC_USSD "0a0103" #define MSC_USSD_TO_EUSE "0a0103" -extern bool got_crcx; void expect_crcx(enum rtp_direction towards); +bool crcx_scheduled(enum rtp_direction towards); -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31699 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I972e7426006e5b62f81ccfe4fa224ee9eed7a7ac Gerrit-Change-Number: 31699 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in osmo-msc[master]: in ran_msg, return gsm0808_speech_codec (intra-MSC)
by neels 07 Mar '23

07 Mar '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/31695 ) Change subject: in ran_msg, return gsm0808_speech_codec (intra-MSC) ...................................................................... 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 --- M include/osmocom/msc/ran_msg.h M src/libmsc/msc_a.c M src/libmsc/ran_msg_a.c M src/libmsc/ran_msg_iu.c M tests/msc_vlr/msc_vlr_test_call.c M tests/msc_vlr/msc_vlr_test_call.err M tests/msc_vlr/msc_vlr_tests.c M tests/msc_vlr/msc_vlr_tests.h 8 files changed, 92 insertions(+), 43 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/95/31695/1 diff --git a/include/osmocom/msc/ran_msg.h b/include/osmocom/msc/ran_msg.h index 32b24a0..d6b1e75 100644 --- a/include/osmocom/msc/ran_msg.h +++ b/include/osmocom/msc/ran_msg.h @@ -240,7 +240,8 @@ 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 bcd4830..9c44b67 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -1325,8 +1325,8 @@ { 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 @@ } 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 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) { diff --git a/src/libmsc/ran_msg_iu.c b/src/libmsc/ran_msg_iu.c index ee1d0a5..eb7fc93 100644 --- a/src/libmsc/ran_msg_iu.c +++ b/src/libmsc/ran_msg_iu.c @@ -153,8 +153,16 @@ .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 a547935..06602f7 100644 --- a/tests/msc_vlr/msc_vlr_test_call.c +++ b/tests/msc_vlr/msc_vlr_test_call.c @@ -227,7 +227,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 1cfbbcc..e3127ef 100644 --- a/tests/msc_vlr/msc_vlr_test_call.err +++ b/tests/msc_vlr/msc_vlr_test_call.err @@ -314,13 +314,12 @@ 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 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 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 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 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 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); diff --git a/tests/msc_vlr/msc_vlr_tests.h b/tests/msc_vlr/msc_vlr_tests.h index 1f83013..1a57101 100644 --- a/tests/msc_vlr/msc_vlr_tests.h +++ b/tests/msc_vlr/msc_vlr_tests.h @@ -186,7 +186,7 @@ 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, -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/31695 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ia666cb697fbd140d7239089628faed93860ce671 Gerrit-Change-Number: 31695 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 291
  • 292
  • 293
  • 294
  • 295
  • 296
  • 297
  • ...
  • 365
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.