summaryrefslogtreecommitdiffstats
path: root/mgw
diff options
context:
space:
mode:
Diffstat (limited to 'mgw')
-rw-r--r--mgw/MGCP_Test.cfg3
-rw-r--r--mgw/MGCP_Test.ttcn42
2 files changed, 44 insertions, 1 deletions
diff --git a/mgw/MGCP_Test.cfg b/mgw/MGCP_Test.cfg
index 90d736b..2d46e9c 100644
--- a/mgw/MGCP_Test.cfg
+++ b/mgw/MGCP_Test.cfg
@@ -15,7 +15,8 @@
[MAIN_CONTROLLER]
[EXECUTE]
-MGCP_Test.control
+#MGCP_Test.control
+MGCP_Test.TC_conn_timeout
#MGCP_Test.TC_selftest
##MGCP_Test.TC_crcx
#MGCP_Test.TC_crcx_noprefix
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 31c2a1d..82429b9 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -2066,6 +2066,45 @@ module MGCP_Test {
/* TODO: AUCX (various) */
/* TODO: invalid verb (various) */
+
+ testcase TC_conn_timeout() runs on dummy_CT {
+ var RtpFlowData flow;
+ var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "1@" & c_mgw_domain;
+ var MgcpCallId call_id := '1225'H;
+ var MGCP_RecvFrom mrf;
+
+ f_init(ep);
+ log("Setting conn-timeout to 1s");
+ f_vty_config(MGWVTY, "mgcp", "conn-timeout 1");
+
+ log("Sending UDP data for 1.5s");
+ flow := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 111, "GSM-HR-08/8000/1"));
+ flow.em.portnr := 10000;
+ f_flow_create(RTPEM[0], ep, call_id, "loopback", flow);
+ f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+ f_sleep(1.5);
+
+ log("Stopping for 0.5s and resuming");
+ f_rtpem_mode(RTPEM[0], RTPEM_MODE_NONE);
+ f_sleep(0.5);
+ f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+ f_sleep(0.1);
+
+ log("Stopping for 1.5s, expecting to run into timeout");
+ f_rtpem_mode(RTPEM[0], RTPEM_MODE_NONE);
+ f_sleep(1.5);
+
+ log("Resuming should fail now");
+ f_rtpem_conn_refuse_expect(RTPEM[0]);
+ f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+ f_sleep(0.2);
+ f_rtpem_conn_refuse_verify(RTPEM[0]);
+
+ f_vty_config(MGWVTY, "mgcp", "no conn-timeout");
+
+ setverdict(pass);
+ }
+
control {
execute(TC_selftest());
execute(TC_crcx());
@@ -2119,5 +2158,8 @@ module MGCP_Test {
execute(TC_amr_oa_bwe_rtp_conversion());
execute(TC_amr_oa_oa_rtp_conversion());
execute(TC_amr_bwe_bwe_rtp_conversion());
+
+ execute(TC_conn_timeout());
+ /* execute(TC_conn_timeout_rtp_keepalive()); */
}
}