Gizmo, Asterisk, Google Voice

I have a bit of a Rube Goldberg setup, and surprisingly enough it is working with intermittent success. I was hoping someone might be able to give me a little help to make it more reliable.

My apartment is gated with no general code. This is unacceptable, since it requires me to answer the phone, and in this day and age is considered manual labor. To get around this, it calls my Google Voice number. I have the phone number for the door call box routing to my gizmo account, and from there forwarded to my asterisk box at home. Since I have a dynamic ip address I have the calls forwarded to door@.dyndns.org.

Yes, there are a lot of potential points of failure here, but I think it should be more reliable than what I am seeing. I have periods where it works, followed by periods of timeouts when registering:

[Aug 23 11:30:39] NOTICE[24733]: chan_sip.c:9923 sip_reg_timeout:    -- Registration for '1747<...>@proxy01.sipphone.com' timed out, trying again (Attempt #8)

The relevant parts of my asterisk config files are as follows:

extensions.conf:

[door]
exten => door,1,Verbose(1,Received Door Phone Call)
exten => door,n,Answer()
exten => door,n,Wait(1)
exten => door,n,Playback(9)
exten => door,n,Hangup()

note: 9 is a 8000 hz wav file with a 5 second DTMF 9 signal

sip.conf:

[general]
srvlookup=yes
nat=yes
externhost=<host>.dyndns.org
externrefresh=2
register => 1747<...>:<password>@proxy01.sipphone.com

[proxy01.sipphone.com]
type=peer
context=door
disallow=all
allow=ulaw
allow=alaw
dtmfmode=inband
host=proxy01.sipphone.com
insecure=port,invite
secret=<password>
username=1747<rest_of_number>
canreinvite=no

Firewall rules:
SIP
TCP 5004
UDP 5004

TCP 5060-5082
UDP 5060-5082
TCP 8000-20000
UDP 8000-20000

So, if anyone is bored, and have some suggestions on where else to look, I’d appreciate the help

Adding to [general] solved my timeouts.

qualify=no defaultexpirey=3600 [/code]