diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2019-02-21 17:35:01 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-02-26 09:10:41 +0000 |
commit | 6d4e094341b2a8b4246e766f60ea13c2caade8d8 (patch) | |
tree | e08f4328814f4d37c269cad9e4bc1f252661a34b /mgw/MGCP_Test.ttcn | |
parent | a071ee467ced61797d6d29149f10bf3a60c404ec (diff) |
MGCP_Test: Add testcase to test ts101318/rfc5993 conversion
The MGW recentenly adds support to convert between ts101318 and rfc5993
when GSM-HR is used. Lets add a testcase for that.
depends: osmo-mgw Iceef19e5619f8c92dfa7c8cdecb2e9b15f0a11a1
Change-Id: I96df45fe45b53088e07b26f14173a75498a84143
Related: OS#3807
Diffstat (limited to 'mgw/MGCP_Test.ttcn')
-rw-r--r-- | mgw/MGCP_Test.ttcn | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 9eff8c23..4969a3f6 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1314,6 +1314,63 @@ module MGCP_Test { setverdict(pass); } + + /* create two local RTP emulations; create two connections on MGW EP, see if + * exchanged data is converted bwtween ts101318 and rfc5993 */ + testcase TC_ts101318_rfc5993_rtp_conversion() runs on dummy_CT { + var RtpFlowData flow[2]; + var RtpemStats stats[2]; + var MgcpResponse resp; + var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "2@" & c_mgw_domain; + var MgcpCallId call_id := '1226'H; + + f_init(ep); + + /* Turn on conversion mode */ + f_vty_enter_config(MGWVTY); + f_vty_transceive(MGWVTY, "mgcp"); + f_vty_transceive(MGWVTY, "rtp-patch rfc5993hr"); + + /* from us to MGW */ + flow[0] := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 111, "GSM-HR-08/8000")); + /* bind local RTP emulation sockets */ + flow[0].em.portnr := 10000; + flow[0].rtp_cfg := c_RtpemDefaultCfg; + flow[0].rtp_cfg.tx_payload_type := flow[0].pt; + flow[0].rtp_cfg.rx_fixed_payload := '0b11b3eede60be4e3ec68838c7b5'O; + flow[0].rtp_cfg.tx_fixed_payload := '0b11b3eede60be4e3ec68838c7b5'O; + 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, 111, "GSM-HR-08/8000")); + flow[1].em.portnr := 20000; + flow[1].rtp_cfg := c_RtpemDefaultCfg; + flow[1].rtp_cfg.tx_payload_type := flow[1].pt; + flow[1].rtp_cfg.rx_fixed_payload := '000b11b3eede60be4e3ec68838c7b5'O; + flow[1].rtp_cfg.tx_fixed_payload := '000b11b3eede60be4e3ec68838c7b5'O; + f_flow_create(RTPEM[1], ep, call_id, "sendrecv", flow[1]); + + f_rtpem_mode(RTPEM[1], RTPEM_MODE_BIDIR); + f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR); + + f_sleep(1.0); + + f_flow_delete(RTPEM[0]); + f_flow_delete(RTPEM[1], ep, call_id); + + stats[0] := f_rtpem_stats_get(RTPEM[0]); + stats[1] := f_rtpem_stats_get(RTPEM[1]); + + f_rtpem_stats_err_check(stats[0]); + f_rtpem_stats_err_check(stats[1]); + + /* Turn off conversion mode */ + f_vty_transceive(MGWVTY, "no rtp-patch rfc5993hr"); + + setverdict(pass); + } + + /* TODO: Double-DLCX (no retransmission) */ @@ -1364,5 +1421,6 @@ module MGCP_Test { execute(TC_two_crcx_mdcx_and_rtp()); execute(TC_two_crcx_and_unsolicited_rtp()); execute(TC_two_crcx_and_one_mdcx_rtp_ho()); + execute(TC_ts101318_rfc5993_rtp_conversion()); } } |