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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936 )
Change subject: improve/fix f_tc_mo_setup_dtmf_dup
......................................................................
improve/fix f_tc_mo_setup_dtmf_dup
- Fix error log for a missing final DTMF.
- Instead of code dup to establish a call, use f_mo_call_establish(). This
will make the test benefit from changes to f_mo_call_establish() (which will
soon come up to accomodate changes in osmo-msc's codec negotiation).
- Instead of hardcoding the expected N_SD counter values to detect DTAP
duplicates, use f_bssmap_last_n_sd() and f_next_n_sd(), so that the N_SD
counter is correct regardless of how many DTAP were sent in
f_mo_call_establish().
- Instead of hardcoding a correct N_SD in the end, use skip_seq_patching ==
false, so that the ttcn DTAP correctly tracks N_SD for subsequent call
release messages.
- Release the call.
Change-Id: Ibfa8b906764f2d5ed75fe74125be42af4546e864
---
M msc/BSC_ConnectionHandler.ttcn
M msc/MSC_Tests.ttcn
2 files changed, 26 insertions(+), 16 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 5b0a125..0ddc911 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -1273,50 +1273,58 @@
var MgcpCommand mgcp_cmd;
var template PDU_ML3_MS_NW dtmf_dtap;
- f_establish_fully();
+ f_mo_call_establish(cpars);
- /* Create MNCC and MGCP expect */
- f_create_mncc_expect(hex2str(cpars.called_party));
- f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
+ /* Send DTMF: send the exact same DTAP message twice, the dup should be filtered out by
+ * 3GPP TS 24.007 11.2.3.2 Message Type Octet / Duplicate Detection. */
- BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party)));
- MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(cpars.called_party)))) -> value mncc;
- cpars.mncc_callref := mncc.u.signal.callref;
+ /* Find out the next NSD that will be used, from RAN emulation. */
+ var N_Sd_Array last_n_sd := f_bssmap_last_n_sd();
+ var uint2_t next_n_sd := f_next_n_sd(last_n_sd, 0 /* cc is index 0 */);
- /* Send DTMF */
+ /* Compose DTAP with this correct NSD */
dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "2");
- dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(2, 2);
- BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
+
+ /* Here, pass skip_seq_patching == false so that the RAN Emulation NSD increments after this message. */
+ BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, false));
T.start;
alt {
- [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {}
+ [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {
+ log("f_mo_seq_dtmf_dup() 1: got first START_DTMF_ind");
+ }
[] T.timeout {
setverdict(fail, "Timeout waiting for START_DTMF_ind");
mtc.stop;
}
}
+ /* Send the exact same DTAP with above NSD, which is now incorrect (has not incremented), so that this message
+ * will get filtered by the duplicate detection. Write NSD into DTAP and pass skip_seq_patching == true. */
+ dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(next_n_sd, 2);
BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
T.start;
alt {
[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {
- setverdict(fail, "Received duplicate START_DTMF_ind");
+ setverdict(fail, "f_mo_seq_dtmf_dup() 2: Received duplicate START_DTMF_ind");
mtc.stop;
}
[] T.timeout { }
}
+ /* Here the NSD should be correct again and we see a DTMF. */
dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "3");
- dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(3, 2);
- BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
+ BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, false));
alt {
- [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { }
+ [] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) {
+ log("f_mo_seq_dtmf_dup() 3: got second START_DTMF_ind");
+ }
[] T.timeout {
- setverdict(fail, "Received duplicate START_DTMF_ind");
+ setverdict(fail, "Timeout waiting for final START_DTMF_ind");
mtc.stop;
}
}
+ f_call_hangup(cpars, true);
setverdict(pass);
}
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index fbb471e..c290d7c 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1776,6 +1776,8 @@
cpars.bss_rtp_port := 1110;
cpars.mgcp_connection_id_bss := '22222'H;
cpars.mgcp_connection_id_mss := '33333'H;
+ cpars.mgcp_ep := "rtpbridge/1 at mgw";
+ cpars.mo_call := true;
f_perform_lu();
f_mo_seq_dtmf_dup(cpars);
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15936
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: Ibfa8b906764f2d5ed75fe74125be42af4546e864
Gerrit-Change-Number: 15936
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191105/72a96e4f/attachment.htm>