From 4cbd676b76e6cbd2d5482a813c992f865f29105c Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 19 May 2021 11:17:55 -0400 Subject: [PATCH] TT#122401 add DTX tests Change-Id: I518d226c324123f94668dcec470e22b7a4f95f7e --- t/Makefile | 20 +- t/auto-daemon-tests-dtx-cn.pl | 354 ++++++++++++++++++++++++++++++++++ t/auto-daemon-tests-dtx.pl | 215 +++++++++++++++++++-- 3 files changed, 572 insertions(+), 17 deletions(-) create mode 100755 t/auto-daemon-tests-dtx-cn.pl diff --git a/t/Makefile b/t/Makefile index ec4781d85..6144294aa 100644 --- a/t/Makefile +++ b/t/Makefile @@ -85,7 +85,7 @@ COMMONOBJS= str.o auxlib.o rtplib.o loglib.o include ../lib/common.Makefile .PHONY: all-tests unit-tests daemon-tests all-daemon-tests \ - daemon-tests-main daemon-tests-jb daemon-tests-reorder + daemon-tests-main daemon-tests-jb daemon-tests-reorder daemon-tests-dtx daemon-tests-dtx-cn TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash ifeq ($(with_transcoding),yes) @@ -111,7 +111,7 @@ daemon-tests: tests-preload.so $(MAKE) -C ../daemon $(MAKE) all-daemon-tests -all-daemon-tests: daemon-tests-main daemon-tests-jb daemon-tests-reorder +all-daemon-tests: daemon-tests-main daemon-tests-jb daemon-tests-reorder daemon-tests-dtx daemon-tests-dtx-cn daemon-tests-main: rm -rf fake-$@-sockets @@ -137,6 +137,22 @@ daemon-tests-reorder: test "$$(ls fake-$@-sockets)" = "" rmdir fake-$@-sockets +daemon-tests-dtx: + rm -rf fake-$@-sockets + mkdir fake-$@-sockets + LD_PRELOAD=../t/tests-preload.so RTPE_BIN=../daemon/rtpengine TEST_SOCKET_PATH=./fake-$@-sockets \ + perl -I../perl auto-daemon-tests-dtx.pl + test "$$(ls fake-$@-sockets)" = "" + rmdir fake-$@-sockets + +daemon-tests-dtx-cn: + rm -rf fake-$@-sockets + mkdir fake-$@-sockets + LD_PRELOAD=../t/tests-preload.so RTPE_BIN=../daemon/rtpengine TEST_SOCKET_PATH=./fake-$@-sockets \ + perl -I../perl auto-daemon-tests-dtx-cn.pl + test "$$(ls fake-$@-sockets)" = "" + rmdir fake-$@-sockets + test-bitstr: test-bitstr.o spandsp_send_fax_pcm: spandsp_send_fax_pcm.o diff --git a/t/auto-daemon-tests-dtx-cn.pl b/t/auto-daemon-tests-dtx-cn.pl new file mode 100755 index 000000000..baf4f5e9d --- /dev/null +++ b/t/auto-daemon-tests-dtx-cn.pl @@ -0,0 +1,354 @@ +#!/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; + + +autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 -i 2001:db8:4321::1 + -n 2223 -c 12345 -f -L 7 -E -u 2222 --silence-detect=1 --dtx-delay=10 + --dtx-cn-params=10)) + 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 5000)], [qw(198.51.100.10 5002)]); + +($port_a) = offer('G.711 DTX', + { replace => ['origin'], codec => { + transcode => ['PCMA'], + } }, < ['origin'] }, < CN +rcv($sock_b, $port_a, rtpm(8, 2002, 4320, $ssrc, "\x8c\x68\x02\x87\x94\x8e\x17\xc5\x19\x34\x6e\x08\x1c\x7e\x9f\x86\xf4\x09\x12\x8c\x81\x0c\x06\x05\x84\x18\x0e\x03\x16\x9f\x0a\x4c\x35\x4f\x05\x9c\x8e\x1d\x18\xf2\x9e\x8a\x99\xb4\x05\x11\x0e\x59\x02\xc8\x6b\x99\x1a\x03\x8c\x13\x67\x96\x35\x1e\x86\x9e\x80\x82\x99\x10\x86\x1f\x9b\x0a\x8f\x35\x04\x8c\x04\xd5\x63\x69\x0f\x09\x9a\x84\x01\x92\x71\x84\x1b\x8f\x03\xea\x73\x00\x0a\x13\x62\x9b\x00\xe4\x04\x87\x86\xd5\xea\x04\x04\x0d\x89\x8a\x91\xea\x97\x1f\x83\x96\x87\xb5\x85\x0d\x04\x63\xfc\x13\xe7\x46\x83\x14\x97\xd2\x0e\x69\x6d\x17\x0a\x85\x9a\x35\xe3\x8d\x64\x67\x46\x66\x0c\xe9\x02\x80\x87\xcf\x0d\x81\x10\x99\x92\x90\x03\x0c\xfd\x10\xb4\x1b")); +rcv($sock_b, $port_a, rtpm(8, 2003, 4480, $ssrc, "\x9a\x87\x6a\x08\x09\x0b\x7b\x61\x81\xe7\x85\x05\x19\x0a\x87\x04\x34\x06\x93\x8a\x88\xb5\x5c\x6b\x0f\x02\x84\x0f\x82\x81\x40\x34\x91\x34\x03\x85\x9a\x03\x14\x6f\x80\xb5\x03\x0e\x98\x12\x00\x0a\x86\x10\x8e\x92\x03\x87\x87\x85\x6f\x6a\x04\x82\x81\x94\x80\x01\x14\x9b\x65\x6c\x84\x09\x65\x0b\xb4\x34\x8d\xe2\x02\x05\x0d\x8c\xe1\x0c\x14\x92\xe1\x0e\x80\x8d\x15\x8e\x03\x0c\x8b\x4b\x8d\x8f\xb5\x00\xb5\x18\x59\x72\x01\x97\x88\x35\x35\x8d\x13\x8f\xf3\x04\x87\x0d\x35\x88\xe4\x1a\x0a\x04\x9e\x94\x17\x0a\xec\x89\x1a\x94\x88\x8e\x94\x34\xe8\x35\x69\x82\x89\xc6\x9c\x52\x9d\x08\x89\x94\xe2\x80\xd3\xb5\x0b\x84\x0d\xee\x0e\x8d\x88\x5d\x0b\x07\x35\x84")); +# start audio again +snd($sock_a, $port_b, rtp(0, 2002, 4640, 0x5678, "\x40" x 160)); +rcv($sock_b, $port_a, rtpm(8, 2004, 4640, $ssrc, "\x68" x 160)); + +rtpe_req('delete', 'G.711 DTX', { 'from-tag' => ft() }); + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5004)], [qw(198.51.100.10 5006)]); + +($port_a) = offer('G.711 DTX ptime=30', + { replace => ['origin'], codec => { + transcode => ['PCMA'], + } }, < ['origin'] }, < CN +rcv($sock_b, $port_a, rtpm(8, 2002, 4480, $ssrc, "\x8c\x68\x02\x87\x94\x8e\x17\xc5\x19\x34\x6e\x08\x1c\x7e\x9f\x86\xf4\x09\x12\x8c\x81\x0c\x06\x05\x84\x18\x0e\x03\x16\x9f\x0a\x4c\x35\x4f\x05\x9c\x8e\x1d\x18\xf2\x9e\x8a\x99\xb4\x05\x11\x0e\x59\x02\xc8\x6b\x99\x1a\x03\x8c\x13\x67\x96\x35\x1e\x86\x9e\x80\x82\x99\x10\x86\x1f\x9b\x0a\x8f\x35\x04\x8c\x04\xd5\x63\x69\x0f\x09\x9a\x84\x01\x92\x71\x84\x1b\x8f\x03\xea\x73\x00\x0a\x13\x62\x9b\x00\xe4\x04\x87\x86\xd5\xea\x04\x04\x0d\x89\x8a\x91\xea\x97\x1f\x83\x96\x87\xb5\x85\x0d\x04\x63\xfc\x13\xe7\x46\x83\x14\x97\xd2\x0e\x69\x6d\x17\x0a\x85\x9a\x35\xe3\x8d\x64\x67\x46\x66\x0c\xe9\x02\x80\x87\xcf\x0d\x81\x10\x99\x92\x90\x03\x0c\xfd\x10\xb4\x1b\x9a\x87\x6a\x08\x09\x0b\x7b\x61\x81\xe7\x85\x05\x19\x0a\x87\x04\x34\x06\x93\x8a\x88\xb5\x5c\x6b\x0f\x02\x84\x0f\x82\x81\x40\x34\x91\x34\x03\x85\x9a\x03\x14\x6f\x80\xb5\x03\x0e\x98\x12\x00\x0a\x86\x10\x8e\x92\x03\x87\x87\x85\x6f\x6a\x04\x82\x81\x94\x80\x01\x14\x9b\x65\x6c\x84\x09\x65\x0b\xb4\x34\x8d\xe2\x02\x05\x0d\x8c")); +rcv($sock_b, $port_a, rtpm(8, 2003, 4720, $ssrc, "\xe1\x0c\x14\x92\xe1\x0e\x80\x8d\x15\x8e\x03\x0c\x8b\x4b\x8d\x8f\xb5\x00\xb5\x18\x59\x72\x01\x97\x88\x35\x35\x8d\x13\x8f\xf3\x04\x87\x0d\x35\x88\xe4\x1a\x0a\x04\x9e\x94\x17\x0a\xec\x89\x1a\x94\x88\x8e\x94\x34\xe8\x35\x69\x82\x89\xc6\x9c\x52\x9d\x08\x89\x94\xe2\x80\xd3\xb5\x0b\x84\x0d\xee\x0e\x8d\x88\x5d\x0b\x07\x35\x84\x8a\xfa\xc8\x82\xfd\x95\x0d\x69\x9a\x83\x61\xfd\x12\x81\x69\x18\x85\x06\xb5\x08\xb5\xda\x93\x9d\x82\x03\xf5\x65\xe6\x35\xb5\x1e\x04\xdd\x88\x06\x62\x99\x35\x8f\xf9\x9a\x8a\x0d\x98\x92\x04\x81\x9d\x09\x35\xd0\x80\x0a\x85\x04\x80\x35\x87\x87\x35\x8c\x60\xe9\x14\x0d\x5b\x43\xdf\x0b\xfc\xf4\x8e\x0a\x0e\x77\x1c\x98\x6c\x08\xb5\xe4\x00\x1d\x0a\x82\x85\x8d\x8f\x08\x99\x8e\x01\x09\x63\x08\x95\xb4\x04\x03\xb5\xb5\x00\x87\x08\xe2\x99\x0c\x0e\xe1\xb5\x90\x88\x82\x71\x8b\x0b\xc4\x35\x72\x87\x5a\x9a\x9f\x0a\xd8\x9a\x90\x0c\x9f\x03\x7c\x83\xb5\x0b\x96\x43\x35\x81\xb4\x89\x04\x8f\x13\x82\x00\x94\x8e\x0c\x8b\x80\x05\x0c\x8b\x11\x64\x81\x03\x83\x9b")); +# start audio again +snd($sock_a, $port_b, rtp(0, 2002, 4960, 0x5678, "\x40" x 240)); +rcv($sock_b, $port_a, rtpm(8, 2004, 4960, $ssrc, "\x68" x 240)); + +rtpe_req('delete', 'G.711 DTX ptime=30', { 'from-tag' => ft() }); + + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5008)], [qw(198.51.100.10 5010)]); + +($port_a) = offer('G.711 DTX ptime change', + { replace => ['origin'], codec => { + transcode => ['PCMA'], + } }, < ['origin'] }, < CN +rcv($sock_b, $port_a, rtpm(8, 2003, 4480, $ssrc, "\x8c\x68\x02\x87\x94\x8e\x17\xc5\x19\x34\x6e\x08\x1c\x7e\x9f\x86\xf4\x09\x12\x8c\x81\x0c\x06\x05\x84\x18\x0e\x03\x16\x9f\x0a\x4c\x35\x4f\x05\x9c\x8e\x1d\x18\xf2\x9e\x8a\x99\xb4\x05\x11\x0e\x59\x02\xc8\x6b\x99\x1a\x03\x8c\x13\x67\x96\x35\x1e\x86\x9e\x80\x82\x99\x10\x86\x1f\x9b\x0a\x8f\x35\x04\x8c\x04\xd5\x63\x69\x0f\x09\x9a\x84\x01\x92\x71\x84\x1b\x8f\x03\xea\x73\x00\x0a\x13\x62\x9b\x00\xe4\x04\x87\x86\xd5\xea\x04\x04\x0d\x89\x8a\x91\xea\x97\x1f\x83\x96\x87\xb5\x85\x0d\x04\x63\xfc\x13\xe7\x46\x83\x14\x97\xd2\x0e\x69\x6d\x17\x0a\x85\x9a\x35\xe3\x8d\x64\x67\x46\x66\x0c\xe9\x02\x80\x87\xcf\x0d\x81\x10\x99\x92\x90\x03\x0c\xfd\x10\xb4\x1b")); +rcv($sock_b, $port_a, rtpm(8, 2004, 4640, $ssrc, "\x9a\x87\x6a\x08\x09\x0b\x7b\x61\x81\xe7\x85\x05\x19\x0a\x87\x04\x34\x06\x93\x8a\x88\xb5\x5c\x6b\x0f\x02\x84\x0f\x82\x81\x40\x34\x91\x34\x03\x85\x9a\x03\x14\x6f\x80\xb5\x03\x0e\x98\x12\x00\x0a\x86\x10\x8e\x92\x03\x87\x87\x85\x6f\x6a\x04\x82\x81\x94\x80\x01\x14\x9b\x65\x6c\x84\x09\x65\x0b\xb4\x34\x8d\xe2\x02\x05\x0d\x8c\xe1\x0c\x14\x92\xe1\x0e\x80\x8d\x15\x8e\x03\x0c\x8b\x4b\x8d\x8f\xb5\x00\xb5\x18\x59\x72\x01\x97\x88\x35\x35\x8d\x13\x8f\xf3\x04\x87\x0d\x35\x88\xe4\x1a\x0a\x04\x9e\x94\x17\x0a\xec\x89\x1a\x94\x88\x8e\x94\x34\xe8\x35\x69\x82\x89\xc6\x9c\x52\x9d\x08\x89\x94\xe2\x80\xd3\xb5\x0b\x84\x0d\xee\x0e\x8d\x88\x5d\x0b\x07\x35\x84")); +rcv($sock_b, $port_a, rtpm(8, 2005, 4800, $ssrc, "\x8a\xfa\xc8\x82\xfd\x95\x0d\x69\x9a\x83\x61\xfd\x12\x81\x69\x18\x85\x06\xb5\x08\xb5\xda\x93\x9d\x82\x03\xf5\x65\xe6\x35\xb5\x1e\x04\xdd\x88\x06\x62\x99\x35\x8f\xf9\x9a\x8a\x0d\x98\x92\x04\x81\x9d\x09\x35\xd0\x80\x0a\x85\x04\x80\x35\x87\x87\x35\x8c\x60\xe9\x14\x0d\x5b\x43\xdf\x0b\xfc\xf4\x8e\x0a\x0e\x77\x1c\x98\x6c\x08\xb5\xe4\x00\x1d\x0a\x82\x85\x8d\x8f\x08\x99\x8e\x01\x09\x63\x08\x95\xb4\x04\x03\xb5\xb5\x00\x87\x08\xe2\x99\x0c\x0e\xe1\xb5\x90\x88\x82\x71\x8b\x0b\xc4\x35\x72\x87\x5a\x9a\x9f\x0a\xd8\x9a\x90\x0c\x9f\x03\x7c\x83\xb5\x0b\x96\x43\x35\x81\xb4\x89\x04\x8f\x13\x82\x00\x94\x8e\x0c\x8b\x80\x05\x0c\x8b\x11\x64\x81\x03\x83\x9b")); +# start audio again +snd($sock_a, $port_b, rtp(0, 2002, 4960, 0x5678, "\x40" x 240)); +rcv($sock_b, $port_a, rtpm(8, 2006, 4960, $ssrc, "\x68" x 160)); + +rtpe_req('delete', 'G.711 DTX ptime change', { 'from-tag' => ft() }); + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5012)], [qw(198.51.100.10 5014)]); + +($port_a) = offer('G.722 DTX', + { replace => ['origin'], codec => { + transcode => ['G722'], + } }, < ['origin'] }, < CN +rcv($sock_b, $port_a, rtpm(9, 2002, 4320, $ssrc, "\xd8\xd6\xff\xd9\xd8\xda\xfa\xd8\xd6\xfc\xda\xda\xdc\xdb\xfb\xd3\xfc\xdc\xd5\xdd\xdd\xde\xd8\xda\xfe\xd5\xda\xfd\xdb\xdd\xd8\xdb\xdd\xd8\xda\xfe\xd8\xd8\xd9\xdc\xda\xdd\xde\xdc\xd6\xdc\xd9\xda\xdf\xff\xd7\xde\xd9\xd7\xfe\xd9\xde\xdc\xd8\xd6\xdb\xfc\xda\xdd\xdc\xd7\xdd\xd5\xde\xdf\xfe\xd7\xdc\xd6\xdd\xd9\xde\xfb\xd4\xd7\xff\xd7\xfe\xd9\xfc\xd9\xd5\xdc\xd8\xdc\xdc\xdc\xd9\xd7\xff\xd5\xdb\xf9\xdb\xdd\xd5\xdc\xd8\xd7\xf5\xdb\xde\xd8\xd7\xff\xd6\xf8\xde\xdc\xd5\xd8\xdc\xd7\xf5\xdd\xd9\xd7\xde\xdc\xd5\xfa\xfe\xd6\xdc\xd6\xff\xd6\xf9\xdf\xdc\xd6\xdb\xfe\xd5\xfe\xde\xde\xd8\xd4\x9c\x34\x85\x21\x85\x20\x97\x06\x20\x99\x11\x8e\x29\xb4\x06\xa0")); +rcv($sock_b, $port_a, rtpm(9, 2003, 4480, $ssrc, "\xa8\x0c\x8d\x32\xb6\x08\xb9\x61\x6a\x46\x8a\x27\x93\x27\x9b\x39\xfb\xc8\x6e\x88\x24\xb7\x31\xda\xd3\xed\x46\x6d\xe3\xd9\x79\xcb\x2e\x85\x39\xa3\x6a\xcf\x3b\xd4\xca\xd9\x71\x60\xf8\x4c\xf7\xc5\x53\xe1\x6a\xf5\xdb\x53\x86\x2c\xb6\x24\xbe\x27\x89\x45\x62\xc9\x74\xe6\x72\x4d\xca\x65\x73\xc7\x62\xb7\x1b\x89\x2a\xd4\x51\xe9\x5a\xdc\xfb\xb4\x6d\xca\x35\xdf\x72\xea\xce\x33\xce\x59\x9b\xe4\x64\x51\xd3\x5a\x8c\x73\xee\x6e\x6d\xd6\xc8\x4f\xef\x2f\xfe\x2b\xbd\x7d\x8a\xda\x70\x8f\x2c\xec\x73\xcc\xf6\x6a\x86\x74\xe4\xfb\x53\xfd\x30\x8a\x30\xdf\x6a\xee\x56\x8d\x74\xdd\x1f\x6b\xf7\x54\x8a\x2c\x9c\x67\x96\xdf\x6d\xcf\x4e\x55\xf7\x6b\xf3\x6b\x98\x57")); +# start audio again +snd($sock_a, $port_b, rtp(0, 2003, 4800, 0x5678, "\x40" x 160)); +rcv($sock_b, $port_a, rtpm(9, 2004, 4640, $ssrc, "\x8c\x52\xd6\x27\x73\xce\x7b\xb3\x6b\xdb\x33\xd4\x4f\x17\xd6\x24\x96\xec\xad\xd5\xc9\x37\x59\x53\x67\x6d\xd3\x53\x5f\xb0\xe9\xd1\xcf\x6b\x96\x19\x90\x69\xbf\xf3\x6f\xca\x6f\xba\xf4\xd8\x18\xd7\xef\xed\xdc\x2e\x4f\xd6\x73\xff\x99\x2a\xd0\x3c\x8d\x28\x94\x7a\xe9\xcc\x5f\xcd\x6a\x72\x50\x7d\xf6\x34\x4d\x73\x2a\xd3\x2d\x55\xcc\x6a\xdc\x2d\xb1\x2a\xcd\x37\x98\xd2\xf6\x52\xf1\x69\xd7\x8a\x6d\xde\x6f\xf4\xd3\x6f\x54\x8b\x70\xee\x3e\x4f\xd4\xef\xf5\x5f\xcf\xfd\x29\x99\x7c\x6a\xee\x33\x8a\x7f\x8d\x15\x6e\x28\xf1\x74\x9e\x39\xcb\x38\xee\x5b\x3f\x1c\x7f\x57\x5b\xdd\xde\x5e\x5f\xfe\xdd\x5c\x5b\xdc\xdb\x5d\x5d\xde\xdd\xdc\xdc\x5a\x5c\xda\xdd\xdb")); + +rtpe_req('delete', 'G.722 DTX', { 'from-tag' => ft() }); + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5016)], [qw(198.51.100.10 5018)]); + +($port_a) = offer('G.722 reverse DTX', + { replace => ['origin'], codec => { + transcode => ['PCMU'], + } }, < ['origin'] }, < CN +rcv($sock_b, $port_a, rtpm(0, 2002, 4320, $ssrc, "\x0f\x10\x10\x11\x11\x12\x13\x14\x17\x19\x22\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x01\x02\x02\x03\x03\x04\x04\x05\x05\x06\xa5\x40\x28\xad\xbd\xa4\x3c\xe6\x32\x1e\x42\x21\x35\x50\xb4\xac")); +rcv($sock_b, $port_a, rtpm(0, 2003, 4480, $ssrc, "\xda\x22\x37\xa6\xaa\x26\x2b\x2e\xad\x31\x24\x29\x3b\xb4\x20\x5e\x1f\x5e\x2e\xb5\xa4\x36\x31\xd4\xb3\xa0\xb2\x9e\x2f\x3a\x23\x6b\x27\xdc\x3f\xb2\x30\x29\xa5\x38\x4a\xbb\x1f\x33\xac\xb3\xa9\xa7\xb2\x39\xab\x34\xb0\x1f\xa5\x1e\x2d\xa6\x2e\xff\x47\x41\x25\x23\xb0\xad\x2b\xb7\x57\xae\x30\xa4\x29\xbf\x55\x2a\x1f\x37\x46\xb0\x2a\xcc\x2e\xac\xac\xfd\xbf\x2e\x2d\x26\xa2\xa0\xba\xbf\xbc\x34\xa8\xbb\xac\x9f\xaf\x26\x2e\x47\xd2\x38\xcb\x64\xa9\x3d\xbc\xf0\x23\x41\x44\x3c\x1f\xae\xaf\x1f\xc7\xa7\x4c\x4b\x64\x4a\x25\xc1\x27\xaa\xac\xde\x27\xab\x39\xb2\xb7\xb9\x28\x26\xd3\x39\x9e\x30\xaf\xad\x3e\x21\x23\x20\x4e\x49\xaa\xcb\xae\x2e\x32\x1f\xac\x2d")); +rcv($sock_b, $port_a, rtpm(0, 2004, 4640, $ssrc, "\x1e\x2b\xb8\x9f\xa2\x9e\x6e\x3f\x25\x28\xad\x24\xa8\xab\x61\x1e\xba\x1e\x28\xae\xaf\x29\x3d\x43\xa9\x9e\x29\x24\xb1\x37\x2a\x20\xac\x39\xa3\xb7\x28\xac\xad\xaf\x43\x3f\x2e\xa7\xab\xbd\xaa\x2a\x3d\xb0\x4d\x44\xad\x23\x4d\x21\x9e\x1e\xa6\xc6\x27\x2e\x27\xa6\xc9\x26\x3d\xb7\xc9\x24\xa9\xa6\x3d\xa4\x29\x25\xa0\x5c\xa7\xa5\x9f\x29\x9f\x31\x6b\x53\x2b\xbc\xa1\x1f\x1f\xa7\x38\xa5\xd5\x2e\xac\x26\x1e\xa1\xcc\x2f\x20\x2d\xb3\xbc\x3c\x1f\xc4\xa3\x2f\xbd\xa1\xa4\xbd\x1e\xc0\x1f\x41\xa8\xa2\xe3\xb5\x71\xb6\x22\xa3\xbd\xc6\xa9\xf1\x9e\x20\xae\x26\xc2\x24\xa7\xa2\x6f\x20\x2d\x1f\xae\xa0\xcd\xdd\xa7\xd3\xbe\x27\x40\xaf\xa8\x49\xd2\x37\xaa\x41\x31")); +# start audio again +snd($sock_a, $port_b, rtp(9, 2003, 4960, 0x5678, "\x3a\x96\x24\x86\x21\x84\x04\x8c\x4d\xd0\xd1\xd2\x94\xd5\xd5\xd6\xd7\xd8\x98\xd8\xd8\xd8\xd8\xd8\xd8\xd8\xd9\xd9\xda\xda\xda\xdb\xdc\x9a\xda\xdb\x9c\xda\xda\x9c\xda\xda\xdb\xdc\xda\xdb\xdd\xdb\xdb\xdc\xda\xdb\xdb\xdd\xda\xdb\xdc\xda\xda\xda\xdc\xd9\xd9\xdb\xdc\xd8\xd8\xda\xdb\xdc\xd8\xd9\xda\xdb\xdb\xdb\xde\xda\xdb\xdb\xdb\xdb\xdb\xde\xda\xda\xdb\xdb\xdb\xdb\xde\xda\xdb\xdb\xdb\xdb\xdb\xde\xda\xdb\xdc\xd6\xdc\xd7\xff\xd8\xd8\xda\xda\xdb\xd9\xdc\xd9\xdb\xdc\xd6\xdd\xd8\xd9\xdc\xd7\xfc\xd7\xdd\xd9\xd9\xdb\xdc\xd9\xd9\xdb\xde\xd9\xd8\xdb\xdf\xda\xda\xdd\xd9\xd9\xda\xde\xda\xdb\xdf\xdc\xd5\xdb\xff\xd6\xde\xdc\xd9\xd9\xd8\xdd\xd9\xda\xfe")); +rcv($sock_b, $port_a, rtpm(0, 2005, 4800, $ssrc, "\xae\x2b\x9f\x22\x9f\xe8\xb8\xb6\xa8\x29\xdb\x4d\xca\x1e\x9e\x33\x2d\xef\xa1\x2b\x46\xb2\x1f\xa5\xcf\xb0\xa0\x26\xb1\xb7\x2e\xab\xb6\x23\x1e\xf4\xaa\x20\xaf\x2e\xaa\x1f\xad\xad\x1f\xa6\x48\xc1\x3d\x26\x68\x61\xed\x20\xd2\xda\xa3\x20\x23\x59\x35\xb1\x44\x22\x9e\xcc\x2a\x36\x20\xa7\xaf\xa7\xa4\x21\xb2\xa3\x2b\x22\x47\x22\xbe\x9e\x2d\x28\x9e\x9f\x2a\xad\x22\xc6\xb2\x25\x24\xc8\x9e\xb9\xa2\xa8\x56\xa1\x21\xe5\x1f\x54\xac\x68\xaf\xb4\x1f\xea\xaf\xb9\x26\xb4\x28\x52\xa9\x9e\x21\xbb\x60\x1f\xab\x9e\xa2\x2d\xa5\x38\xa7\x29\xbd\xa3\x26\xa1\xa9\x2f\x26\xa0\x3a\x4c\xab\x29\xa8\xb0\x07\x07\x08\x08\x08\x09\x09\x0a\x0a\x0a\x0b\x0b\x0b\x0c\x0c\x0c")); +snd($sock_a, $port_b, rtp(9, 2004, 5120, 0x5678, "\x3a\x96\x24\x86\x21\x84\x04\x8c\x4d\xd0\xd1\xd2\x94\xd5\xd5\xd6\xd7\xd8\x98\xd8\xd8\xd8\xd8\xd8\xd8\xd8\xd9\xd9\xda\xda\xda\xdb\xdc\x9a\xda\xdb\x9c\xda\xda\x9c\xda\xda\xdb\xdc\xda\xdb\xdd\xdb\xdb\xdc\xda\xdb\xdb\xdd\xda\xdb\xdc\xda\xda\xda\xdc\xd9\xd9\xdb\xdc\xd8\xd8\xda\xdb\xdc\xd8\xd9\xda\xdb\xdb\xdb\xde\xda\xdb\xdb\xdb\xdb\xdb\xde\xda\xda\xdb\xdb\xdb\xdb\xde\xda\xdb\xdb\xdb\xdb\xdb\xde\xda\xdb\xdc\xd6\xdc\xd7\xff\xd8\xd8\xda\xda\xdb\xd9\xdc\xd9\xdb\xdc\xd6\xdd\xd8\xd9\xdc\xd7\xfc\xd7\xdd\xd9\xd9\xdb\xdc\xd9\xd9\xdb\xde\xd9\xd8\xdb\xdf\xda\xda\xdd\xd9\xd9\xda\xde\xda\xdb\xdf\xdc\xd5\xdb\xff\xd6\xde\xdc\xd9\xd9\xd8\xdd\xd9\xda\xfe")); +rcv($sock_b, $port_a, rtpm(0, 2006, 4960, $ssrc, "\x0d\x0d\x0d\x0e\x0e\x0e\x0f\x10\x13\x15\x1e\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x02\x02\x03\x04\x04\x05\x05\x06\x07\x07\x07\x08\x08\x09\x09\x0a\x0a\x0a\x0b\x0b")); + +rtpe_req('delete', 'G.722 reverse DTX', { 'from-tag' => ft() }); + + + +done_testing(); diff --git a/t/auto-daemon-tests-dtx.pl b/t/auto-daemon-tests-dtx.pl index 68e103d7b..561a8f9fe 100755 --- a/t/auto-daemon-tests-dtx.pl +++ b/t/auto-daemon-tests-dtx.pl @@ -15,19 +15,8 @@ autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 -i 2001:db8:4321::1 or die; -my $amr_tests = (POSIX::uname())[1] eq 'moose'; - - -# 100 ms sine wave - -my $wav_file = "\x52\x49\x46\x46\x64\x06\x00\x00\x57\x41\x56\x45\x66\x6d\x74\x20\x10\x00\x00\x00\x01\x00\x01\x00\x40\x1f\x00\x00\x80\x3e\x00\x00\x02\x00\x10\x00\x64\x61\x74\x61\x40\x06\x00\x00\x00\x00\xb0\x22\x45\x41\x25\x58\x95\x64\x24\x65\xbd\x59\xb6\x43\xb4\x25\x35\x03\x5e\xe0\x3b\xc1\x8c\xa9\x0f\x9c\x6a\x9a\xc2\xa4\xe7\xb9\x55\xd7\x92\xf9\x92\x1c\x30\x3c\xb2\x54\x2e\x63\xf3\x65\xa7\x5c\x68\x48\x9b\x2b\xa1\x09\x8a\xe6\x71\xc6\x28\xad\xab\x9d\xcc\x99\x06\xa2\x5c\xb5\x81\xd1\x2d\xf3\x53\x16\xe1\x36\xe8\x50\x64\x61\x59\x66\x36\x5f\xcf\x4c\x56\x31\x04\x10\xd0\xec\xe0\xcb\x19\xb1\xa9\x9f\x98\x99\xa8\x9f\x1a\xb1\xdf\xcb\xd1\xec\x04\x10\x54\x31\xd2\x4c\x33\x5f\x5c\x66\x61\x61\xeb\x50\xde\x36\x56\x16\x2b\xf3\x83\xd1\x59\xb5\x08\xa2\xcb\x99\xac\x9d\x28\xad\x70\xc6\x8a\xe6\xa3\x09\x98\x2b\x6a\x48\xa6\x5c\xf4\x65\x2d\x63\xb3\x54\x2e\x3c\x93\x1c\x93\xf9\x53\xd7\xe9\xb9\xc1\xa4\x69\x9a\x11\x9c\x8b\xa9\x3b\xc1\x5e\xe0\x36\x03\xb2\x25\xba\x43\xb7\x59\x2a\x65\x90\x64\x29\x58\x42\x41\xb2\x22\xff\xff\x50\xdd\xbb\xbe\xdb\xa7\x6b\x9b\xdd\x9a\x42\xa6\x4b\xbc\x4b\xda\xca\xfc\xa5\x1f\xc2\x3e\x77\x56\xed\x63\x9a\x65\x3b\x5b\x1b\x46\xa9\x28\x70\x06\x6c\xe3\xd2\xc3\x4d\xab\xd1\x9c\x10\x9a\x56\xa3\x99\xb7\x67\xd4\x5b\xf6\x79\x19\x8e\x39\xd7\x52\x58\x62\x30\x66\xfd\x5d\xa2\x4a\x81\x2e\xd1\x0c\xae\xe9\x1f\xc9\x17\xaf\x9e\x9e\xa4\x99\xce\xa0\x2c\xb3\xaf\xce\xf8\xef\x33\x13\x1e\x34\xe8\x4e\x57\x60\x68\x66\x57\x60\xe9\x4e\x1c\x34\x35\x13\xf6\xef\xb0\xce\x2d\xb3\xcc\xa0\xa6\x99\x9c\x9e\x17\xaf\x22\xc9\xa9\xe9\xd6\x0c\x7c\x2e\xa7\x4a\xf8\x5d\x36\x66\x52\x62\xdb\x52\x8c\x39\x79\x19\x5c\xf6\x67\xd4\x97\xb7\x59\xa3\x0e\x9a\xd1\x9c\x4e\xab\xd0\xc3\x6e\xe3\x6e\x06\xac\x28\x18\x46\x3d\x5b\x98\x65\xef\x63\x76\x56\xc3\x3e\xa4\x1f\xc9\xfc\x4e\xda\x49\xbc\x43\xa6\xdd\x9a\x69\x9b\xdd\xa7\xbb\xbe\x4f\xdd\x01\x00\xaf\x22\x47\x41\x23\x58\x96\x64\x24\x65\xbb\x59\xba\x43\xb0\x25\x39\x03\x59\xe0\x40\xc1\x87\xa9\x15\x9c\x65\x9a\xc4\xa4\xe7\xb9\x56\xd7\x90\xf9\x94\x1c\x2e\x3c\xb3\x54\x2f\x63\xf1\x65\xa8\x5c\x68\x48\x9a\x2b\xa2\x09\x8a\xe6\x71\xc6\x27\xad\xac\x9d\xcb\x99\x08\xa2\x59\xb5\x84\xd1\x2a\xf3\x56\x16\xe0\x36\xe7\x50\x65\x61\x59\x66\x35\x5f\xd1\x4c\x54\x31\x04\x10\xd2\xec\xdd\xcb\x1c\xb1\xa5\x9f\x9b\x99\xa8\x9f\x18\xb1\xe2\xcb\xcd\xec\x07\x10\x54\x31\xd1\x4c\x33\x5f\x5d\x66\x60\x61\xec\x50\xdd\x36\x57\x16\x29\xf3\x86\xd1\x57\xb5\x09\xa2\xcb\x99\xab\x9d\x29\xad\x70\xc6\x8a\xe6\xa2\x09\x9a\x2b\x69\x48\xa7\x5c\xf2\x65\x2e\x63\xb2\x54\x31\x3c\x91\x1c\x93\xf9\x53\xd7\xe9\xb9\xc1\xa4\x6a\x9a\x10\x9c\x8a\xa9\x3f\xc1\x59\xe0\x3a\x03\xb0\x25\xb8\x43\xbd\x59\x24\x65\x95\x64\x24\x58\x46\x41\xaf\x22\x02\x00\x4e\xdd\xbb\xbe\xdd\xa7\x68\x9b\xdf\x9a\x42\xa6\x48\xbc\x50\xda\xc6\xfc\xa7\x1f\xc2\x3e\x75\x56\xef\x63\x99\x65\x3c\x5b\x1a\x46\xaa\x28\x6e\x06\x6e\xe3\xd1\xc3\x4e\xab\xd1\x9c\x0e\x9a\x57\xa3\x9a\xb7\x64\xd4\x60\xf6\x75\x19\x90\x39\xd7\x52\x55\x62\x34\x66\xf9\x5d\xa8\x4a\x7a\x2e\xd8\x0c\xa7\xe9\x23\xc9\x16\xaf\x9d\x9e\xa6\x99\xcb\xa0\x2f\xb3\xad\xce\xfa\xef\x30\x13\x21\x34\xe6\x4e\x59\x60\x66\x66\x5a\x60\xe4\x4e\x23\x34\x2e\x13\xfc\xef\xab\xce\x30\xb3\xcb\xa0\xa5\x99\x9f\x9e\x14\xaf\x24\xc9\xa7\xe9\xd8\x0c\x7b\x2e\xa8\x4a\xf7\x5d\x36\x66\x53\x62\xda\x52\x8d\x39\x78\x19\x5d\xf6\x67\xd4\x97\xb7\x59\xa3\x0d\x9a\xd2\x9c\x4e\xab\xd1\xc3\x6d\xe3\x6f\x06\xaa\x28\x19\x46\x3f\x5b\x95\x65\xf2\x63\x74\x56\xc2\x3e\xa8\x1f\xc4\xfc\x52\xda\x45\xbc\x46\xa6\xdc\x9a\x6a\x9b\xdc\xa7\xba\xbe\x51\xdd\xff\xff\xb1\x22\x45\x41\x24\x58\x97\x64\x22\x65\xbd\x59\xb7\x43\xb3\x25\x37\x03\x5b\xe0\x3e\xc1\x89\xa9\x11\x9c\x6a\x9a\xc0\xa4\xeb\xb9\x51\xd7\x94\xf9\x91\x1c\x31\x3c\xb1\x54\x2f\x63\xf3\x65\xa5\x5c\x6c\x48\x95\x2b\xa7\x09\x86\xe6\x73\xc6\x28\xad\xa9\x9d\xcf\x99\x04\xa2\x5b\xb5\x84\xd1\x29\xf3\x57\x16\xde\x36\xe9\x50\x65\x61\x57\x66\x38\x5f\xcd\x4c\x57\x31\x04\x10\xd0\xec\xe1\xcb\x17\xb1\xaa\x9f\x97\x99\xaa\x9f\x18\xb1\xe1\xcb\xce\xec\x07\x10\x53\x31\xd0\x4c\x38\x5f\x55\x66\x68\x61\xe6\x50\xe0\x36\x56\x16\x2b\xf3\x81\xd1\x5d\xb5\x04\xa2\xce\x99\xaa\x9d\x29\xad\x70\xc6\x8a\xe6\xa2\x09\x9b\x2b\x67\x48\xa9\x5c\xf1\x65\x2e\x63\xb4\x54\x2e\x3c\x93\x1c\x92\xf9\x54\xd7\xe8\xb9\xc2\xa4\x69\x9a\x10\x9c\x8c\xa9\x3c\xc1\x5c\xe0\x37\x03\xb2\x25\xb8\x43\xbc\x59\x24\x65\x95\x64\x26\x58\x43\x41\xb2\x22\xff\xff\x50\xdd\xba\xbe\xde\xa7\x68\x9b\xdd\x9a\x45\xa6\x45\xbc\x52\xda\xc5\xfc\xa8\x1f\xbf\x3e\x79\x56\xec\x63\x9b\x65\x3b\x5b\x1a\x46\xaa\x28\x6f\x06\x6e\xe3\xd0\xc3\x4f\xab\xd0\x9c\x0f\x9a\x58\xa3\x97\xb7\x68\xd4\x5c\xf6\x78\x19\x8f\x39\xd6\x52\x57\x62\x32\x66\xfb\x5d\xa6\x4a\x7b\x2e\xd8\x0c\xa6\xe9\x25\xc9\x15\xaf\x9c\x9e\xa9\x99\xc7\xa0\x33\xb3\xa9\xce\xfd\xef\x2f\x13\x21\x34\xe6\x4e\x58\x60\x67\x66\x59\x60\xe5\x4e\x23\x34\x2c\x13\x00\xf0\xa6\xce\x35\xb3\xc7\xa0\xa8\x99\x9d\x9e\x15\xaf\x24\xc9\xa8\xe9\xd5\x0c\x7e\x2e\xa5\x4a\xfa\x5d\x35\x66\x52\x62\xdb\x52\x8d\x39\x77\x19\x5e\xf6\x66\xd4\x98\xb7\x59\xa3\x0c\x9a\xd3\x9c\x4d\xab\xd1\xc3\x6e\xe3\x6e\x06\xaa\x28\x1b\x46\x3b\x5b\x9a\x65\xed\x63\x76\x56\xc4\x3e\xa3\x1f\xcb\xfc\x4b\xda\x4a\xbc\x43\xa6\xdd\x9a\x6a\x9b\xdc\xa7\xba\xbe\x51\xdd\xff\xff\xb1\x22\x44\x41\x25\x58\x96\x64\x23\x65\xbd\x59\xb6\x43\xb4\x25\x36\x03\x5c\xe0\x3d\xc1\x8a\xa9\x12\x9c\x67\x9a\xc4\xa4\xe6\xb9\x55\xd7\x93\xf9\x91\x1c\x31\x3c\xb0\x54\x31\x63\xef\x65\xab\x5c\x66\x48\x9a\x2b\xa4\x09\x87\xe6\x73\xc6\x26\xad\xad\x9d\xcb\x99\x07\xa2\x5b\xb5\x81\xd1\x2c\xf3\x56\x16\xde\x36\xeb\x50\x62\x61\x59\x66\x38\x5f\xcc\x4c\x59\x31\x01\x10\xd3\xec\xdd\xcb\x1b\xb1\xa8\x9f\x98\x99\xa9\x9f\x18\xb1\xe0\xcb\xd1\xec\x03\x10\x57\x31\xce\x4c\x37\x5f\x58\x66\x63\x61\xec\x50\xdb\x36\x5a\x16\x27\xf3\x85\xd1\x5a\xb5\x05\xa2\xce\x99\xaa\x9d\x29\xad\x70\xc6\x8a\xe6\xa2\x09\x9a\x2b\x69\x48\xa6\x5c\xf4\x65\x2e\x63\xb1\x54\x32\x3c\x8e\x1c\x96\xf9\x52\xd7\xea\xb9\xc1\xa4\x67\x9a\x13\x9c\x8a\xa9\x3c\xc1\x5e\xe0\x33\x03\xb7\x25\xb4\x43\xbf\x59\x21\x65\x99\x64\x21\x58\x48\x41\xad\x22\x03\x00\x4f\xdd\xbb\xbe\xdb\xa7\x6a\x9b\xdd\x9a\x43\xa6\x4b\xbc\x4a\xda\xcb\xfc\xa4\x1f\xc3\x3e\x76\x56\xef\x63\x96\x65\x40\x5b\x17\x46\xac\x28\x6e\x06\x6d\xe3\xd2\xc3\x4d\xab\xd2\x9c\x0d\x9a\x59\xa3\x97\xb7\x68\xd4\x5c\xf6\x77\x19\x8f\x39\xd8\x52\x55\x62\x33\x66\xfb\x5d\xa4\x4a\x7f\x2e\xd4\x0c\xab\xe9\x20\xc9\x17\xaf\x9d\x9e\xa7\x99\xc9\xa0\x32\xb3\xa9\xce\xfd\xef\x2f\x13\x20\x34\xe8\x4e\x56\x60\x6a\x66\x55\x60\xe9\x4e\x1f\x34\x31\x13\xfa\xef\xad\xce\x2e\xb3\xcc\xa0\xa7\x99\x9b\x9e\x18\xaf\x20\xc9\xac\xe9\xd2\x0c\x81\x2e\xa1\x4a\xff\x5d\x30\x66\x56\x62\xd7\x52\x90\x39\x77\x19\x5d\xf6\x67\xd4\x96\xb7\x5a\xa3\x0e\x9a\xd0\x9c\x50\xab\xcf\xc3\x6e\xe3\x6f\x06\xaa\x28\x1a\x46\x3d\x5b\x98\x65\xee\x63\x77\x56\xc1\x3e\xa7\x1f\xc8\xfc\x4c\xda\x4b\xbc\x41\xa6\xdf\x9a\x68\x9b\xdd\xa7\xba\xbe\x51\xdd"; -is length($wav_file), 1644, 'embedded binary wav file'; - -my $pcma_1 = "\xd5\xb4\xa5\xa3\xac\xac\xa3\xa5\xb7\xfc\x0a\x3a\x20\x2d\x2c\x23\x24\x31\x6c\x89\xbb\xa0\xad\xac\xa2\xa7\xb0\x96\x0c\x39\x21\x2d\x2c\x22\x27\x32\x1c\x83\xbe\xa1\xad\xac\xa2\xa6\xbd\x9a\x06\x3f\x26\x2d\x2c\x2d\x26\x3f\x06\x9a\xbd\xa6\xa2\xac\xad\xa1\xbe\x83\x1c\x32\x27\x22\x2c\x2d\x21\x39\x0c\x96\xb0\xa7\xa2\xac\xad\xa0\xbb\x89\x6c\x31\x24\x23\x2c\x2d\x20\x3a\x0a\xfc\xb7\xa5\xa3\xac\xac\xa3\xa5\xb4\x55\x34\x25\x23\x2c\x2c\x23\x25\x37\x7c\x8a\xba\xa0\xad\xac\xa3\xa4\xb1\xec\x09\x3b\x20\x2d\x2c\x22\x27\x30\x16\x8c\xb9\xa1\xad\xac\xa2\xa7\xb2\x9c\x03\x3e\x21\x2d\x2c\x22\x26\x3d\x1a\x86\xbf\xa6\xad\xac\xad\xa6\xbf\x86\x1a\x3d\x26\x22\x2c"; -my $pcma_2 = "\x2d\x21\x3e\x03\x9c\xb2\xa7\xa2\xac\xad\xa1\xb9\x8c\x16\x30\x27\x22\x2c\x2d\x20\x3b\x09\xec\xb1\xa4\xa3\xac\xad\xa0\xba\x8a\x7c\x37\x25\x23\x2c\x2c\x23\x25\x34\xd5\xb4\xa5\xa3\xac\xac\xa3\xa5\xb7\xfc\x0a\x3a\x20\x2d\x2c\x23\x24\x31\x6c\x89\xbb\xa0\xad\xac\xa2\xa7\xb0\x96\x0c\x39\x21\x2d\x2c\x22\x27\x32\x1c\x83\xbe\xa1\xad\xac\xa2\xa6\xbd\x9a\x06\x3f\x26\x2d\x2c\x2d\x26\x3f\x06\x9a\xbd\xa6\xa2\xac\xad\xa1\xbe\x83\x1c\x32\x27\x22\x2c\x2d\x21\x39\x0c\x96\xb0\xa7\xa2\xac\xad\xa0\xbb\x89\x6c\x31\x24\x23\x2c\x2d\x20\x3a\x0a\xfc\xb7\xa5\xa3\xac\xac\xa3\xa5\xb4\xd5\x34\x25\x23\x2c\x2c\x23\x25\x37\x7c\x8a\xba\xa0\xad\xac\xa3\xa4\xb1\xec\x09"; -my $pcma_3 = "\x3b\x20\x2d\x2c\x22\x27\x30\x16\x8c\xb9\xa1\xad\xac\xa2\xa7\xb2\x9c\x03\x3e\x21\x2d\x2c\x22\x26\x3d\x1a\x86\xbf\xa6\xad\xac\xad\xa6\xbf\x86\x1a\x3d\x26\x22\x2c\x2d\x21\x3e\x03\x9c\xb2\xa7\xa2\xac\xad\xa1\xb9\x8c\x16\x30\x27\x22\x2c\x2d\x20\x3b\x09\xec\xb1\xa4\xa3\xac\xad\xa0\xba\x8a\x7c\x37\x25\x23\x2c\x2c\x23\x25\x34\x55\xb4\xa5\xa3\xac\xac\xa3\xa5\xb7\xfc\x0a\x3a\x20\x2d\x2c\x23\x24\x31\x6c\x89\xbb\xa0\xad\xac\xa2\xa7\xb0\x96\x0c\x39\x21\x2d\x2c\x22\x27\x32\x1c\x83\xbe\xa1\xad\xac\xa2\xa6\xbd\x9a\x06\x3f\x26\x2d\x2c\x2d\x26\x3f\x06\x9a\xbd\xa6\xa2\xac\xad\xa1\xbe\x83\x1c\x32\x27\x22\x2c\x2d\x21\x39\x0c\x96\xb0\xa7\xa2\xac\xad\xa0"; -my $pcma_4 = "\xbb\x89\x6c\x31\x24\x23\x2c\x2d\x20\x3a\x0a\xfc\xb7\xa5\xa3\xac\xac\xa3\xa5\xb4\x55\x34\x25\x23\x2c\x2c\x23\x25\x37\x7c\x8a\xba\xa0\xad\xac\xa3\xa4\xb1\xec\x09\x3b\x20\x2d\x2c\x22\x27\x30\x16\x8c\xb9\xa1\xad\xac\xa2\xa7\xb2\x9c\x03\x3e\x21\x2d\x2c\x22\x26\x3d\x1a\x86\xbf\xa6\xad\xac\xad\xa6\xbf\x86\x1a\x3d\x26\x22\x2c\x2d\x21\x3e\x03\x9c\xb2\xa7\xa2\xac\xad\xa1\xb9\x8c\x16\x30\x27\x22\x2c\x2d\x20\x3b\x09\xec\xb1\xa4\xa3\xac\xad\xa0\xba\x8a\x7c\x37\x25\x23\x2c\x2c\x23\x25\x34\x55\xb4\xa5\xa3\xac\xac\xa3\xa5\xb7\xfc\x0a\x3a\x20\x2d\x2c\x23\x24\x31\x6c\x89\xbb\xa0\xad\xac\xa2\xa7\xb0\x96\x0c\x39\x21\x2d\x2c\x22\x27\x32\x1c\x83\xbe\xa1"; -my $pcma_5 = "\xad\xac\xa2\xa6\xbd\x9a\x06\x3f\x26\x2d\x2c\x2d\x26\x3f\x06\x9a\xbd\xa6\xa2\xac\xad\xa1\xbe\x83\x1c\x32\x27\x22\x2c\x2d\x21\x39\x0c\x96\xb0\xa7\xa2\xac\xad\xa0\xbb\x89\x6c\x31\x24\x23\x2c\x2d\x20\x3a\x0a\xfc\xb7\xa5\xa3\xac\xac\xa3\xa5\xb4\xd5\x34\x25\x23\x2c\x2c\x23\x25\x37\x7c\x8a\xba\xa0\xad\xac\xa3\xa4\xb1\xec\x09\x3b\x20\x2d\x2c\x22\x27\x30\x16\x8c\xb9\xa1\xad\xac\xa2\xa7\xb2\x9c\x03\x3e\x21\x2d\x2c\x22\x26\x3d\x1a\x86\xbf\xa6\xad\xac\xad\xa6\xbf\x86\x1a\x3d\x26\x22\x2c\x2d\x21\x3e\x03\x9c\xb2\xa7\xa2\xac\xad\xa1\xb9\x8c\x16\x30\x27\x22\x2c\x2d\x20\x3b\x09\xec\xb1\xa4\xa3\xac\xad\xa0\xba\x8a\x7c\x37\x25\x23\x2c\x2c\x23\x25\x34"; +#my $amr_tests = (POSIX::uname())[1] eq 'moose'; +my $amr_tests = 0; @@ -40,6 +29,7 @@ my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp, +if ($amr_tests) { ($sock_a, $sock_b) = new_call([qw(198.51.100.10 4024)], [qw(198.51.100.10 4026)]); @@ -69,7 +59,7 @@ a=sendrecv a=rtcp:PORT SDP -($port_b) = answer('AMR-WB -> PCM CMR', +($port_b) = answer('AMR SID', { ICE => 'remove', replace => ['origin'] }, < PCM CMR', +($port_b) = answer('AMR SID TS gap', { ICE => 'remove', replace => ['origin'] }, < ft() }); +} + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5000)], [qw(198.51.100.10 5002)]); + +($port_a) = offer('G.711 DTX', + { replace => ['origin'], codec => { + transcode => ['PCMA'], + } }, < ['origin'] }, < silence +rcv($sock_b, $port_a, rtpm(8, 2002, 4320, $ssrc, "\xd5" x 160)); +rcv($sock_b, $port_a, rtpm(8, 2003, 4480, $ssrc, "\xd5" x 160)); +# start audio again +snd($sock_a, $port_b, rtp(0, 2002, 4640, 0x5678, "\x40" x 160)); +rcv($sock_b, $port_a, rtpm(8, 2004, 4640, $ssrc, "\x68" x 160)); + +rtpe_req('delete', 'G.711 DTX', { 'from-tag' => ft() }); + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5004)], [qw(198.51.100.10 5006)]); + +($port_a) = offer('G.711 DTX ptime=30', + { replace => ['origin'], codec => { + transcode => ['PCMA'], + } }, < ['origin'] }, < silence +rcv($sock_b, $port_a, rtpm(8, 2002, 4480, $ssrc, "\xd5" x 240)); +rcv($sock_b, $port_a, rtpm(8, 2003, 4720, $ssrc, "\xd5" x 240)); +# start audio again +snd($sock_a, $port_b, rtp(0, 2002, 4960, 0x5678, "\x40" x 240)); +rcv($sock_b, $port_a, rtpm(8, 2004, 4960, $ssrc, "\x68" x 240)); + +rtpe_req('delete', 'G.711 DTX ptime=30', { 'from-tag' => ft() }); + + + + +($sock_a, $sock_b) = new_call([qw(198.51.100.10 5008)], [qw(198.51.100.10 5010)]); + +($port_a) = offer('G.711 DTX ptime change', + { replace => ['origin'], codec => { + transcode => ['PCMA'], + } }, < ['origin'] }, < silence +rcv($sock_b, $port_a, rtpm(8, 2003, 4480, $ssrc, "\xd5" x 160)); +rcv($sock_b, $port_a, rtpm(8, 2004, 4640, $ssrc, "\xd5" x 160)); +rcv($sock_b, $port_a, rtpm(8, 2005, 4800, $ssrc, "\xd5" x 160)); +# start audio again +snd($sock_a, $port_b, rtp(0, 2002, 4960, 0x5678, "\x40" x 240)); +rcv($sock_b, $port_a, rtpm(8, 2006, 4960, $ssrc, "\x68" x 160)); + +rtpe_req('delete', 'G.711 DTX ptime change', { 'from-tag' => ft() }); + + + done_testing();