summaryrefslogtreecommitdiffstats
path: root/bsc/BSC_Tests.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'bsc/BSC_Tests.ttcn')
-rw-r--r--bsc/BSC_Tests.ttcn28
1 files changed, 23 insertions, 5 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 4c86e51..ec1be13 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -38,6 +38,7 @@ import from RSL_Emulation all;
import from MGCP_Emulation all;
import from MGCP_Templates all;
import from MGCP_Types all;
+import from MGCP_CodecPort all;
import from Osmocom_CTRL_Functions all;
import from Osmocom_CTRL_Types all;
@@ -295,7 +296,9 @@ function f_init_mgcp(charstring id) runs on test_CT {
callagent_udp_port := -1,
mgw_ip := mp_test_ip,
mgw_udp_port := 2427,
- multi_conn_mode := false
+ /* Enable it for SCCPlite, since we have 2 MGCP sockets towards MGW (UDP one +
+ the on with MGCP over IPA forwarded from MSC one) */
+ multi_conn_mode := (mp_bssap_cfg.transport == BSSAP_TRANSPORT_SCCPlite_SERVER)
};
vc_MGCP := MGCP_Emulation_CT.create(id);
@@ -1718,6 +1721,7 @@ private function f_connect_handler(inout MSC_ConnHdlr vc_conn) runs on test_CT {
}
connect(vc_conn:BSSAP, g_bssap.vc_RAN:CLIENT);
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
+ connect(vc_conn:MGCP_MULTI, vc_MGCP:MGCP_CLIENT_MULTI);
}
function f_start_handler(void_fn fn, template (omit) TestHdlrParams pars := omit)
@@ -2891,18 +2895,32 @@ testcase TC_ho_int() runs on test_CT {
/* Expecting MGCP to DLCX the endpoint's two connections: towards BTS and towards MSC */
private function f_expect_dlcx_conns(boolean exp_clear_cmpl := true) runs on MSC_ConnHdlr {
var MgcpCommand mgcp;
+ var template MgcpResponse mgcp_resp;
+ var MGCP_RecvFrom mrf;
+ var template MgcpMessage msg_resp;
+ var template MgcpMessage msg_dlcx := {
+ command := tr_DLCX()
+ }
- MGCP.receive(tr_DLCX()) -> value mgcp {
+ if (g_pars.aoip) {
+ MGCP.receive(tr_DLCX()) -> value mgcp {
log("Got first DLCX: ", mgcp);
MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
- };
+ };
- /* For SCCPLite, BSC doesn't handle the MSC-side */
- if (g_pars.aoip) {
MGCP.receive(tr_DLCX()) -> value mgcp {
log("Got second DLCX: ", mgcp);
MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
};
+ } else {
+ /* For SCCPLite, BSC doesn't handle the MSC-side */
+ MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) -> value mrf {
+ log("Got first DLCX: ", mrf.msg.command);
+ msg_resp := {
+ response := ts_DLCX_ACK2(mrf.msg.command.line.trans_id)
+ }
+ MGCP_MULTI.send(t_MGCP_SendToMrf(mrf, msg_resp));
+ };
}
if (exp_clear_cmpl) {