f_channel_needs_modify(): ask actual TCH lchan mode via VTY
I am introducing a BSC test case that runs through a assigning a TCH channel for signalling, and then using Channel Mode Modify to change its mode from signalling to speech. For this to work, f_channel_needs_modify() needs to actually look up the channel mode of the TCH and not assume that a TCH is always in speech mode. Related: SYS#4895 Change-Id: If30e2cec65da91cb5899ee29e2afb6696437a4c9
This commit is contained in:
parent
317c04f2ad
commit
c2425cc580
|
@ -45,6 +45,7 @@ import from L3_Templates all;
|
||||||
|
|
||||||
import from TELNETasp_PortType all;
|
import from TELNETasp_PortType all;
|
||||||
import from Osmocom_VTY_Functions all;
|
import from Osmocom_VTY_Functions all;
|
||||||
|
import from TCCConversion_Functions all;
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -955,21 +956,30 @@ return boolean {
|
||||||
/* Determine if the channel mode specified within rsl_chan_nr requires a
|
/* Determine if the channel mode specified within rsl_chan_nr requires a
|
||||||
* MODE MODIFY in to match the channel mode specified by given BSSMAP
|
* MODE MODIFY in to match the channel mode specified by given BSSMAP
|
||||||
* ChannelType */
|
* ChannelType */
|
||||||
function f_channel_needs_modify(BSSMAP_IE_ChannelType bssmap, RslChannelNr rsl_chan_nr)
|
function f_channel_needs_modify(TELNETasp_PT vty, BSSMAP_IE_ChannelType bssmap, RslChannelNr rsl_chan_nr)
|
||||||
return boolean {
|
return boolean {
|
||||||
|
|
||||||
/* FIXME: This tests the rsl_chan_nr to determine if we are on a
|
|
||||||
* signalling channel or not. Unfortunately this may lead to false
|
|
||||||
* results if we are on a TCH. The problem is that a TCH may be also
|
|
||||||
* used in signalling mode, but this function assumes that only SDCCH4
|
|
||||||
* and SDCCH8 are used as signalling channels at all. */
|
|
||||||
|
|
||||||
var boolean current_signalling := false;
|
var boolean current_signalling := false;
|
||||||
var boolean desired_signalling := false;
|
var boolean desired_signalling := false;
|
||||||
|
|
||||||
select (rsl_chan_nr) {
|
select (rsl_chan_nr) {
|
||||||
case (t_RslChanNr_SDCCH4(?, ?)) { current_signalling := true; }
|
case (t_RslChanNr_SDCCH4(?, ?)) { current_signalling := true; }
|
||||||
case (t_RslChanNr_SDCCH8(?, ?)) { current_signalling := true; }
|
case (t_RslChanNr_SDCCH8(?, ?)) { current_signalling := true; }
|
||||||
|
case (t_RslChanNr_Bm(?)) {
|
||||||
|
/* TCH/F, always subslot 0 */
|
||||||
|
var charstring res := f_vty_transceive_ret(vty, "show lchan 0 0 " & int2str(rsl_chan_nr.tn) & " 0");
|
||||||
|
if (f_strstr(res, "Channel Mode / Codec: SIGNALLING", 0) >= 0) {
|
||||||
|
current_signalling := true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case (t_RslChanNr_Lm(?, ?)) {
|
||||||
|
/* TCH/H */
|
||||||
|
var charstring res := f_vty_transceive_ret(vty, "show lchan 0 0 " & int2str(rsl_chan_nr.tn)
|
||||||
|
& " " & int2str(rsl_chan_nr.u.lm.sub_chan));
|
||||||
|
if (f_strstr(res, "Channel Mode / Codec: SIGNALLING", 0) >= 0) {
|
||||||
|
current_signalling := true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bssmap.speechOrDataIndicator == '0011'B) {
|
if (bssmap.speechOrDataIndicator == '0011'B) {
|
||||||
|
@ -1134,7 +1144,7 @@ runs on MSC_ConnHdlr {
|
||||||
* channel, we must now check if the mode of the current
|
* channel, we must now check if the mode of the current
|
||||||
* channel is compatible. If not we expect the BSC to modify
|
* channel is compatible. If not we expect the BSC to modify
|
||||||
* the mode */
|
* the mode */
|
||||||
exp_modify := f_channel_needs_modify(ass_cmd.pdu.bssmap.assignmentRequest.channelType, g_chan_nr);
|
exp_modify := f_channel_needs_modify(BSCVTY, ass_cmd.pdu.bssmap.assignmentRequest.channelType, g_chan_nr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Some test situations will involve MGCP transactions on a media
|
/* Some test situations will involve MGCP transactions on a media
|
||||||
|
|
Loading…
Reference in New Issue