[asterisk-users] fail-over server
Vieri
rentorbuy at yahoo.com
Wed Feb 9 08:55:28 CST 2011
--- On Tue, 2/8/11, Jonathan Thurman <jonathan at thurmantech.com> wrote:
> It depends on your configuration. If you use Asterisk
> Realtime to
> store SIP registrations, then the database will contain
> information on
> how to contact the device (fullcontact, ipaddr, and port
> fields).
> Then on a failover, Asterisk will do a lookup for the peer
> in the
> database, find the needed information and dial the device.
I don't use realtime and haven't tried it yet.
I don't know much about the SIP protocol but can't the server send a notification of some sort to peers so as to quicken re-registration?
I'm thinking of something similar to "sip notify".
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?
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.
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?
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.
> In the above scenario, I can kill Asterisk, start it again,
> and place
> a call from two devices that have not registered
> again.
I'd like to do that without Realtime (or with Realtime+FreePBX) or with any other means that doesn't require more than 2 servers (2 asterisk boxes)?
Feedback appreciated.
Thanks
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
More information about the asterisk-users
mailing list