Hi Giorgio,<br><br>LOTS of people have had this issue, check the list archives for some other responses. <br><br>You are quite correct, Asterisk DNS is synchronous, so when your internet connection goes down, it causes some problems for the rest of the system. There are a couple of ways of handling this:
<br><br>1) Don&#39;t use DNS. Use IP&#39;s in your Asterisk conf files instead of hostnames. (Make sure there are no hostnames ANYWHERE in the conf files).<br><br>2) Use an internal DNS server/cache. Setup a DNS server that caches queries somewhere on your network (or on the Asterisk box itself, if you&#39;re unable to put it somewhere else on the network). Set the Asterisk box to use your internal DNS server. This way, even if the internet goes down, Zap calls and internal calls will still be routed, as Asterisk will still be able perform DNS lookups. 
<br><br>Both of these options have the downside that if your provider changes their IP, nothing works and you&#39;ll have to either change all your conf files (option 1) or clear your DNS cache and force a lookup again (option 2). However, most providers won&#39;t change the IP on your, and I would hope that if they did, they would notify their customers ahead of time.
<br><br>Cheers,<br>Alex Robar<br><br><div><span class="gmail_quote">On 4/26/07, <b class="gmail_sendername">Giorgio Incantalupo</b> &lt;<a href="mailto:gincantalupo@fgasoftware.com">gincantalupo@fgasoftware.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>I have an Asterisk <a href="http://1.2.9.1">1.2.9.1</a> on a Debian Sarge distro connected to a VoIP
<br>provider via internet.<br>I noticed Asterisk gets slow and&nbsp;&nbsp;behaves in strange manner if I unplug<br>my internet cable from the PBX: for example I get incoming calls after<br>seconds or I get no audio during calls.<br>
I thought it was something connected to DNS resolution so I put VoIP<br>provider addresses inside /etc/hosts but still have slow problems.<br>I made some tests adding registrations to providers inside sip.conf<br>keeping my PBX disconnected from internet: after a &quot;sip reload&quot; the CLI
<br>simply stay freezed waiting for something. Trying to &quot;sip reload&quot; gives<br>a message Asterisk is still waiting to perform the last reload. A real mess!<br>I read on internet, inside dns.h file reference, Asterisk is using
<br>synchronous dns functions...infact a note explains that:<br>&quot;Asterisk DNS is synchronus at this time. This means that if your DNS<br>does not work properly, Asterisk might not start properly or a channel<br>may lock&quot;
<br>How can it be? If this should be true this would be a big problem with<br>VoIP lines since losing internet connections is not so uncommon (if so,<br>why nobody else got this trouble?)<br>Is it possible to bypass this behaviour or should I avoid VoIP lines??
<br><br>TIA<br><br>Giorgio Incantalupo<br><br><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list
<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>
-- <br>Alex Robar<br><a href="mailto:alex.robar@gmail.com">alex.robar@gmail.com</a>