neels submitted this change.

View Change


Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved
mgw: add TC_crcx_iufp_sendrecv and _recvonly

Test creating a conn in different MGCP ConnectionModes.

Related: Related: SYS#6974 SYS#6907
Related: osmo-mgw Ic089485543c5c97a35c7ae24fe0f622bf57d1976
Change-Id: I00fd854f058f7f53e2f579e8481ca2b9253f08e3
---
M mgw/MGCP_Test.ttcn
1 file changed, 65 insertions(+), 0 deletions(-)

diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 7090b34..7d8c235 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -2817,6 +2817,56 @@
setverdict(pass);
}

+ /* test valid CRCX with IUFP in a given MGCP ConnectionMode ("sendrecv", "recvonly") */
+ function f_tc_crcx_iufp_mode(charstring mgcp_mode) runs on dummy_CT {
+ var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "2@" & c_mgw_domain;
+ var template MgcpCommand cmd;
+ var MgcpResponse resp;
+ var MgcpCallId call_id := '1234'H;
+ var MgcpConnectionId conn_id;
+
+ f_init(ep);
+
+ /* create the connection on the MGW.
+ * Start directly in sendrecv mode, with IUFP and a (so far unknown) audio port == 0.
+ * The MGCP ConnectionMode 'M:' is mandatory in MGCP in a CRCX. Another a=sendrecv exists in SDP. */
+ cmd := ts_CRCX(get_next_trans_id(), ep, mgcp_mode, call_id);
+ cmd.sdp := ts_SDP("127.0.0.2", "127.0.0.1", "23", "42", 0, { "96" },
+ { valueof(ts_SDP_rtpmap(96, "VND.3GPP.IUFP/16000")),
+ valueof(ts_SDP_ptime(20)) });
+ resp := mgcp_transceive_mgw(cmd, tr_CRCX_ACK);
+ conn_id := extract_conn_id(resp);
+ if (not match(resp.sdp.connection, ts_SDP_connection_IP("127.0.0.1", "IP4"))) {
+ setverdict(fail, "Wrong RemoteConnection in CRCX ACK", resp.sdp.connection);
+ }
+
+ /* Add the audio port in a subsequent MDCX. */
+ cmd := ts_MDCX(get_next_trans_id(), ep, "sendrecv", call_id, conn_id);
+ cmd.sdp := ts_SDP("127.0.0.2", "127.0.0.1", "23", "42", 2344, { "96" },
+ { valueof(ts_SDP_rtpmap(96, "VND.3GPP.IUFP/16000")),
+ valueof(ts_SDP_ptime(20)) });
+ resp := mgcp_transceive_mgw(cmd, tr_MDCX_ACK);
+
+ if (not ispresent(resp.sdp) or not ispresent(resp.sdp.connection)) {
+ setverdict(fail, "No RemoteConnection info found in MDCX ACK");
+ }
+ if (not match(resp.sdp.connection, ts_SDP_connection_IP("127.0.0.1", "IP4"))) {
+ setverdict(fail, "Wrong RemoteConnection in MDCX ACK", resp.sdp.connection);
+ }
+
+ /* clean-up */
+ f_dlcx_ok(ep, call_id);
+ setverdict(pass);
+ }
+
+ testcase TC_crcx_iufp_sendrecv() runs on dummy_CT {
+ f_tc_crcx_iufp_mode("sendrecv");
+ }
+
+ testcase TC_crcx_iufp_recvonly() runs on dummy_CT {
+ f_tc_crcx_iufp_mode("recvonly");
+ }
+
/* create two local emulations and pass data in both directions */
function f_two_crcx_mdcx_data_transfer(MgcpEndpoint ep, MgcpCallId call_id, inout RtpFlowData flow_a,
inout RtpFlowData flow_b, boolean tear_down_rtp := true) runs on dummy_CT {
@@ -3356,6 +3406,8 @@

execute(TC_crcx_mdcx_ip4());
execute(TC_crcx_mdcx_ip6());
+ execute(TC_crcx_iufp_sendrecv());
+ execute(TC_crcx_iufp_recvonly());
execute(TC_two_crcx_mdcx_and_rtp_ipv4_ipv6());
execute(TC_two_crcx_mdcx_and_rtp_ipv6());
execute(TC_two_crcx_and_rtp_osmux_bidir_ipv6());

To view, visit change 37283. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I00fd854f058f7f53e2f579e8481ca2b9253f08e3
Gerrit-Change-Number: 37283
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged