summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-02-21 17:35:01 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-02-21 17:42:16 +0100
commit674e517fec8a9108fd87a019edb742e3ac8b4388 (patch)
tree461d3bb56d64afe5feb5fd656b2fdd70b5a3c60b
parentb5a2296168e3b2c2d9ffec1b07142e4a9b0c3536 (diff)
MGCP_Test: Add testcase to test ts101318/rfc5993 conversionpmaier/hrmangle2
The MGW recentenly adds support to convert between ts101318 and rfc5993 when GSM-HR is used. Lets add a testcase for that. Change-Id: I96df45fe45b53088e07b26f14173a75498a84143 Related: OS#3807
-rw-r--r--mgw/MGCP_Test.ttcn58
-rw-r--r--mgw/expected-results.xml1
2 files changed, 59 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 9eff8c2..4969a3f 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1314,6 +1314,63 @@ module MGCP_Test {
setverdict(pass);
}
+
+ /* create two local RTP emulations; create two connections on MGW EP, see if
+ * exchanged data is converted bwtween ts101318 and rfc5993 */
+ testcase TC_ts101318_rfc5993_rtp_conversion() runs on dummy_CT {
+ var RtpFlowData flow[2];
+ var RtpemStats stats[2];
+ var MgcpResponse resp;
+ var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "2@" & c_mgw_domain;
+ var MgcpCallId call_id := '1226'H;
+
+ f_init(ep);
+
+ /* Turn on conversion mode */
+ f_vty_enter_config(MGWVTY);
+ f_vty_transceive(MGWVTY, "mgcp");
+ f_vty_transceive(MGWVTY, "rtp-patch rfc5993hr");
+
+ /* from us to MGW */
+ flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 111, "GSM-HR-08/8000"));
+ /* bind local RTP emulation sockets */
+ flow[0].em.portnr := 10000;
+ flow[0].rtp_cfg := c_RtpemDefaultCfg;
+ flow[0].rtp_cfg.tx_payload_type := flow[0].pt;
+ flow[0].rtp_cfg.rx_fixed_payload := '0b11b3eede60be4e3ec68838c7b5'O;
+ flow[0].rtp_cfg.tx_fixed_payload := '0b11b3eede60be4e3ec68838c7b5'O;
+ f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]);
+
+ /* from MGW back to us */
+ flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 111, "GSM-HR-08/8000"));
+ flow[1].em.portnr := 20000;
+ flow[1].rtp_cfg := c_RtpemDefaultCfg;
+ flow[1].rtp_cfg.tx_payload_type := flow[1].pt;
+ flow[1].rtp_cfg.rx_fixed_payload := '000b11b3eede60be4e3ec68838c7b5'O;
+ flow[1].rtp_cfg.tx_fixed_payload := '000b11b3eede60be4e3ec68838c7b5'O;
+ f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]);
+
+ f_rtpem_mode(RTPEM[1], RTPEM_MODE_BIDIR);
+ f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+
+ f_sleep(1.0);
+
+ f_flow_delete(RTPEM[0]);
+ f_flow_delete(RTPEM[1], ep, call_id);
+
+ stats[0] := f_rtpem_stats_get(RTPEM[0]);
+ stats[1] := f_rtpem_stats_get(RTPEM[1]);
+
+ f_rtpem_stats_err_check(stats[0]);
+ f_rtpem_stats_err_check(stats[1]);
+
+ /* Turn off conversion mode */
+ f_vty_transceive(MGWVTY, "no rtp-patch rfc5993hr");
+
+ setverdict(pass);
+ }
+
+
/* TODO: Double-DLCX (no retransmission) */
@@ -1364,5 +1421,6 @@ module MGCP_Test {
execute(TC_two_crcx_mdcx_and_rtp());
execute(TC_two_crcx_and_unsolicited_rtp());
execute(TC_two_crcx_and_one_mdcx_rtp_ho());
+ execute(TC_ts101318_rfc5993_rtp_conversion());
}
}
diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml
index b45ba1f..f5bc1a0 100644
--- a/mgw/expected-results.xml
+++ b/mgw/expected-results.xml
@@ -37,4 +37,5 @@
<testcase classname='MGCP_Test' name='TC_two_crcx_mdcx_and_rtp' time='MASKED'/>
<testcase classname='MGCP_Test' name='TC_two_crcx_and_unsolicited_rtp' time='MASKED'/>
<testcase classname='MGCP_Test' name='TC_two_crcx_and_one_mdcx_rtp_ho' time='MASKED'/>
+ <testcase classname='MGCP_Test' name='TC_ts101318_rfc5993_rtp_conversion' time='MASKED'/>
</testsuite>