[asterisk-users] fail-over server

Jonathan Thurman jonathan at thurmantech.com
Thu Feb 10 09:26:21 CST 2011


On Wed, Feb 9, 2011 at 6:55 AM, Vieri <rentorbuy at yahoo.com> wrote:

[snip]

> Since all of the SIP devices in my LAN have static IP addresses, I can keep track of
> everyone on my own. For instance, could I do "fake" SIP registrations from localhost
> (the * server) and specify a LAN IP address?

Have you looked at the 'defaultip' sip configuration option?  Or
setting host=<IP> for those devices?

> I would write a custom script that would execute whenever an Asterisk server "takes over".
> As said earlier, this server would not have any SIP extensions registered at first and they
> would be registering slowly within 60 seconds or more. However, since I KNOW FOR SURE
> that some SIP devices are always online and have static IP addresses, can't I "fool" Asterisk
> by somehow registering via locahost but spoofing the source IP address?
> Maybe setting the source port to what it was exactly can be tougher but I *could* try to keep track of it.

That sounds more complicated and likely to break than using Realtime.

> This way, whenever the Asterisk server that took over tries to bridge a call, it will try to connect to the fakely-registered IP address.
>
> I'm not using realtime for 2 reasons:
>
> 1- I'm using the FreePBX framework and there's no realtime backend unfortunately.
> Moving to Realtime and losing all the FreePBX goodies is time-consuming. Does anyone know how to use FreePBX + Realtime?

This is unfortunate for most of the Asterisk GUI's available.


> 2- I don't have enough hardware resources to setup a server for the realtime DB
> that both Asterisk servers would connect to. Also, I wouldn't feel comfortable
> having just one DB server. For easier maintenance I would use a clustered
> database for realtime. However, I'm using Mysql 5.0 ndbcluster tables for other
> non-voip purposes and my experience hasn't been so great. I once had a power
> outage and all ndb table data was lost. Also, 5.0 ndb crashes in several occasions.
> As far as I can tell, it isn't reliable. I haven't tried 5.1 though. I have no experience with clustered postgresql.

So run the DB on the same server as Asterisk, if your call volume
allows it, and either replicate the data using the built-in DB
replication or use DRBD between the two existing servers.  We use DRBD
between two Asterisk nodes on smaller installations for configurations
and voicemail.  It works very well for us.

For MySQL Cluster to work well, the application has to be designed for
it, and it is a RAM based storage.  But that is a conversation for
another list.

-Jonathan



More information about the asterisk-users mailing list