[Asterisk-Dev] ENUM multiple records handling

Adam Goryachev mailinglists at websitemanagers.com.au
Sun Feb 13 18:07:12 MST 2005


On Sat, 2005-02-12 at 19:45 +0000, Conroy, Lawrence (SMTP) wrote:

> Seriously:
> It is perfectly possible to do exactly what has been proposed; send a
> sequence of queries, returning the "next best" each time. This is caller
> logic, in the same way that the listed contacts (and their 
> order/priority)
> is callee logic. Both count, as otherwise we'd be forced to place a call
> to a premium rate number if that was order 1, priority 1 in an ENUM 
> zone.

Just wanted to comment on this in particular.

It seems to me that the ideal method for dealing with this data is to do
a similar thing to what the MYSQL app does for a select statement.

ie, something like this:
enumlookup(ID,1 123 555 6789)
Then we are returned the first result for 1 123 555 6789, then if we
decide we don't like this priority, we can do:
enumlookup(${ID})
which will lookup the second priority, and so on...
If possible, we should automatically free the associated memory when the
channel is hungup, or if that isn't possible, then on a timeout, and/or:
enumlookupend(${ID})

Thus, if you have two channels dealing with the same data 30 seconds
apart, you won't accidentally return a higher priority record simply
because you didn't realise this was a new call and should start again in
parsing the data.

IMHO, let the OS/admin decide how to deal with caching DNS requests (eg,
using a dnscache) rather than trying to re-implement that service inside
asterisk. Do you really want to add methods for clearing the cache,
ensuring the cache isn't using too much memory, logging/debugging what
is happening with DNS lookups/failures, working out when/how/what to
discard from the cache etc....

Let asterisk deal with phone calls, let other servers/software deal with
issues they are designed for.

Just my 0.02c worth.

Of course, I may be totally off bat here, so please ignore me if this is
total dribble :)

Regards,
Adam

-- 
 -- 
Adam Goryachev
Website Managers
Ph:  +61 2 8304 0000                        adam at websitemanagers.com.au
Fax: +61 2 9345 4396                        www.websitemanagers.com.au




More information about the asterisk-dev mailing list