|
|
|
|
@ -10,7 +10,7 @@ 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 --dtx-delay=10
|
|
|
|
|
-n 2223 -f -L 7 -E --silence-detect=1 --dtx-delay=10
|
|
|
|
|
--max-dtx=10))
|
|
|
|
|
or die;
|
|
|
|
|
|
|
|
|
|
@ -30,6 +30,181 @@ my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp,
|
|
|
|
|
|
|
|
|
|
if ($amr_tests) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.21 7294)], [qw(198.51.100.21 7296)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('seq nr codec change', {
|
|
|
|
|
flags => [],
|
|
|
|
|
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 0
|
|
|
|
|
c=IN IP4 198.51.100.21
|
|
|
|
|
----------------------------------
|
|
|
|
|
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('seq nr codec change', {
|
|
|
|
|
flags => [],
|
|
|
|
|
codec => { },
|
|
|
|
|
}, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 7296 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.21
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3
|
|
|
|
|
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_b, $port_a, rtp(8, 1000, 3000, 0x1234, "\x99" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 1000, 3000, 0x1234, "\xb2" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.21 7298)], [qw(198.51.100.21 7300)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('seq nr codec change', {
|
|
|
|
|
flags => [],
|
|
|
|
|
codec => { transcode => ['AMR-WB/16000/1/23850//mode-set--0,1,2/CMR-interval--500'] },
|
|
|
|
|
}, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 7298 RTP/AVP 96 8
|
|
|
|
|
c=IN IP4 198.51.100.21
|
|
|
|
|
a=rtpmap:96 opus/48000/2
|
|
|
|
|
a=fmtp:96 minptime=10;useinbandfec=1
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 96 8 97
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:96 opus/48000/2
|
|
|
|
|
a=fmtp:96 useinbandfec=1; minptime=10
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=rtpmap:97 AMR-WB/16000
|
|
|
|
|
a=fmtp:97 mode-set=0,1,2
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
($port_b) = answer('seq nr codec change', {
|
|
|
|
|
flags => [],
|
|
|
|
|
codec => { },
|
|
|
|
|
}, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 7300 RTP/AVP 97
|
|
|
|
|
c=IN IP4 198.51.100.21
|
|
|
|
|
a=rtpmap:97 AMR-WB/16000
|
|
|
|
|
a=fmtp:97 mode-set=0,1,2
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 96
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:96 opus/48000/2
|
|
|
|
|
a=fmtp:96 stereo=0; useinbandfec=1
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(97, 1000, 3000, 0x1234, "\xf1\x75\x22\x74\x85\x60\x93\x6f\x97\x5c\x27\xd9\xba\xe2\xfe\x07\x9e\x10\x84\x92\x10\xd6\xdc\xdd\x56\x52\x93\x91\x90\x50\xd3\xb1\x98"));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(96, 1000, 3000, 0x1234, "\x48\x80\x0a\x02\x12\xf4\xed\x7e\xda\x67\x39\x9d\x13\xc3\x57\x2b\x37\xbc\xa7\xbb\x3e\x50\x09\xe3\xef\xa5\x2e\x5b\x3a\x5c\x90\xfe\x31\x78\x04\x57\xe5\x17\x1c\x75\x95\x35\x11\xed\x08\xa8\xc0"));
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(97, 1001, 3320, 0x1234, "\xf1\x75\x22\x74\x85\x60\x93\x6f\x97\x5c\x27\xd9\xba\xe2\xfe\x07\x9e\x10\x84\x92\x10\xd6\xdc\xdd\x56\x52\x93\x91\x90\x50\xd3\xb1\x98"));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(96, 1001, 3960, 0x1234, "\x48\x81\x3d\x30\x37\x95\xcf\x61\xb6\xd5\x48\x0e\xfc\x1f\x0d\xd8\xd3\xbb\xa1\xc5\xcb\xb6\x8e\xf6\x0a\xa8\x04\x37\x8e\x2e\xb4\x5f\xb4\x74\x20\x8c\xaf\x9b\xf9\x14\xaa\xb9\x3c\xbb\xb1\xea\x21\xea\xbf\x84\x7b\x30"));
|
|
|
|
|
|
|
|
|
|
offer('seq nr codec change', {
|
|
|
|
|
flags => [],
|
|
|
|
|
codec => { transcode => ['AMR-WB/16000/1/23850//mode-set--0,1,2/CMR-interval--500'] },
|
|
|
|
|
}, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 7298 RTP/AVP 96 8
|
|
|
|
|
c=IN IP4 198.51.100.21
|
|
|
|
|
a=rtpmap:96 opus/48000/2
|
|
|
|
|
a=fmtp:96 minptime=10;useinbandfec=1
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio PORT RTP/AVP 96 8 97
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:96 opus/48000/2
|
|
|
|
|
a=fmtp:96 useinbandfec=1; minptime=10
|
|
|
|
|
a=rtpmap:8 PCMA/8000
|
|
|
|
|
a=rtpmap:97 AMR-WB/16000
|
|
|
|
|
a=fmtp:97 mode-set=0,1,2
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
answer('seq nr codec change', {
|
|
|
|
|
flags => [],
|
|
|
|
|
codec => { },
|
|
|
|
|
}, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 7300 RTP/AVP 8
|
|
|
|
|
c=IN IP4 198.51.100.21
|
|
|
|
|
a=sendrecv
|
|
|
|
|
----------------------------------
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.3
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
snd($sock_b, $port_a, rtp(8, 1002, 3480, 0x1234, "\x65" x 160));
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(8, 1002, 3480, 0x1234, "\x65" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.10 5210)], [qw(198.51.100.10 5212)]);
|
|
|
|
|
|
|
|
|
|
($port_a) = offer('packet loss',
|
|
|
|
|
|