I'm looking for a solution to exchange information using (UDP
or TCP
) between ** NAT ** separated android terminals or nodes, let's assume A
and B
are two android clients.
I am working on a " remote VoIP application " in which clients are directly communicating with each other.
For the implementation of STUN Server and NAT Traversal, I used an open-source STUN server
software namely STUNTMAN.
On the client-side, In order to obtain Public IP: PORT
from STUNTMAN
, I have integrated an open-source stun-client as "JSTUN" which is a Java-based STUN client.
At Client-A, the example results from ** STUNTMAN Server ** are like;
stunclient --mode full --localport 9999 stunserver.stunprotocol.org
Binding test: success
Local address: 192.168.1.8:9999
Mapped address: 1.2.3.4:9999
Behavior test: success
Nat behavior: Endpoint Independent Mapping
Filtering test: success
Nat filtering: Address and Port Dependent Filtering
To make Peer-to-Peer communication between Android Clients, I have maintained a signaling server
which is accurately sharing Mapped Addresses between Clients A & B.
But, when I tried to start Peer-to-Peer communication using UDP or TCP sockets, there was no such communication between them.
I have also tried this solution on StackOverflow as confusion-about-stun-server and android-iOS-peer-to-peer-arhitechture. I am unable to understand where am I doing wrong?
Is there any possibility to maintain P2P communication for VoIP?
Is there any VoIP application having a P2P feature? (Initially, Skype was based on peer-to-peer architecture)
What I need is a programmatic example, not a theory based answer.