BSSMAP_Emulation: Parameter to skip seq no patching
This is needed to check that duplicated messages will actually be thrown
away by the MSC.
Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659
diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index 67d9e98..5f8fe4f 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -70,6 +70,7 @@
/* similar to PDU_BSSAP with DTAP, but DTAP is already decoded! */
type record PDU_DTAP_MO {
OCT1 dlci optional,
+ boolean skip_seq_patching optional,
PDU_ML3_MS_NW dtap
}
@@ -84,8 +85,9 @@
dtap := dtap
}
-template PDU_DTAP_MO ts_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := '00'O) := {
+template PDU_DTAP_MO ts_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := '00'O, boolean skip_seq_patching := false) := {
dlci := dlci,
+ skip_seq_patching := skip_seq_patching,
dtap := dtap
}
@@ -649,7 +651,9 @@
/* convert from decoded DTAP to encoded DTAP */
var octetstring l3_enc := enc_PDU_ML3_MS_NW(dtap_mo.dtap);
/* patch correct L3 send sequence number N(SD) into l3_enc */
- f_ML3_patch_seq(ConnectionTable[idx], dtap_mo.dtap, l3_enc);
+ if (dtap_mo.skip_seq_patching == false) {
+ f_ML3_patch_seq(ConnectionTable[idx], dtap_mo.dtap, l3_enc);
+ }
bssap := valueof(ts_BSSAP_DTAP(l3_enc, dtap_mo.dlci));
BSSAP.send(ts_BSSAP_DATA_req(ConnectionTable[idx].sccp_conn_id, bssap));
}
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 97b26d2..0627aa2 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -675,7 +675,7 @@
/* Send DTMF */
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));
+ 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")) {}
@@ -685,7 +685,7 @@
}
}
- BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap));
+ 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")) {
@@ -697,7 +697,7 @@
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))
+ BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
alt {
[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { }
[] T.timeout {