Asterisk v1.4.0 stops taking calls after several hours

I have Asterisk v1.4 installed on CentOS and after several hours, the server no longer takes calls from peers such as IPKALL (SIP) and Teliax (IAX2). But, I may still call the server from my SIP endpoints, and call between endpoints. This happens consistently.

I do not have ‘qualify’ set to yes, and am using the Asterisk GUI so therefore it is using /etc/asterisk/users.conf for the trunks. Any ideas?

My asterisk system, hosted on my Fonera running on OpenWRT firmware, also behaves like this if I set the defaultexpiry to greater than 240 seconds. Right now, I have defaultexpiry=180 so that it will be able to receive incoming calls. I am hoping someone will address this issue.