|
|
|
@ -88,6 +88,116 @@ sub stun_succ { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# GH 1989 |
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.1 7294)], [qw(198.51.100.3 7296)]); |
|
|
|
|
|
|
|
($port_a) = offer('asym codec passthrough', { |
|
|
|
flags => ['allow asymmetric codecs'], |
|
|
|
codec => { transcode => ['PCMU', 'PCMA'] }, |
|
|
|
}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7294 RTP/AVP 9 0 |
|
|
|
c=IN IP4 198.51.100.1 |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio PORT RTP/AVP 9 0 8 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:9 G722/8000 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:8 PCMA/8000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_b) = answer('asym codec passthrough', { |
|
|
|
flags => ['allow asymmetric codecs'], |
|
|
|
codec => { transcode => ['PCMU', 'PCMA'] }, |
|
|
|
}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7296 RTP/AVP 0 8 |
|
|
|
c=IN IP4 198.51.100.3 |
|
|
|
a=sendrecv |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio PORT RTP/AVP 0 9 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:9 G722/8000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_a) = offer('asym codec passthrough', { |
|
|
|
flags => ['allow asymmetric codecs'], |
|
|
|
codec => { transcode => ['PCMU', 'PCMA'] }, |
|
|
|
}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7294 RTP/AVP 9 |
|
|
|
c=IN IP4 198.51.100.1 |
|
|
|
a=sendrecv |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio PORT RTP/AVP 9 0 8 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:9 G722/8000 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:8 PCMA/8000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_b) = answer('asym codec passthrough', { |
|
|
|
flags => ['allow asymmetric codecs'], |
|
|
|
codec => { transcode => ['PCMU', 'PCMA'] }, |
|
|
|
}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7296 RTP/AVP 0 8 |
|
|
|
c=IN IP4 198.51.100.3 |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio PORT RTP/AVP 9 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:9 G722/8000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 1000, 3000, 0x1234, "\x99" x 160)); |
|
|
|
Time::HiRes::usleep(20000); # resample delay |
|
|
|
snd($sock_b, $port_a, rtp(0, 1001, 3160, 0x1234, "\x99" x 160)); |
|
|
|
rcv($sock_a, $port_b, rtpm(9, 1000, 3000, 0x1234, "\x92\x20\x84\x20\x85\x20\xa0\x26\xa6\x27\xe7\xe8\xe9\xe9\xea\xeb\xec\xed\xed\xee\xee\xef\xf0\xf0\xf0\xf0\xf0\xf1\xf1\xf2\xf3\xf4\xf3\xf4\xf3\xf4\xf4\xf2\xf5\xf4\xf3\xf5\xf5\xf5\xf4\xf3\xf6\xf5\xf4\xf4\xf4\xf4\xf3\xf5\xf5\xf5\xf4\xf4\xf4\xf2\xf5\xf4\xf4\xf3\xf7\xf7\xf5\xf4\xf3\xf7\xf5\xf4\xf3\xf7\xf7\xf5\xf4\xf3\xf7\xf5\xf4\xf3\xf7\xf7\xf5\xf3\xf8\xf3\xf6\xf4\xf3\xf9\xf2\xf7\xf6\xf4\xf4\xf1\xf6\xf5\xf3\xf9\xf4\xf3\xf7\xf6\xf5\xf2\xf8\xf4\xf1\xf5\xf5\xf4\xf2\xf8\xf4\xf2\xf6\xf6\xf6\xf3\xfa\xf6\xf3\xf8\xf1\xf6\xf4\xf4\xf6\xf3\xfc\xef\xfb\xf6\xf6\xf6\xf3\xfe\xf0\xf2\xfc\xf2\xf8\xf0\xf8\xf4\xef\xdb\xee\xfd\xf2\xfa\xf8\xed\xde\xf1\xf9\xf4")); |
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(9, 3000, 5000, 0x6321, "\x92\x20\x84\x20\x85\x20\xa0\x26\xa6\x27\xe7\xe8\xe9\xe9\xea\xeb\xec\xed\xed\xee\xee\xef\xf0\xf0\xf0\xf0\xf0\xf1\xf1\xf2\xf3\xf4\xf3\xf4\xf3\xf4\xf4\xf2\xf5\xf4\xf3\xf5\xf5\xf5\xf4\xf3\xf6\xf5\xf4\xf4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\xef\xfb\xf6\xf6\xf6\xf3\xfe\xf0\xf2\xfc\xf2\xf8\xf0\xf8\xf4\xef\xdb\xee\xfd\xf2\xfa\xf8\xed\xde\xf1\xf9\xf4")); |
|
|
|
rcv($sock_b, $port_a, rtpm(0, 3000, 5000, 0x6321, "\xfb\x7b\xfa\x78\xf6\x71\xee\x6b\xeb\x79\x59\xad\x9e\x99\x99\x99\x98\x99\x99\x98" . "\x99" x 140)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($extended_tests) { |
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.1 7256)], [qw(198.51.100.3 7258)]); |
|
|
|
|