neels has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31711 )
Change subject: msc: detect RTP to CN failure in call tests
......................................................................
msc: detect RTP to CN failure in call tests
When CN RTP is missing, the X2 timer will fire after all other call
signalling looks successful. So far we establish an MT call, wait three
seconds and directly disconnect, long before X2 or X2427 can fire.
Make X2 shorter. (By means of f_vty_config() from ttcn, so that we don't
need to edit various osmo-msc.cfg in various repositories. The short
timer is always critical for the test to be accurate.)
Add proper function to detect premature disconnect. Otherwise we just
get a cryptic message like "Couldn't find MnccExpect for incoming call"
because of MNCC messaging after the unexpected release event.
Change-Id: I3ccf541360cc8440e664f0e29494b9ce7b6f8943
---
M hnbgw/HNBGW_Tests.ttcn
M msc/BSC_ConnectionHandler.ttcn
2 files changed, 54 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/11/31711/1
diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 9b9b94e..8d39550 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -469,6 +469,10 @@
f_vty_transceive(HNBGWVTY, "enable");
/* TODO: CTRL? */
+
+ /* Configure the MGCP timeout so that a failure to set up all RTP streams triggers
within the time that we keep
+ * an otherwise established call open. */
+ f_vty_config(MSCVTY, "msc", "timer mgw X2 3");
}
/* global altstep for global guard timer; */
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index fe9187c..d96ae0b 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1349,6 +1349,33 @@
setverdict(pass);
}
+function f_call_keep_open(inout CallParameters cpars, float open_time := 5.0)
+runs on BSC_ConnHdlr {
+ log("Hold the call for some time");
+
+ timer T := open_time;
+ T.start;
+ alt {
+ [] MNCC.receive(tr_MNCC_DISC_ind(cpars.mncc_callref));
+ [] MNCC.receive(tr_MNCC_REL_ind(cpars.mncc_callref));
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(cpars.transaction_id)));
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id)));
+ [] BSSAP.receive(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+ [] BSSAP.receive(tr_BSSMAP_ClearCommand);
+ [] BSSAP.receive(tr_BSSMAP_ClearCommandCSFB);
+ [] BSSAP.receive(tr_RANAP_IuReleaseCommand(?));
+
+ [] T.timeout {
+ log("Call stayed open for ", open_time, " seconds, all is well.")
+ setverdict(pass);
+ return;
+ }
+ }
+
+ setverdict(fail, "An unexpected release event disconnected the active call
prematurely");
+ mtc.stop;
+}
+
/* Reply to a received CRCX with an OK (or the reply configured in cpars), using the
given parameters.
* Return true when an OK reply was sent, false otherwise.
* Count occurence of Osmux, include Osmux parameters in the reply if necessary. */
@@ -1797,8 +1824,7 @@
f_mt_call_establish(cpars);
- log("Hold the call for some time");
- f_sleep(3.0);
+ f_call_keep_open(cpars);
log("Hangup");
f_call_hangup(cpars, true);
@@ -1811,8 +1837,7 @@
f_mo_call_establish(cpars);
- log("Hold the call for some time");
- f_sleep(3.0);
+ f_call_keep_open(cpars);
log("Hangup");
f_call_hangup(cpars, false);
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31711
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: I3ccf541360cc8440e664f0e29494b9ce7b6f8943
Gerrit-Change-Number: 31711
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange