Skip to content

Commit

Permalink
bsc: Use different CIC in concurrent calls from same MSC
Browse files Browse the repository at this point in the history
The MSC (our TTCN3 emulation) expects to assign unique CIC for each
concurrent call, so that the BSC can properly differentiate and do the
proper connection setup.

Change-Id: Iac09590693bf39ccc90bf2b0645ca672a4787c95
  • Loading branch information
pespin committed Oct 2, 2023
1 parent 45a6dd3 commit b522e1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions bsc/BSC_Tests.ttcn
Original file line number Diff line number Diff line change
Expand Up @@ -1726,9 +1726,9 @@ testcase TC_assignment_cic_only(integer bssap_idx := 0) runs on test_CT {
}

/* generate an assignment request for either AoIP or SCCPlite */
function f_gen_ass_req(boolean osmux_enabled := false, integer bssap_idx := 0, charstring aoip_tla := "1.2.3.4") return PDU_BSSAP {
function f_gen_ass_req(boolean osmux_enabled := false, uint8_t ass_cid := 0, integer bssap_idx := 0, charstring aoip_tla := "1.2.3.4") return PDU_BSSAP {
var PDU_BSSAP ass_cmd;
var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(0));
var BSSMAP_IE_Osmo_OsmuxCID osmux_cid := valueof(ts_OsmuxCID(ass_cid));
if (mp_bssap_cfg[bssap_idx].transport == BSSAP_TRANSPORT_AoIP) {
var BSSMAP_IE_AoIP_TransportLayerAddress tla :=
valueof(f_ts_BSSMAP_IE_AoIP_TLA(aoip_tla, 2342));
Expand All @@ -1738,7 +1738,9 @@ function f_gen_ass_req(boolean osmux_enabled := false, integer bssap_idx := 0, c
ass_cmd := valueof(ts_BSSMAP_AssignmentReq(omit, tla));
}
} else {
var BSSMAP_IE_CircuitIdentityCode cic := valueof(ts_BSSMAP_IE_CIC(0,1));
var BIT8 ass_cid_bit := int2bit(ass_cid, 8);
var BSSMAP_IE_CircuitIdentityCode cic := valueof(ts_BSSMAP_IE_CIC(bit2int(ass_cid_bit >> 5),
bit2int(ass_cid_bit and4b '00011111'B)));
ass_cmd := valueof(ts_BSSMAP_AssignmentReq(cic, omit));
}
return ass_cmd;
Expand Down Expand Up @@ -12194,7 +12196,7 @@ private function f_vty_mgw_cfg_keepalive(integer mgw_nr := 1, integer req_intval
private const charstring COORD_CMD_ESTABLISHED := "COORD_CMD_ESTABLISHED";
private function f_TC_mgwpool_call_seq_1(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 PDU_BSSAP ass_cmd := f_gen_ass_req(ass_cid := 0);
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));

Expand All @@ -12207,7 +12209,7 @@ private function f_TC_mgwpool_call_seq_1(charstring id) runs on MSC_ConnHdlr {
}
private function f_TC_mgwpool_call_seq_2(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 PDU_BSSAP ass_cmd := f_gen_ass_req(ass_cid := 1);
ass_cmd.pdu.bssmap.assignmentRequest.channelType := valueof(ts_BSSMAP_IE_ChannelType);
ass_cmd.pdu.bssmap.assignmentRequest.codecList := valueof(ts_BSSMAP_IE_CodecList({ts_CodecFR}));

Expand Down
2 changes: 1 addition & 1 deletion bsc/MSC_ConnectionHandler.ttcn
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ runs on MSC_ConnHdlr {
var template MgcpCommand cmd;
var template MgcpResponse resp;
var integer cic := f_bssmap_ie_cic_2_int(ass_cmd.pdu.bssmap.assignmentRequest.circuitIdentityCode);
var MgcpEndpoint ep := int2str(cic) & "@mgw"; /* 1: matches value configured in BSC_Tests.ttcn pass in AssignReq */
var MgcpEndpoint ep := int2str(cic) & "@mgw"; /* matches value configured in BSC_Tests.ttcn pass in AssignReq */
var MgcpCallId call_id := '51234'H;
var SDP_attribute_list attributes := { valueof(ts_SDP_ptime(20)) };
if (g_pars.use_osmux_cn) {
Expand Down

0 comments on commit b522e1c

Please sign in to comment.