Asterisk Hang - chan_sip.c Network is unreachable

This is a copy of my post to the AsteriskNOW support forum. I think its very unlikely this issue is an AsteriskNOW problem and not a problem with Asterisk. Thx and apologies in advance.

Hello,

Over the past two days I’ve been having trouble with my AsteriskNOW install and a SIP provider called flowroute. The issue is a loss of connectivity which causes asterisk to hang. It appears the interface or route used to connect to flowroute was down. I would expect asterisk to try to connect to the provider every few seconds. Unfortunately, it tried to connect a few hundred times a second. After a few hours of this, asterisk consumed all the available memory and the kernel started killing processes, eventually killing the asterisk process which brought the system down.

Is there anyway to change the behavior? We have a PRI that is supposed to act as a backup to the SIP provider. If the SIP provider is down, I’ve configured the outbound routes to switch to the PRI (which is our default inbound route). Network outages, while uncommon, do happen.

Versions:
/etc/asterisknow-version: AsteriskNOW 1.5.0
/etc/redhat-release: CentOS release 5.3 (Final)

Packages:
dahdi-firmware-vpmadt032-1.07-1_centos5
kmod-dahdi-linux-2.1.0.4-1_centos5.2.6.18_128.1.1.el5
dahdi-tools-2.1.0.2-2_centos5
kmod-dahdi-linux-2.1.0.4-1_centos5.2.6.18_128.1.14.el5
dahdi-firmware-tc400m-MR6.12-1_centos5
dahdi-firmware-oct6114-128-1.05.01-1_centos5
dahdi-linux-kmod-base-2.1.0.4-1_centos5.2.6.18_128.1.1.el5
asterisk14-dahdi-1.4.25.1-1_centos5
dahdi-firmware-oct6114-064-1.05.01-1_centos5
dahdi-linux-2.1.0.4-1_centos5
dahdi-firmware-2.0.0-1_centos5
dahdi-linux-kmod-base-2.1.0.4-1_centos5.2.6.18_128.1.14.el5
asterisk-sounds-core-en-ulaw-1.4.15-1_centos5
asterisknow-version-1.5.0-1_centos5
asterisk14-core-1.4.25.1-1_centos5
asterisk14-addons-mysql-1.4.8-1_centos5
asterisk-sounds-extra-en-gsm-1.4.9-1_centos5
asterisk-sounds-moh-fpm-ulaw-0.0-3_centos5
asterisk14-addons-core-1.4.8-1_centos5
asterisk14-voicemail-1.4.25.1-1_centos5
asterisk14-doc-1.4.25.1-1_centos5
asterisk14-dahdi-1.4.25.1-1_centos5
asterisk14-1.4.25.1-1_centos5

Here is a small snippet of the 26 Gb asterisk/full log file that was generated:

[Dec 28 14:03:08] NOTICE[13162] chan_sip.c:    -- Registration for '12345678@sip.flowroute.com' timed out, trying again (Attempt #2635618)
[Dec 28 14:03:08] WARNING[13162] chan_sip.c: sip_xmit of 0x728bfe0 (len 406) to 70.167.153.130:5060 returned -2: Network is unreachable
[Dec 28 14:03:08] WARNING[13162] acl.c: Cannot connect
[Dec 28 14:03:08] NOTICE[13162] chan_sip.c:    -- Registration for '12345678@sip.flowroute.com' timed out, trying again (Attempt #2635617)
[Dec 28 14:03:08] WARNING[13162] chan_sip.c: sip_xmit of 0x728bfe0 (len 406) to 70.167.153.130:5060 returned -2: Network is unreachable
[Dec 28 14:03:08] WARNING[13162] acl.c: Cannot connect
[Dec 28 14:03:08] NOTICE[13162] chan_sip.c:    -- Registration for '12345678@sip.flowroute.com' timed out, trying again (Attempt #2635616)
[Dec 28 14:03:08] WARNING[13162] chan_sip.c: sip_xmit of 0x728bfe0 (len 406) to 70.167.153.130:5060 returned -2: Network is unreachable
[Dec 28 14:03:08] WARNING[13162] acl.c: Cannot connect
[Dec 28 14:03:08] NOTICE[13162] chan_sip.c:    -- Registration for '12345678@sip.flowroute.com' timed out, trying again (Attempt #2635615)
[Dec 28 14:03:08] WARNING[13162] chan_sip.c: sip_xmit of 0x728bfe0 (len 406) to 70.167.153.130:5060 returned -2: Network is unreachable
[Dec 28 14:03:08] WARNING[13162] acl.c: Cannot connect

Edit: Its worth noting the attempt number at the top of the log snippit #2635618. Reminds me of Lost.

Thanks,

Jason