[asterisk-users] asterisk slows down when unplugging internet cable with VoIP lines

Alex Robar alex.robar at gmail.com
Thu Apr 26 07:09:28 MST 2007


Hi Giorgio,

LOTS of people have had this issue, check the list archives for some other
responses.

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:

1) Don't use DNS. Use IP's in your Asterisk conf files instead of hostnames.
(Make sure there are no hostnames ANYWHERE in the conf files).

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'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.

Both of these options have the downside that if your provider changes their
IP, nothing works and you'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't change the IP on your, and I would hope that
if they did, they would notify their customers ahead of time.

Cheers,
Alex Robar

On 4/26/07, Giorgio Incantalupo <gincantalupo at fgasoftware.com> wrote:
>
> Hi,
> I have an Asterisk 1.2.9.1 on a Debian Sarge distro connected to a VoIP
> provider via internet.
> I noticed Asterisk gets slow and  behaves in strange manner if I unplug
> my internet cable from the PBX: for example I get incoming calls after
> seconds or I get no audio during calls.
> I thought it was something connected to DNS resolution so I put VoIP
> provider addresses inside /etc/hosts but still have slow problems.
> I made some tests adding registrations to providers inside sip.conf
> keeping my PBX disconnected from internet: after a "sip reload" the CLI
> simply stay freezed waiting for something. Trying to "sip reload" gives
> a message Asterisk is still waiting to perform the last reload. A real
> mess!
> I read on internet, inside dns.h file reference, Asterisk is using
> synchronous dns functions...infact a note explains that:
> "Asterisk DNS is synchronus at this time. This means that if your DNS
> does not work properly, Asterisk might not start properly or a channel
> may lock"
> How can it be? If this should be true this would be a big problem with
> VoIP lines since losing internet connections is not so uncommon (if so,
> why nobody else got this trouble?)
> Is it possible to bypass this behaviour or should I avoid VoIP lines??
>
> TIA
>
> Giorgio Incantalupo
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Alex Robar
alex.robar at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070426/d77f49c7/attachment.htm


More information about the asterisk-users mailing list