2
votes

The video call works fine within the same network. The problem is while calling computer on other network, the remote video doesn't show up. On chrome I don't get any errors in the console, but on firefox console Im getting "ICE Failure".

Im using Node JS for implementing signaling server and Google STUN Server.

Following is the sequence of events im using:

User A:

  1. Creates Peerconnection (includes getusermedia, addstream)
  2. registers onIcecandidate handler

  3. emits a socket event to notify User B about the call and waits for response

  4. Receives Offer from User B and creates answer.

User B:

  1. Receives the socket event and creates Peerconnection (includes getusermedia, addstream)

  2. registers onicecandidate handler

  3. Also registers "Onnegogiationneeded" handler. User A doesn't have this handler. It is removed so that the User B gets enough time to create Peerconnection,candidate handlers and then create an Offer
  4. When Onnegogiation is triggered, an offer is created and sent to User A

NOTE:
1. Im creating peerconnection and onicecandidate handlers on both sides before creating Offer. 2. It was done to make sure that Onicecandiate handler is ready on both sides much before the offer is created and no ICE Candidates are missed.

Is there anything wrong with the above sequence of events?

1

1 Answers

2
votes

We can debug and fix the issue in following sequence :

  1. Check the sdp and candidates being exchanged.
  2. If any of the STUn candidates i mean srflx or prflx are exchanged , negotiated we need to check whether they were used later to exchange media or not.If not STUN server is not configured properly, kindly correct.
    3.If the STUN candidates being exchanged still you are facing this issue which means one of the candidate in different network is behind symmetric firewall.In that case one needs to configure TURN server. You can use any freely available TURN server or deploy our own TS or use some paid service.Make sure you are configuring the TURN server well as per your firewall. Mostly TURN server are not freely available.

4.If still you are facing issue which means there is some issue with firewall, desired port be it for STUN,TURN server or negotiated ports are not open in your firewall. In this case test your setup in open network. If that works one has to open those ports/IPs and configure firewall accordingly.

PS : You might not find any logs in chrome console but in chrome://webrtc-internals you will find very rich information which will be useful for you in debugging and fixing your issue.