<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24173">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">MGCP_Test: test LOOPBACK with implicit destination addr<br><br>Test what happens when the MGW gets a CRCX that creates a connection in<br>LOOPBACK mode but does not specify an RTP destination address. The MGW<br>is expected to deduct the destination address from the first incoming<br>RTP packet and loop it back to its originating address.<br><br>Change-Id: I7baf827fb0c3f33e13ccbaffd37ba0eb4e20c304<br>Related: OS#5123<br>---<br>M mgw/MGCP_Test.ttcn<br>1 file changed, 18 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/24173/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn</span><br><span>index f6dfe57..c4f97a8 100644</span><br><span>--- a/mgw/MGCP_Test.ttcn</span><br><span>+++ b/mgw/MGCP_Test.ttcn</span><br><span>@@ -1693,7 +1693,7 @@</span><br><span> </span><br><span>         /* Create one connection in loopback mode, test if the RTP packets are</span><br><span>        * actually reflected */</span><br><span style="color: hsl(0, 100%, 40%);">-        testcase TC_one_crcx_loopback_rtp() runs on dummy_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+        function f_TC_one_crcx_loopback_rtp(boolean one_phase := true) runs on dummy_CT {</span><br><span>            var RtpFlowData flow;</span><br><span>                var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "1@" & c_mgw_domain;</span><br><span>           var MgcpCallId call_id := '1225'H;</span><br><span>@@ -1702,7 +1702,7 @@</span><br><span>           f_init(ep);</span><br><span>          flow := valueof(t_RtpFlow(mp_local_ipv4, mp_remote_ipv4, 111, "GSM-HR-08/8000/1"));</span><br><span>                flow.em.portnr := 10000;</span><br><span style="color: hsl(0, 100%, 40%);">-                f_flow_create(RTPEM[0], ep, call_id, "loopback", flow);</span><br><span style="color: hsl(120, 100%, 40%);">+             f_flow_create(RTPEM[0], ep, call_id, "loopback", flow, one_phase := one_phase);</span><br><span> </span><br><span>                f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);</span><br><span>            f_sleep(1.0);</span><br><span>@@ -1722,6 +1722,21 @@</span><br><span>               setverdict(pass);</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ /* Create one connection in loopback mode, test if the RTP packets are</span><br><span style="color: hsl(120, 100%, 40%);">+         * actually reflected */</span><br><span style="color: hsl(120, 100%, 40%);">+      testcase TC_one_crcx_loopback_rtp() runs on dummy_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+                 f_TC_one_crcx_loopback_rtp(one_phase := true)</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+   /* Same as above, but we will intenionally not tell the MGW where to</span><br><span style="color: hsl(120, 100%, 40%);">+   * send the outgoing traffic. The connection is still created in</span><br><span style="color: hsl(120, 100%, 40%);">+       * loopback mode, so the MGW should take the originating address from</span><br><span style="color: hsl(120, 100%, 40%);">+  * the incoming RTP packet and send it back to the source */</span><br><span style="color: hsl(120, 100%, 40%);">+  testcase TC_one_crcx_loopback_rtp_implicit() runs on dummy_CT {</span><br><span style="color: hsl(120, 100%, 40%);">+                f_TC_one_crcx_loopback_rtp(one_phase := false)</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        function f_TC_two_crcx_and_rtp(boolean bidir, charstring codec_name_a, integer pt_a,</span><br><span>                                         charstring codec_name_b, integer pt_b) runs on dummy_CT {</span><br><span>            var RtpFlowData flow[2];</span><br><span>@@ -2426,6 +2441,7 @@</span><br><span> </span><br><span>                 execute(TC_one_crcx_receive_only_rtp());</span><br><span>             execute(TC_one_crcx_loopback_rtp());</span><br><span style="color: hsl(120, 100%, 40%);">+          execute(TC_one_crcx_loopback_rtp_implicit());</span><br><span>                execute(TC_two_crcx_and_rtp());</span><br><span>              execute(TC_two_crcx_and_rtp_bidir());</span><br><span>                execute(TC_two_crcx_diff_pt_and_rtp());</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24173">change 24173</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24173"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I7baf827fb0c3f33e13ccbaffd37ba0eb4e20c304 </div>
<div style="display:none"> Gerrit-Change-Number: 24173 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>