|
|
|
|
@ -630,6 +630,77 @@ rcv($sock_a, $port_b, rtpm(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
($sock_a, $sock_b) = new_call([qw(198.51.100.1 3356)], [qw(198.51.100.3 3358)]);
|
|
|
|
|
|
|
|
|
|
($port_a, undef, $srtp_key_a) = offer('non-OSRTP offer with offer flag and protocol, accept',
|
|
|
|
|
{ ICE => 'remove', replace => ['origin'], DTLS => 'off', OSRTP => ['offer'],
|
|
|
|
|
'transport protocol' => 'RTP/AVP'}, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 3356 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
|
|
|
|
|
c=IN IP4 203.0.113.1
|
|
|
|
|
a=rtpmap:0 PCMU/8000
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=rtcp:PORT
|
|
|
|
|
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:CRYPTO128
|
|
|
|
|
a=crypto:2 AES_CM_128_HMAC_SHA1_32 inline:CRYPTO128
|
|
|
|
|
a=crypto:3 AES_192_CM_HMAC_SHA1_80 inline:CRYPTO192
|
|
|
|
|
a=crypto:4 AES_192_CM_HMAC_SHA1_32 inline:CRYPTO192
|
|
|
|
|
a=crypto:5 AES_256_CM_HMAC_SHA1_80 inline:CRYPTO256
|
|
|
|
|
a=crypto:6 AES_256_CM_HMAC_SHA1_32 inline:CRYPTO256
|
|
|
|
|
a=crypto:7 F8_128_HMAC_SHA1_80 inline:CRYPTO128
|
|
|
|
|
a=crypto:8 F8_128_HMAC_SHA1_32 inline:CRYPTO128
|
|
|
|
|
a=crypto:9 NULL_HMAC_SHA1_80 inline:CRYPTO128
|
|
|
|
|
a=crypto:10 NULL_HMAC_SHA1_32 inline:CRYPTO128
|
|
|
|
|
SDP
|
|
|
|
|
|
|
|
|
|
($port_b) = answer('non-OSRTP offer with offer flag and protocol, accept',
|
|
|
|
|
{ ICE => 'remove', replace => ['origin'], DTLS => 'off', }, <<SDP);
|
|
|
|
|
v=0
|
|
|
|
|
o=- 1545997027 1 IN IP4 198.51.100.1
|
|
|
|
|
s=tester
|
|
|
|
|
t=0 0
|
|
|
|
|
m=audio 3358 RTP/AVP 0
|
|
|
|
|
c=IN IP4 198.51.100.3
|
|
|
|
|
a=sendrecv
|
|
|
|
|
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:Kl3GFJ5Gqz5x07xYkoyHODkVkSpiplZnXsQIw+Q7
|
|
|
|
|
----------------------------------
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
$srtp_ctx_a = {
|
|
|
|
|
cs => $NGCP::Rtpclient::SRTP::crypto_suites{AES_CM_128_HMAC_SHA1_80},
|
|
|
|
|
key => 'Kl3GFJ5Gqz5x07xYkoyHODkVkSpiplZnXsQIw+Q7',
|
|
|
|
|
};
|
|
|
|
|
$srtp_ctx_b = {
|
|
|
|
|
cs => $NGCP::Rtpclient::SRTP::crypto_suites{AES_CM_128_HMAC_SHA1_80},
|
|
|
|
|
key => $srtp_key_a,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
snd($sock_a, $port_b, rtp(0, 1000, 3000, 0x1234, "\x00" x 160));
|
|
|
|
|
srtp_rcv($sock_b, $port_a, rtpm(0, 1000, 3000, 0x1234, "\x00" x 160), $srtp_ctx_b);
|
|
|
|
|
srtp_snd($sock_b, $port_a, rtp(0, 2000, 4000, 0x3456, "\x00" x 160), $srtp_ctx_a);
|
|
|
|
|
rcv($sock_a, $port_b, rtpm(0, 2000, 4000, 0x3456, "\x00" x 160));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|