Skip to content

Commit

Permalink
MT#60347 tests for xtended allow-asymmetric-codecs
Browse files Browse the repository at this point in the history
Change-Id: Ic39204f22aa20350ba904eee79f313f4e12a0874
  • Loading branch information
rfuchs committed Jul 25, 2024
1 parent abbc022 commit d48f4f3
Showing 1 changed file with 278 additions and 0 deletions.
278 changes: 278 additions & 0 deletions t/auto-daemon-tests.pl
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,284 @@ sub stun_succ {



new_call;

offer('mismatched t-e control', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 101
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:101 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 101
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

answer('mismatched t-e control', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 97
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:97 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP

new_call;

offer('mismatched t-e', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 101
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:101 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 101
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

answer('mismatched t-e', { flags => ['allow asymmetric codecs'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 97
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:97 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 97
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:97 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

new_call;

offer('mismatched t/c t-e control', { codec => {transcode => ['telephone-event'] } }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8
c=IN IP4 198.51.100.50
a=sendrecv
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=sendrecv
a=rtcp:PORT
SDP

answer('mismatched t/c t-e control', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 97
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:97 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP

new_call;

offer('mismatched t/c t-e', { codec => {transcode => ['telephone-event'] } }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8
c=IN IP4 198.51.100.50
a=sendrecv
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=sendrecv
a=rtcp:PORT
SDP

answer('mismatched t/c t-e', { flags => ['allow asymmetric codecs'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 97
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:97 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 97
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:97 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

new_call;

offer('mismatched accept t-e control', { codec => {accept => ['telephone-event'] } }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 101
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:101 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 101
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

answer('mismatched accept t-e control', { }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 97
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:97 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 101
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

new_call;

offer('mismatched accept t-e', { codec => {accept => ['telephone-event'] } }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 101
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:101 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 101
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP

answer('mismatched accept t-e', { flags => ['allow asymmetric codecs'] }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio 3000 RTP/AVP 8 97
c=IN IP4 198.51.100.50
a=sendrecv
a=rtpmap:97 telephone-event/8000
-------------------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.11
s=tester
t=0 0
m=audio PORT RTP/AVP 8 97
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:97 telephone-event/8000
a=sendrecv
a=rtcp:PORT
SDP




#done_testing;NGCP::Rtpengine::AutoTest::terminate('f00');exit;
new_call;

offer('t-e fmtp', { flags => [qw(codec-strip-all codec-transcode-PCMA codec-transcode-telephone-event)],
Expand Down

0 comments on commit d48f4f3

Please sign in to comment.