aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mgw/MGCP_Test.ttcn64
-rw-r--r--mgw/expected-results.xml3
2 files changed, 67 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index a0a836b5..467ebfce 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1380,6 +1380,67 @@ module MGCP_Test {
setverdict(pass);
}
+ /* create two local RTP emulations; create two connections on MGW EP, see if
+ * exchanged data is converted between AMR octet-aligned and bandwith
+ * efficient-mode */
+ function f_TC_amr_x_x_rtp_conversion(octetstring pl0, octetstring pl1, charstring fmtp0, charstring fmtp1) 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);
+
+ /* from us to MGW */
+ flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 112, "AMR/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 := pl0;
+ flow[0].rtp_cfg.tx_fixed_payload := pl0;
+ flow[0].fmtp := fmtp0;
+ 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, 112, "AMR/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 := pl1;
+ flow[1].rtp_cfg.tx_fixed_payload := pl1;
+ flow[1].fmtp := fmtp1;
+ 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]);
+
+ setverdict(pass);
+ }
+
+ testcase TC_amr_oa_bwe_rtp_conversion() runs on dummy_CT {
+ f_TC_amr_x_x_rtp_conversion('100c4e9ba850e30d5d53d04de41e7c'O, '10d3a6ea1438c35754f41379079f'O, "octet-align=1", "octet-align=0");
+ }
+
+ testcase TC_amr_oa_oa_rtp_conversion() runs on dummy_CT {
+ f_TC_amr_x_x_rtp_conversion('100c4e9ba850e30d5d53d04de41e7c'O, '100c4e9ba850e30d5d53d04de41e7c'O, "octet-align=1", "octet-align=1");
+ }
+
+ testcase TC_amr_bwe_bwe_rtp_conversion() runs on dummy_CT {
+ f_TC_amr_x_x_rtp_conversion('10d3a6ea1438c35754f41379079f'O, '10d3a6ea1438c35754f41379079f'O, "octet-align=0", "octet-align=0");
+ }
/* TODO: Double-DLCX (no retransmission) */
@@ -1432,5 +1493,8 @@ module MGCP_Test {
execute(TC_two_crcx_and_unsolicited_rtp());
execute(TC_two_crcx_and_one_mdcx_rtp_ho());
execute(TC_ts101318_rfc5993_rtp_conversion());
+ execute(TC_amr_oa_bwe_rtp_conversion());
+ execute(TC_amr_oa_oa_rtp_conversion());
+ execute(TC_amr_bwe_bwe_rtp_conversion());
}
}
diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml
index f5bc1a0b..5c520c5e 100644
--- a/mgw/expected-results.xml
+++ b/mgw/expected-results.xml
@@ -38,4 +38,7 @@
<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'/>
+ <testcase classname='MGCP_Test' name='TC_amr_oa_bwe_rtp_conversion' time='MASKED'/>
+ <testcase classname='MGCP_Test' name='TC_amr_oa_oa_rtp_conversion' time='MASKED'/>
+ <testcase classname='MGCP_Test' name='TC_amr_bwe_bwe_rtp_conversion' time='MASKED'/>
</testsuite>