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
Fri Mar 8 04:05:38 UTC 2019


Neels Hofmeyr has uploaded this change for review. ( 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, 43 insertions(+), 35 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/91/13191/1

diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index e6cf2b0..90cdf25 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -513,31 +513,37 @@
 		f_mgcp_par_append(mgcp_resp.params, ts_MgcpParSpecEP(cpars.mgcp_ep));
 		MGCP.send(mgcp_resp);
 		}
-	/* Second MGCP CRCX (this time for MSS/CN side) */
-	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,
-							{ int2str(cpars.rtp_payload_type) },
-							{ valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
-										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));
-		/* 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)) {
-		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));
+
+	interleave {
+	/* Second MGCP CRCX (this time for MSS/CN side) */
+	[] 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,
+								{ int2str(cpars.rtp_payload_type) },
+								{ valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
+											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));
+			/* 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 */
+	[] 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)));
 	MNCC.receive(tr_MNCC_SETUP_cnf(cpars.mncc_callref));
@@ -613,25 +619,27 @@
 		MGCP.send(mgcp_resp);
 		}
 	}
-	/* Second MGCP CRCX (this time for MSS/CN side) */
-	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,
-							{ int2str(cpars.rtp_payload_type) },
-							{ valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
-										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));
 
 	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))) {}
+	/* Second MGCP CRCX (this time for MSS/CN side) */
+	[] 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,
+								{ int2str(cpars.rtp_payload_type) },
+								{ valueof(ts_SDP_rtpmap(cpars.rtp_payload_type,
+											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));
+		}
+
+	[] 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: newchange
Gerrit-Change-Id: Ia06af1e347601949f4ddb19f963daa400766d9e7
Gerrit-Change-Number: 13191
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190308/15c76ea9/attachment.html>


More information about the gerrit-log mailing list