|
|
|
@ -11,16 +11,419 @@ use POSIX;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
autotest_start(qw(--config-file=none -t -1 -i 203.0.113.1 -i 2001:db8:4321::1
|
|
|
|
|
-n 2223 -c 12345 -f -L 7 -E -u 2222 --silence-detect=1))
|
|
|
|
|
-n 2223 -c 12345 -f -L 7 -E -u 2222 --log-level-internals=7))
|
|
|
|
|
or die;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $port_c, $ssrc_a, $ssrc_b, $resp,
|
|
|
|
|
$sock_ax, $sock_bx, $port_ax, $port_bx,
|
|
|
|
|
$sock_ax, $sock_bx, $port_ax, $port_bx, $port_d,
|
|
|
|
|
$srtp_ctx_a, $srtp_ctx_b, $srtp_ctx_a_rev, $srtp_ctx_b_rev, $ufrag_a, $ufrag_b,
|
|
|
|
|
@ret1, @ret2, @ret3, @ret4, $srtp_key_a, $srtp_key_b, $ts, $seq,
|
|
|
|
|
$ftr, $ttr, $ttr2);
|
|
|
|
|
$ftr, $ttr, $fts, $ttr2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b, $sock_c, $sock_d) =
|
|
|
|
|
new_call([qw(198.51.100.14 6080)], [qw(198.51.100.14 6082)], [qw(198.51.100.14 6084)],
|
|
|
|
|
[qw(198.51.100.14 6086)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('"all" sub',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6080 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
($port_b) = answer('"all" sub',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6082 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $fts, $port_c, undef, $port_d) = subscribe_request('"all" sub',
|
|
|
|
|
{ 'flags' => ['all'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- SDP_VERSION IN IP4 203.0.113.1
|
|
|
|
|
s=RTPE_VERSION
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
is $ftr, undef, 'from-tag matches';
|
|
|
|
|
is_deeply $fts, [ft(), tt()], 'from-tags match';
|
|
|
|
|
|
|
|
|
|
subscribe_answer('"all" sub',
|
|
|
|
|
{ 'to-tag' => $ttr, flags => ['allow transcoding'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6084 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
m=audio 6086 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_c, $port_c, rtpm(8, 4001, 7160, -1, "\x2a" x 160));
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_d, $port_d, rtpm(8, 2001, 4160, -1, "\x2a" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b, $sock_c, $sock_d) =
|
|
|
|
|
new_call([qw(198.51.100.14 6088)], [qw(198.51.100.14 6090)], [qw(198.51.100.14 6092)],
|
|
|
|
|
[qw(198.51.100.14 6094)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('sub to multiple tags',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6088 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
($port_b) = answer('sub to multiple tags',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6090 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $fts, $port_c, undef, $port_d) = subscribe_request('sub to multiple tags',
|
|
|
|
|
{ 'from-tags' => [ft(), tt()] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- SDP_VERSION IN IP4 203.0.113.1
|
|
|
|
|
s=RTPE_VERSION
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
is $ftr, undef, 'from-tag matches';
|
|
|
|
|
is_deeply $fts, [ft(), tt()], 'from-tags match';
|
|
|
|
|
|
|
|
|
|
subscribe_answer('sub to multiple tags',
|
|
|
|
|
{ 'to-tag' => $ttr, flags => ['allow transcoding'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6092 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
m=audio 6094 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_c, $port_c, rtpm(8, 4001, 7160, -1, "\x2a" x 160));
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_d, $port_d, rtpm(8, 2001, 4160, -1, "\x2a" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b, $sock_c, $sock_d) =
|
|
|
|
|
new_call([qw(198.51.100.14 6096)], [qw(198.51.100.14 6098)], [qw(198.51.100.14 6100)],
|
|
|
|
|
[qw(198.51.100.14 6102)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('sub to multiple tags via flags',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6096 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
($port_b) = answer('sub to multiple tags via flags',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6098 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $fts, $port_c, undef, $port_d) = subscribe_request('sub to multiple tags via flags',
|
|
|
|
|
{ flags => ['from-tags-' . ft(), 'from-tags-' . tt()] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- SDP_VERSION IN IP4 203.0.113.1
|
|
|
|
|
s=RTPE_VERSION
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
is $ftr, undef, 'from-tag matches';
|
|
|
|
|
is_deeply $fts, [ft(), tt()], 'from-tags match';
|
|
|
|
|
|
|
|
|
|
subscribe_answer('sub to multiple tags via flags',
|
|
|
|
|
{ 'to-tag' => $ttr, flags => ['allow transcoding'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6100 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
m=audio 6102 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_c, $port_c, rtpm(8, 4001, 7160, -1, "\x2a" x 160));
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_d, $port_d, rtpm(8, 2001, 4160, -1, "\x2a" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b, $sock_c, $sock_d) =
|
|
|
|
|
new_call([qw(198.51.100.14 6104)], [qw(198.51.100.14 6106)], [qw(198.51.100.14 6108)],
|
|
|
|
|
[qw(198.51.100.14 6110)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('sub to multiple tags - reverse',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6104 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
($port_b) = answer('sub to multiple tags - reverse',
|
|
|
|
|
{ }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6106 RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $fts, $port_c, undef, $port_d) = subscribe_request('sub to multiple tags - reverse',
|
|
|
|
|
{ 'from-tags' => [tt(), ft()] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- SDP_VERSION IN IP4 203.0.113.1
|
|
|
|
|
s=RTPE_VERSION
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
m=audio PORT RTP/AVP 0 8
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=sendonly
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
is $ftr, undef, 'from-tag matches';
|
|
|
|
|
is_deeply $fts, [tt(), ft()], 'from-tags match';
|
|
|
|
|
|
|
|
|
|
subscribe_answer('sub to multiple tags - reverse',
|
|
|
|
|
{ 'to-tag' => $ttr, flags => ['allow transcoding'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 6108 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
m=audio 6110 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.14
|
|
|
|
|
a=recvonly
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_a, rtpm(0, 4001, 7160, 0x6543, "\x00" x 160));
|
|
|
|
|
rcv($sock_d, $port_d, rtpm(8, 4001, 7160, -1, "\x2a" x 160));
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_c, $port_c, rtpm(8, 2001, 4160, -1, "\x2a" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -79,7 +482,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('sub, multi codec, sub w diff codec',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('sub, multi codec, sub w diff codec',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -167,7 +570,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('sub w tc - acc',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('sub w tc - acc',
|
|
|
|
|
{ 'from-tag' => ft(), codec => { transcode => ['PCMA'] } }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -254,7 +657,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('sub w tc - rej',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('sub w tc - rej',
|
|
|
|
|
{ 'from-tag' => ft(), codec => { transcode => ['PCMA'] } }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -341,7 +744,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('simple sub',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('simple sub',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -427,7 +830,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('simple sub w label',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('simple sub w label',
|
|
|
|
|
{ label => 'foo' }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -513,7 +916,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('simple sub w to-tag label',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('simple sub w to-tag label',
|
|
|
|
|
{ label => 'bar' }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -599,7 +1002,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c, undef, $srtp_key_a) = subscribe_request('SRTP sub',
|
|
|
|
|
($ftr, $ttr, undef, $port_c, undef, $srtp_key_a) = subscribe_request('SRTP sub',
|
|
|
|
|
{ 'from-tag' => ft(), 'transport-protocol' => 'RTP/SAVP',
|
|
|
|
|
SDES => ['no-AEAD_AES_256_GCM', 'no-AEAD_AES_128_GCM'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
@ -705,7 +1108,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c, undef, undef, undef, undef, undef, $srtp_key_a) = subscribe_request('SRTP sub',
|
|
|
|
|
($ftr, $ttr, undef, $port_c, undef, undef, undef, undef, undef, $srtp_key_a) = subscribe_request('SRTP sub',
|
|
|
|
|
{ 'from-tag' => ft(), 'transport-protocol' => 'RTP/SAVP',
|
|
|
|
|
SDES => ['no-AEAD_AES_256_GCM', 'no-AEAD_AES_128_GCM'] }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
@ -838,7 +1241,7 @@ srtp_snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160), $srtp_ctx_b
|
|
|
|
|
srtp_snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160), $srtp_ctx_a);
|
|
|
|
|
($ssrc_b) = srtp_rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160), $srtp_ctx_a);
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('SRTP call RTP sub',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('SRTP call RTP sub',
|
|
|
|
|
{ 'from-tag' => ft(), 'transport-protocol' => 'RTP/AVP', }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -925,7 +1328,7 @@ snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 4000, 7000, 0x6543, "\x00" x 160));
|
|
|
|
|
($ssrc_b) = rcv($sock_b, $port_a, rtpm(0, 4000, 7000, -1, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_c) = subscribe_request('ICE sub',
|
|
|
|
|
($ftr, $ttr, undef, $port_c) = subscribe_request('ICE sub',
|
|
|
|
|
{ 'from-tag' => ft(), ICE => 'force' }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -997,7 +1400,7 @@ SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_b) = subscribe_request('publish/subscribe',
|
|
|
|
|
($ftr, $ttr, undef, $port_b) = subscribe_request('publish/subscribe',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -1026,7 +1429,7 @@ SDP
|
|
|
|
|
snd($sock_a, $port_a, rtp(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_b, rtpm(0, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_b) = subscribe_request('publish/subscribe',
|
|
|
|
|
($ftr, $ttr, undef, $port_b) = subscribe_request('publish/subscribe',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -1087,7 +1490,7 @@ SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_a, rtp(8, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_b) = subscribe_request('publish/subscribe w codec-accept',
|
|
|
|
|
($ftr, $ttr, undef, $port_b) = subscribe_request('publish/subscribe w codec-accept',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -1116,7 +1519,7 @@ SDP
|
|
|
|
|
snd($sock_a, $port_a, rtp(8, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_b, rtpm(8, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_b) = subscribe_request('publish/subscribe w codec-accept',
|
|
|
|
|
($ftr, $ttr, undef, $port_b) = subscribe_request('publish/subscribe w codec-accept',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -1177,7 +1580,7 @@ SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_a, rtp(8, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_b) = subscribe_request('publish/subscribe w unsupp and t/c',
|
|
|
|
|
($ftr, $ttr, undef, $port_b) = subscribe_request('publish/subscribe w unsupp and t/c',
|
|
|
|
|
{ 'from-tag' => ft() }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
@ -1206,7 +1609,7 @@ SDP
|
|
|
|
|
snd($sock_a, $port_a, rtp(8, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
rcv($sock_b, $port_b, rtpm(8, 2001, 4160, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
($ftr, $ttr, $port_b) = subscribe_request('publish/subscribe w unsupp and t/c',
|
|
|
|
|
($ftr, $ttr, undef, $port_b) = subscribe_request('publish/subscribe w unsupp and t/c',
|
|
|
|
|
{ 'from-tag' => ft(), codec => { strip => ['PCMA'], transcode => ['PCMU'] } }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|