[Asterisk-Dev] Current database abstraction effort ?

Nicolas Bougues nbougues-listes at axialys.net
Tue Jan 6 06:58:03 MST 2004


On Tue, Jan 06, 2004 at 03:47:48AM -0600, Steven Critchfield wrote:
> 
> BTW, extension lookups in a DB more than once is wasteful and way
> suboptimal. Loading them all at start time makes the DB nothing more
> than a fancy flat file with a funny editing language.
> 

I agree with that. It has one advantage though : it's centralised. It
matters when you have several servers to manage.

Furthermore, I'm still planning how to do things, but it will probably
be either :
- entire contexts lookups, with caching. The first lookup would be
  done when required, and a new one when the context is needed again
  and the cache has expired
- a specific lookup application : I'm mostly interested in these
  dynamic lookups for :
  - outgoing calls routing
  - local AGI (or AGI-alike) scripts launching
  So this could be handled inside a specific extension app (somewhat
  like what Enum does).

> Also, have you given any thought as to how you can maintain comments in
> the configuration that are relevant when the DB doesn't insure order of
> results? 

Keeping order in a database is fairly easy, just add a field for
that. About comments, well, I must admit I don't really care, for the
reasons I explained earlier.

The goal is not necessarily to provide a full replacement for
extensions.conf, but rather to enable some database-lookup for various
routing decisions.

The same goes for extensions configuration from inside Asterisk : it
does make sense to alter them using CLI at runtime when they're
"statically" in a file. But much less when they're dynamically looked
up in a DB.

-- 
Nicolas Bougues
Axialys Interactive



More information about the asterisk-dev mailing list