From c7e6f500fe135f83aaeecefc54d5d9a6af377194 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 26 Feb 2025 07:58:04 -0400 Subject: [PATCH] MT#55283 add EVS DTX tests Change-Id: Iebaefde5ab8de606a8ba7bde3e7e1c15fd7dfd6c (cherry picked from commit 7194b6a61a0bf88c4585f6c7fb7e5c2be9a8fa87) --- t/Makefile | 5 +- t/auto-daemon-tests-evs-dtx.pl | 160 +++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 1 deletion(-) create mode 100755 t/auto-daemon-tests-evs-dtx.pl diff --git a/t/Makefile b/t/Makefile index 615f6df2a..2674fae7f 100644 --- a/t/Makefile +++ b/t/Makefile @@ -104,7 +104,7 @@ include ../lib/common.Makefile .PHONY: all-tests unit-tests daemon-tests daemon-tests \ daemon-tests-main daemon-tests-jb daemon-tests-dtx daemon-tests-dtx-cn daemon-tests-pubsub \ daemon-tests-intfs daemon-tests-stats daemon-tests-delay-buffer daemon-tests-delay-timing \ - daemon-tests-evs daemon-tests-player-cache daemon-tests-redis daemon-tests-t38 + daemon-tests-evs daemon-tests-player-cache daemon-tests-redis daemon-tests-t38 daemon-tests-evs-dtx TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash ifeq ($(with_transcoding),yes) @@ -202,6 +202,9 @@ daemon-tests-t38: daemon-test-deps spandsp_recv_fax_pcm spandsp_recv_fax_t38 \ spandsp_send_fax_pcm spandsp_send_fax_t38 ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-t38.pl +daemon-tests-evs-dtx: daemon-test-deps + ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-evs-dtx.pl + test-bitstr: test-bitstr.o test-mix-buffer: test-mix-buffer.o $(COMMONOBJS) mix_buffer.o ssrc.o rtp.o crypto.o helpers.o \ diff --git a/t/auto-daemon-tests-evs-dtx.pl b/t/auto-daemon-tests-evs-dtx.pl new file mode 100755 index 000000000..516c158d8 --- /dev/null +++ b/t/auto-daemon-tests-evs-dtx.pl @@ -0,0 +1,160 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use NGCP::Rtpengine::Test; +use NGCP::Rtpclient::SRTP; +use NGCP::Rtpengine::AutoTest; +use Test::More; + + +$ENV{RTPENGINE_EXTENDED_TESTS} or exit(); +$ENV{RTPENGINE_3GPP_EVS_LIB} or exit(); + +autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 -i 2001:db8:4321::1 + -n 2223 -f -L 7 -E --silence-detect=1 --dtx-delay=10), + "--evs-lib-path=$ENV{RTPENGINE_3GPP_EVS_LIB}") + or die; + + +my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp, + $sock_ax, $sock_bx, $port_ax, $port_bx, + $srtp_ctx_a, $srtp_ctx_b, $srtp_ctx_a_rev, $srtp_ctx_b_rev, + @ret1, @ret2, @ret3, @ret4, $srtp_key_a, $srtp_key_b, $ts, $seq); + + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 4076)], [qw(198.51.100.10 4078)]); + +($port_a) = offer('EVS DTX out', + { ICE => 'remove', codec => { transcode => ['PCMA'] } }, < ft() }); + + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 4096)], [qw(198.51.100.10 4098)]); + +($port_a) = offer('EVS DTX in', + { ICE => 'remove', codec => { transcode => ['PCMA'] } }, < ft() }); + + +#done_testing;NGCP::Rtpengine::AutoTest::terminate('f00');exit; +done_testing();