mgw: Test DLCX in three diffeent (valid) configurations
DLCX can be with EP-only, with EP+CallId or with EP+CallId+ConnId,
let's test all three valid cases.
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index debe36c..9a2f754 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -621,8 +621,25 @@
setverdict(pass);
}
- /* Test (valid) CRCX followed by (valid) DLCX */
- testcase TC_crcx_and_dlcx() runs on dummy_CT {
+ /* Test (valid) CRCX followed by (valid) DLCX containig EP+CallId+ConnId */
+ testcase TC_crcx_and_dlcx_ep_callid_connid() runs on dummy_CT {
+ var template MgcpCommand cmd;
+ var MgcpResponse resp;
+ var MgcpEndpoint ep := "5@mgw";
+ var MgcpCallId call_id := '51234'H;
+
+ f_init(ep);
+
+ cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id);
+ resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK);
+
+ f_dlcx_ok(ep, call_id, extract_conn_id(resp));
+
+ setverdict(pass);
+ }
+
+ /* Test (valid) CRCX followed by (valid) DLCX containing EP+CallId */
+ testcase TC_crcx_and_dlcx_ep_callid() runs on dummy_CT {
var template MgcpCommand cmd;
var MgcpResponse resp;
var MgcpEndpoint ep := "5@mgw";
@@ -638,6 +655,24 @@
setverdict(pass);
}
+ /* Test (valid) CRCX followed by (valid) DLCX containing EP */
+ testcase TC_crcx_and_dlcx_ep() runs on dummy_CT {
+ var template MgcpCommand cmd;
+ var MgcpResponse resp;
+ var MgcpEndpoint ep := "5@mgw";
+ var MgcpCallId call_id := '51234'H;
+
+ f_init(ep);
+
+ cmd := ts_CRCX(get_next_trans_id(), ep, "recvonly", call_id);
+ resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK);
+
+ f_dlcx_ok(ep);
+
+ setverdict(pass);
+ }
+
+
/* TODO: DLCX of valid endpoint but invalid call-id */
/* TODO: Double-DLCX (retransmission) */
/* TODO: Double-DLCX (no retransmission) */
@@ -664,6 +699,8 @@
execute(TC_crcx_sdp());
execute(TC_mdcx_without_crcx());
execute(TC_dlcx_without_crcx());
- execute(TC_crcx_and_dlcx());
+ execute(TC_crcx_and_dlcx_ep_callid_connid());
+ execute(TC_crcx_and_dlcx_ep_callid());
+ execute(TC_crcx_and_dlcx_ep());
}
}