msc: call: allow using MGW conn IPs in either order

So far, the first CRCX dispatched by osmo-msc is used for the RAN side,
and the second one for the CN side. Upcoming changes to osmo-msc move
the CN side CRCX to an earlier point in time, reversing that order.

Allow both RTP addresses from the two MGCP CRCX OK to appear in the
Assignment Request message to RAN, so that the test succeeds for both
the current osmo-msc and the upcoming patch (see below).

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: Id0c98bc267daff352fc7db7712f967111970fd4d
This commit is contained in:
Neels Hofmeyr 2022-07-25 22:07:24 +02:00
parent a8cc0d4db0
commit 02d513efd8
2 changed files with 12 additions and 6 deletions

View File

@ -1066,8 +1066,10 @@ runs on BSC_ConnHdlr {
if (g_pars.ran_is_geran) {
var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
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, ?);
interleave {
/* Second MGCP CRCX (this time for MSS/CN side) */
@ -1084,7 +1086,7 @@ runs on BSC_ConnHdlr {
}
/* expect the MSC to trigger a BSSMAP ASSIGNMENT */
[] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) -> value bssap {
[] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, (tla_ass1, tla_ass2))) -> value bssap {
var template BSSMAP_IE_AoIP_TransportLayerAddress tla;
var BSSMAP_IE_SpeechCodec codec;
var BSSMAP_IE_Osmo_OsmuxCID osmuxCID;
@ -1486,8 +1488,10 @@ runs on BSC_ConnHdlr {
return;
}
var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
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;
@ -1533,8 +1537,9 @@ runs on BSC_ConnHdlr {
var BSSMAP_IE_SpeechCodec codec;
var BSSMAP_IE_Osmo_OsmuxCID osmuxCID;
if (not match(bssap.pdu.bssmap.assignmentRequest.aoIPTransportLayer, tla_ass)) {
log("Expected:", tla_ass);
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;

View File

@ -6695,7 +6695,8 @@ friend function f_tc_call_re_establishment_2(charstring id, BSC_ConnHdlrPars par
/* ...and with Assignment of a voice channel. */
var template BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_1.mgw_rtp_ip, ?);
(f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_1.mgw_rtp_ip, ?),
f_tr_BSSMAP_IE_AoIP_TLA(cpars.mgw_conn_2.mgw_rtp_ip, ?));
BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass));
/* By this Assignment Request, the CM Re-Establishment Request is implicitly accepted. */