<p>laforge <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15639">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">MGCP_Test: Make RTP bwe/oa format conversation tests more robust<br><br>The following testcases are carried out using two bidirectional<br>connections on one MGW endpoint.<br><br>MGCP_Test.TC_amr_oa_bwe_rtp_conversion<br>MGCP_Test.TC_amr_oa_oa_rtp_conversion<br>MGCP_Test.TC_amr_bwe_bwe_rtp_conversion<br><br>The test is programmed in a way that the TTCN3 side of the RTP emulation<br>also works in bidirectional mode. This is prone to run into a race<br>condition when the RX side is activated but the TX side is already<br>transmitting.<br><br>However, in order to test if the RTP format conversion works we do not<br>need to test both directions at the same time. Its perfectly fine to do<br>the one direction first and then do the other afterwards. Lets also add<br>some guard time while switching the RTP flows.<br><br>Change-Id: Idf257cfc1ab45a7f0fb6e1a2f6426f1b3145879b<br>---<br>M mgw/MGCP_Test.ttcn<br>1 file changed, 20 insertions(+), 6 deletions(-)<br><br></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 7ddb6ea..41def03 100644</span><br><span>--- a/mgw/MGCP_Test.ttcn</span><br><span>+++ b/mgw/MGCP_Test.ttcn</span><br><span>@@ -2012,7 +2012,7 @@</span><br><span> </span><br><span>                f_init(ep);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-         /* from us to MGW */</span><br><span style="color: hsl(120, 100%, 40%);">+          /* Connection #0 (Bidirectional) */</span><br><span>          flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 112, "AMR/8000"));</span><br><span>                 /* bind local RTP emulation sockets */</span><br><span>               flow[0].em.portnr := 10000;</span><br><span>@@ -2023,7 +2023,7 @@</span><br><span>          flow[0].fmtp := fmtp0;</span><br><span>               f_flow_create(RTPEM[0], ep, call_id, "sendrecv", flow[0]);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                /* from MGW back to us */</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Connection #1 (Bidirectional) */</span><br><span>          flow[1] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 112, "AMR/8000"));</span><br><span>                 flow[1].em.portnr := 20000;</span><br><span>          flow[1].rtp_cfg := c_RtpemDefaultCfg;</span><br><span>@@ -2033,17 +2033,31 @@</span><br><span>              flow[1].fmtp := fmtp1;</span><br><span>               f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-                f_rtpem_mode(RTPEM[1], RTPEM_MODE_BIDIR);</span><br><span style="color: hsl(0, 100%, 40%);">-               f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+             /* Send RTP packets to connection #0, receive on connection #1 */</span><br><span style="color: hsl(120, 100%, 40%);">+             f_rtpem_mode(RTPEM[1], RTPEM_MODE_RXONLY);</span><br><span style="color: hsl(120, 100%, 40%);">+            f_sleep(0.5);</span><br><span style="color: hsl(120, 100%, 40%);">+         f_rtpem_mode(RTPEM[0], RTPEM_MODE_TXONLY);</span><br><span>           f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+         f_rtpem_mode(RTPEM[0], RTPEM_MODE_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+              f_sleep(0.5);</span><br><span style="color: hsl(120, 100%, 40%);">+         f_rtpem_mode(RTPEM[1], RTPEM_MODE_NONE);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+          /* Send RTP packets to connection #1, receive on connection #0 */</span><br><span style="color: hsl(120, 100%, 40%);">+             f_rtpem_mode(RTPEM[0], RTPEM_MODE_RXONLY);</span><br><span style="color: hsl(120, 100%, 40%);">+            f_sleep(0.5);</span><br><span style="color: hsl(120, 100%, 40%);">+         f_rtpem_mode(RTPEM[1], RTPEM_MODE_TXONLY);</span><br><span style="color: hsl(120, 100%, 40%);">+            f_sleep(1.0);</span><br><span style="color: hsl(120, 100%, 40%);">+         f_rtpem_mode(RTPEM[1], RTPEM_MODE_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+              f_sleep(0.5);</span><br><span style="color: hsl(120, 100%, 40%);">+         f_rtpem_mode(RTPEM[0], RTPEM_MODE_NONE);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+            /* Remove RTP flows and check statistics */</span><br><span>          f_flow_delete(RTPEM[0]);</span><br><span>             f_flow_delete(RTPEM[1], ep, call_id);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+             /* Check for errors */</span><br><span>               stats[0] := f_rtpem_stats_get(RTPEM[0]);</span><br><span>             stats[1] := f_rtpem_stats_get(RTPEM[1]);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>             f_rtpem_stats_err_check(stats[0]);</span><br><span>           f_rtpem_stats_err_check(stats[1]);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15639">change 15639</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/+/15639"/><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: Idf257cfc1ab45a7f0fb6e1a2f6426f1b3145879b </div>
<div style="display:none"> Gerrit-Change-Number: 15639 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>