The redundancy mechanism of a SIP server helps ensure the reliability and continuity of SIP services. Primary and backup server deployment is one common redundancy method. The primary and backup servers share user accounts, Dialog information depending on the specific implementation of the server redundancy solution, Registration information, and other service data. Under normal conditions, all SIP requests and responses are handled by the primary server. When the primary server fails, is under maintenance, or becomes unreachable, the SIP endpoint automatically switches to the backup server to request service, helping maintain service continuity for users. After the primary server recovers, the SIP endpoint can automatically switch back to the primary server for service.
Figure 1 SIP Server Primary and Backup
Failover: A mechanism in which the backup server takes over all services when the primary server is unavailable, without affecting customer use.
Failback: A mechanism in which the device detects whether the primary server has recovered while the backup server is working, so that it can quickly switch back to the primary server.
Server Unavailable: The client requests registration and the Server responds with 500/503, or UDP receives a destination-unreachable ICMP message, or the TCP connection times out.
Register Failback: When the primary server is unavailable and the phone has registered to the backup server, the phone creates a new Register Dialog to detect whether the primary server has recovered. This function has an independent and configurable detection interval.
This document is intended for internal R&D or testing personnel who want to understand how the Dial plan function is improved.
Configure two Server entries for the SIP line of the phone. SIP Server1 is the primary server, and SIP Server2 is the backup server.
The phone supports Failover for the following signaling messages: Register, Invite, and Bye. Other signaling messages are not supported yet.
2.2.1 Register Failover
Trigger conditions: manual registration / registration timeout / Option or Cancel request timeout
1) The phone sends a Register message to the primary server.
2) The phone tries to send Register to the primary server for the specified number of times for V3 products, or for a specific duration for V2 products.
3) When the primary server is Unavailable, the phone sends the Register message to the backup server.
4) The backup server responds with 200 OK, and the phone is successfully registered.
2.2.2 Invite Failover
Trigger condition: the user places a call
1) Phone A calls Phone B.
2) Phone A sends an Invite request to the primary server.
3) Phone A tries to send Invite to the primary server for the specified number of times for V3 products, or for a specific duration for V2 products.
4) When the primary server is Unavailable, the phone sends Register to the backup server.
5) The backup server responds with 200 OK to the phone, and the phone is successfully registered to the backup server.
6) The phone sends an Invite request to the backup server.
7) The backup server responds with 200 OK, and Phone A and Phone B establish a call.
2.2.3 Bye Failover
Trigger condition: after the phone has established a call through the primary server, the phone hangs up the call
1) Phone A establishes a call with Phone B through the primary server.
2) Phone A hangs up the call.
3) Phone A sends a Bye request to the primary server.
4) Phone A tries to send Bye to the primary server for the specified number of times for V3 products, or for a specific duration for V2 products.
5) When the primary server is Unavailable, the phone sends Register to the backup server.
6) The backup server responds with 200 OK to the phone, and the phone is successfully registered to the backup server.
7) The phone sends a Bye message to the backup server.
8) The backup server responds with 200 OK, and the call with Phone B ends.
2.2.4 Failover Failure
When all servers are unavailable, the phone attempts each server in sequence according to the priority of the primary and backup servers, for the specified number of times for V3 products or for a specific duration for V2 products. The last server is an exception. According to RFC3261, SIP tries for 64*T1, which is 32 seconds. The current SIP signaling request then fails and the result is reported to the user.
The phone supports independent Register Failback. After the phone successfully registers to the backup server, it periodically sends an independent Register to the primary server to detect whether the primary server has recovered.
Trigger condition: Register Failback timer timeout.
1) The phone successfully registers to the backup server.
2) When Register Failback times out, the phone sends an independent Register to the primary server.
3) The primary server responds with 200 OK, and the phone switches back to the primary server.
When the primary server is still unavailable, the Register sent by the phone is retransmitted according to RFC3261 until the 64*T1, or 32-second, timeout is reached. After timeout, the timer starts again and periodically detects the primary server.
| Configuration Item Name | Description | Value | |
| SIPN | Register Addr: | Primary server address. | IP/domain name Default value: empty |
| SIPN | Register Port: | Primary server service port. | Numeric Default value: 5060 |
| SIPN | Register TTL: | Primary server registration period. | Numeric Default value: 3600 Unit: seconds |
| SIPN | Transport: | Primary server transport protocol: UDP, TCP, or TLS. | 0: UDP 1: TCP 3: TLS Default value: 0 |
| SIPN | Backup Addr: | Backup server address. | IP/domain name Default value: empty |
| SIPN | Backup Port: | Backup server service port. | Numeric Default value: 5060 |
| SIPN | Backup TTL: | Backup server registration period. | Numeric Default value: 3600 Unit: seconds |
| SIPN | Backup Transport: | Backup server transport protocol: UDP, TCP, or TLS. | 0: UDP 1: TCP 3: TLS Default value: 0 |
| SIPN | Enable Failback: | Controls whether Register Failback is enabled for the line. | 0/1 Default value: 1 |
| SIPN Failback Interval: | Time interval for detecting whether the primary server or Proxy has recovered after registration to the backup server or Proxy. | Numeric Default value: 1800 Unit: seconds | |
| SIPN Signal Retry Counts: | Number of SIP Request retransmissions when the server or Proxy is unavailable, except for the last server or Proxy, which uses a 32-second timeout. | Numeric Default value: 3 | |
The user can log in to the Web server of the phone and configure the primary and backup servers.
1) Click the "Line" tab and select the SIP subtab, which is the default page.
2) Select the line to be configured through the "Line" drop-down list inside the page.
3) Configure the line registration information.
4) Configure the server information for SIP Server1, the primary server, and SIP Server2, the backup server, as shown in Figure 2.
5) Click "Basic Settings" on the current page to set the configuration items related to primary and backup Failback, as shown in Figure 3.
6) Click the "Submit" button at the bottom of the page to make the configuration take effect.
Figure 2 SIP Server Primary and Backup Configuration
Figure 3 SIP Primary and Backup Failback Configuration