[asterisk-users] DID failover

Rich Adamson radamson at routers.com
Sun Oct 15 12:06:51 MST 2006


Todd- Asterisk wrote:
> I'm setting up an asterisk server where an administrator will not always 
> be available in case of problems.  While I expect problems to be rare, I 
> need to be prepared.  We're thinking of VoIP DID's and SIP phones so 
> it's an all TCP/IP network.   We could get a second server to substitute 
> - What is involved in 'transferring' or 're-registering' the DID 
> incoming lines to a second server in case the primary is down? If there 
> a better fall-over method?  I'm looking for the easiest way for the 
> un-educated sys-admin-apprentice to handle it.   The system doesn't 
> exist yet so any suggestions are appreciated.   I recognize I'll need to 
> modify the SIP phones- I'll figure that out later.
>  thanks in advance

One of the simplest ways to accomplish this is to use an APC power strip 
with SNMP control. (Each of the power outlets on the power strip can be 
turned on / off remotely via an snmp command.

With this rough approach, stop the 'broken' asterisk server and start 
the backup server (via the power strip control), and wait for the system 
to come up.

If both asterisk systems are configured absolutely the same (eg, same 
*.conf entries, ip addresses), then when the system comes up, it will 
'register' with your sip or iax provider.

The sip phones will likely take a little bit longer to come up due to 
arp cache timout values within the sip phones. I've not tested any of 
the sip phones to see what the default timeout values have to be, but it 
will vary by manufacturer. (Microsoft PC stuff is generally around two 
minutes.) As soon as that cache value timeouts out, the sip phone will 
register (with the new server) and should be totally functional.

If at some future time you need a T1 or PRI on the system, someone 
manufacturers a T1 relay that will swap the T1 from one system to another.

The downside to this approach is that you have to wait on each device's 
arp cache timeout value (including routers, dsl moems, sip phones, ATA 
boxes, and any other device that is required in you fully working 
system. Very few of the voip devices allow you to set the arp timeout value.

In very general terms from a historical perspective, abruptly shutting 
down power to a linux/unix box is not is not an acceptable practice. 
However, the newer systems are far more tolerant, and for emergency 
purposes, its probably not that bad as the last step.

If you read over some of the archives, there are other ways that involve 
redundant servers, heartbeats, load sharing, reserving a valid extension 
number that would kick of scripts (etc) to swap boxes. Each have their 
advantages, disadvantages, and costs.



More information about the asterisk-users mailing list