I am developing a small webrtc application in C. I am making a webrtc call using sip signalling. I have below queries regarding usage of stun/turn/ice.
When I start call I send INVITE with offer (SDP). In SDP we need to put ICE candidates.
I have two possible cases. To explain it I will take an example. Say two endpoints are A and B. I have a sip proxy server say P. Also I have a turn server (supports both stun and turn), say it is T.
Case 1
All entities A, B, P and T are in same private network. Is STUN resolution required here? If yes then what all stun requests/responses I need to deal with?
Case 2
Here A is in private network. Other entities B, P and T are in public network. In this case I hope we need to do STUN/TURN resolution. Lets say I started with STUN, and got host and reflexive candidates. I see in some examples, Permission , Channel Bind requests are also used. If I am using just STUN (no TURN), after I get host and reflective candidates then do I need to do anything extra?
Besides this, is there any good open source available for stun/turn client in C that uses gnutls (no openssl)?
答案 0 :(得分:2)
案例1 - 否。本身不需要。只是没有简单的方法来检测INVITE何时来自同一个网络。
案例2 - 如果您只是使用STUN,本地主持人和反身候选人都可以。 TURN用于需要中继的场景(对称NAT场景)。