2 routers not working with asterisk

asterisk 1.8.3
FreePBX 2.9.0rc1.
centos 5.5
dell poweredge 1850
linksys spa 942 & 922
asus wl-500g premium v2 dd-wrt mega IP of
linksys wgr54 router dd-wrt
deviceanduser mode
behind NAT

asus router providers internet to linksys router.
when phone is connected to linksys router, phone registers and can ring extension 2600 on asus side but 2600 cannot ring 1337.

asus provides static IP 192.168.10.35 to linksys router
linksys router provides IP 192.168.20.22 to linksys spa 942

asterisk sip info can even figure out the IP but just reports it as unreachable.

1337/1337 192.168.20.22 D A 5060 UNREACHABLE

On the linksys router, I have set port forwarding for ports 5004 to 5084 & 10000 to 20000 to the asterisk server: 192.168.10.22; I have set the same ports to the phone IP and I have set it to the dhcp of the linksys router, all of which fail.

One odd thing is that when 2600 calls 1337, it calls the IVR and not the devices voicemail.

linksys router is used for wireless.
iphone connects to it and registers on asterisk server using app called linphone. I can make and receive calls from extension 3622 even though this theoretically would be double NAT.

iphone connected to linksys wireless router shows this

3622/3622 192.168.10.10 D N A 3544 OK (123 ms)

linksys spa942 directly connected to router shows this

1337/1337 192.168.20.22 D A 5060 UNREACHABLE

How can that be even though they should both have a 20.xx address?

Well sip is on port 5060, so the port forwarding was doing nothing.

Why don’t you put the wireless router in bridge (access point) mode so your network is configured properly?

That would also make things simpler.

My home network is setup this way. I use Bria on my Blackberry.

What a mess, double NAT will never work. Why would you need such a configuration?

Where did you get ports 4005 to 5084? That’s not correct, one port for SIP 5060 and the RTP range must match what is in /etc/asterisk/rtp.conf

You also have to setup your externip and localnet variables in the sip configuration settings module.

/etc/asterisk/rtp.conf
rtpstart=10000
rtpend=20000

I have sip ports 5004 to 5084 configured on the working asus routers.

I DID have double NAT working on two identical netget routers with pretty much the same configuration. I have it setup this way because I would like a working phone in the living room as well as my office.

I will change SIP to only 5060 but should it be forwarded directly to the asterisk server, phone, or linksys server?

This worked however I would to have liked the second router to be on a separate subnet, but for now your suggestion worked.

thanks