msc: f_tc_mt_t310: allow CRCX in either order

continued from Id0c98bc267daff352fc7db7712f967111970fd4d

Upcoming changes to osmo-msc move the CN side CRCX to an earlier point
in time, reversing that order. Introduce an 'interleave' to not care
about the ordering of MGCP and BSSAP messages.

Related: SYS#5066
Related: Ie433db1ba0c46d4b97538a969233c155cefac21c (osmo-msc)
Change-Id: I0ec348df08aa49ed58b3465de51b259fb74c0aea
This commit is contained in:
Neels Hofmeyr 2022-07-25 22:07:24 +02:00 committed by neels
parent 9b94149ef9
commit d8a4aee1c6
1 changed files with 18 additions and 12 deletions

View File

@ -1771,25 +1771,31 @@ friend function f_tc_mt_t310(charstring id, BSC_ConnHdlrPars pars) runs on BSC_C
/* NOTE: MSC is expected to start T310 here */
interleave {
/* MSC->MGW: CRCX (first) */
MGCP.receive(tr_CRCX) -> value mgcp_cmd;
f_handle_crcx(cpars, mgcp_cmd); /* MSC<-MGW: OK */
[] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
f_handle_crcx(cpars, mgcp_cmd); /* MSC<-MGW: OK */
}
/* BSC->BSC: BSSMAP ASSIGNMENT REQ */
BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, ?)) -> value bssap;
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 })));
[] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, ?)) -> value bssap {
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;
MGCP.send(ts_MDCX_ACK(mgcp_cmd.line.trans_id, cpars.mgw_conn_1.mgcp_connection_id,
sdp := omit));
[] MGCP.receive(tr_MDCX) -> value mgcp_cmd {
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_handle_crcx(cpars, mgcp_cmd); /* MSC<-MGW: OK */
MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref));
[] MGCP.receive(tr_CRCX) -> value mgcp_cmd {
f_handle_crcx(cpars, mgcp_cmd); /* MSC<-MGW: OK */
MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref));
}
}
/* Reschedule the guard timeout */
g_Tguard.start(30.0 + 10.0);