|
|
|
@ -52,6 +52,7 @@ sub new_call { |
|
|
|
$cid = $tag_iter++ . "-test-callID"; |
|
|
|
$ft = $tag_iter++ . "-test-fromtag"; |
|
|
|
$tt = $tag_iter++ . "-test-totag"; |
|
|
|
print("new call $cid\n"); |
|
|
|
for my $p (@ports) { |
|
|
|
my ($addr, $port) = @{$p}; |
|
|
|
my $s = IO::Socket::IP->new(Type => &SOCK_DGRAM, Proto => 'udp', |
|
|
|
@ -2915,6 +2916,236 @@ rcv($sock_c, $port_a, qr/^\x00\x00\x01\x00\x00\x01\x01\x00$/s); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.1 7010)], [qw(198.51.100.3 7012)]); |
|
|
|
|
|
|
|
($port_a) = offer('PCM to RFC DTMF transcoding', { ICE => 'remove', replace => ['origin'], |
|
|
|
codec => { transcode => ['telephone-event'] }}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7010 RTP/AVP 0 |
|
|
|
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 96 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:96 telephone-event/8000 |
|
|
|
a=fmtp:96 0-15 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_b) = answer('PCM to RFC DTMF transcoding', { replace => ['origin'] }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7012 RTP/AVP 0 96 |
|
|
|
c=IN IP4 198.51.100.3 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:96 telephone-event/8000 |
|
|
|
a=fmtp:96 0-15 |
|
|
|
a=sendrecv |
|
|
|
-------------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 203.0.113.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 |
|
|
|
SDP |
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 1000, 3000, 0x1234, "\x00" x 160)); |
|
|
|
($seq, $ssrc) = rcv($sock_b, $port_a, rtpm(0, -1, 3000, -1, "\x00" x 160)); |
|
|
|
snd($sock_a, $port_b, rtp(0, 1001, 3160, 0x1234, "\x00" x 160)); |
|
|
|
rcv($sock_b, $port_a, rtpm(0, $seq+1, 3160, $ssrc, "\x00" x 160)); |
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x5678, "\x00" x 160)); |
|
|
|
($seq, $ssrc) = rcv($sock_a, $port_b, rtpm(0, -1, 4000, -1, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(0, 2001, 4000+160, 0x5678, "\x00" x 160)); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+1, 4000+160, $ssrc, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2002, 4000+320, 0x5678, "\x08\x10\x00\xa0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+2, 4000+320, $ssrc, "\xff\xb0\xac\xbc\x4c\x39\x3f\x63\xee\x55\x4a\xf6\xba\xaf\xbc\x45\x2c\x2d\x4b\xba\xaf\xbb\x6e\x48\x53\xf3\x5f\x3f\x3a\x52\xba\xac\xb3\x5e\x2f\x2d\x3e\xc8\xb8\xc0\xe8\x6b\xd7\xcc\x66\x39\x30\x3f\xbf\xac\xae\xd2\x37\x2f\x3c\xe1\xc6\xd2\x77\xdd\xbf\xbb\xdc\x38\x2c\x35\xd1\xae\xad\xc2\x43\x37\x40\x6e\xe7\x58\x4e\xdd\xb8\xb1\xc3\x3d\x2b\x2f\x5e\xb5\xaf\xbe\x59\x44\x51\xfb\x5b\x3f\x3d\x6b\xb6\xac\xb8\x4a\x2d\x2d\x47\xbf\xb6\xc1\xfa\x63\xda\xd1\x57\x37\x32\x49\xba\xab\xb0\xfe\x33\x2f\x40\xd2\xc2\xd1\x7e\xda\xbf\xbe\x73\x35\x2d\x3a\xc4\xac\xae\xcd\x3d\x36\x43\xf6\xdf\x5c\x55\xd2\xb7\xb4\xce\x37\x2b\x32\xdf\xb1\xaf\xc3\x4d\x41\x50\x7e\x59\x40")); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2003, 4000+320, 0x5678, "\x08\x10\x01\x40")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+3, 4000+480, $ssrc, "\x40\xe0\xb3\xad\xbd\x3f\x2c\x2f\x54\xbb\xb5\xc4\x6b\x5d\xde\xd9\x4e\x37\x35\x58\xb5\xab\xb4\x52\x2f\x2f\x47\xca\xbf\xd0\xfe\xd8\xc1\xc3\x57\x32\x2e\x40\xbc\xab\xb0\xe0\x39\x35\x46\xe3\xdb\x61\x5d\xcc\xb7\xb7\xe8\x33\x2b\x37\xcb\xae\xb0\xcb\x46\x3f\x50\x7e\x58\x41\x46\xcf\xb1\xae\xc6\x39\x2b\x31\x7d\xb7\xb5\xc8\x5d\x58\xe5\xe1\x4a\x37\x38\xf2\xb1\xab\xba\x44\x2e\x30\x4f\xc3\xbe\xd1\x7d\xd8\xc3\xc9\x4b\x30\x2f\x4c\xb6\xab\xb3\x61\x35\x35\x4b\xd8\xd6\x68\x68\xc8\xb7\xba\x5d\x30\x2c\x3c\xbf\xad\xb1\xd8\x40\x3e\x52\xfb\x58\x44\x4c\xc8\xb0\xb0\xd6\x34\x2b\x35\xd5\xb3\xb5\xcd\x54\x54\xec\xef\x47\x37\x3c\xd3\xaf\xac\xc0\x3c\x2d\x33\x63\xbe")); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2004, 4000+320, 0x5678, "\x08\x10\x01\xe0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+4, 4000+640, $ssrc, "\xbd\xd3\x77\xd9\xc5\xd0\x44\x30\x32\x65\xb2\xab\xb8\x4c\x32\x35\x50\xcf\xd2\x70\x7a\xc6\xb8\xbe\x4c\x2e\x2d\x45\xb9\xac\xb4\xfd\x3c\x3d\x55\xf2\x5a\x47\x56\xc1\xb0\xb4\x71\x30\x2b\x3a\xc7\xb0\xb6\xd7\x4d\x50\xf6\x78\x45\x38\x41\xc7\xae\xae\xcc\x37\x2c\x36\xe5\xbb\xbd\xd7\x6d\xdb\xc9\xdd\x3f\x30\x36\xdc\xae\xab\xbd\x41\x2f\x37\x5d\xcb\xcf\x7b\xef\xc4\xb9\xc6\x42\x2d\x2e\x55\xb4\xac\xb8\x58\x39\x3d\x59\xea\x5c\x4a\x66\xbd\xb0\xb8\x50\x2e\x2c\x40\xbd\xaf\xb8\xe8\x48\x4e\x7d\x6b\x43\x3a\x4a\xbf\xad\xaf\xe4\x32\x2c\x3a\xcf\xb8\xbd\xdc\x66\xde\xcc\xf5\x3c\x30\x3b\xca\xad\xac\xc6\x3b\x2e\x39\x7c\xc6\xcd\xfa\xe7\xc3\xbb\xce\x3c\x2d\x31\xf2")); |
|
|
|
# test out of seq |
|
|
|
snd($sock_b, $port_a, rtp(0, 2006, 4000+160*5, 0x5678, "\x00" x 160)); # buffered |
|
|
|
Time::HiRes::usleep(20000); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2005, 4000+320, 0x5678, "\x08\x10\x01\xe0")); # repeat, no-op, consumed |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+5, 4000+160*5, $ssrc, "\x00" x 160)); |
|
|
|
# resume normal |
|
|
|
snd($sock_b, $port_a, rtp(0, 2007, 4000+160*6, 0x5678, "\x00" x 160)); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+6, 4000+160*6, $ssrc, "\x00" x 160)); |
|
|
|
# test TS reset |
|
|
|
snd($sock_b, $port_a, rtp(0, 2008, 2000, 0x5678, "\x00" x 160)); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+7, 4000+160*7, $ssrc, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2009, 2160, 0x5678, "\x08\x10\x00\xa0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+8, 4000+160*8, $ssrc, "\xff\xb0\xac\xbc\x4c\x39\x3f\x63\xee\x55\x4a\xf6\xba\xaf\xbc\x45\x2c\x2d\x4b\xba\xaf\xbb\x6e\x48\x53\xf3\x5f\x3f\x3a\x52\xba\xac\xb3\x5e\x2f\x2d\x3e\xc8\xb8\xc0\xe8\x6b\xd7\xcc\x66\x39\x30\x3f\xbf\xac\xae\xd2\x37\x2f\x3c\xe1\xc6\xd2\x77\xdd\xbf\xbb\xdc\x38\x2c\x35\xd1\xae\xad\xc2\x43\x37\x40\x6e\xe7\x58\x4e\xdd\xb8\xb1\xc3\x3d\x2b\x2f\x5e\xb5\xaf\xbe\x59\x44\x51\xfb\x5b\x3f\x3d\x6b\xb6\xac\xb8\x4a\x2d\x2d\x47\xbf\xb6\xc1\xfa\x63\xda\xd1\x57\x37\x32\x49\xba\xab\xb0\xfe\x33\x2f\x40\xd2\xc2\xd1\x7e\xda\xbf\xbe\x73\x35\x2d\x3a\xc4\xac\xae\xcd\x3d\x36\x43\xf6\xdf\x5c\x55\xd2\xb7\xb4\xce\x37\x2b\x32\xdf\xb1\xaf\xc3\x4d\x41\x50\x7e\x59\x40")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.1 7020)], [qw(198.51.100.3 7022)]); |
|
|
|
|
|
|
|
($port_a) = offer('PCM to RFC DTMF transcoding w/ PCM transcoding', { ICE => 'remove', replace => ['origin'], |
|
|
|
codec => { transcode => ['PCMA', 'telephone-event'] }}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7020 RTP/AVP 0 |
|
|
|
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 96 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:8 PCMA/8000 |
|
|
|
a=rtpmap:96 telephone-event/8000 |
|
|
|
a=fmtp:96 0-15 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_b) = answer('PCM to RFC DTMF transcoding w/ PCM transcoding', { replace => ['origin'] }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7022 RTP/AVP 8 96 |
|
|
|
c=IN IP4 198.51.100.3 |
|
|
|
a=rtpmap:0 PCMA/8000 |
|
|
|
a=rtpmap:96 telephone-event/8000 |
|
|
|
a=fmtp:96 0-15 |
|
|
|
a=sendrecv |
|
|
|
-------------------------------------- |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 203.0.113.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 |
|
|
|
SDP |
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 1000, 3000, 0x1234, "\x00" x 160)); |
|
|
|
($seq, $ssrc) = rcv($sock_b, $port_a, rtpm(8, -1, 3000, -1, "\x2a" x 160)); |
|
|
|
snd($sock_a, $port_b, rtp(0, 1001, 3160, 0x1234, "\x00" x 160)); |
|
|
|
rcv($sock_b, $port_a, rtpm(8, $seq+1, 3160, $ssrc, "\x2a" x 160)); |
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(8, 2000, 4000, 0x5678, "\x2a" x 160)); |
|
|
|
($seq, $ssrc) = rcv($sock_a, $port_b, rtpm(0, -1, 4000, -1, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(8, 2001, 4000+160, 0x5678, "\x2a" x 160)); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+1, 4000+160, $ssrc, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2002, 4000+320, 0x5678, "\x08\x10\x00\xa0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+2, 4000+320, $ssrc, "\xff\xb0\xac\xbc\x4c\x39\x3f\x63\xee\x55\x4a\xf6\xba\xaf\xbc\x45\x2c\x2d\x4b\xba\xaf\xbb\x6e\x48\x53\xf3\x5f\x3f\x3a\x52\xba\xac\xb3\x5e\x2f\x2d\x3e\xc8\xb8\xc0\xe8\x6b\xd7\xcc\x66\x39\x30\x3f\xbf\xac\xae\xd2\x37\x2f\x3c\xe1\xc6\xd2\x77\xdd\xbf\xbb\xdc\x38\x2c\x35\xd1\xae\xad\xc2\x43\x37\x40\x6e\xe7\x58\x4e\xdd\xb8\xb1\xc3\x3d\x2b\x2f\x5e\xb5\xaf\xbe\x59\x44\x51\xfb\x5b\x3f\x3d\x6b\xb6\xac\xb8\x4a\x2d\x2d\x47\xbf\xb6\xc1\xfa\x63\xda\xd1\x57\x37\x32\x49\xba\xab\xb0\xfe\x33\x2f\x40\xd2\xc2\xd1\x7e\xda\xbf\xbe\x73\x35\x2d\x3a\xc4\xac\xae\xcd\x3d\x36\x43\xf6\xdf\x5c\x55\xd2\xb7\xb4\xce\x37\x2b\x32\xdf\xb1\xaf\xc3\x4d\x41\x50\x7e\x59\x40")); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2003, 4000+320, 0x5678, "\x08\x10\x01\x40")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+3, 4000+480, $ssrc, "\x40\xe0\xb3\xad\xbd\x3f\x2c\x2f\x54\xbb\xb5\xc4\x6b\x5d\xde\xd9\x4e\x37\x35\x58\xb5\xab\xb4\x52\x2f\x2f\x47\xca\xbf\xd0\xfe\xd8\xc1\xc3\x57\x32\x2e\x40\xbc\xab\xb0\xe0\x39\x35\x46\xe3\xdb\x61\x5d\xcc\xb7\xb7\xe8\x33\x2b\x37\xcb\xae\xb0\xcb\x46\x3f\x50\x7e\x58\x41\x46\xcf\xb1\xae\xc6\x39\x2b\x31\x7d\xb7\xb5\xc8\x5d\x58\xe5\xe1\x4a\x37\x38\xf2\xb1\xab\xba\x44\x2e\x30\x4f\xc3\xbe\xd1\x7d\xd8\xc3\xc9\x4b\x30\x2f\x4c\xb6\xab\xb3\x61\x35\x35\x4b\xd8\xd6\x68\x68\xc8\xb7\xba\x5d\x30\x2c\x3c\xbf\xad\xb1\xd8\x40\x3e\x52\xfb\x58\x44\x4c\xc8\xb0\xb0\xd6\x34\x2b\x35\xd5\xb3\xb5\xcd\x54\x54\xec\xef\x47\x37\x3c\xd3\xaf\xac\xc0\x3c\x2d\x33\x63\xbe")); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2004, 4000+320, 0x5678, "\x08\x10\x01\xe0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+4, 4000+640, $ssrc, "\xbd\xd3\x77\xd9\xc5\xd0\x44\x30\x32\x65\xb2\xab\xb8\x4c\x32\x35\x50\xcf\xd2\x70\x7a\xc6\xb8\xbe\x4c\x2e\x2d\x45\xb9\xac\xb4\xfd\x3c\x3d\x55\xf2\x5a\x47\x56\xc1\xb0\xb4\x71\x30\x2b\x3a\xc7\xb0\xb6\xd7\x4d\x50\xf6\x78\x45\x38\x41\xc7\xae\xae\xcc\x37\x2c\x36\xe5\xbb\xbd\xd7\x6d\xdb\xc9\xdd\x3f\x30\x36\xdc\xae\xab\xbd\x41\x2f\x37\x5d\xcb\xcf\x7b\xef\xc4\xb9\xc6\x42\x2d\x2e\x55\xb4\xac\xb8\x58\x39\x3d\x59\xea\x5c\x4a\x66\xbd\xb0\xb8\x50\x2e\x2c\x40\xbd\xaf\xb8\xe8\x48\x4e\x7d\x6b\x43\x3a\x4a\xbf\xad\xaf\xe4\x32\x2c\x3a\xcf\xb8\xbd\xdc\x66\xde\xcc\xf5\x3c\x30\x3b\xca\xad\xac\xc6\x3b\x2e\x39\x7c\xc6\xcd\xfa\xe7\xc3\xbb\xce\x3c\x2d\x31\xf2")); |
|
|
|
# test out of seq |
|
|
|
snd($sock_b, $port_a, rtp(8, 2006, 4000+800, 0x5678, "\x2a" x 160)); # buffered |
|
|
|
Time::HiRes::usleep(20000); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2005, 4000+320, 0x5678, "\x08\x10\x01\xe0")); # repeat, no-op, consumed |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+5, 4000+800, $ssrc, "\x00" x 160)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.1 7030)], [qw(198.51.100.3 7032)]); |
|
|
|
|
|
|
|
($port_a) = offer('PCM to RFC DTMF transcoding w/ forced PCM transcoding', { ICE => 'remove', replace => ['origin'], |
|
|
|
codec => { transcode => ['telephone-event'] }}, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7030 RTP/AVP 0 8 |
|
|
|
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 96 |
|
|
|
c=IN IP4 203.0.113.1 |
|
|
|
a=rtpmap:0 PCMU/8000 |
|
|
|
a=rtpmap:8 PCMA/8000 |
|
|
|
a=rtpmap:96 telephone-event/8000 |
|
|
|
a=fmtp:96 0-15 |
|
|
|
a=sendrecv |
|
|
|
a=rtcp:PORT |
|
|
|
SDP |
|
|
|
|
|
|
|
($port_b) = answer('PCM to RFC DTMF transcoding w/ forced PCM transcoding', { replace => ['origin'] }, <<SDP); |
|
|
|
v=0 |
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3 |
|
|
|
s=tester |
|
|
|
t=0 0 |
|
|
|
m=audio 7032 RTP/AVP 8 96 |
|
|
|
c=IN IP4 198.51.100.3 |
|
|
|
a=rtpmap:0 PCMA/8000 |
|
|
|
a=rtpmap:96 telephone-event/8000 |
|
|
|
a=fmtp:96 0-15 |
|
|
|
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 |
|
|
|
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_a, $port_b, rtp(0, 1000, 3000, 0x1234, "\x00" x 160)); |
|
|
|
($seq, $ssrc) = rcv($sock_b, $port_a, rtpm(8, -1, 3000, -1, "\x2a" x 160)); |
|
|
|
snd($sock_a, $port_b, rtp(0, 1001, 3160, 0x1234, "\x00" x 160)); |
|
|
|
rcv($sock_b, $port_a, rtpm(8, $seq+1, 3160, $ssrc, "\x2a" x 160)); |
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(8, 2000, 4000, 0x5678, "\x2a" x 160)); |
|
|
|
($seq, $ssrc) = rcv($sock_a, $port_b, rtpm(0, -1, 4000, -1, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(8, 2001, 4000+160, 0x5678, "\x2a" x 160)); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+1, 4000+160, $ssrc, "\x00" x 160)); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2002, 4000+320, 0x5678, "\x08\x10\x00\xa0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+2, 4000+320, $ssrc, "\xff\xb0\xac\xbc\x4c\x39\x3f\x63\xee\x55\x4a\xf6\xba\xaf\xbc\x45\x2c\x2d\x4b\xba\xaf\xbb\x6e\x48\x53\xf3\x5f\x3f\x3a\x52\xba\xac\xb3\x5e\x2f\x2d\x3e\xc8\xb8\xc0\xe8\x6b\xd7\xcc\x66\x39\x30\x3f\xbf\xac\xae\xd2\x37\x2f\x3c\xe1\xc6\xd2\x77\xdd\xbf\xbb\xdc\x38\x2c\x35\xd1\xae\xad\xc2\x43\x37\x40\x6e\xe7\x58\x4e\xdd\xb8\xb1\xc3\x3d\x2b\x2f\x5e\xb5\xaf\xbe\x59\x44\x51\xfb\x5b\x3f\x3d\x6b\xb6\xac\xb8\x4a\x2d\x2d\x47\xbf\xb6\xc1\xfa\x63\xda\xd1\x57\x37\x32\x49\xba\xab\xb0\xfe\x33\x2f\x40\xd2\xc2\xd1\x7e\xda\xbf\xbe\x73\x35\x2d\x3a\xc4\xac\xae\xcd\x3d\x36\x43\xf6\xdf\x5c\x55\xd2\xb7\xb4\xce\x37\x2b\x32\xdf\xb1\xaf\xc3\x4d\x41\x50\x7e\x59\x40")); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2003, 4000+320, 0x5678, "\x08\x10\x01\x40")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+3, 4000+480, $ssrc, "\x40\xe0\xb3\xad\xbd\x3f\x2c\x2f\x54\xbb\xb5\xc4\x6b\x5d\xde\xd9\x4e\x37\x35\x58\xb5\xab\xb4\x52\x2f\x2f\x47\xca\xbf\xd0\xfe\xd8\xc1\xc3\x57\x32\x2e\x40\xbc\xab\xb0\xe0\x39\x35\x46\xe3\xdb\x61\x5d\xcc\xb7\xb7\xe8\x33\x2b\x37\xcb\xae\xb0\xcb\x46\x3f\x50\x7e\x58\x41\x46\xcf\xb1\xae\xc6\x39\x2b\x31\x7d\xb7\xb5\xc8\x5d\x58\xe5\xe1\x4a\x37\x38\xf2\xb1\xab\xba\x44\x2e\x30\x4f\xc3\xbe\xd1\x7d\xd8\xc3\xc9\x4b\x30\x2f\x4c\xb6\xab\xb3\x61\x35\x35\x4b\xd8\xd6\x68\x68\xc8\xb7\xba\x5d\x30\x2c\x3c\xbf\xad\xb1\xd8\x40\x3e\x52\xfb\x58\x44\x4c\xc8\xb0\xb0\xd6\x34\x2b\x35\xd5\xb3\xb5\xcd\x54\x54\xec\xef\x47\x37\x3c\xd3\xaf\xac\xc0\x3c\x2d\x33\x63\xbe")); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2004, 4000+320, 0x5678, "\x08\x10\x01\xe0")); |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+4, 4000+640, $ssrc, "\xbd\xd3\x77\xd9\xc5\xd0\x44\x30\x32\x65\xb2\xab\xb8\x4c\x32\x35\x50\xcf\xd2\x70\x7a\xc6\xb8\xbe\x4c\x2e\x2d\x45\xb9\xac\xb4\xfd\x3c\x3d\x55\xf2\x5a\x47\x56\xc1\xb0\xb4\x71\x30\x2b\x3a\xc7\xb0\xb6\xd7\x4d\x50\xf6\x78\x45\x38\x41\xc7\xae\xae\xcc\x37\x2c\x36\xe5\xbb\xbd\xd7\x6d\xdb\xc9\xdd\x3f\x30\x36\xdc\xae\xab\xbd\x41\x2f\x37\x5d\xcb\xcf\x7b\xef\xc4\xb9\xc6\x42\x2d\x2e\x55\xb4\xac\xb8\x58\x39\x3d\x59\xea\x5c\x4a\x66\xbd\xb0\xb8\x50\x2e\x2c\x40\xbd\xaf\xb8\xe8\x48\x4e\x7d\x6b\x43\x3a\x4a\xbf\xad\xaf\xe4\x32\x2c\x3a\xcf\xb8\xbd\xdc\x66\xde\xcc\xf5\x3c\x30\x3b\xca\xad\xac\xc6\x3b\x2e\x39\x7c\xc6\xcd\xfa\xe7\xc3\xbb\xce\x3c\x2d\x31\xf2")); |
|
|
|
# test out of seq |
|
|
|
snd($sock_b, $port_a, rtp(8, 2006, 4000+800, 0x5678, "\x2a" x 160)); # buffered |
|
|
|
Time::HiRes::usleep(20000); |
|
|
|
snd($sock_b, $port_a, rtp(96, 2005, 4000+320, 0x5678, "\x08\x10\x01\xe0")); # repeat, no-op, consumed |
|
|
|
rcv($sock_a, $port_b, rtpm(0, $seq+5, 4000+800, $ssrc, "\x00" x 160)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
END { |
|
|
|
if ($rtpe_pid) { |
|
|
|
kill('INT', $rtpe_pid) or die; |
|
|
|
|