Change in osmo-ttcn3-hacks[master]: msc: fix Iu mo call

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Sun Nov 3 23:18:12 UTC 2019


neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939 )


Change subject: msc: fix Iu mo call
......................................................................

msc: fix Iu mo call

Change-Id: I0ead36333ab665147b8d222070ea5cf8afc555ec
---
M library/ranap/RANAP_Templates.ttcn
M msc/BSC_ConnectionHandler.ttcn
2 files changed, 48 insertions(+), 31 deletions(-)



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

diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn
index df4ea03..c616231 100644
--- a/library/ranap/RANAP_Templates.ttcn
+++ b/library/ranap/RANAP_Templates.ttcn
@@ -1305,7 +1305,7 @@
 				protocolIEs := {
 					{
 						id := id_RAB_SetupOrModifyList,
-						criticality := reject,
+						criticality := ?,
 						value_ := {
 							rAB_SetupOrModifyList := rab_sml
 						}
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 23697da..b11d24b 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1091,6 +1091,20 @@
 	}
 }
 
+private altstep as_optional_mgcp_dlcx(CallParameters cpars) runs on BSC_ConnHdlr {
+	var MgcpCommand mgcp_cmd;
+	var boolean respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx));
+	[] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
+		log("as_optional_mgcp_dlcx: rx MGCP DLCX");
+		if (respond_to_dlcx) {
+			MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id));
+		}
+		/* Without this 'repeat', currently active other interleave and alt series exit as soon as a
+		 * DLCX is handled. */
+		repeat;
+	}
+}
+
 function f_mo_call_establish(inout CallParameters cpars)
 runs on BSC_ConnHdlr {
 
@@ -1099,6 +1113,7 @@
 	var template MgcpResponse mgcp_resp;
 	var boolean respond_to_dlcx;
 	var PDU_BSSAP bssap;
+	var RANAP_PDU ranap;
 	var MgcpOsmuxCID osmux_cid;
 
 	cpars.mo_call := true;
@@ -1193,11 +1208,29 @@
 		}
 		BSSAP.send(bssap);
 		}
-	/*
-	[!g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_RabAssReq(rab_sml)) {
-		//BSSAP.send(ts_RANAP_RabAssResp(rab_sml)); FIXME
+	[] BSSAP.receive(tr_RANAP_RabAssReq(*)) -> value ranap {
+		log("f_mo_call_establish 4.iu: rx RANAP RAB Assignment Request");
+		var RAB_SetupOrModifiedList l := {
+			{
+				{
+					id := id_RAB_SetupOrModifiedItem,
+					criticality := ignore,
+					value_ := {
+					  rAB_SetupOrModifiedItem := {
+						rAB_ID := int2bit(23, 8),
+						transportLayerAddress := hex2bit( '350001c0a8021500000000000000000000000000'H),
+						iuTransportAssociation := {
+							bindingID := '040c0000'O
+						},
+						dl_dataVolumes := omit,
+						iE_Extensions := omit
+						}
+					}
+				}
+			}
+		};
+		BSSAP.send(ts_RANAP_RabAssResp(l));
 		}
-	*/
 
 	/* MDCX setting up the RAN side remote RTP address received from Assignment Complete */
 	[] MGCP.receive(tr_MDCX) -> value mgcp_cmd {
@@ -1315,48 +1348,32 @@
 	respond_to_dlcx := not (isbound(cpars.mgw_drop_dlcx) and valueof(cpars.mgw_drop_dlcx));
 
 	var default mdcx := activate(as_optional_mgcp_mdcx(cpars.mgw_conn_2.mgw_rtp_ip, cpars.mgw_conn_2.mgw_rtp_port));
+	var default dlcx := activate(as_optional_mgcp_dlcx(cpars));
 
 	/* clearing of radio channel */
-	interleave {
-	//[g_pars.ran_is_geran] BSSAP.receive(t_clear) {
-	[] BSSAP.receive(t_clear) {
+	alt {
+	[g_pars.ran_is_geran] BSSAP.receive(t_clear) {
 		log("f_call_hangup 5: rx BSSAP Clear Command");
 		BSSAP.send(ts_BSSMAP_ClearComplete);
 		BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
 		log("f_call_hangup 6: rx SCCP DISC");
+		setverdict(pass);
 		}
-	/*
-	[!g_pars.ran_is_geran] BSSAP.receive(t_iurel) {
+	[not g_pars.ran_is_geran] BSSAP.receive(tr_RANAP_IuReleaseCommand(?)) {
+		log("f_call_hangup 5.iu: rx Iu Release Command");
 		BSSAP.send(ts_RANAP_IuReleaseComplete);
 		BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
-		}
-	*/
-	[] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
-			log("f_call_hangup 7: rx MGCP DLCX");
-			if (respond_to_dlcx) {
-				MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id));
-			}
-			dlcx_contained_ci := f_MgcpCmd_contains_par(mgcp_cmd, "I");
+		log("f_call_hangup 6.iu: rx SCCP DISC");
+		setverdict(pass);
 		}
 	}
 
-	/* Two DLCXes expected, one for RAN and one for CN side.
-	 * Unless the first DLCX did not contain a CI, in which case it was a wildcard DLCX for both. */
-	if (dlcx_contained_ci) {
-		MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
-			log("f_call_hangup 8: rx MGCP DLCX");
-			if (respond_to_dlcx) {
-				MGCP.send(ts_DLCX_ACK2(mgcp_cmd.line.trans_id));
-			}
-		}
-	}
-
+	f_sleep(1.0);
 	f_create_mgcp_delete_ep(cpars.mgcp_ep);
 	log("f_call_hangup 9: done");
 
 	deactivate(mdcx);
-
-	setverdict(pass);
+	deactivate(dlcx);
 }
 
 function f_mt_call(inout CallParameters cpars)

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15939
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: I0ead36333ab665147b8d222070ea5cf8afc555ec
Gerrit-Change-Number: 15939
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191103/d389bcec/attachment.htm>


More information about the gerrit-log mailing list