No voice on asterisk 1.8 SIP (NAT)

Hi all,

I have a asterisk server running on a public IP and softphones on both private network through NAT and public network. When I call from phone on public network to phone on private network, only the phone on the public network can hear. I have been searching for the solution for quite a while and tried all kind of settings (nat=yes,host = dynamic, qualify = yes). Nothing helped. I tried to downgrade to 1.6 and 1.4. With the same settings, 1.4 works fine. I’m wondering if anyone have any advise or method to do the troubleshooting? Thanks.

PS: If I setup two phones both inside the private network (asterisk is outside), neither of them can hear each other. If both phones are on public network, everything works fine.

here is my current setup:

sip.conf

[phone1]
mailbox = 2@family
canreinvite=no
context=phones
dtmfmode=auto
host=dynamic
nat=yes
port=5060
qualify=no
secret=xxxxxxx
type=friend
disallow = all
allow = ulaw
allow = alaw
allow = gsm
allow = h263
allow = h263p

[phone2]
secret = xxxxxxx
mailbox = 4@family
directmedia=no
host=dynamic
context=phones
type=friend
qualify=yes
port=5060
nat=yes
dtmfmode=rfc2833
canreinvite=no
disallow = all
allow = ulaw
allow = alaw
allow = gsm
allow = h263
allow = h263p

The only option of those you tried that might be relevant is nat=yes, but it should only be applied to the phone that is inside the NAT boundary.

Almost certainly the problem is with the NATted phone or the NAT router. You would need to extract SDP exchange from the SIP dialogue to be more sure of the reasons.