0

I have a RTCPeerConnection, which is properly established and can forward video and audio.

The thing is - this connection should also have a RTCDataChannel, created by the server (jitsi-videobridge).


Here's the incoming SDP:

v=0
o=- 52c2f31d2e997e86 2 IN IP4 127.0.0.1
s=-
t=0 0
a=x-attach-conference-id:52c2f31d2e997e86
a=x-attach-new-participant-flag
a=group:BUNDLE audio video data
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 127 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1 1 ssltcp 2130706431 192.168.0.5 4443 typ host generation 0
a=candidate:2 1 ssltcp 2130706431 2001:0:5ef5:79fb:309f:3941:bb9f:8a46 4443 typ host generation 0
a=candidate:4 1 udp 2113939711 2001:0:5ef5:79fb:309f:3941:bb9f:8a46 10000 typ host generation 0
a=candidate:3 1 udp 2113932031 192.168.0.5 10000 typ host generation 0
a=ice-ufrag:54ku71b09j1sc9
a=ice-pwd:6aajbrmegkmgl6g9aoc1p14m50
a=fingerprint:sha-1 DF:09:D9:FD:E0:D8:03:71:90:B4:CA:E9:A7:2E:FE:07:A2:B3:F8:4B
a=setup:actpass
a=mid:audio
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10; useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
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:127 red/8000
a=rtpmap:126 telephone-event/8000
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=x-attach-channel-id:90780b7ef750e3f0
a=ssrc:3478236559 cname:mcu
a=ssrc:3478236559 msid:mcu mcu-audio0
a=ssrc:3478236559 mslabel:mcu
a=ssrc:3478236559 label:mcu-audio0
m=video 9 UDP/TLS/RTP/SAVPF 100
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:1 1 ssltcp 2130706431 192.168.0.5 4443 typ host generation 0
a=candidate:2 1 ssltcp 2130706431 2001:0:5ef5:79fb:309f:3941:bb9f:8a46 4443 typ host generation 0
a=candidate:4 1 udp 2113939711 2001:0:5ef5:79fb:309f:3941:bb9f:8a46 10000 typ host generation 0
a=candidate:3 1 udp 2113932031 192.168.0.5 10000 typ host generation 0
a=ice-ufrag:54ku71b09j1sc9
a=ice-pwd:6aajbrmegkmgl6g9aoc1p14m50
a=fingerprint:sha-1 DF:09:D9:FD:E0:D8:03:71:90:B4:CA:E9:A7:2E:FE:07:A2:B3:F8:4B
a=setup:actpass
a=mid:video
a=sendrecv
a=rtcp-mux
a=rtpmap:100 VP8/90000
a=fmtp:100 x-google-start-bitrate=550
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=x-google-flag:conference
a=imageattr:* recv [x=640,y=480] [x=160,y=120]
a=x-attach-channel-id:48fbbaf7ca9b1ed0
a=ssrc:4166867687 cname:mcu
a=ssrc:4166867687 msid:mcu mcu-video0
a=ssrc:4166867687 mslabel:mcu
a=ssrc:4166867687 label:mcu-video0
m=application 9 DTLS/SCTP 5000
c=IN IP4 0.0.0.0
a=candidate:1 1 ssltcp 2130706431 192.168.0.5 4443 typ host generation 0
a=candidate:2 1 ssltcp 2130706431 2001:0:5ef5:79fb:309f:3941:bb9f:8a46 4443 typ host generation 0
a=candidate:4 1 udp 2113939711 2001:0:5ef5:79fb:309f:3941:bb9f:8a46 10000 typ host generation 0
a=candidate:3 1 udp 2113932031 192.168.0.5 10000 typ host generation 0
a=ice-ufrag:16hvt1b09hq7nv
a=ice-pwd:71ut14smqi4327i5m8b7p76unr
a=fingerprint:sha-1 DF:09:D9:FD:E0:D8:03:71:90:B4:CA:E9:A7:2E:FE:07:A2:B3:F8:4B
a=setup:actpass
a=mid:data
a=sctpmap:5000 webrtc-datachannel 1024
a=x-attach-sctpconnection-id:c1d38e64f921d720

As you can see, it has a DataChannel block m=application 9 DTLS/SCTP 5000.


I attached the ondatachannel event to the RTCPeerConnection. It never triggers for some reason.

Any ideas what I can look for? I'd have expected to see this event trigger, given that the SDP contains a dataChannel.


Versions: Version 52.0.2743.116 (64-bit) on macOS El Capitan, also tested on Google Chrome Version 54.0.2840.71 on Windows 8.1.


I'm willing to provide additional information. However, due to the code being mostly proprietary, that unfortunately doesn't include huge chunks of source-code. So please excuse the lack of source. :(

If you have any idea/question, please feel free to comment.

Florian Wendelborn
  • 1,667
  • 1
  • 19
  • 29
  • without source who can tell if you're doing it correctly – Jaromanda X Oct 30 '16 at 01:47
  • @JaromandaX as I said, I'm unable to share the complete source. If there is any specific guess/idea I'm here to share the required information though. So if you have any idea what I may do wrongly, I'll look if that's the case. – Florian Wendelborn Oct 30 '16 at 01:49
  • 1
    all I can suggest is [documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/ondatachannel) – Jaromanda X Oct 30 '16 at 01:52
  • @JaromandaX The thing is, that event just won't trigger. I know what to do once it triggers, but since there's none - this doc unfortunately won't help. I hoped that someone would find an issue in the SDP or tell me that what I was trying can't possibly work. – Florian Wendelborn Oct 30 '16 at 01:55
  • 1
    I was merely suggesting the documentation because it shows how to attach the event listener - of course if you're doing it right (which you say, but we obviously can't see) then that documentation wont help you at all. Again, and I understand why you can't, without code it's like throwing darts in a pitch black room – Jaromanda X Oct 30 '16 at 01:58
  • 1
    Do you create an `RTCPeerConnection` for each user? Maybe you are looking at the wrong `ondatachannel` event? – Samuel Méndez Nov 03 '16 at 13:09
  • 1
    @SamuelMéndez thanks for your input. Unfortunately that wasn't the case. It was a simple server-side misconfiguration, as the port was blocked by a firewall. As I'm only writing the client-side I didn't notice that. I'll close this now since it's basically not an issue anymore. – Florian Wendelborn Nov 03 '16 at 13:12

1 Answers1

0

Turns out the port was just blocked by a firewall in the server-side. As I'm only responsible for the client-side I didn't notice that. :(

Florian Wendelborn
  • 1,667
  • 1
  • 19
  • 29