diff --git a/t/Makefile b/t/Makefile index 575c7bf51..86362dde7 100644 --- a/t/Makefile +++ b/t/Makefile @@ -108,7 +108,7 @@ include ../lib/common.Makefile daemon-tests-measure-rtp daemon-tests-mos-legacy daemon-tests-mos-fullband daemon-tests-config-file \ daemon-tests-templ-def daemon-tests-templ-def-offer daemon-tests-t38 daemon-tests-evs-dtx \ daemon-tests-transform daemon-tests-http daemon-tests-heuristic daemon-tests-asymmetric \ - daemon-tests-dtx-no-shift daemon-tests-rtcp daemon-tests-redis-subscribe + daemon-tests-dtx-no-shift daemon-tests-rtcp daemon-tests-redis-subscribe daemon-tests-rtp-ext TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash ifeq ($(with_transcoding),yes) @@ -154,7 +154,7 @@ daemon-tests: daemon-tests-main daemon-tests-jb daemon-tests-pubsub daemon-tests daemon-tests-sdp-manipulations daemon-tests-sdes-manipulations \ daemon-tests-sdp-orig-replacements daemon-tests-moh daemon-tests-evs-dtx daemon-tests-transform \ daemon-tests-transcode-config daemon-tests-codec-prefs daemon-tests-http daemon-tests-heuristic \ - daemon-tests-asymmetric daemon-tests-rtcp daemon-tests-redis-subscribe + daemon-tests-asymmetric daemon-tests-rtcp daemon-tests-redis-subscribe daemon-tests-rtp-ext daemon-test-deps: tests-preload.so $(MAKE) -C ../daemon @@ -280,6 +280,9 @@ daemon-tests-http: daemon-test-deps daemon-tests-rtcp: daemon-test-deps ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-rtcp.pl +daemon-tests-rtp-ext: daemon-test-deps + ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-rtp-ext.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-rtp-ext.pl b/t/auto-daemon-tests-rtp-ext.pl new file mode 100755 index 000000000..8c0186431 --- /dev/null +++ b/t/auto-daemon-tests-rtp-ext.pl @@ -0,0 +1,381 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use NGCP::Rtpengine::Test; +use NGCP::Rtpclient::SRTP; +use NGCP::Rtpengine::AutoTest; +use Test::More; +use NGCP::Rtpclient::ICE; +use POSIX; +use Data::Dumper; + + +autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 -n 2223 -f -L 7 -E --log-level-internals=7)) + 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, $ufrag_a, $ufrag_b, + @ret1, @ret2, @ret3, @ret4, $srtp_key_a, $srtp_key_b, $ts, $seq, $has_recv); + + + +($sock_a, $sock_ax, $sock_b, $sock_bx) = new_call( + [qw(198.51.100.1 7000)], + [qw(198.51.100.1 7001)], + [qw(198.51.100.3 7002)], + [qw(198.51.100.3 7003)], +); + +($port_a, $port_ax) = offer('control', { }, < { transcode => ['PCMU'] } }, < { transcode => ['PCMU'] } }, < { transcode => ['PCMU'] } }, <