Change in osmo-ttcn3-hacks[master]: MGCP_Test: test LOOPBACK with implicit destination addr

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri May 7 21:09:19 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24173 )


Change subject: MGCP_Test: test LOOPBACK with implicit destination addr
......................................................................

MGCP_Test: test LOOPBACK with implicit destination addr

Test what happens when the MGW gets a CRCX that creates a connection in
LOOPBACK mode but does not specify an RTP destination address. The MGW
is expected to deduct the destination address from the first incoming
RTP packet and loop it back to its originating address.

Change-Id: I7baf827fb0c3f33e13ccbaffd37ba0eb4e20c304
Related: OS#5123
---
M mgw/MGCP_Test.ttcn
1 file changed, 18 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/24173/1

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index f6dfe57..c4f97a8 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -1693,7 +1693,7 @@
 
 	/* Create one connection in loopback mode, test if the RTP packets are
 	 * actually reflected */
-	testcase TC_one_crcx_loopback_rtp() runs on dummy_CT {
+	function f_TC_one_crcx_loopback_rtp(boolean one_phase := true) runs on dummy_CT {
 		var RtpFlowData flow;
 		var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "1@" & c_mgw_domain;
 		var MgcpCallId call_id := '1225'H;
@@ -1702,7 +1702,7 @@
 		f_init(ep);
 		flow := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 111, "GSM-HR-08/8000/1"));
 		flow.em.portnr := 10000;
-		f_flow_create(RTPEM[0], ep, call_id, "loopback", flow);
+		f_flow_create(RTPEM[0], ep, call_id, "loopback", flow, one_phase := one_phase);
 
 		f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
 		f_sleep(1.0);
@@ -1722,6 +1722,21 @@
 		setverdict(pass);
 	}
 
+	/* Create one connection in loopback mode, test if the RTP packets are
+	 * actually reflected */
+	testcase TC_one_crcx_loopback_rtp() runs on dummy_CT {
+		 f_TC_one_crcx_loopback_rtp(one_phase := true)
+	}
+
+	/* Same as above, but we will intenionally not tell the MGW where to
+	 * send the outgoing traffic. The connection is still created in
+	 * loopback mode, so the MGW should take the originating address from
+	 * the incoming RTP packet and send it back to the source */
+	testcase TC_one_crcx_loopback_rtp_implicit() runs on dummy_CT {
+		 f_TC_one_crcx_loopback_rtp(one_phase := false)
+	}
+
+
 	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];
@@ -2426,6 +2441,7 @@
 
 		execute(TC_one_crcx_receive_only_rtp());
 		execute(TC_one_crcx_loopback_rtp());
+		execute(TC_one_crcx_loopback_rtp_implicit());
 		execute(TC_two_crcx_and_rtp());
 		execute(TC_two_crcx_and_rtp_bidir());
 		execute(TC_two_crcx_diff_pt_and_rtp());

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24173
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I7baf827fb0c3f33e13ccbaffd37ba0eb4e20c304
Gerrit-Change-Number: 24173
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210507/654293f0/attachment.htm>


More information about the gerrit-log mailing list