Has anyone ever found a real, working solution to the problem that causes Asterisk to freeze up and extensions not to work whenever the internet goes down?
I’ve been able to do it by using only numerical IP addresses in trunk settings and by configuring the Asterisk SIP Settings with the correct internal and external IP addresses, but I’m wondering if there’s a fix that allows you to use domain names again?
I think I have a more elegant answer, but I need someone’s assistance.
The problem is that Asterisk receives no response to its DNS queries.
My solution is to set my resolv.conf file to have two real nameservers and the final nameserer will point to a fictional, local nameserver. I say fictional, because it’ll resolve all DNS requests with a fictional DNS. Why a fictional DNS? Why not? If the internet is down, we just want Asterisk to get SOMETHING so it won’t freeze. Since the internet is DOWN, we don’t really care is that something is valid or not. Of course, if the internet is up, the first two real nameservers will be used, and a real response will be given.
Here’s the question: How do I set up a fictional nameserver, i.e. one that just responds to all queries with 220.127.116.11?
Put another way, I know that the hosts file is consulted FIRST, before the DNS servers in resolv.conf. Is there a second hosts-like file that is consulted AFTER resolv.conf?
Is there a line that I can put in resolv.conf that will just force 18.104.22.168 if all else fails?
“To change lookup order, edit the /etc/host.conf file. The line order hosts, bind specifies that /etc/hosts takes precedence over the name servers. Changing the line to order bind, hosts configures the system to resolve hostnames and IP addresses using the name servers first. If the IP address cannot be resolved through the name servers, the system then looks for the IP address in the /etc/hosts file.”
Now, is there a wildcard entry that I can use in the hosts file?