I use Linphone(http://www.linphone.org/) open source to make a mVoIP android application using Asterisk Server. It is working nicely when the smartphone is on 3G or 4G(LTE) network. However, it failed to register when it is on Wi-Fi network.
Via and Contact info was wrong for smartphone that is on Wi-Fi network.
A = Smartphone on Wi-Fi network
B = Smartphone on 4G(LTE) network
It delivers sounds to B phone from A phone. However, it failed to deliver sound from B phone to A phone.
I traced SIP logs and noticed that phone A tells wrong private IP address(contact) to Asterisk server. It was why it failed to listen sound on phone A.
So, I turned on Stun server, which I have to connect specific stun server, it hardly finds local IP address through NAT. The problem was that Linphone itself cannot find a private IP address of smartphone A that is on Wi-Fi network.
C = A third smartphone on Wi-Fi network.
Another problem that I faced is that an additional smartphone on same Wi-Fi network is not working even though Stun server solved its NAT problem.
Is there anyone who had same issue? and is there a way to solve this issue? Thank you.