asterisk fails when DNS or internet fails

Home » Asterisk Users » asterisk fails when DNS or internet fails
Asterisk Users 14 Comments

Hi,

Would just like to inquire why asterisk fails to send calls in / out
when the DNS is failing
or when the server with asterisk has no internet. Ip phones are
connected via IP address and i am using an FXO card, so even if
internet fails i should still be able to make calls thru the fxo. but
that is not the case.

i am using the latest asterisk 1.4 and dahdi. any help would truly be
appreciated. thank you.

Regards,
Ron

14 thoughts on - asterisk fails when DNS or internet fails

  • Hi,

    it is a known problem, one of the worst. To avoid it:

    – do not use urls, only ip addresses in sip.conf

    or put your urls inside /etc/hosts (is what I do especially sip
    providers urls)

    or install a dns-cache on your pbx (maybe the best solution)

    Giorgio

  • By the way, is this only an issue for asterisk 1.4? or is it the same with
    1.6 and/or 1.8?

    TIA.

    Regards,
    Ron

  • On Mon, May 30, 2011 at 2:44 AM, gincantalupo
    wrote:

    Even a dns cache won’t help you forever. Once the entry’s TTL expires, your
    cache won’t be able to give you an answer until it can contact root servers
    on the internet.

    -M

  • I couldn’t disagree more. In fact I think this problem is more serious
    than it is getting credit for, when asterisk is in use in places where
    Internet connectivity is far from stable. I have several hotels that have
    gone without Internet connectivity for days, and somewhere between one and
    three days down they can only spottily call within the system, and can’t
    make outbound calls on their voice T1. Its certainly true that they were
    suffering without Internet access, but it is very hard to explain to the
    owners why they can’t use their phones. In fact the symptoms are very
    strange – inbound calls on the T1 get the auto-attendant, but internal
    transfers fail. No one can call outbound, and only *sometimes* do
    internal extension to extension calls fail.

    I still scratch my head about what exactly asterisk is trying to lookup
    that keeps it from being able to place internal SIP calls from extension
    to extension, and sadly the few times this has occurred I wasn’t around to
    debug.

    Hasn’t anyone managed to solve this with something better than a caching
    DNS server, which seems to only last a short while? What exactly is going
    on that is failing?

    Cheers,

    j

  • What kind of info is it about?
    If it is the hostname of _local_ machines/clients, you should be
    authoritive. That should keep asterisk happy.
    If it is about remote nodes, well if your isp-connection is lost, you
    can not contact them anyway ;-(

    So run locally your bind-server, authoritive for your own addresses, and
    caching for external ones.

    hw

  • I our setup we don’t have DNS or Internet connectivity but we are good
    no issue so far.

  • 31 maj 2011 kl. 14.49 skrev Benny Amorsen:

    Longterm we should really integrate an Asynchronus DNS library, like C-Ares.

    I’ve been wanting to do that for years.

    /O

  • may i know what domain is asterisk specifically looking for? coz i don’t use
    domains on the ip phones,
    i configure them to register to the IP e.g. 10.10.10.1. forgot to mention
    i am using freepbx as a GUI,
    does freepbx tells asterisk to look for a specific domain?

    TIA.

    Regards,
    Ron

  • thank you eric. i have setup a reverse dns for my internal IP, hopefully
    that works. thanks again!

  • I’m not sure if that’s all is true.
    Sure, if you add a line in /etc/hosts, that works for most applications,
    as not all commands follow /etc/resolv.conf….

    i just tried, adding a line to /etc/hosts.
    ping hostname works, but host hostname fails, just as host ip-address.
    So even when you only put ip-addresses (brrr) into your config files,
    the reversed-lookup will still spoil the party.

  • It depends on the settings in /etc/nsswitch.conf and the resolver library
    the application uses.

    Compare ping and ssh referencing a host that is only in /etc/hosts.