Change in osmo-ttcn3-hacks[master]: msc: for mo and mt call, interleave MGCP and Assignment

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Mar 17 14:39:58 UTC 2019


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13191 )

Change subject: msc: for mo and mt call, interleave MGCP and Assignment
......................................................................

msc: for mo and mt call, interleave MGCP and Assignment

Upcoming osmo-msc changes move away from the current ordering of MGCP and
Assignment messages. Allow these async dialogs to appear in any order.

Change-Id: Ia06af1e347601949f4ddb19f963daa400766d9e7
---
M msc/BSC_ConnectionHandler.ttcn
1 file changed, 21 insertions(+), 13 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index e6cf2b0..c7a4a71 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -513,8 +513,13 @@
 		f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep));
 		MGCP.send(mgcp_resp);
 		}
+
+	var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
+		valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss));
+
+	interleave {
 	/* Second MGCP CRCX (this time for MSS/CN side) */
-	MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
+	[] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
 		var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss,
 							hex2str(cpars.mgcp_call_id), "42",
 							cpars.mgw_rtp_port_mss,
@@ -525,18 +530,19 @@
 		MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp));
 		/* MSC acknowledges the MNCC_CREATE to the MNCC handler */
 		MNCC.receive(tr_MNCC_RTP_CREATE(cpars.mncc_callref));
-	}
+		}
 
 	/* expect the MSC to trigger a BSSMAP ASSIGNMENT */
-	var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
-		valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss));
-	BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) {
+	[] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) {
 		var BSSMAP_IE_AoIP_TransportLayerAddress tla;
 		var BSSMAP_IE_SpeechCodec codec;
+
 		tla := valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.bss_rtp_ip), cpars.bss_rtp_port));
 		codec := valueof(ts_BSSMAP_IE_SpeechCodec({ts_CodecFR}));
+
 		BSSAP.send(ts_BSSMAP_AssignmentComplete(omit, tla, codec));
 		}
+	}
 
 	/* MS -> MSC: ALERTING */
 	BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_CONNECT(cpars.transaction_id)));
@@ -613,8 +619,12 @@
 		MGCP.send(mgcp_resp);
 		}
 	}
+
+	var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
+		valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss));
+	interleave {
 	/* Second MGCP CRCX (this time for MSS/CN side) */
-	MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
+	[] MGCP.receive(tr_CRCX(cpars.mgcp_ep)) -> value mgcp_cmd {
 		var SDP_Message sdp := valueof(ts_SDP(cpars.mgw_rtp_ip_mss, cpars.mgw_rtp_ip_mss,
 							hex2str(cpars.mgcp_call_id), "42",
 							cpars.mgw_rtp_port_mss,
@@ -623,15 +633,13 @@
 										cpars.rtp_sdp_format)),
 							  valueof(ts_SDP_ptime(20)) }));
 		MGCP.send(ts_CRCX_ACK(mgcp_cmd.line.trans_id, cpars.mgcp_connection_id_mss, sdp));
-	}
 
-	/* Alerting */
-	MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref));
+		/* Alerting */
+		MNCC.send(ts_MNCC_ALERT_req(cpars.mncc_callref));
+		}
 
-	var BSSMAP_IE_AoIP_TransportLayerAddress tla_ass :=
-		valueof(ts_BSSMAP_IE_AoIP_TLA4(f_inet_addr(cpars.mgw_rtp_ip_bss),cpars.mgw_rtp_port_bss));
-	interleave {
-	[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) {}
+	[] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(cpars.transaction_id))) {
+		}
 	/* expect AoIP IP/Port to match what we returned in CRCX_ACK above */
 	[] BSSAP.receive(tr_BSSMAP_AssignmentReq(omit, tla_ass)) {
 		var BSSMAP_IE_AoIP_TransportLayerAddress tla;

-- 
To view, visit https://gerrit.osmocom.org/13191
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia06af1e347601949f4ddb19f963daa400766d9e7
Gerrit-Change-Number: 13191
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190317/ecf4c662/attachment.html>


More information about the gerrit-log mailing list