Browse Source

TT#92250 add tests for reorder-codec

Change-Id: I87e6a2068af2350db4d175bbb0b5dbacf1543fee
pull/1164/head
Richard Fuchs 5 years ago
parent
commit
6bf5e3af54
3 changed files with 12579 additions and 6 deletions
  1. +2
    -0
      t/Makefile
  2. +12399
    -0
      t/auto-daemon-tests-reorder.pl
  3. +178
    -6
      t/auto-daemon-tests.pl

+ 2
- 0
t/Makefile View File

@ -114,6 +114,8 @@ daemon-tests: tests-preload.so
perl -I../perl auto-daemon-tests.pl
LD_PRELOAD=../t/tests-preload.so RTPE_BIN=../daemon/rtpengine TEST_SOCKET_PATH=./fake-sockets \
perl -I../perl auto-daemon-tests-jb.pl
LD_PRELOAD=../t/tests-preload.so RTPE_BIN=../daemon/rtpengine TEST_SOCKET_PATH=./fake-sockets \
perl -I../perl auto-daemon-tests-reorder.pl
test "$$(ls fake-sockets)" = ""
rmdir fake-sockets


+ 12399
- 0
t/auto-daemon-tests-reorder.pl
File diff suppressed because it is too large
View File


+ 178
- 6
t/auto-daemon-tests.pl View File

@ -7,6 +7,7 @@ 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
@ -14,6 +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
@ -1675,10 +1678,6 @@ rtpe_req('delete', 'AMR SID', { 'from-tag' => ft() });
done_testing;
exit;
}
@ -1730,7 +1729,180 @@ SDP
if (0) {
if ($amr_tests) {
# AMR-WB b2b transcoding
($sock_a, $sock_b) = new_call([qw(198.51.100.10 3062)], [qw(198.51.100.10 3064)]);
($port_a) = offer('AMR-WB b2b transcoding',
{ ICE => 'remove', replace => ['origin'],
codec => {
mask => ['all'],
transcode => [
'PCMA',
'AMR',
'AMR-WB/16000/1///mode-set--0,1,2;mode-change-period--2;mode-change-capability--2/dtx--1',
'telephone-event',
],
} }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.10
s=tester
t=0 0
m=audio 3062 RTP/AVP 8 108 101 111 96
c=IN IP4 198.51.100.10
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:101 telephone-event/8000
a=rtpmap:111 AMR-WB/16000
a=fmtp:111 mode-set=0,1,2; mode-change-period=2; mode-change-capability=2
a=rtpmap:96 telephone-event/16000
a=fmtp:101 0-15
a=fmtp:96 0-15
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 8 108 97 101 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:97 AMR-WB/16000
a=fmtp:97 mode-set=0,1,2;mode-change-period=2;mode-change-capability=2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-15
a=sendrecv
a=rtcp:PORT
a=ptime:20
SDP
($port_b) = answer('AMR-WB b2b transcoding',
{ ICE => 'remove', replace => ['origin'], flags => [] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.10
s=tester
t=0 0
m=audio 3064 RTP/AVP 97 96
c=IN IP4 198.51.100.10
a=rtpmap:97 AMR-WB/16000
a=fmtp:97 octet-align=0; mode-set=0,1,2; max-red=0; mode-change-capability=2
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-16
a=ptime:20
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 8 108 111 101 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:111 AMR-WB/16000
a=fmtp:111 mode-set=0,1,2; mode-change-period=2; mode-change-capability=2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-16
a=sendrecv
a=rtcp:PORT
a=ptime:20
SDP
($sock_a, $sock_b) = new_call([qw(198.51.100.10 3066)], [qw(198.51.100.10 3068)]);
($port_a) = offer('AMR-WB b2b transcoding',
{ ICE => 'remove', replace => ['origin'],
codec => {
mask => ['all'],
transcode => [
'PCMA',
'AMR',
'AMR-WB/16000/1///mode-set--0,1,2;mode-change-period--2;mode-change-capability--2/dtx--1',
'telephone-event',
],
} }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.10
s=tester
t=0 0
m=audio 3066 RTP/AVP 8 108 101 111 96
c=IN IP4 198.51.100.10
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:101 telephone-event/8000
a=rtpmap:111 AMR-WB/16000
a=fmtp:111 mode-set=0,1,2; mode-change-period=2; mode-change-capability=2
a=rtpmap:96 telephone-event/16000
a=fmtp:101 0-15
a=fmtp:96 0-15
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 8 108 97 101 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:108 AMR/8000
a=fmtp:108 mode-set=7
a=rtpmap:97 AMR-WB/16000
a=fmtp:97 mode-set=0,1,2;mode-change-period=2;mode-change-capability=2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-15
a=sendrecv
a=rtcp:PORT
a=ptime:20
SDP
($port_b) = answer('AMR-WB b2b transcoding',
{ ICE => 'remove', replace => ['origin'], flags => ['reorder-codecs'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.10
s=tester
t=0 0
m=audio 3068 RTP/AVP 97 96
c=IN IP4 198.51.100.10
a=rtpmap:97 AMR-WB/16000
a=fmtp:97 octet-align=0; mode-set=0,1,2; max-red=0; mode-change-capability=2
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-16
a=ptime:20
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 111 96
c=IN IP4 203.0.113.1
a=rtpmap:111 AMR-WB/16000
a=fmtp:111 mode-set=0,1,2; mode-change-period=2; mode-change-capability=2
a=rtpmap:96 telephone-event/16000
a=fmtp:96 0-16
a=sendrecv
a=rtcp:PORT
a=ptime:20
SDP
# GH 1098
@ -2045,7 +2217,7 @@ rcv($sock_a, $port_b, rtpm(0, 5000, 7000, -1, "\x00" x 160));
if (0) {
if ($amr_tests) {
# AMR-WB mode tests


Loading…
Cancel
Save