title: Use kamailio sip server with more than one network, is not working
body: <p>I need to configure kamailio to work within different networks and over internet. I tried lot of configurations but none works.</p>
  
  <p>I configured kamailio as shown in this <a href="https://stackoverflow.com/questions/29166375/voip-calls-doesnt-work-in-different-networks-using-pjsip-and-kamailio-server">link</a>! but doesn't work, I looked at tcp dump:</p>
  
  <pre><code>&gt;&gt;14:49:20.328121 IP 192.168.10.8.sip &gt; 187.95.131.xxx.sip: SIP: REGISTER sip:187.95.131.166 SIP/2.0
  &gt;&gt;14:49:24.331926 IP 192.168.10.8.sip &gt; 187.95.131.xxx.sip: SIP: REGISTER sip:187.95.131.xxx SIP/2.0
  </code></pre>
  
  <p>The kamailio do not respond to client.</p>
  
  <p>The configuration of kamailio is:</p>
  
  <pre><code>&gt;&gt; WITH_MYSQL
  
  &gt;&gt; WITH_AUTH
  
  &gt;&gt; WITH_USRLOCDB
  
  &gt;&gt; WITH_NAT
  &gt;&gt;...
  
  &gt;&gt;alias=187.95.131.xxx:5060
  
  &gt;&gt;...
  </code></pre>
  
  <p>everything like the link says.</p>
  
  <p>and rtpproxy is running when called by kamailio:</p>
  
  <pre><code>&gt;&gt;13:39:35 firewall /usr/sbin/kamailio[15886]: INFO: rtpproxy [rtpproxy.c:1598]: rtpp_test(): rtp proxy &lt;unix:/var/run/rtpproxy/rtpproxy.sock&gt; found, support for it enabled
  </code></pre>
  
  <p>My network setup is:</p>
  
  <p>internet &lt;----> (firewall with kamailio) &lt;---->(LAN0, LAN1, LAN2)</p>
  
  <p>LAN0 = 192.168.2.0/24</p>
  
  <p>LAN1 = 192.168.3.0/24</p>
  
  <p>LAN3 = 192.168.10.0/24</p>
  
  <p>The LANs don't talk with other. (except by firewall rules)</p>
  
  <p>If setup kamailio to bind on all lan interfaces, the voip works only if the caller is on the same lan that receiver, but within different lans or over internet the sip registers but have no voice.</p>
  
  <p>For tests, all incoming/outcoming udp connection on the internet interface and all udp forward between lans and internet interface are accepted.</p>