[asterisk-users] replace astdb with a cluster-capable sql database engine

Vieri rentorbuy at yahoo.com
Sun Mar 9 04:16:39 CDT 2008


--- Bruce Reeves <breeveslist at eusnetworks.com> wrote:

> Vieri,
> 
> What values are you looking to move from astdb?
> 
> I have used realtime to store values for call
> features and other
> functions in the dial plan. I'm curious what you are
> looking to do.

Thanks for the feedback Bruce.

What I'm trying to do is fairly simple.

I have two asterisk boxes on one site which are
practically identical. They have the same dialplan and
"serve" the same pool of SIP extensions. They are
configured as to load balance SIP registrations, ie.
aprox. 50% register on pbx1 and 50% on pbx2. For now
I'm hardcoding each client where they should register
but will soon adopt another mechanism such as DNS SRV
or Linux-HA or something.
Whenever a SIP user wants to contact another
extension, asterisk uses DUNDi with regcontext to
check where to place the call. For now it's just a
two-server setup so I could very well make use of IAX2
friend trunks but if I start using more than 2 servers
then DUNDi lookups will be more efficient.

The only telephony hardware I have on both systems is:
1 E1 PRI card and 1 4-port BRI card.

I have 8 ISDN lines so 4 go to each pbx server.

I have 2 PRI lines that connect to an Alcatel PBX so
each asterisk pbx has 1 PRI connection (routed the
same way of course).

I wanted to implement some kind of master-master
cluster of two servers but not necessarily in the
strict sense of a "cluster".

The setup fits my needs (work in progress):
* load balanced sip registrations (about 300 on each
server)
* sip extensions on one server will call out first on
the local BRI and PRI ports and if they are all
congested then they will go out to the other server
via a IAX friend trunk and try to dial out the other
set of BRI/PRI ports.
* sip extensions will use (are using) DUNDi with
regcontext to establish connections with each other.
* incoming calls from PRI/BRI ports will use DUNDi to
connect to their SIP destination.

So everything seems to be ok except for astdb.

Let me give just one simple example. Suppose extension
101 dials *78 which sets DND on (in asterisk) and sets
a DB key value on pbx server 1. Then suppose server 1
goes down for some reason and extension 101
auto-registers on server 2. If someone calls 101 then
the phone will start to ring but should report BUSY. 

This is only an example but there are a lot more
because I'm using FreePBX which makes extensive use of
DB calls (a hacked up version but it's mainly
FreePBX). I am not using Realtime but if someone can
tell me that the astdb problem will go away with
Realtime then I can give it a try. Even the main
FreePBX developer would be interested to know if the
future holds the chance of having a different astdb
backend so that rewriting of the complex dialplan is
not necessary.

So, if the astdb backend were a modern SQL database
engine like MySQL or Postgresql then I could easily
setup a master-master cluster which would solve the
DND example I described earlier.

I noticed that it's not the first time people bring
this issue up but I've never seen a clear resolution.
It seems as if people don't actually care to have the
choice of another backend for astdb so I suppose they
are getting away with it somehow (maybe by using
Realtime which I never have).

Thanks for the feedback!

Vieri



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs



More information about the asterisk-users mailing list