InnovateAsterisk / Browser-Phone

A fully featured browser based WebRTC SIP phone for Asterisk
https://www.innovateasterisk.com
GNU Affero General Public License v3.0
470 stars 239 forks source link

turn server #533

Open prathibhacdac opened 2 months ago

prathibhacdac commented 2 months ago

Will the application work if the turn server is located inside a symmetric NAT?

InnovateAsterisk commented 2 months ago

Your answer may be found here: https://www.rfc-editor.org/rfc/rfc3489

Applicability Statement This protocol is not a cure-all for the problems associated with NAT. It does not enable incoming TCP connections through NAT. It allows incoming UDP packets through NAT, but only through a subset of existing NAT types. In particular, STUN does not enable incoming UDP packets through symmetric NATs (defined below), which are common in large enterprises. STUN's discovery procedures are based on assumptions on NAT treatment of UDP; such assumptions may prove invalid down the road as new NAT devices are deployed. STUN does not work when it is used to obtain an address to communicate with a peer which happens to be behind the same NAT. STUN does not work when the STUN server is not in a common shared address realm. For a more complete discussion of the limitations of STUN, see Section 14.

Symmetric: A symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used. Furthermore, only the external host that receives a packet can send a UDP packet back to the internal host.

prathibhacdac commented 2 months ago

I've configured STUN and TURN server in phone.js But sometimes I'm not getting the audio and video.

chrome://webrtc-internals shows the following error:

url: stun:x.x.x.x:3478 address: 192.168.56.x port: 62957 host_candidate: 192.168.56.x:62957 error_text: STUN binding request timed out. error_code: 701