[CentOS] gethostbyname clarification

Mon May 25 23:59:27 UTC 2009
Joseph L. Casale <JCasale at activenetwerx.com>

I have an issue, although it's a result of sketchy code in the sip implementation
in Asterisk that's been around forever, I am sure I am going to have to fix it some other
way as many people have waited with no fix yet from Digium.

If a name resolution fails for a remote sip peer, the entire stack tanks and local
sip phones don't work either. We have several sip trunks and an analog trunk for redundancy
when the SIP providers are down. Problem is if the net connection is down *nothing* works.

Most people suggest to run your own caching nameserver which we do. We had long outage and
sure enough eventually all the sip phones couldn't connect. I fear in hard coding the remote
sip peers in the hosts file incase that changes. The server was also restarted which I believe
clears out the name server cache?

Is there some way I can configure nsswitch.conf from "hosts: files dns" to something like
"hosts: files dns file2" so if those ip's ever changed I would have time to figure it out
and update the file unless another outage occurred at the same time :)?

Anyone got a better idea how to solve this dilemma?

Thanks!
jlc