Browse Source

MT#55283 test: add test for unknown fmtp

closes #1968

Change-Id: I71d2f7947f0495ea08d000568c40915e86d034d8
rfuchs/1971
wangduanduan 5 months ago
committed by Richard Fuchs
parent
commit
7b5235b4bf
2 changed files with 213 additions and 0 deletions
  1. +3
    -0
      t/Makefile
  2. +210
    -0
      t/auto-daemon-tests-unknown-fmtp.pl

+ 3
- 0
t/Makefile View File

@ -223,6 +223,9 @@ daemon-tests-audio-player-play-media: daemon-test-deps
daemon-tests-rtpp-flags: daemon-test-deps
./auto-test-helper "$@" perl -I../perl auto-daemon-tests-rtpp-flags.pl
daemon-tests-unknown-fmtp: daemon-test-deps
./auto-test-helper "$@" perl -I../perl auto-daemon-tests-unknown-fmtp.pl
daemon-tests-sdp-manipulations: daemon-test-deps
./auto-test-helper "$@" perl -I../perl auto-daemon-tests-sdp-manipulations.pl


+ 210
- 0
t/auto-daemon-tests-unknown-fmtp.pl View File

@ -0,0 +1,210 @@
#!/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
-i foo/203.0.113.7 -i bar/203.0.113.8
-n 2223 -c 12345 -f -L 7 -E -u 2222 --silence-detect=1 --log-level-internals=7))
or die;
new_call;
offer('rtpp-flags: basic A to B call', {
'rtpp-flags' => 'replace-origin address-family=IP4 transport-protocol=RTP/AVP',
'from-tag' => ft(),
}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=fmtp:0 this-is-unknown=no
a=rtpmap:8 PCMA/8000
a=fmtp:8 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
c=IN IP4 198.51.100.1
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 8 101
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=fmtp:0 this-is-unknown=no
a=rtpmap:8 PCMA/8000
a=fmtp:8 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:PORT
SDP
# g711 SDP answer fmtp will ingore
answer('rtpp-flags: basic A to B call', {
'rtpp-flags' => 'replace-origin address-family=IP4 transport-protocol=RTP/AVP',
'from-tag' => ft(),
'to-tag' => tt(),
}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio 2002 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
c=IN IP4 198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0 101
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:PORT
SDP
new_call;
offer('rtpp-flags: basic A to B call', {
'rtpp-flags' => 'replace-origin address-family=IP4 transport-protocol=RTP/AVP',
'from-tag' => ft(),
}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=fmtp:3 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
c=IN IP4 198.51.100.1
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 3 101
c=IN IP4 203.0.113.1
a=rtpmap:3 GSM/8000
a=fmtp:3 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:PORT
SDP
# answer without a=fmtp:3 this-is-unknown=no, GSM will be removed, no audio codec now
answer('rtpp-flags: basic A to B call', {
'rtpp-flags' => 'replace-origin address-family=IP4 transport-protocol=RTP/AVP',
'from-tag' => ft(),
'to-tag' => tt(),
}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio 2002 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
c=IN IP4 198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 101
c=IN IP4 203.0.113.1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:PORT
SDP
new_call;
offer('rtpp-flags: basic A to B call', {
'rtpp-flags' => 'replace-origin address-family=IP4 transport-protocol=RTP/AVP',
'from-tag' => ft(),
}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=fmtp:3 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
c=IN IP4 198.51.100.1
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 3 101
c=IN IP4 203.0.113.1
a=rtpmap:3 GSM/8000
a=fmtp:3 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:PORT
SDP
# answer with a=fmtp:3 this-is-unknown=no, GSM will be keeped
answer('rtpp-flags: basic A to B call', {
'rtpp-flags' => 'replace-origin address-family=IP4 transport-protocol=RTP/AVP',
'from-tag' => ft(),
'to-tag' => tt(),
}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio 2002 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=fmtp:3 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
c=IN IP4 198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=- 1545997027 1 IN IP4 203.0.113.1
s=tester
t=0 0
m=audio PORT RTP/AVP 3 101
c=IN IP4 203.0.113.1
a=rtpmap:3 GSM/8000
a=fmtp:3 this-is-unknown=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=rtcp:PORT
SDP
#done_testing;NGCP::Rtpengine::AutoTest::terminate('f00');exit;
done_testing();

Loading…
Cancel
Save