title: Linphone doesn't work well on Wi-Fi network - Asterisk Server
body: <p>I use Linphone(<a href="http://www.linphone.org/" rel="nofollow">http://www.linphone.org/</a>) 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. </p>
  
  <p>Via and Contact info was wrong for smartphone that is on Wi-Fi network.</p>
  
  <pre><code>A = Smartphone on Wi-Fi network
  B = Smartphone on 4G(LTE) network
  </code></pre>
  
  <p>It delivers sounds to B phone from A phone. However, it failed to deliver sound from B phone to A phone.</p>
  
  <p><strong>I traced SIP logs and noticed that phone A tells wrong private IP address(contact) to Asterisk server.</strong> It was why it failed to listen sound on phone A.</p>
  
  <p>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. </p>
  
  <pre><code>C = A third smartphone on Wi-Fi network.
  </code></pre>
  
  <p>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. </p>
  
  <p>Is there anyone who had same issue? and is there a way to solve this issue? Thank you.</p>