|
|
|
@ -1972,5 +1972,205 @@ rcv_no($sock_c); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b, $sock_c, $sock_d) = |
|
|
|
new_call([qw(198.51.100.14 6190)], |
|
|
|
[qw(198.51.100.14 6192)], |
|
|
|
[qw(198.51.100.14 6194)], |
|
|
|
[qw(198.51.100.14 6196)]); |
|
|
|
|
|
|
|
($port_a, undef, $port_b) = offer('make bundle, reject', |
|
|
|
{ bundle => ['offer'] }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 6190 RTP/AVP 0 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=sendrecv |
|
|
|
m=video 6192 RTP/AVP 105 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=sendrecv |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
a=group:BUNDLE 1 2 |
|
|
|
m=audio PORT RTP/AVP 0 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=mid:1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=extmap-allow-mixed |
|
|
|
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
m=video PORT RTP/AVP 105 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=mid:2 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=extmap-allow-mixed |
|
|
|
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_c, undef, $port_d) = answer('make bundle, reject', |
|
|
|
{ }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 6194 RTP/AVP 0 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=sendrecv |
|
|
|
m=video 6196 RTP/AVP 105 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=sendrecv |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio PORT RTP/AVP 0 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
m=video PORT RTP/AVP 105 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
isnt($port_a, $port_b, 'different ports'); |
|
|
|
isnt($port_a, $port_c, 'different ports'); |
|
|
|
isnt($port_a, $port_d, 'different ports'); |
|
|
|
isnt($port_b, $port_c, 'different ports'); |
|
|
|
isnt($port_b, $port_d, 'different ports'); |
|
|
|
isnt($port_c, $port_d, 'different ports'); |
|
|
|
|
|
|
|
snd($sock_a, $port_c, rtp(0, 2000, 6000, 0x1234, "\x44" x 160)); |
|
|
|
rcv($sock_c, $port_a, rtpm(0, 2000, 6000, 0x1234, "\x44" x 160)); |
|
|
|
|
|
|
|
snd($sock_c, $port_a, rtp(0, 6000, 8000, 0x5678, "\x77" x 160)); |
|
|
|
rcv($sock_a, $port_c, rtpm(0, 6000, 8000, 0x5678, "\x77" x 160)); |
|
|
|
|
|
|
|
snd($sock_b, $port_d, rtp(105, 3000, 4000, 0x6321, "\x33" x 800)); |
|
|
|
rcv($sock_d, $port_b, rtpm(105, 3000, 4000, 0x6321, "\x33" x 800)); |
|
|
|
|
|
|
|
snd($sock_d, $port_b, rtp(105, 7000, 9000, 0x8741, "\x22" x 800)); |
|
|
|
rcv($sock_b, $port_d, rtpm(105, 7000, 9000, 0x8741, "\x22" x 800)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
undef($sock_d); |
|
|
|
|
|
|
|
($sock_a, $sock_b, $sock_c) = |
|
|
|
new_call([qw(198.51.100.14 6374)], |
|
|
|
[qw(198.51.100.14 6376)], |
|
|
|
[qw(198.51.100.14 6378)]); |
|
|
|
|
|
|
|
($port_a, undef, $port_b) = offer('make bundle, accept', |
|
|
|
{ bundle => ['offer'] }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 6374 RTP/AVP 0 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=sendrecv |
|
|
|
m=video 6376 RTP/AVP 105 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=sendrecv |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
a=group:BUNDLE 1 2 |
|
|
|
m=audio PORT RTP/AVP 0 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=mid:1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=extmap-allow-mixed |
|
|
|
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
m=video PORT RTP/AVP 105 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=mid:2 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=extmap-allow-mixed |
|
|
|
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_c, undef, $port_d) = answer('make bundle, accept', |
|
|
|
{ }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
a=group:BUNDLE 1 2 |
|
|
|
m=audio 6378 RTP/AVP 0 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=sendrecv |
|
|
|
a=mid:1 |
|
|
|
a=extmap-allow-mixed |
|
|
|
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid |
|
|
|
m=video 6378 RTP/AVP 105 |
|
|
|
c=IN IP4 198.51.100.14 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=sendrecv |
|
|
|
a=extmap-allow-mixed |
|
|
|
a=extmap:1 urn:ietf:params:rtp-hdrext:sdes:mid |
|
|
|
a=mid:2 |
|
|
|
---------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio PORT RTP/AVP 0 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
m=video PORT RTP/AVP 105 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:105 H264/90000 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
isnt($port_a, $port_b, 'different ports'); |
|
|
|
isnt($port_a, $port_c, 'different ports'); |
|
|
|
isnt($port_a, $port_d, 'different ports'); |
|
|
|
isnt($port_b, $port_c, 'different ports'); |
|
|
|
isnt($port_b, $port_d, 'different ports'); |
|
|
|
isnt($port_c, $port_d, 'different ports'); |
|
|
|
|
|
|
|
snd($sock_a, $port_c, rtp(0, 2000, 6000, 0x1234, "\x44" x 160)); |
|
|
|
rcv($sock_c, $port_a, rtpm(0, 2000, 6000, 0x1234, "\x44" x 160, [[1, '1']])); |
|
|
|
|
|
|
|
snd($sock_c, $port_a, rtp(0, 6000, 8000, 0x5678, "\x77" x 160)); |
|
|
|
rcv($sock_a, $port_c, rtpm(0, 6000, 8000, 0x5678, "\x77" x 160)); |
|
|
|
|
|
|
|
snd($sock_b, $port_d, rtp(105, 3000, 4000, 0x6321, "\x33" x 800)); |
|
|
|
rcv($sock_c, $port_a, rtpm(105, 3000, 4000, 0x6321, "\x33" x 800, [[1, '2']])); |
|
|
|
|
|
|
|
snd($sock_c, $port_b, rtp(105, 7000, 9000, 0x8741, "\x22" x 800)); |
|
|
|
rcv($sock_b, $port_d, rtpm(105, 7000, 9000, 0x8741, "\x22" x 800)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#done_testing;NGCP::Rtpengine::AutoTest::terminate('f00');exit; |
|
|
|
done_testing(); |