Search code examples
javascriptwebrtcortc

Edge DTLS Handshake fails to complete (ORTC)


I'm trying to use Edge's ORTC in order to have real-time communication with other web browsers. I've successfuly made this work using peer-to-peer connections but I'm having problems after adding a gateway in between.

The DTLS handshake for some reason fails when I start the call using Edge (controlling), I've turn on wireshark to see if any DTLS messages were being executed but none was "sniffed" (this can be an wireshark issue though). If I answer from Edge (controlled) the connection works (even with the gateway in between).

It's important to notice that the ICE Connection is successfuly established in every case, it seems that by some reason Edge doesn't initiate the DTLS handshake and I can't understand what is the trigger point (I even get the "checking" status on the "ondtlsstatechange" event for the dtls transport object). After about 30 seconds the failed event triggers!

Someone else is having this problem? What could be creating this issue?

Thanks..


Solution

  • I've found a solution..

    Well, basically my Gateway was a passive peer and I was starting the DTLS transport with the role "auto", and since the Edge was the "controlling" it automatically sets it as a "server". So basically both ends were "servers" and no DTLS Handshake was being sent. Setting the remote role as "server" solved the issue :)

    remoteDtlsParameters.role = "server";
    dtlsTransport.start(remoteDtlsParameters);
    

    More info about the remote parameters can be found here:

    https://msdn.microsoft.com/en-us/library/mt502488(v=vs.85).aspx