bsc: improve TC_assignment_csd
Verify that CSD ipaccess CRCX/MDCX has the CSD RTP payload type, and
that the RSL_IE_IPAC_RTP_CSD_FMT IE is set with
RSL_IPA_RTP_CSD_TRAU_BTS.
Related: OS#4393
Change-Id: Id0e0c5631d7a36635e1ef49cf5bf554f0336556b
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index f40b19e..aa627b7 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1852,6 +1852,7 @@
private function f_tc_assignment_csd(charstring id) runs on MSC_ConnHdlr {
var template PDU_BSSAP exp_compl := f_gen_exp_compl();
var PDU_BSSAP ass_cmd := f_gen_ass_req();
+ var SDP_FIELD_PayloadType pt_csd := PT_CSD;
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelTypeCSD);
ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecCSData}));
@@ -1859,6 +1860,11 @@
ass_cmd.pdu.bssmap.assignmentRequest.channelType.speechId_DataIndicator := GSM0808_DATA_RATE_TRANSP_4k8;
f_establish_fully(ass_cmd, exp_compl);
+
+ if (g_media.bts.rtp_pt != enum2int(pt_csd)) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("unexpected RTP payload type: ", g_media.bts.rtp_pt));
+ }
+
f_perform_clear();
}
testcase TC_assignment_csd() runs on test_CT {
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index b3e6af6..fa7cd84 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -198,6 +198,28 @@
return -1;
}
+/* Verify that CSD CRCX/MDCX has the RSL_IE_IPAC_RTP_CSD_FMT IE, and that
+ * inside it the D value is set to RSL_IPA_RTP_CSD_TRAU_BTS. */
+private function f_ipacc_crcx_mdcx_check_rtp_pt_csd(RSL_Message rsl) runs on MSC_ConnHdlr {
+ var SDP_FIELD_PayloadType pt_csd := PT_CSD;
+ var RSL_IE_Body ie;
+
+ if (g_media.bts.rtp_pt != enum2int(pt_csd)) {
+ return;
+ }
+
+ if (f_rsl_find_ie(rsl, RSL_IE_IPAC_RTP_CSD_FMT, ie)) {
+ if (ie.ipa_rtp_csd_fmt.d != RSL_IPA_RTP_CSD_TRAU_BTS) {
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Rx unexpected IPAC CRCX for CSD with RTP_CSD_FMT IE");
+ }
+ return;
+ }
+
+ Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+ "Rx unexpected IPAC CRCX for CSD without RTP_CSD_FMT IE");
+}
+
/* altstep for handling of IPACC media related commands. Activated by as_Media() to test
* RSL level media handling */
altstep as_Media_ipacc(RSL_DCHAN_PT rsl_pt := RSL, RSL_DCHAN_PT rsl_pt_ho_target := RSL1) runs on MSC_ConnHdlr {
@@ -224,6 +246,7 @@
g_media.bts.local_osmux_cid := omit;
g_media.bts.remote_osmux_cid := omit;
}
+ f_ipacc_crcx_mdcx_check_rtp_pt_csd(rsl);
rsl_pt.send(ts_RSL_IPA_CRCX_ACK(g_chan_nr, g_media.bts.conn_id,
f_inet_addr(g_media.bts.bts.host),
g_media.bts.bts.port_nr,
@@ -262,6 +285,7 @@
g_media.bts.local_osmux_cid := omit;
g_media.bts.remote_osmux_cid := omit;
}
+ f_ipacc_crcx_mdcx_check_rtp_pt_csd(rsl);
rsl_pt.send(ts_RSL_IPA_MDCX_ACK(g_chan_nr, g_media.bts.conn_id,
f_inet_addr(g_media.bts.peer.host),
g_media.bts.peer.port_nr,