phonertc icon indicating copy to clipboard operation
phonertc copied to clipboard

TURN server is strictly required or optional?

Open oleg-ria opened this issue 10 years ago • 6 comments

just to make sure, TURN server is strictly required or optional? And one question more, in wiki i saw explanations how to set TURN server settings, but never for signaling server. Do we need to set somewhere something like: window.ua = new SIP.UA({ traceSip: true, uri: '[email protected]', ws_servers: ['wss://sip-ws.example.com'], mediaHandlerFactory: PhoneRTCMediaHandler }); and window.ua.on('invite', makeCall) ? I have freeswitch as signaling server, will it work without TURN server? P.S. trying to run https://github.com/alongubkin/phonertc/tree/master/demo/client

oleg-ria avatar Nov 04 '14 22:11 oleg-ria

@NayRia WebRTC using ICE framework for peer-to-peer connection ,80% call connect through STUN ,remain 20% call connect though TURN(because of firewall issue)

So TURN is not optional ,If your not use TURN server 20% call will fails

Note:if you want to use this APP in LAN no need TURN

murugan-pandian avatar Nov 05 '14 05:11 murugan-pandian

@murugannode Yes this i understand, the question is, if i omit TURN server settings, would my application still work? And could you give me any example of signaling server configuration in javascript? Thanks

oleg-ria avatar Nov 05 '14 09:11 oleg-ria

@NayRia yes if you omit TURN it will work Example configuration with TURN

config: {'iceServers': [ { url: 'stun:stun.l.google.com:19302' }, { url: 'turn:[email protected]:80', credential: 'homeo' } ]}

Without TURN: config: {'iceServers': [ { url: 'stun:stun.l.google.com:19302' } ]}

please refer this link http://www.html5rocks.com/en/tutorials/webrtc/basics/

murugan-pandian avatar Nov 05 '14 09:11 murugan-pandian

@murugannode, thanks for explanation and link

oleg-ria avatar Nov 27 '14 21:11 oleg-ria

@murugan-pandian Where exactly would you use that configuration? The library only accepts a turn server as config parameter.

Jenjen1324 avatar Aug 04 '16 08:08 Jenjen1324

@Jenjen1324 you can see here https://github.com/alongubkin/phonertc/blob/master/src/browser/PhoneRTCProxy.js#L165 they already use STUN server

murugan-pandian avatar Aug 04 '16 17:08 murugan-pandian