Hi.
I have two SIP phones:
- One on the same local network with asterisk (same dhcp server feeds both these with IPs). Both of these are in my home NAT (as would be expected)
- One remotely elsewhere at a friend’s house behind his NAT
(Warning: Double NAT situation!)
At home, i have asterisk port forwarding the correct SIP port and the RTP ports such that both my remote phone and local phones can make calls out through my SIP PSTN provider Unlimitel.
So my problem is, from my remote phone, I call the local phone and it rings (i can hear the ring here too). But when the user picks up, I can’t hear him and he can’t hear me. Why is this and what can I do to fix it?
Thanks a lot!
Problem is that SIP sends the phone’s IP in the SDP (part of the sip message), and a SIP peer (such as Asterisk) will look at the SDP instead of where the packet is coming from. This is useful as it allows things like reinvites and music on hold, but is a PITA when it comes to NAT ![:smile: :smile:](https://emoji.discourse-cdn.com/twitter/smile.png?v=5)
First double check that your sip.conf has the correct externip= and localnet= set. Then make sure that your friends phone has nat=yes, and I recommend qualify=yes to keep the nat mappings open.
Now on your friend’s phone, enable STUN. STUN is designed to let a phone discover it’s correct IP address and what kind of NAT is in use. stun.xten.net and stun.softjoys.com (as i recall) are two free STUN servers.
Also if that doesn’t clear things up, try sip debug and look for the IPs…