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/.
Harald Welte gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/5398
BSC_Tests: Ensure MSC passes SpeechCodecList in AoIP ASSIGNMENT
Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e
---
M bsc/BSC_Tests.ttcn
M library/BSSMAP_Templates.ttcn
2 files changed, 55 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/98/5398/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 77f3ef8..42de6be 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -484,6 +484,7 @@
const OCT8 kc := '0001020304050607'O;
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
+ ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation :=
valueof(ts_BSSMAP_IE_EncrInfo(kc, '01'O));
f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/0 assignment");
@@ -496,10 +497,25 @@
const OCT8 kc := '0001020304050607'O;
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
+ ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation :=
valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O));
f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/1 assignment");
}
+
+/* Exxpet ASSIGNMENT FAIL if mandatory IE is missing */
+testcase TC_assignment_fr_a5_1_codec_missing() runs on test_CT {
+ var template PDU_BSSAP exp_fail := tr_BSSMAP_AssignmentFail;
+ var BSSMAP_IE_AoIP_TransportLayerAddress tla := valueof(ts_BSSMAP_IE_AoIP_TLA4('01020304'O, 2342));
+ var PDU_BSSAP ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
+ const OCT8 kc := '0001020304050607'O;
+
+ ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
+ ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation :=
+ valueof(ts_BSSMAP_IE_EncrInfo(kc, '02'O));
+ f_assignment_exp(ass_cmd, exp_fail, "BSC didn't reject missing mandatory speech codec IE");
+}
+
testcase TC_assignment_fr_a5_3() runs on test_CT {
@@ -509,6 +525,7 @@
const OCT8 kc := '0001020304050607'O;
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
+ ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation :=
valueof(ts_BSSMAP_IE_EncrInfo(kc, '08'O));
f_assignment_exp(ass_cmd, exp_compl, "BSC failed TCH/F FR A5/3 assignment");
@@ -522,6 +539,7 @@
const OCT16 kc128 := kc & kc;
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
+ ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));
ass_cmd.pdu.bssmap.assignmentRequest.encryptionInformation :=
valueof(ts_BSSMAP_IE_EncrInfo(kc, '10'O));
ass_cmd.pdu.bssmap.assignmentRequest.kC128 := valueof(ts_BSSMAP_IE_Kc128(kc128));
@@ -1244,6 +1262,7 @@
execute( TC_assignment_sign() );
execute( TC_assignment_fr_a5_0() );
execute( TC_assignment_fr_a5_1() );
+ execute( TC_assignment_fr_a5_1_codec_missing() );
execute( TC_assignment_fr_a5_3() );
execute( TC_assignment_fr_a5_4() );
diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 87d5628..24a888c 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -388,6 +388,42 @@
kC128_Value := kc128
}
+/* 3.2.2.103 */
+template (value) BSSMAP_FIELD_CodecElement ts_CodecBase := {
+ codecType := GSM_FR,
+ tF := '0'B,
+ pT := '0'B,
+ pI := '0'B,
+ fI := '1'B,
+ extendedCodecType := omit,
+ s0_7 := omit,
+ s8_15 := omit
+}
+template (value) BSSMAP_FIELD_CodecElement ts_CodecFR modifies ts_CodecBase := {
+ codecType := GSM_FR
+}
+template (value) BSSMAP_FIELD_CodecElement ts_CodecEFR modifies ts_CodecBase := {
+ codecType := GSM_EFR
+}
+template (value) BSSMAP_FIELD_CodecElement ts_CodecHR modifies ts_CodecBase := {
+ codecType := GSM_HR
+}
+template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_F modifies ts_CodecBase := {
+ codecType := FR_AMR,
+ s0_7 := '11111111'B,
+ s8_15 := '01010111'B /* S11, S13 and S15 are reserved and coded with zeroes */
+}
+template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_H modifies ts_CodecBase := {
+ codecType := HR_AMR,
+ s0_7 := '00111111'B,
+ s8_15 := '00000111'B /* S6 - S7 and S11 – S15 are reserved and coded with zeroes */
+}
+template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := {
+ elementIdentifier := '7D'O,
+ lengthIndicator := 0, /* overwritten */
+ codecElements := valueof(elem)
+}
+
template PDU_BSSAP
ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit)
--
To view, visit https://gerrit.osmocom.org/5398
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I66deffc50b5adcc8707747c0baa2e65ee36bf18e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>