Hi All,
I'm working on an application that will need to make peer to peer data
transfer connections that traverse NAT. I've been looking into
PJNATH/pjsip to accomplish this. I've downloaded the source code and
built the ice_demo. When I run ice_demo on two clients that are on the
same network they can connect. When I run ice_demo on clients that are
not on the same network, and there is a NAT traversal in between them
they fail to connect.
Stepping through the code I don't find any attempt by ice_demo to try to
connect to a TURN/STUN server. Instead it attempts to send messages
directly to the other client. From what I understand for ICE to work
across a NAT traversal both clients must send bind messages to a STUN
server and then using the info from the STUN server they attempt to
punch through the NAT. How can the ice_demo do NAT traversal if it
never connects to a STUN server? (And clearly it can't do TURN with out
a server!) Is there something I need to configure to get the ice_demo to
connect to a STUN server? (Maybe the ice_demo doesn't handle NAT
traversal? If that's the case is there a different demo/sample that does
demonstrate making a NAT traversal connection for peer to peer data
transfer. Or maybe I misunderstand how to run the ice_demo?)
Assuming that I'm correct that in addition to pjsip I need a TURN/STUN
server, I find in the pjsip FAQ under this question:
https://trac.pjsip.org/repos/wiki/FAQ#simple-turn-client1 the update
saying that now that there is an open source TURN server available I
should use that. But it doesn't mention what "that" is. Should I be
looking into coTURN? Some other open source TURN server?
Any help or direction that anyone can provide is greatly appreciated,
Chip
ps: Here are the steps I'm performing in the ice_demo:
1) Client 1 launches ice_demo and creates an ice instance.
2) Client 1 init's as offerer.
3) Client 2 launches ice_demo and creates an ice instance.
4) Client 2 init's as answerer.
5) Both clients type "show" to display their info.
6) Client 1 copies Client 2's info as input for Client 1's remote candidate.
7) Client 2 copies Client 1's info as input for Client 2's remote candidate.
8) Both clients start at the same time to initiate ICE negotiation.
As mentioned above, if both clients are on the same network the
connection is successful. If there is a NAT traversal the connection fails.
Thanks again...
_______________________________________________
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org