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

June 2024

  • 1 participants
  • 1566 discussions
[M] Change in osmo-ttcn3-hacks[master]: msc: test re-assignment to match codec with MT
by neels 25 Jun '24

25 Jun '24
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053?usp=email ) Change subject: msc: test re-assignment to match codec with MT ...................................................................... msc: test re-assignment to match codec with MT Related: osmo-msc I8760feaa8598047369ef8c3ab2673013bac8ac8a Depends: osmo-msc I0f1e1a551aed545b555b9f236fc5967b1e4cc940 Change-Id: I402ed0523a2a87b83f29c5577b2c828102005d53 --- M msc/BSC_ConnectionHandler.ttcn M msc/MSC_Tests.ttcn 2 files changed, 84 insertions(+), 7 deletions(-) Approvals: neels: Looks good to me, approved Jenkins Builder: Verified diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 109888a..16309ed 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -979,7 +979,11 @@ BearerCapability_TLV bearer_cap, /* which bearer capabilities to claim */ boolean emergency, /* is this an emergency call? */ boolean csd, /* is this a circuit switched data call? */ - BSSMAP_FIELD_CodecElement tch_codec_chosen, /* If TCH, which codec to send in BSSMAP Assignment Complete. */ + BSSMAP_FIELD_CodecElement ass_compl_chosen_codec, /* If TCH, which codec to send in BSSMAP Assignment Complete. */ + charstring mncc_alert_req_sends_remote_sdp, /* SDP string. MNCC_ALERT_REQ is when MO learns MT's codec capabilities */ + boolean expect_re_assignment, /* Set to true when mncc_alert_req_sends_remote_sdp should trigger a 2nd Assignment to adjust the codec */ + BSSMAP_FIELD_CodecElements re_ass_req_codecs, /* If expect_re_assignment: verify codecs seen in 2nd Assignment Request */ + BSSMAP_FIELD_CodecElement re_ass_compl_chosen_codec, /* If expect_re_assignment: What Codec (Chosen) to send back in 2nd Assignment Complete */ /* MNCC related parameters */ uint32_t mncc_callref optional, /* call reference on the MNCC side */ @@ -1017,7 +1021,11 @@ bearer_cap := valueof(ts_Bcap_voice), emergency := false, csd := false, - tch_codec_chosen := valueof(ts_CodecFR), + ass_compl_chosen_codec := ts_CodecFR, + mncc_alert_req_sends_remote_sdp := "", + expect_re_assignment := false, + re_ass_req_codecs := {ts_CodecFR}, + re_ass_compl_chosen_codec := ts_CodecFR, mncc_callref := omit, mncc_bearer_cap := valueof(ts_MNCC_bcap_voice), mncc_rtp_ip := "42.23.11.5", @@ -1058,7 +1066,11 @@ bearer_cap := ?, emergency := ?, csd := ?, - tch_codec_chosen := ?, + ass_compl_chosen_codec := ?, + mncc_alert_req_sends_remote_sdp := ?, + expect_re_assignment := ?, + re_ass_req_codecs := ?, + re_ass_compl_chosen_codec := ?, mncc_callref := *, mncc_bearer_cap := ?, mncc_rtp_ip := ?, @@ -1609,7 +1621,8 @@ } } -private function f_mo_call_establish__handle_assignment_request(inout CallParameters cpars, PDU_BSSAP ass_req) +private function f_mo_call_establish__handle_assignment_request(inout CallParameters cpars, PDU_BSSAP ass_req, + BSSMAP_FIELD_CodecElement tch_codec_chosen) runs on BSC_ConnHdlr { var BSSMAP_IE_AoIP_TransportLayerAddress tla; var BSSMAP_IE_SpeechCodec codec; @@ -1645,7 +1658,7 @@ if (cpars.csd) { codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecCSData})); } else { - codec := valueof(ts_BSSMAP_IE_SpeechCodec({cpars.tch_codec_chosen})); + codec := valueof(ts_BSSMAP_IE_SpeechCodec({tch_codec_chosen})); } var PDU_BSSAP bssap; @@ -1736,13 +1749,31 @@ BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(cpars.transaction_id))); /* Alerting */ - MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref)); + var MNCC_PDU mncc_alert_req := valueof(ts_MNCC_ALERT_req(cpars.mncc_callref)); + + /* Tell the MO call leg about MT's codecs, via SDP in MNCC */ + mncc_alert_req.u.signal.sdp := cpars.mncc_alert_req_sends_remote_sdp; + + MNCC.send(mncc_alert_req); + + if (cpars.expect_re_assignment) { + /* Another Assignment Request is expected after telling the MO call leg about MT's codecs */ + BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap; + + if (not match(bssap.pdu.bssmap.assignmentRequest.codecList.codecElements, + cpars.re_ass_req_codecs)) { + setverdict(fail, "MSC sent Assignment Request with unexpected codec list"); + mtc.stop; + } + + f_mo_call_establish__handle_assignment_request(cpars, bssap, cpars.re_ass_compl_chosen_codec); + } } //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); - f_mo_call_establish__handle_assignment_request(cpars, bssap); + f_mo_call_establish__handle_assignment_request(cpars, bssap, cpars.ass_compl_chosen_codec); } [] BSSAP.receive(tr_RANAP_RabAssReq(*)) -> value ranap { log("f_mo_call_establish 4.iu: rx RANAP RAB Assignment Request"); diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 898aeef..a503d20 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -7414,6 +7414,39 @@ vc_conn.done; } +friend function f_tc_lu_and_mo_call_reass_for_mt_codec(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr { + f_init_handler(pars); + var CallParameters cpars := valueof(t_CallParams); + /* MO will first choose GSM-FR = BSC returns GSM-FR in Assignment Complete's Codec (Chosen) */ + cpars.ass_compl_chosen_codec := valueof(ts_CodecFR); + /* But when the MT call leg responds, we learn that it only supports AMR */ + cpars.mncc_alert_req_sends_remote_sdp := + "v=0\r\n" + & "o=BSC_ConnectionHandler.ttcn 0 0 IN IP4 1.1.1.1\r\n" + & "s=GSM Call\r\n" + & "c=IN IP4 " & cpars.bss_rtp_ip & "\r\n" + & "t=0 0\r\n" + & "m=audio " & int2str(cpars.bss_rtp_port) & " RTP/AVP 112\r\n" + & "a=rtpmap:112 AMR/8000\r\n" + & "a=fmtp:112 octet-align=1\r\n" + & "a=ptime:20\r\n"; + /* MSC should ask for another Assignment after MNCC_ALERT_REQ, that should now contain only the remote call + * leg's capabilities, i.e. only AMR. */ + cpars.expect_re_assignment := true; + cpars.re_ass_req_codecs := {valueof(ts_CodecAMR_F), valueof(ts_CodecAMR_H)}; + /* When the MSC asks for another Assignment after MNCC_ALERT_REQ, we'll give it AMR. */ + cpars.re_ass_compl_chosen_codec := valueof(ts_CodecAMR_F); + f_perform_lu(); + f_mo_call(cpars); +} +testcase TC_lu_and_mo_call_reass_for_mt_codec() runs on MTC_CT { + var BSC_ConnHdlr vc_conn; + f_init(); + + vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call_reass_for_mt_codec), 7); + vc_conn.done; +} + control { execute( TC_cr_before_reset() ); execute( TC_lu_imsi_noauth_tmsi() ); @@ -7602,6 +7635,8 @@ execute( TC_lu_and_mo_csd() ); execute( TC_lu_and_mt_csd() ); + + execute( TC_lu_and_mo_call_reass_for_mt_codec() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053?usp=email 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: I402ed0523a2a87b83f29c5577b2c828102005d53 Gerrit-Change-Number: 35053 Gerrit-PatchSet: 5 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: msc: split off f_mo_call_establish__handle_assignment_request()
by neels 25 Jun '24

25 Jun '24
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35052?usp=email ) Change subject: msc: split off f_mo_call_establish__handle_assignment_request() ...................................................................... msc: split off f_mo_call_establish__handle_assignment_request() Subsequent patch wants to re-use that code. Split off to keep the patches small. Related: I402ed0523a2a87b83f29c5577b2c828102005d53 Change-Id: I98c6171a592dfe1573e15136c4ecf4ff234048d7 --- M msc/BSC_ConnectionHandler.ttcn 1 file changed, 74 insertions(+), 51 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn index 056a3c0..109888a 100644 --- a/msc/BSC_ConnectionHandler.ttcn +++ b/msc/BSC_ConnectionHandler.ttcn @@ -979,6 +979,7 @@ BearerCapability_TLV bearer_cap, /* which bearer capabilities to claim */ boolean emergency, /* is this an emergency call? */ boolean csd, /* is this a circuit switched data call? */ + BSSMAP_FIELD_CodecElement tch_codec_chosen, /* If TCH, which codec to send in BSSMAP Assignment Complete. */ /* MNCC related parameters */ uint32_t mncc_callref optional, /* call reference on the MNCC side */ @@ -1016,6 +1017,7 @@ bearer_cap := valueof(ts_Bcap_voice), emergency := false, csd := false, + tch_codec_chosen := valueof(ts_CodecFR), mncc_callref := omit, mncc_bearer_cap := valueof(ts_MNCC_bcap_voice), mncc_rtp_ip := "42.23.11.5", @@ -1056,6 +1058,7 @@ bearer_cap := ?, emergency := ?, csd := ?, + tch_codec_chosen := ?, mncc_callref := *, mncc_bearer_cap := ?, mncc_rtp_ip := ?, @@ -1606,6 +1609,63 @@ } } +private function f_mo_call_establish__handle_assignment_request(inout CallParameters cpars, PDU_BSSAP ass_req) +runs on BSC_ConnHdlr { + var BSSMAP_IE_AoIP_TransportLayerAddress tla; + var BSSMAP_IE_SpeechCodec codec; + var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; + + if (not ispresent(ass_req.pdu.bssmap.assignmentRequest.aoIPTransportLayer)) { + setverdict(fail, "MSC sent Assignment Request without AoIP Transport Layer IE"); + mtc.stop; + } + + var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass1 := + f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_1.mgw_rtp_ip, ?); + var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass2 := + f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_2.mgw_rtp_ip, ?); + + if (not match(ass_req.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass1) + and not match(ass_req.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass2)) { + log("Expected one of: 1:", tla_ass1, " 2:", tla_ass2); + log("Got:", ass_req.pdu.bssmap.assignmentRequest.aoIPTransportLayer); + setverdict(fail, "MSC sent Assignment Request with unexpected AoIP Transport Layer IE"); + mtc.stop; + } + + if (cpars.csd and not match(ass_req.pdu.bssmap.assignmentRequest.codecList.codecElements, + {ts_CodecCSData})) { + setverdict(fail, "MSC sent Assignment Request with unexpected codec list for CSD ", + ass_req.pdu.bssmap.assignmentRequest.codecList); + mtc.stop; + } + + tla := valueof(f_ts_BSSMAP_IE_AoIP_TLA(cpars.bss_rtp_ip, cpars.bss_rtp_port)); + + if (cpars.csd) { + codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecCSData})); + } else { + codec := valueof(ts_BSSMAP_IE_SpeechCodec({cpars.tch_codec_chosen})); + } + + var PDU_BSSAP bssap; + if (cpars.use_osmux) { + if (not ispresent(ass_req.pdu.bssmap.assignmentRequest.osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + osmuxCID := valueof(ts_OsmuxCID(0)); + if (cpars.use_osmux and not match(ass_req.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { + setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); + mtc.stop; + } + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); + } else { + bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); + } + BSSAP.send(bssap); +} + function f_mo_call_establish(inout CallParameters cpars) runs on BSC_ConnHdlr { @@ -1642,11 +1702,6 @@ return; } - var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass1 := - f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_1.mgw_rtp_ip, ?); - var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass2 := - f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_2.mgw_rtp_ip, ?); - var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port)); var boolean got_mncc_setup_compl_ind := false; var boolean got_cc_connect := false; @@ -1687,52 +1742,7 @@ //[g_pars.ran_is_geran] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap [] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit)) -> value bssap { log("f_mo_call_establish 4: rx Assignment Request"); - var BSSMAP_IE_AoIP_TransportLayerAddress tla; - var BSSMAP_IE_SpeechCodec codec; - var BSSMAP_IE_Osmo_OsmuxCID osmuxCID; - - if (not ispresent(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer)) { - setverdict(fail, "MSC sent Assignment Request without AoIP Transport Layer IE"); - mtc.stop; - } - if (not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass1) - and not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass2)) { - log("Expected one of: 1:", tla_ass1, " 2:", tla_ass2); - log("Got:", bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer); - setverdict(fail, "MSC sent Assignment Request with unexpected AoIP Transport Layer IE"); - mtc.stop; - } - - if (cpars.csd and not match(bssap.pdu.bssmap.assignmentRequest.codecList.codecElements, - {ts_CodecCSData})) { - setverdict(fail, "MSC sent Assignment Request with unexpected codec list for CSD ", - bssap.pdu.bssmap.assignmentRequest.codecList); - mtc.stop; - } - - tla := valueof(f_ts_BSSMAP_IE_AoIP_TLA(cpars.bss_rtp_ip, cpars.bss_rtp_port)); - - if (cpars.csd) { - codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecCSData})); - } else { - codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR})); - } - - if (cpars.use_osmux) { - if (not ispresent(bssap.pdu.bssmap.assignmentRequest.osmuxCID)) { - setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); - mtc.stop; - } - osmuxCID := valueof(ts_OsmuxCID(0)); - if (cpars.use_osmux and not match(bssap.pdu.bssmap.assignmentRequest.osmuxCID, osmuxCID)) { - setverdict(fail, "MSC sent AssignReq without expected OsmuxCID IE"); - mtc.stop; - } - bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec, osmuxCID)); - } else { - bssap := valueof(ts_BSSMAP_AssignmentComplete(omit, tla, codec)); - } - BSSAP.send(bssap); + f_mo_call_establish__handle_assignment_request(cpars, bssap); } [] BSSAP.receive(tr_RANAP_RabAssReq(*)) -> value ranap { log("f_mo_call_establish 4.iu: rx RANAP RAB Assignment Request"); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35052?usp=email 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: I98c6171a592dfe1573e15136c4ecf4ff234048d7 Gerrit-Change-Number: 35052 Gerrit-PatchSet: 4 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-msc[master]: do not invoke two Assignments (fixup for re-assignment)
by neels 25 Jun '24

25 Jun '24
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/37272?usp=email ) Change subject: do not invoke two Assignments (fixup for re-assignment) ...................................................................... do not invoke two Assignments (fixup for re-assignment) Make sure we wait for Assignment responses before dispatching an Assignment Request towards RAN. In particular, when the remote call leg sends its codecs, we may trigger Re-Assignment to match that codec. Make sure this is done only once: when receiving another SDP message, wait for the first Assignment. Implement as an osmo_timer, since there still is no osmo_fsm implementation for Assignment nor for CC trans FSM. Also it doesn't belong in the msc_a FSM (it should remain in state COMMUNICATING). Without this patch, new ttcn3 test TC_lu_and_mo_call_reass_for_mt_codec sporadically fails, if MNCC with SDP falls in-between Assignment Request and Assignment Complete. Related: osmo-msc d767c73a1f93253a54d6a8650a4cf2143353bba0 == I8760feaa8598047369ef8c3ab2673013bac8ac8a Related: osmo-ttcn3-hacks I402ed0523a2a87b83f29c5577b2c828102005d53 Change-Id: I0f1e1a551aed545b555b9f236fc5967b1e4cc940 --- M include/osmocom/msc/msc_a.h M src/libmsc/gsm_04_08_cc.c M src/libmsc/msc_a.c M src/libmsc/ran_infra.c 4 files changed, 75 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified neels: Looks good to me, approved diff --git a/include/osmocom/msc/msc_a.h b/include/osmocom/msc/msc_a.h index a5b624c..d180e38 100644 --- a/include/osmocom/msc/msc_a.h +++ b/include/osmocom/msc/msc_a.h @@ -137,6 +137,8 @@ /* There may be up to 7 incoming calls for this subscriber. This is the currently serviced voice call, * as in, the other person the subscriber is currently talking to. */ struct gsm_trans *active_trans; + + struct osmo_timer_list assignment_request_pending; } cc; struct msc_ho_state ho; diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c index 63b1699..fc4f730 100644 --- a/src/libmsc/gsm_04_08_cc.c +++ b/src/libmsc/gsm_04_08_cc.c @@ -772,7 +772,8 @@ const struct gsm_mncc_bearer_cap *bcap) { struct codec_filter *codecs = &trans->cc.codecs; - struct call_leg *cl = trans->msc_a ? trans->msc_a->cc.call_leg : NULL; + struct msc_a *msc_a = trans->msc_a; + struct call_leg *cl = msc_a ? msc_a->cc.call_leg : NULL; struct rtp_stream *rtp_cn = cl ? cl->rtp[RTP_TO_CN] : NULL; if (sdp[0]) { @@ -818,6 +819,16 @@ return; } + if (msc_a && osmo_timer_pending(&msc_a->cc.assignment_request_pending)) { + /* Still waiting for an Assignment Response. + * For example, when the remote call leg sends some MNCC with SDP with a mismatching codec, + * we start Re-Assignment to match that codec: we send an Assignment Request and wait for a response. + * When we receive another MNCC with SDP from the remote call leg before this Re-Assignment is + * completed, we must not trigger *another* Assignment Request, but instead wait for the Re-Assignment + * to come back with a response first. */ + return; + } + /* We've already completed Assignment of a voice channel (some time ago), and now the remote side has changed * to a mismatching codec (list). Try to re-assign this side to a matching codec. */ LOG_TRANS(trans, LOGL_INFO, "Remote call leg mismatches assigned codec: %s\n", diff --git a/src/libmsc/msc_a.c b/src/libmsc/msc_a.c index bff5e67..2e88a32 100644 --- a/src/libmsc/msc_a.c +++ b/src/libmsc/msc_a.c @@ -673,6 +673,8 @@ rtp_to_ran->codecs_known ? &rtp_to_ran->codecs : NULL, NULL); } +static void assignment_request_timeout_cb(void *data); + /* The MGW has given us a local IP address for the RAN side. Ready to start the Assignment of a voice channel. */ void msc_a_tx_assignment_cmd(struct msc_a *msc_a) { @@ -680,6 +682,19 @@ struct gsm_trans *cc_trans = msc_a->cc.active_trans; struct gsm0808_channel_type channel_type; + /* Do not dispatch another Assignment Command before an earlier assignment is completed. This is a sanity + * safeguard, ideally callers should not even invoke this function when an Assignment is already ongoing. + * (There is no osmo_fsm for Assignment / the CC trans code; when we refactor that one day, this timer should be + * an FSM state.) */ + if (osmo_timer_pending(&msc_a->cc.assignment_request_pending)) { + LOG_MSC_A(msc_a, LOGL_ERROR, + "Not transmitting Assignment, still waiting for the response to an earlier Assignment\n"); + return; + } + osmo_timer_setup(&msc_a->cc.assignment_request_pending, assignment_request_timeout_cb, msc_a); + osmo_timer_schedule(&msc_a->cc.assignment_request_pending, + osmo_tdef_get(msc_a->c.ran->tdefs, -37, OSMO_TDEF_S, 10), 0); + if (!cc_trans) { LOG_MSC_A(msc_a, LOGL_ERROR, "No CC transaction active\n"); call_leg_release(msc_a->cc.call_leg); @@ -943,6 +958,9 @@ vlr_subscr_enable_expire_lu(vsub); } + /* We no longer care about assignment responses. */ + osmo_timer_del(&msc_a->cc.assignment_request_pending); + /* If we're closing in a middle of a trans, we need to clean up */ trans_conn_closed(msc_a); @@ -1051,6 +1069,7 @@ vsub->msc_conn_ref = NULL; osmo_timer_del(&msc_a->lu_delay_timer); + osmo_timer_del(&msc_a->cc.assignment_request_pending); } const struct value_string msc_a_fsm_event_names[] = { @@ -1479,6 +1498,9 @@ const struct gsm0808_speech_codec *codec_if_known = ac->assignment_complete.codec_present ? &ac->assignment_complete.codec : NULL; + /* Pending assignment has worked out. We're no longer waiting for a response now. */ + osmo_timer_del(&msc_a->cc.assignment_request_pending); + /* For a voice group call, handling is performed by VGCS FSM */ gcc_trans = trans_find_by_type(msc_a, TRANS_GCC); if (gcc_trans) { @@ -1582,10 +1604,15 @@ } } +/* Invoked when Assignment has failed, either by a failure response, or by timeout. When failing on timeout, + * pass af == NULL. */ static void msc_a_up_call_assignment_failure(struct msc_a *msc_a, const struct ran_msg *af) { struct gsm_trans *trans; + /* Pending assignment has failed. We're no longer waiting for a response now. */ + osmo_timer_del(&msc_a->cc.assignment_request_pending); + /* For a normal voice call, there will be an rtp_stream FSM. */ if (msc_a->cc.call_leg && msc_a->cc.call_leg->rtp[RTP_TO_RAN]) { LOG_MSC_A(msc_a, LOGL_ERROR, "Assignment Failure, releasing call\n"); @@ -1617,6 +1644,12 @@ msc_a_release_cn(msc_a); } +static void assignment_request_timeout_cb(void *data) +{ + struct msc_a *msc_a = data; + msc_a_up_call_assignment_failure(msc_a, NULL); +} + static void msc_a_up_classmark_update(struct msc_a *msc_a, const struct osmo_gsm48_classmark *classmark, struct osmo_gsm48_classmark *dst) { diff --git a/src/libmsc/ran_infra.c b/src/libmsc/ran_infra.c index 79de7d2..0656cca 100644 --- a/src/libmsc/ran_infra.c +++ b/src/libmsc/ran_infra.c @@ -47,6 +47,8 @@ { .T = -36, .default_val = 0, .unit = OSMO_TDEF_MS, \ .desc = "Delay connection release after LU. Useful to optimize an SMSC to dispatch " \ "pending messages within the initial connection." }, \ + { .T = -37, .default_val = 10, \ + .desc = "Voice channel Assignment sanity timeout, when no response is received (should never happen)." }, \ struct osmo_tdef msc_tdefs_geran[] = { RAN_TDEFS -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/37272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I0f1e1a551aed545b555b9f236fc5967b1e4cc940 Gerrit-Change-Number: 37272 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-msc[master]: do not invoke two Assignments (fixup for re-assignment)
by neels 25 Jun '24

25 Jun '24
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/37272?usp=email ) Change subject: do not invoke two Assignments (fixup for re-assignment) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/37272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I0f1e1a551aed545b555b9f236fc5967b1e4cc940 Gerrit-Change-Number: 37272 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 25 Jun 2024 00:49:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in ...osmo-s1gw[master]: fix Copyright year in *.erl files: 2021 -> 2024
by fixeria 24 Jun '24

24 Jun '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37264?usp=email ) Change subject: fix Copyright year in *.erl files: 2021 -> 2024 ...................................................................... fix Copyright year in *.erl files: 2021 -> 2024 Change-Id: I610ced7d15a8a1652813c02978e2d7569c077337 --- M src/osmo_s1gw.erl M src/osmo_s1gw_app.erl M src/osmo_s1gw_sup.erl M src/s1ap_proxy.erl M src/sctp_client.erl M src/sctp_proxy.erl M src/sctp_server.erl 7 files changed, 16 insertions(+), 7 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo_s1gw.erl b/src/osmo_s1gw.erl index 422b3c7..71ac34c 100644 --- a/src/osmo_s1gw.erl +++ b/src/osmo_s1gw.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved diff --git a/src/osmo_s1gw_app.erl b/src/osmo_s1gw_app.erl index e41f5f5..c570804 100644 --- a/src/osmo_s1gw_app.erl +++ b/src/osmo_s1gw_app.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved diff --git a/src/osmo_s1gw_sup.erl b/src/osmo_s1gw_sup.erl index fe67f59..e13cd1a 100644 --- a/src/osmo_s1gw_sup.erl +++ b/src/osmo_s1gw_sup.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved diff --git a/src/s1ap_proxy.erl b/src/s1ap_proxy.erl index 6c143e8..579df40 100644 --- a/src/s1ap_proxy.erl +++ b/src/s1ap_proxy.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved diff --git a/src/sctp_client.erl b/src/sctp_client.erl index 06ee31d..24ec75d 100644 --- a/src/sctp_client.erl +++ b/src/sctp_client.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved diff --git a/src/sctp_proxy.erl b/src/sctp_proxy.erl index 7f389aa..a40371d 100644 --- a/src/sctp_proxy.erl +++ b/src/sctp_proxy.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved diff --git a/src/sctp_server.erl b/src/sctp_server.erl index 2c3893a..d0484e6 100644 --- a/src/sctp_server.erl +++ b/src/sctp_server.erl @@ -1,4 +1,4 @@ -%% Copyright (C) 2021 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> +%% Copyright (C) 2024 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> %% Author: Vadim Yanitskiy <vyanitskiy(a)sysmocom.de> %% %% All Rights Reserved -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37264?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I610ced7d15a8a1652813c02978e2d7569c077337 Gerrit-Change-Number: 37264 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: mgw: add TC_crcx_iufp_sendrecv and _recvonly
by fixeria 24 Jun '24

24 Jun '24
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37283?usp=email ) Change subject: mgw: add TC_crcx_iufp_sendrecv and _recvonly ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File mgw/MGCP_Test.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37283/comment/48e20faa_651b… PS1, Line 2850: not ispresent(resp.sdp) This is not needed, since `ispresent()` is safe against `foo.omit.bar`. `not ispresent(resp.sdp.connection)` alone would do the job, but this is not critical and can be kept like that. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37283?usp=email 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: I00fd854f058f7f53e2f579e8481ca2b9253f08e3 Gerrit-Change-Number: 37283 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jun 2024 20:04:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-msc[master]: do not invoke two Assignments (fixup for re-assignment)
by fixeria 24 Jun '24

24 Jun '24
Attention is currently required from: neels, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/37272?usp=email ) Change subject: do not invoke two Assignments (fixup for re-assignment) ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/37272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I0f1e1a551aed545b555b9f236fc5967b1e4cc940 Gerrit-Change-Number: 37272 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jun 2024 18:44:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-mgw[master]: do not FAIL on CRCX in sendrecv mode
by fixeria 24 Jun '24

24 Jun '24
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37282?usp=email ) Change subject: do not FAIL on CRCX in sendrecv mode ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37282?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ic089485543c5c97a35c7ae24fe0f622bf57d1976 Gerrit-Change-Number: 37282 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jun 2024 18:32:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-mgw[master]: mgcp_test: add CRCX for IUFP in sendrecv
by fixeria 24 Jun '24

24 Jun '24
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37281?usp=email ) Change subject: mgcp_test: add CRCX for IUFP in sendrecv ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37281?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Icdb1085b8e44ac4cff6c457163349b81e81bf765 Gerrit-Change-Number: 37281 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jun 2024 18:31:40 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-mgw[master]: mgcp_test: test a=ptime:20, not 40
by fixeria 24 Jun '24

24 Jun '24
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37280?usp=email ) Change subject: mgcp_test: test a=ptime:20, not 40 ...................................................................... Patch Set 1: Code-Review+1 (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/37280/comment/bec0c277_4d293c1c PS1, Line 11: never see anything else than 20 in practice IIRC, 40 ms is the case for TCH/H (half rate channels). But AFAICS, all definitions you're modifying are for TCH/F (like EFR), so it's fine. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37280?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ia2292198bf6e3b72912afd69607654ca77fd549d Gerrit-Change-Number: 37280 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 24 Jun 2024 17:46:28 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.