SRTP failed in Chrome / in Opera is OK

Hello all,

I would like to ask about following issue with Chrome Version 35.0.1916.114 m :

I’m using JsSIP client and it’s working in other browser (e.g. Opera). Before some Chrome update’s worked on Chrome too, I tried to change the Encryption streams flag but it didn’t helpful.
Here is try to call from Opera:

[code]debian*CLI> sip set debug on
SIP Debugging enabled

<— SIP read from UDP:192.168.0.107:5060 —>
INVITE sip:300@192.168.0.107 SIP/2.0
Record-Route: sip:192.168.0.107;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
Record-Route: sip:192.168.0.107:8080;transport=ws;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
Via: SIP/2.0/UDP 192.168.0.107;branch=z9hG4bK319a.9e1f2eda07bc425ca94ba6c5936b5d47.0
Via: SIP/2.0/WS vts0llmmn03p.invalid;rport=54695;received=192.168.0.100;branch=z9hG4bK3988588
Max-Forwards: 16
To: sip:300@192.168.0.107
From: sip:webrtc@webrtc.sk;tag=21p9qjst8f
Call-ID: ice0irltju38oltabrab
CSeq: 592 INVITE
Contact: sip:iftq7p6a@vts0llmmn03p.invalid;alias=192.168.0.100~54695~5;transport=ws;ob
Allow: ACK,CANCEL,BYE,OPTIONS,INVITE
Content-Type: application/sdp
Supported: path, outbound, gruu
User-Agent: JsSIP 0.3.0
Content-Length: 2248

v=0
o=- 3257986907143603013 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS pUYrMRwXzERLqm3gOHrexc08nshtY6il2cmI
m=audio 64997 RTP/SAVPF 111 103 104 0 8 106 105 13 126
c=IN IP4 192.168.0.100
a=rtcp:64997 IN IP4 192.168.0.100
a=candidate:2131708102 1 udp 2113937151 192.168.0.100 64997 typ host generation 0
a=candidate:2131708102 2 udp 2113937151 192.168.0.100 64997 typ host generation 0
a=candidate:2752416543 1 udp 2113937151 192.168.255.1 64998 typ host generation 0
a=candidate:2752416543 2 udp 2113937151 192.168.255.1 64998 typ host generation 0
a=candidate:2393703408 1 udp 2113937151 169.254.221.41 64999 typ host generation 0
a=candidate:2393703408 2 udp 2113937151 169.254.221.41 64999 typ host generation 0
a=candidate:831304758 1 tcp 1509957375 192.168.0.100 0 typ host generation 0
a=candidate:831304758 2 tcp 1509957375 192.168.0.100 0 typ host generation 0
a=candidate:3935139823 1 tcp 1509957375 192.168.255.1 0 typ host generation 0
a=candidate:3935139823 2 tcp 1509957375 192.168.255.1 0 typ host generation 0
a=candidate:3224305408 1 tcp 1509957375 169.254.221.41 0 typ host generation 0
a=candidate:3224305408 2 tcp 1509957375 169.254.221.41 0 typ host generation 0
a=ice-ufrag:36UH0Uan6li1au5A
a=ice-pwd:K9lDyvmwC6apwRjhVIYY/Eqn
a=ice-options:google-ice
a=fingerprint:sha-256 A4:78:9B:C1:13:91:67:4E:FB:44:26:47:E4:FF:81:74:03:92:B8:18:C4:CC:C6:7B:45:35:33:04:06:5B:D2:AF
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=crypto:0 AES_CM_128_HMAC_SHA1_32 inline:atrj1mkw523qfAePFiEgoidFKxxJXwHEroyKxxV6
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:eNZsj/XeZV0f/87rHYF6X5097ICNEuANRIT6silS
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
a=ssrc:1912220047 cname:vcTFUkKlziF4iTr2
a=ssrc:1912220047 msid:pUYrMRwXzERLqm3gOHrexc08nshtY6il2cmI 20fff2c2-9340-46dd-a26a-d83a8d7765e5
a=ssrc:1912220047 mslabel:pUYrMRwXzERLqm3gOHrexc08nshtY6il2cmI
a=ssrc:1912220047 label:20fff2c2-9340-46dd-a26a-d83a8d7765e5
<------------->
— (16 headers 47 lines) —
Sending to 192.168.0.107:5060 (no NAT)
Sending to 192.168.0.107:5060 (no NAT)
Using INVITE request as basis request - ice0irltju38oltabrab
Found peer ‘webrtc’ for ‘webrtc’ from 192.168.0.107:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 111
Found RTP audio format 103
Found RTP audio format 104
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 106
Found RTP audio format 105
Found RTP audio format 13
Found RTP audio format 126
Found audio description format opus for ID 111
Found unknown media description format ISAC for ID 103
Found unknown media description format ISAC for ID 104
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found unknown media description format CN for ID 106
Found unknown media description format CN for ID 105
Found audio description format CN for ID 13
Found audio description format telephone-event for ID 126
Capabilities: us - (ulaw|alaw), peer - audio=(ulaw|alaw|opus)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x3 (telephone-event|CN|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.0.100:64997
Looking for 300 in internal (domain 192.168.0.107)
list_route: route/path hop: sip:192.168.0.107;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
list_route: route/path hop: sip:192.168.0.107:8080;transport=ws;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3

<— Transmitting (no NAT) to 192.168.0.107:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.107;branch=z9hG4bK319a.9e1f2eda07bc425ca94ba6c5936b5d47.0;received=192.168.0.107
Via: SIP/2.0/WS vts0llmmn03p.invalid;rport=54695;received=192.168.0.100;branch=z9hG4bK3988588
Record-Route: sip:192.168.0.107;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
Record-Route: sip:192.168.0.107:8080;transport=ws;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
From: sip:webrtc@webrtc.sk;tag=21p9qjst8f
To: sip:300@192.168.0.107
Call-ID: ice0irltju38oltabrab
CSeq: 592 INVITE
Server: Asterisk PBX 12.1.0-rc3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:300@192.168.0.109:5060
Content-Length: 0

<------------>
– Executing [300@internal:1] Dial(“SIP/webrtc-00000020”, “SIP/softphone/300”) in new stack
== Using SIP RTP CoS mark 5
Audio is at 17726
Adding codec 100003 (ulaw) to SDP
Adding codec 100004 (alaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.0.107:5060:
INVITE sip:300@192.168.0.107:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.109:5060;branch=z9hG4bK48c1d70a
Max-Forwards: 70
From: sip:webrtc@softphone.sk;tag=as0f4e3271
To: sip:300@192.168.0.107:5060
Contact: sip:webrtc@192.168.0.109:5060
Call-ID: 3ea5848b5f0b321233a59a1f5d32f412@softphone.sk
CSeq: 102 INVITE
User-Agent: Asterisk PBX 12.1.0-rc3
Date: Thu, 05 Jun 2014 13:06:21 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 306

v=0
o=root 772899671 772899671 IN IP4 192.168.0.109
s=Asterisk PBX 12.1.0-rc3
c=IN IP4 192.168.0.109
t=0 0
m=audio 17726 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=maxptime:150
a=sendrecv


-- Called SIP/softphone/300

<— SIP read from UDP:192.168.0.107:5060 —>
SIP/2.0 100 trying – your call is important to us
Via: SIP/2.0/UDP 192.168.0.109:5060;branch=z9hG4bK48c1d70a
From: sip:webrtc@softphone.sk;tag=as0f4e3271
To: sip:300@192.168.0.107:5060
Call-ID: 3ea5848b5f0b321233a59a1f5d32f412@softphone.sk
CSeq: 102 INVITE
Server: kamailio (4.1.2 (x86_64/linux))
Content-Length: 0

<------------->
— (8 headers 0 lines) —
[Jun 5 15:06:21] ERROR[3631]: pjsip:0 <?>: icess0x325ca78 …Error sending STUN request: Invalid argument

<— SIP read from UDP:192.168.0.107:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.109:5060;branch=z9hG4bK48c1d70a
Record-Route: sip:192.168.0.107;lr;ftag=as0f4e3271
Call-ID: 3ea5848b5f0b321233a59a1f5d32f412@softphone.sk
From: sip:webrtc@softphone.sk;tag=as0f4e3271
To: sip:300@192.168.0.107;tag=a77ea38a6ad246cfb9ca1a9fd9aad7cf
CSeq: 102 INVITE
Server: Blink 0.8.1 (Windows)
Contact: sip:30965842@192.168.0.104:56812
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Content-Length: 0

<------------->
— (11 headers 0 lines) —
list_route: route/path hop: sip:192.168.0.107;lr;ftag=as0f4e3271
– SIP/softphone-00000021 is ringing

<— Transmitting (no NAT) to 192.168.0.107:5060 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.107;branch=z9hG4bK319a.9e1f2eda07bc425ca94ba6c5936b5d47.0;received=192.168.0.107
Via: SIP/2.0/WS vts0llmmn03p.invalid;rport=54695;received=192.168.0.100;branch=z9hG4bK3988588
Record-Route: sip:192.168.0.107;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
Record-Route: sip:192.168.0.107:8080;transport=ws;r2=on;lr=on;ftag=21p9qjst8f;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
From: sip:webrtc@webrtc.sk;tag=21p9qjst8f
To: sip:300@192.168.0.107;tag=as44e288fb
Call-ID: ice0irltju38oltabrab
CSeq: 592 INVITE
Server: Asterisk PBX 12.1.0-rc3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:300@192.168.0.109:5060
Content-Length: 0

<------------>
debianCLI> sip set debug off
SIP Debugging Disabled
== Spawn extension (internal, 300, 1) exited non-zero on 'SIP/webrtc-00000020’
debian
CLI>
[/code]

from Chrome:

[code]debian*CLI> sip set debug on
SIP Debugging enabled

<— SIP read from UDP:192.168.0.107:5060 —>
INVITE sip:300@192.168.0.107 SIP/2.0
Record-Route: sip:192.168.0.107;r2=on;lr=on;ftag=uh9slhsl1u;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
Record-Route: sip:192.168.0.107:8080;transport=ws;r2=on;lr=on;ftag=uh9slhsl1u;vsf=AAAAAEVVUjJFWnJZVFRKWlMAQls3
Via: SIP/2.0/UDP 192.168.0.107;branch=z9hG4bK4948.18330ace0cdec8a03ae934112e28a995.0
Via: SIP/2.0/WS 21amqcl48iis.invalid;rport=54604;received=192.168.0.100;branch=z9hG4bK8631612
Max-Forwards: 16
To: sip:300@192.168.0.107
From: sip:webrtc@webrtc.sk;tag=uh9slhsl1u
Call-ID: p67h9go9gq5u7g37qtnb
CSeq: 361 INVITE
Contact: sip:hngf47as@21amqcl48iis.invalid;alias=192.168.0.100~54604~5;transport=ws;ob
Allow: ACK,CANCEL,BYE,OPTIONS,INVITE
Content-Type: application/sdp
Supported: path, outbound, gruu
User-Agent: JsSIP 0.3.0
Content-Length: 2151

v=0
o=- 1355820754587869153 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS qNPFnVkvTtmN80UyNzLABsP1RlKwjEiAsax0
m=audio 64954 RTP/SAVPF 111 103 104 0 8 106 105 13 126
c=IN IP4 192.168.0.100
a=rtcp:64954 IN IP4 192.168.0.100
a=candidate:2131708102 1 udp 2122260223 192.168.0.100 64954 typ host generation 0
a=candidate:2131708102 2 udp 2122260223 192.168.0.100 64954 typ host generation 0
a=candidate:2752416543 1 udp 2122194687 192.168.255.1 64955 typ host generation 0
a=candidate:2752416543 2 udp 2122194687 192.168.255.1 64955 typ host generation 0
a=candidate:2393703408 1 udp 2122129151 169.254.221.41 64956 typ host generation 0
a=candidate:2393703408 2 udp 2122129151 169.254.221.41 64956 typ host generation 0
a=candidate:831304758 1 tcp 1518280447 192.168.0.100 0 typ host generation 0
a=candidate:831304758 2 tcp 1518280447 192.168.0.100 0 typ host generation 0
a=candidate:3935139823 1 tcp 1518214911 192.168.255.1 0 typ host generation 0
a=candidate:3935139823 2 tcp 1518214911 192.168.255.1 0 typ host generation 0
a=candidate:3224305408 1 tcp 1518149375 169.254.221.41 0 typ host generation 0
a=candidate:3224305408 2 tcp 1518149375 169.254.221.41 0 typ host generation 0
a=ice-ufrag:ck3wZz3kb8TPzoL0
a=ice-pwd:hVKiVhYSa6k5A+IJYK/v38rD
a=ice-options:google-ice
a=fingerprint:sha-256 38:98:22:0A:45:C4:DB:0D:81:0F:97:5A:32:D1:42:11:FD:1D:A9:EA:72:16:51:ED:58:DF:4D:3A:99:12:23:F8
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=maxptime:60
a=ssrc:2272756221 cname:Av+3YbN9vrhzKc9I
a=ssrc:2272756221 msid:qNPFnVkvTtmN80UyNzLABsP1RlKwjEiAsax0 500b212b-0393-4753-a2c2-8b366941524a
a=ssrc:2272756221 mslabel:qNPFnVkvTtmN80UyNzLABsP1RlKwjEiAsax0
a=ssrc:2272756221 label:500b212b-0393-4753-a2c2-8b366941524a
<------------->
— (16 headers 46 lines) —
Sending to 192.168.0.107:5060 (no NAT)
Sending to 192.168.0.107:5060 (no NAT)
Using INVITE request as basis request - p67h9go9gq5u7g37qtnb
Found peer ‘webrtc’ for ‘webrtc’ from 192.168.0.107:5060
== Using SIP RTP CoS mark 5
Found RTP audio format 111
Found RTP audio format 103
Found RTP audio format 104
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 106
Found RTP audio format 105
Found RTP audio format 13
Found RTP audio format 126
Found audio description format opus for ID 111
Found unknown media description format ISAC for ID 103
Found unknown media description format ISAC for ID 104
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found unknown media description format CN for ID 106
Found unknown media description format CN for ID 105
Found audio description format CN for ID 13
Found audio description format telephone-event for ID 126
[Jun 5 15:04:43] WARNING[3641][C-0000001b]: chan_sip.c:10632 process_sdp: Rejecting secure audio stream without encryption details: audio 64954 RTP/SAVPF 111 103 104 0 8 106 105 13 126

<— Reliably Transmitting (no NAT) to 192.168.0.107:5060 —>
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 192.168.0.107;branch=z9hG4bK4948.18330ace0cdec8a03ae934112e28a995.0;received=192.168.0.107
Via: SIP/2.0/WS 21amqcl48iis.invalid;rport=54604;received=192.168.0.100;branch=z9hG4bK8631612
From: sip:webrtc@webrtc.sk;tag=uh9slhsl1u
To: sip:300@192.168.0.107;tag=as2c03b76e
Call-ID: p67h9go9gq5u7g37qtnb
CSeq: 361 INVITE
Server: Asterisk PBX 12.1.0-rc3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘p67h9go9gq5u7g37qtnb’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:192.168.0.107:5060 —>
ACK sip:300@192.168.0.107 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.107;branch=z9hG4bK4948.18330ace0cdec8a03ae934112e28a995.0
Max-Forwards: 16
To: sip:300@192.168.0.107;tag=as2c03b76e
From: sip:webrtc@webrtc.sk;tag=uh9slhsl1u
Call-ID: p67h9go9gq5u7g37qtnb
CSeq: 361 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Really destroying SIP dialog ‘p67h9go9gq5u7g37qtnb’ Method: ACK
debianCLI> sip set debug off
SIP Debugging Disabled
debian
CLI>
[/code]

Thank you for your help!

issues.asterisk.org/jira/browse/ASTERISK-22961

As has been pointed in that thread [quote]can confirm that using {‘mandatory’: {‘DtlsSrtpKeyAgreement’: ‘false’}} as a constraint while creating a rtc peer connection solves the issue putting SDES back in charge.
This means that you can use vanilla asterisk with chrome v35 as long as you care to disable SRTP-DTLS at js level.[/quote]

So ask to your JS API developer how to do that, using SIPML5 take a look here: t.co/X8Qjeusob6

ok, thank you, I just change DtlsSrtpKeyAgreement to ‘false’ and now its working.