aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2018-07-25 10:26:09 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-25 18:51:06 +0000
commit7df85f63bf8647a3e6fd4554b1e9e531834d2b5d (patch)
tree0b6fce17e2847d8b0894a93190cb8cda370a73fe
parent3629139790831a41092acfc23939b9978f930014 (diff)
MGCP_Test: Test what happens when two ends use different PT
It is legal that two connections use the same codec but negotiate different dynamic payload types for both connections. Then the MGW is expected to receive packets with one PT and send them with the other PT. This is currently not done in osmo-mgw so the two tests that this commit adds are expected to fail for now. - add testcase TC_two_crcx_diff_pt_and_rtp - add testcase TC_two_crcx_diff_pt_and_rtp_bidir Change-Id: Ib4606dfc08764410ee9e450949361544adb07cd3 Related: OS#3384
-rw-r--r--mgw/MGCP_Test.ttcn23
-rw-r--r--mgw/expected-results.xml6
2 files changed, 24 insertions, 5 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index a6d34607..494e8bba 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -998,7 +998,8 @@ module MGCP_Test {
setverdict(pass);
}
- function f_TC_two_crcx_and_rtp(boolean bidir) runs on dummy_CT {
+ function f_TC_two_crcx_and_rtp(boolean bidir, charstring codec_name_a, integer pt_a,
+ charstring codec_name_b, integer pt_b) runs on dummy_CT {
var RtpFlowData flow[2];
var RtpemStats stats[2];
var MgcpResponse resp;
@@ -1009,13 +1010,13 @@ module MGCP_Test {
f_init(ep);
/* from us to MGW */
- flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 98, "AMR/8000"));
+ flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, pt_a, codec_name_a));
/* bind local RTP emulation sockets */
flow[0].em.portnr := 10000;
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, 98, "AMR/8000"));
+ flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, pt_b, codec_name_b));
flow[1].em.portnr := 20000;
f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]);
@@ -1053,13 +1054,23 @@ module MGCP_Test {
/* create two local RTP emulations; create two connections on MGW EP, exchange some data */
testcase TC_two_crcx_and_rtp() runs on dummy_CT {
- f_TC_two_crcx_and_rtp(false);
+ f_TC_two_crcx_and_rtp(false, "AMR/8000", 98, "AMR/8000", 98);
}
/* create two local RTP emulations; create two connections on MGW EP,
* exchange some data in both directions */
testcase TC_two_crcx_and_rtp_bidir() runs on dummy_CT {
- f_TC_two_crcx_and_rtp(true);
+ f_TC_two_crcx_and_rtp(true, "AMR/8000", 98, "AMR/8000", 98);
+ }
+
+ /* same as TC_two_crcx_and_rtp, but with different PT number on both ends */
+ testcase TC_two_crcx_diff_pt_and_rtp() runs on dummy_CT {
+ f_TC_two_crcx_and_rtp(false, "AMR/8000", 98, "AMR/8000", 112);
+ }
+
+ /* same as TC_two_crcx_and_rtp, but with different PT number on both ends */
+ testcase TC_two_crcx_diff_pt_and_rtp_bidir() runs on dummy_CT {
+ f_TC_two_crcx_and_rtp(true, "AMR/8000", 98, "AMR/8000", 112);
}
/* create two local RTP emulations and pass data in both directions */
@@ -1328,6 +1339,8 @@ module MGCP_Test {
execute(TC_one_crcx_loopback_rtp());
execute(TC_two_crcx_and_rtp());
execute(TC_two_crcx_and_rtp_bidir());
+ execute(TC_two_crcx_diff_pt_and_rtp());
+ execute(TC_two_crcx_diff_pt_and_rtp_bidir());
execute(TC_two_crcx_mdcx_and_rtp());
execute(TC_two_crcx_and_unsolicited_rtp());
execute(TC_two_crcx_and_one_mdcx_rtp_ho());
diff --git a/mgw/expected-results.xml b/mgw/expected-results.xml
index f201099a..92b93518 100644
--- a/mgw/expected-results.xml
+++ b/mgw/expected-results.xml
@@ -34,6 +34,12 @@
<testcase classname='MGCP_Test' name='TC_one_crcx_receive_only_rtp' time='MASKED'/>
<testcase classname='MGCP_Test' name='TC_one_crcx_loopback_rtp' time='MASKED'/>
<testcase classname='MGCP_Test' name='TC_two_crcx_and_rtp_bidir' time='MASKED'/>
+ <testcase classname='MGCP_Test' name='TC_two_crcx_diff_pt_and_rtp' time='MASKED'>
+ <failure type='fail-verdict'>RTP packet payload type errors occurred</failure>
+ </testcase>
+ <testcase classname='MGCP_Test' name='TC_two_crcx_diff_pt_and_rtp_bidir' time='MASKED'>
+ <failure type='fail-verdict'>RTP packet payload type errors occurred</failure>
+ </testcase>
<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'/>