Asterisk keeps disconnecting

I have used Asterisk for a while now, and it generally is a fantastic system. Kudos to everyone who works on it. But I have a problem:
Every so often, my Asterisk box disconnects and will not re-connect until I reboot the computer. The log always shows the same pattern:

[2018-03-27 12:43:05] ERROR[2265] netsock2.c: getaddrinfo(“sip.flowroute.com”, “(null)”, …): Temporary failure in name resolution
[2018-03-27 12:43:05] WARNING[2265] acl.c: Unable to lookup ‘sip.flowroute.com
[2018-03-27 12:43:25] ERROR[2265] netsock2.c: getaddrinfo(“sip.flowroute.com”, “(null)”, …): Temporary failure in name resolution
[2018-03-27 12:43:25] WARNING[2265] acl.c: Unable to lookup ‘sip.flowroute.com
[2018-03-27 12:43:25] NOTICE[2265] chan_sip.c: – Registration for ‘xxxxxxxx@sip.flowroute.com’ timed out, trying again (Attempt #2)
[2018-03-27 12:43:34] NOTICE[2265] chan_sip.c: Peer ‘1600’ is now UNREACHABLE! Last qualify: 75
[2018-03-27 12:43:45] NOTICE[2265] chan_sip.c: – Registration for ‘98237943@sip.flowroute.com’ timed out, trying again (Attempt #3)
[2018-03-27 12:43:52] NOTICE[2265] chan_sip.c: Peer ‘1700’ is now Reachable. (157ms / 2000ms)
[2018-03-27 12:43:58] NOTICE[2265] chan_sip.c: Peer ‘1600’ is now Reachable. (53ms / 2000ms)
[2018-03-27 12:44:05] NOTICE[2265] chan_sip.c: – Registration for ‘xxxxxxxx@sip.flowroute.com’ timed out, trying again (Attempt #4)
[2018-03-27 12:44:25] NOTICE[2265] chan_sip.c: – Registration for ‘xxxxxxxx@sip.flowroute.com’ timed out, trying again (Attempt #5)
[2018-03-27 12:44:31] NOTICE[2265] chan_sip.c: Received SIP subscribe for peer without mailbox: 1500
[2018-03-27 12:44:45] NOTICE[2265] chan_sip.c: – Registration for ‘xxxxxxxx@sip.flowroute.com’ timed out, trying again (Attempt #6)
[2018-03-27 12:45:05] NOTICE[2265] chan_sip.c: – Registration for ‘xxxxxxxx@sip.flowroute.com’ timed out, trying again (Attempt #7)
[2018-03-27 12:45:25] NOTICE[2265] chan_sip.c: – Registration for ‘xxxxxxxx@sip.flowroute.com’ timed out, trying again (Attempt #8)

… ad infinitum

I have talked to flowroute, and they had me switch to IP connection (i.e., through my permanent IP address), but the problem persists. At some point I thought a router was failing, but a replacement did noting. My Asterisk box sits behind a comcast modem and a Netgear Firewall.

This happened for a while and my solution was to reboot the Asterisk box automatically every morning at 4 am. That seemed to work for a while, but now the frequency of this problem seems to have increased and the system often connects during the day. And nothing tells me that it has connected, until I try to call out and can’t get through. Not a good solution as I am missing all incoming calls.

So, I am back trying to diagnose and fix the problem, rather than using a reboot bandaid. Does anybody have a suggestion?

I am a bit puzzled about the Flowroute IP registration, and why I still get this error message:

[2018-03-27 12:43:05] ERROR[2265] netsock2.c: getaddrinfo(“sip.flowroute.com”, “(null)”, …): Temporary failure in name resolution

Do I have to tell Asterisk that I am not using a normal SIP registration anymore? I am also puzzled why the name resolution would not work? There are no dropouts in my Internet connectivity, and I have set 3 different nameservers on the computer (2 of them google).

So, I am really stumped. Any help would be welcome…