RTP packets with wrong destination IP

Hi everyone,

I’m have an Asterisk at the office and I register from home (nat). Everything goes well since it registers correctly and stablishes connection with the asterisk server. However, it seems that Asterisk is putting a wrong destination IP in the rtp paquets. It sends them to 192.168.1.1 instead of sending them to the public IP of my home LAN.

When I do “sip show peers” it shows as host the gateway IP (192.168.1.1). Is this correct? I mean, shouldn’t it point to the public IP address?

The configuration on sip.conf:

[general]
context=unauthenticated
allowguest=no
srvlookup=yes

homePhone
context=local
type=friend
host=dynamic
nat=yes
secret=XXXXXXX
dtmfmode=auto
disallow=all
allow=alaw
allow=ulaw

phone1

I opened ports at my home’s firewall. What can be wrong?

I will much appreciate any help.

The problem is not in Asterisk but on the IP Phone. It sends the private IP in the SIP Register message.

Try enabling STUN on the IP Phone that is behind NAT. If Asterisk is also behind NAT, you must also take this under consideration when you configure the server. Google has a lot of hits on this topic …