|
List Info
Thread: Fixing Asterisk DNS - bug 9152, asynchronous DNS, etc
|
|
| Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |

|
2007-06-20 14:13:53 |
Hello everyone,
I am sick of failing DNS servers / internet connections
locking up
my Asterisk boxes (isn't everyone). I also don't like not
being able
to use proper DNS when I should be able to. I originally
complained
about the problem here:
http://archives.free.net.ph/message/20070430
.205115.69a12f87.en.html
Is anyone willing/able to provide a REAL fix to this
issue? This is
a serious problem for myself and others - I'm willing to pay
cash -
name your price! The fix should work on 1.2, 1.4, and
trunk.
It appears that a good start would be making Asterisk DNS
resolution
asynchronous inside of dns.c and making dns manager work
with
chan_sip. Or maybe not. Does anyone with more clue have
any better
ideas?
I know that DNS fixes aren't very glamorous or cool, but
neither is
Asterisk locking up because of failing DNS requests.
Thanks!
--
Kristian Kielhofner
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| Re: Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |
  United States |
2007-06-20 15:02:09 |
Kristian Kielhofner wrote:
> It appears that a good start would be making Asterisk
DNS resolution
> asynchronous inside of dns.c and making dns manager
work with
> chan_sip. Or maybe not. Does anyone with more clue
have any better
> ideas?
Yes, converting chan_sip over to use dnsmgr would be a huge
step in the
right direction. In fact, everywhere that does dns lookups
should be
converted to use it.
This conversion really isn't that hard for anyone that wants
to do it.
Take a look at chan_iax2 for an example of a module using it
today.
--
Russell Bryant
Software Engineer
Digium, Inc.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| Re: Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |
  United States |
2007-06-20 15:25:16 |
On Wed, 2007-06-20 at 15:13 -0400, Kristian Kielhofner
wrote:
>
> It appears that a good start would be making Asterisk
DNS resolution
> asynchronous inside of dns.c and making dns manager
work with
> chan_sip. Or maybe not. Does anyone with more clue
have any better
> ideas?
Outside of making every DNS lookup in Asterisk asynchronous,
your best
bet would be to run BIND as a caching-only nameserver on the
Asterisk
box. Change the resolv.conf to point to 127.0.0.1. If you
need to run
DNS queries through your ISP's nameservers you can tell BIND
to forward
all queries through those nameservers.
Jeff
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| Re: Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |

|
2007-06-20 16:08:03 |
On 6/20/07, Jeffrey C. Ollie <jeff ocjtech.us> wrote:
> On Wed, 2007-06-20 at 15:13 -0400, Kristian Kielhofner
wrote:
> >
> > It appears that a good start would be making
Asterisk DNS resolution
> > asynchronous inside of dns.c and making dns
manager work with
> > chan_sip. Or maybe not. Does anyone with more
clue have any better
> > ideas?
>
> Outside of making every DNS lookup in Asterisk
asynchronous, your best
> bet would be to run BIND as a caching-only nameserver
on the Asterisk
> box. Change the resolv.conf to point to 127.0.0.1. If
you need to run
> DNS queries through your ISP's nameservers you can tell
BIND to forward
> all queries through those nameservers.
>
> Jeff
>
Jeff,
I have used that "solution" with mixed results
in the past (usually
using dnsmasq). The problem is that no good DNS Cache will
cache a
result longer than the TTL on the record so your
"success" using this
solution will depend more on the TTL than anything else...
I'd like to fix the real problem in Asterisk and not
depend on any
external hacks. This includes:
- DNS Caches
- Hosts files
- etc
--
Kristian Kielhofner
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| Re: Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |

|
2007-06-21 10:19:54 |
On 6/21/07, Klaus Darilion <klaus.mailinglists pernau.at> wrote:
> Hi!
>
> (open)ser also has similar problems to due lack of
asynch DNS - but at
> least they allow to configure DNS timeouts. Thus, a
workaround is
> setting low timeout values. I do not know if Asterisk
supports this -
> but surely will be easier to implement than asynch
DNS.
>
> regards
> klaus
>
klaus,
Cool! I guess I've never bumped into that (I use very few
hostnames
with OpenSER, and when I do, it's in a datacenter with very
reliable
DNS)...
So now the requests are:
- make chan_sip use dns manager
- configurable timeouts on DNS requests
Thoughts?
--
Kristian Kielhofner
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| Re: Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |

|
2007-06-22 15:22:57 |
On 6/22/07, Russell Bryant <russell digium.com> wrote:
> Olle E Johansson wrote:
> > Hmm, last time I checked this wasn't really what
the rest of the
> > world calls "asynch DNS",
> > but things may have changed and I will check
again. Kevin also used
> > to have some doubt
> > whether dnsmgr was the right way to go, so I put
implementation of
> > that on hold for
> > chan_sip, but if it's now the proper way, I'll
look into it again and
> > see if we can enhance
> > it so it can help us improve DNS support,
especially in the area of
> > SRV records in SIP.
>
> Well it is certainly asynchronous DNS by definition in
that it is
> handling DNS lookups asynchronously from the thread
that is using the
> result. But, I can't say if this is in line with what
"the rest of the
> world" expects.
>
> Anyway, I'm sure there are improvements that could be
made to the DNS
> manager, but I can't imagine any reason to hold off on
using it. It is
> certainly an improvement to what is in chan_sip today.
If it was ever
> consider an improper way of doing things, then it
wouldn't be in the
> tree, and it wouldn't be what has been used in
chan_iax2 since before
> Asterisk 1.2.
>
> If anyone can think of a reason *not* to use it
chan_sip, I would like
> to know so that we can make it fit the needs. The
first thing I think
> of is that I don't think it has any support for
handling of SRV records.
> That would be a very nice addition for both IAX2 and
SIP.
>
> --
> Russell Bryant
> Software Engineer
> Digium, Inc.
>
Russell,
How is this for a "task list" (and possible
bounty):
- update dns manager to support SRV
- update chan_sip to use dns manager
- update chan_sip to be "asynchronous" like
chan_iax2
That last one sounds a bit dicey - Olle seemed to be
leaning towards
the ares approach.
Olle, what are your thoughts?
--
Kristian Kielhofner
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.c
om--
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
| Re: Fixing Asterisk DNS - bug 9152,
asynchronous DNS, etc |

|
2007-06-22 17:34:50 |
On 6/22/07, Russell Bryant <russell digium.com> wrote:
> Kristian Kielhofner wrote:
> > How is this for a "task list" (and
possible bounty):
> >
> > - update dns manager to support SRV
> > - update chan_sip to use dns manager
> > - update chan_sip to be "asynchronous"
like chan_iax2
>
> This sounds fine, except for the fact that chan_iax2 is
only
> asynchronous in that it uses our existing DNS manager.
So, that makes
> the last 2 redundant redundant.
>
> --
> Russell Bryant
> Software Engineer
> Digium, Inc.
>
Russell,
Sorry about that. One of your posts read like there was
some extra
effort required to make DNS lookups while using DNS manager
be
asynchronous within a given channel. To be totally clear
(mostly for
the archives) DNS manager is asynchronous and we just need
to make
chan_sip use it (after it supports SRV, of course).
Anyways, that's good news because it's less work (at least
it sounds
like less).
Thanks!
--
Kristian Kielhofner
_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.c
om--
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
|
|
[1-7]
|
|