I have set up a high-availability (HA) configuration with Asterisk, where Server 1 (Primary) and Server 2 (Backup) are configured to handle SIP traffic. I am using a shared virtual IP (VIP) for both servers, and I would like to ensure seamless failover between them for ongoing calls.
Scenario:
Primary Server (Asterisk 1): Handles SIP INVITE requests, receives calls.
Backup Server (Asterisk 2): Remains idle but is ready to take over in case the primary server fails.
The goal is to ensure that:
Initial Call Setup: A softphone sends a SIP INVITE to the virtual IP (VIP) 10.1.1.112. The SIP INVITE is routed to Server 1 (Asterisk 1), which processes the call.
Failure Handling: If Server 1 (Asterisk 1) crashes or is shut down unexpectedly, Server 2 (Asterisk 2) takes over the VIP 10.1.1.112 and continues processing the call.
Current Setup:
Server 1 (Primary): IP 10.1.1.111
Server 2 (Backup): IP 10.1.1.110
Shared VIP: 10.1.1.112 for SIP traffic.
Question:
How can I configure Asterisk to allow Server 2 to take over ongoing calls when Server 1 fails, and maintain call state such as active channels and call progress? What settings are needed for smooth failover, and how can I handle SIP signaling and media in this setup?
Thank you in advance for your help! I look forward to your suggestions and insights.
I have set up a high-availability (HA) configuration with Asterisk,
where Server 1 (Primary) and Server 2 (Backup) are configured to
handle SIP traffic. I am using a shared virtual IP (VIP) for both
servers, and I would like to ensure seamless failover between them for
ongoing calls.
Scenario:
Primary Server (Asterisk 1): Handles SIP INVITE requests,
receives calls.
Backup Server (Asterisk 2): Remains idle but is ready to take
over in case the primary server fails.
The goal is to ensure that:
Initial Call Setup: A softphone sends a SIP INVITE to the
virtual IP (VIP) 10.1.1.112. The SIP INVITE is routed to Server 1
(Asterisk 1), which processes the call.
Failure Handling: If Server 1 (Asterisk 1) crashes or is shut
down unexpectedly, Server 2 (Asterisk 2) takes over the VIP
10.1.1.112 and continues processing the call.
Current Setup:
Server 1 (Primary): IP 10.1.1.111
Server 2 (Backup): IP 10.1.1.110
Shared VIP: 10.1.1.112 for SIP traffic.
Question:
How can I configure Asterisk to allow Server 2 to take over ongoing
calls when Server 1 fails, and maintain call state such as active
channels and call progress? What settings are needed for smooth
failover, and how can I handle SIP signaling and media in this setup?
Thank you in advance for your help! I look forward to your
suggestions and insights.
Could Kamailio help manage this issue when acting as a proxy? Specifically, can Kamailio handle ongoing calls by maintaining the SIP signaling and seamlessly redirecting traffic to the backup server (Server 2) when Server 1 encounters a failure?
If your intention is to continue using Asterisk in that scenario and have active calls continue in it, then no. It would not. Existing calls would drop, new calls would work.
If your intention is to continue using Asterisk in that scenario and
have active calls continue in it, then no. It would not. Existing
calls would drop, new calls would work.