CN112532452B - Method, device, equipment and storage medium for switching main server and standby server of communication terminal - Google Patents

Method, device, equipment and storage medium for switching main server and standby server of communication terminal Download PDF

Info

Publication number
CN112532452B
CN112532452B CN202011375344.2A CN202011375344A CN112532452B CN 112532452 B CN112532452 B CN 112532452B CN 202011375344 A CN202011375344 A CN 202011375344A CN 112532452 B CN112532452 B CN 112532452B
Authority
CN
China
Prior art keywords
server
communication terminal
standby
main
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011375344.2A
Other languages
Chinese (zh)
Other versions
CN112532452A (en
Inventor
翁海明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yealink Network Technology Co Ltd
Original Assignee
Xiamen Yealink Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yealink Network Technology Co Ltd filed Critical Xiamen Yealink Network Technology Co Ltd
Priority to CN202011375344.2A priority Critical patent/CN112532452B/en
Publication of CN112532452A publication Critical patent/CN112532452A/en
Application granted granted Critical
Publication of CN112532452B publication Critical patent/CN112532452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Abstract

The invention discloses a method for switching a main server and a standby server of a communication terminal, which is characterized by comprising the following steps: acquiring a group of active and standby servers; sending a request to a main server in the main and standby servers through a communication terminal; if the communication terminal receives the specific switching response code of the main server or the main server is not reachable, switching to a standby server according to the DNS analysis priority to normally send a request; the communication terminal sends a request to a main server in the main and standby servers again; and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server. The invention can better realize the switching of the main server and the standby server and improve the stability and the reliability of the terminal communication.

Description

Method, device, equipment and storage medium for switching main server and standby server of communication terminal
Technical Field
The present invention relates to the field of network communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for switching a primary server and a secondary server of a communication terminal.
Background
VOIP is a voice over IP (english: voice over Internet Protocol, abbreviated VOIP) technology that is a voice call technology that enables voice calls and multimedia conferences via Internet Protocol (IP), i.e., communication via the internet. Other informal names are IP phone (IP telephone), internet phone (Internet telephony), broadband phone (broadband telephony), and broadband phone service (broadband phone service). With the popularization of gateway products carrying VOIP functions, VOIP technology is widely used in daily life and work. The gateway device carrying VOIP, its telephone and conference functions can bring much convenience to the clients.
When the VOIP server is deployed, the VOIP server has higher requirements on load balancing. Once the server fails, the server cannot respond to the signaling of the gateway, and thus, abnormal functions are caused. At present, the security is ensured by configuring two groups of servers, but a lot of signaling packets are generated in the switching process, so that network blockage is easy to occur, and when the servers are recovered, a lot of signaling packets are gushed in, so that huge pressure is caused to the servers. The existing server switching method cannot timely switch the main server and the standby server when the server is down, and cannot actively switch back to the main server after registering on the standby server.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to provide a method, a device, equipment and a storage medium for switching the main server and the standby server of a communication terminal, which can better realize the switching of the main server and the standby server and improve the stability and the reliability of the communication of the terminal.
In order to achieve the above object, an embodiment of the present invention provides a method for switching a primary server and a backup server of a communication terminal, including:
acquiring a group of active and standby servers;
sending a request to a main server in the main and standby servers through a communication terminal;
if the communication terminal receives the specific switching response code of the main server or the main server is not reachable, switching to a standby server according to the DNS analysis priority to normally send a request;
the communication terminal sends a request to a main server in the main and standby servers again;
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server.
Further, the primary server and the standby server at least comprise a primary server, a first standby server and a second standby server.
Further, the sending, by the communication terminal, a request to a primary server of the primary and standby servers specifically includes:
and initiating any one of a registration request, a subscription request or a call request to a main server in the main and standby servers through a communication terminal.
Further, if the communication terminal receives the specific switch response code of the active server or the active server is not reachable, switching to the standby server according to the DNS resolution priority to normally send a request, which specifically includes:
and if the communication terminal receives a specific switching response code of the main server or the main server is not reachable, carrying out signal retransmission according to a preset transaction retransmission mechanism, and if the main server does not respond or is not reachable in the transaction retransmission process and meets the failure condition of the preset transaction retransmission mechanism, switching to a standby server according to the DNS analysis priority so as to normally send a request.
Further, the preset transaction retransmission mechanism includes: the method comprises the steps of presetting a signaling retransmission interval, signaling retransmission times and signaling total retransmission time; the failure conditions of the preset transaction retransmission mechanism include: and the number of the retransmission times of the signaling or the total retransmission time of the signaling reaches a preset value.
Further, if the communication terminal receives the switch response code specific to the active server or the active server is not reachable, switching to a standby server according to DNS resolution priority to normally send a request, and then further including:
and if the communication terminal does not receive the response of the standby server or the standby server is not reachable, the communication terminal retries to send a request to the main server.
Further, if the communication terminal does not receive the response of the standby server or the standby server is not reachable, the communication terminal retries to send a request to the active server, which specifically includes:
after the communication terminal communicates with the first standby server, if the first standby server does not respond or the first standby server is not reachable when the communication terminal registers for renewal with the first standby server, the communication terminal retries to send a request to the main server or directly sends a request to the second standby server.
Further, if the communication terminal receives the response of the active server or the active server is available, the communication terminal disconnects the data transmission with the standby server, switches to the active server, and communicates with the active server, specifically including:
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, and the communication terminal switches to the main server according to the registration timeout time, the TTL time of DNS inquiry or the preset switching time of the communication terminal and communicates with the main server.
The embodiment of the invention also provides a method for switching the master server and the slave server of the communication terminal, which comprises the following steps:
acquiring a plurality of groups of main and standby servers; the multi-group main and standby servers at least comprise a first group main and standby server, a second group main and standby server and a third group main and standby server;
sending a request to a main server in the first group of main and standby servers through a communication terminal;
if the communication terminal receives the specific switching response code of the main server or the main server is not reachable, switching to a standby server in the first group of main and standby servers according to the DNS resolution priority to normally send a request;
the communication terminal sends a request to a main server in the first group of main and standby servers again;
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server.
The embodiment of the invention also provides a switching device of the main server and the standby server of the communication terminal, which comprises the following steps:
the acquisition module is used for acquiring a group of main and standby servers;
the first sending module is used for sending a request to a main server in the main and standby servers through the communication terminal;
the first switching module is used for switching to a standby server according to the DNS analysis priority to normally send a request if the communication terminal receives a specific switching response code of the main server or the main server is not reachable;
the second sending module is used for sending a request to the main server in the main and standby servers again by the communication terminal;
and the second switching module is used for switching to the main server to communicate with the main server by disconnecting the data transmission with the standby server if the communication terminal receives the response of the main server or the main server is available.
The embodiment of the invention also provides a terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the processor realizes the switching method of the main server and the standby server of the communication terminal when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, which comprises a stored computer program, wherein when the computer program runs, the equipment where the computer readable storage medium is located is controlled to execute the method for switching the master server and the slave server of the communication terminal.
Compared with the prior art, the method, the device, the equipment and the storage medium for switching the main server and the standby server of the communication terminal provided by the embodiment of the invention have the beneficial effects that: obtaining a group of main and standby servers; a communication terminal sends a request to a main server in the main and standby servers; if the communication terminal receives the specific switching response code of the main server or the main server is not reachable, switching to a standby server according to the DNS analysis priority to normally send a request; the communication terminal sends a request to a main server in the main and standby servers again; and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server. The embodiment of the invention can effectively solve the problem of server switching when the server fails, in particular to solve the registration problem caused by error switching due to unstable network conditions and the registration problem caused by network address change, better realize the switching of the main server and the standby server and improve the stability and the reliability of terminal communication.
Drawings
Fig. 1 is a schematic flow chart of a preferred embodiment of a method for switching a primary server and a secondary server of a communication terminal according to the present invention;
fig. 2 is a schematic diagram of a switching process between a communication terminal and a primary server and a secondary server in a preferred embodiment of a switching method of a primary server and a secondary server of a communication terminal provided by the present invention;
fig. 3 is a schematic diagram of a switching process between a communication terminal and a primary server and a secondary server in another preferred embodiment of a switching method between a primary server and a secondary server of a communication terminal provided by the present invention;
fig. 4 is a flow chart of another preferred embodiment of a method for switching a primary server and a secondary server of a communication terminal according to the present invention;
fig. 5 is a schematic diagram of a switching process between a communication terminal and a plurality of groups of active/standby servers in another preferred embodiment of a switching method of active/standby servers of a communication terminal provided by the present invention;
fig. 6 is a schematic flow chart of a preferred embodiment of a switching device of a primary server and a standby server of a communication terminal according to the present invention;
fig. 7 is a schematic structural diagram of a preferred embodiment of a terminal device according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 and fig. 2, fig. 1 is a flow chart of a preferred embodiment of a method for switching a primary server and a secondary server of a communication terminal according to the present invention, and fig. 2 is a schematic diagram of a switching process between a communication terminal and a primary server in a preferred embodiment of a method for switching a primary server and a secondary server of a communication terminal according to the present invention. The method for switching the master server and the slave server of the communication terminal comprises the following steps:
s1, acquiring a group of main and standby servers;
s2, sending a request to a main server 11 in the main and standby servers through the communication terminal 10;
s3, if the communication terminal 10 does not receive the response of the main server 11 or the main server 11 is not reachable, switching to a standby server according to the DNS analysis priority to normally send a request;
s4, the communication terminal 10 sends a request to the main server 11 in the main and standby servers again;
s5, when the communication terminal 10 receives the response from the active server 11 or when the active server 11 is available, the communication terminal 10 disconnects the data transmission with the standby server, switches to the active server 11, and communicates with the active server 11.
Preferably, in step S1, a set of active-standby servers is obtained, where the active-standby servers may be an active server 11, a first standby server 12 and a second standby server 13, where the active server 11 has a priority greater than the first standby server 12, and the first standby server 12 has a priority greater than the second standby server 13.
Preferably, in step S2, the sending, by the communication terminal 10, a request to the active server 11 of the active and standby servers specifically includes:
a registration request, a subscription request, or a call request is initiated to the active server 11 of the active servers through the communication terminal 10.
Preferably, in step S3, if the communication terminal 10 does not receive the response of the primary server 11 or the primary server 11 is not reachable, the communication terminal performs signal retransmission according to a preset transaction retransmission mechanism, and if the primary server 11 is not responsive or is not reachable in the transaction retransmission process and the failure condition of the preset transaction retransmission mechanism is satisfied, the communication terminal switches to a standby server according to DNS resolution priority, so as to normally send a request.
After the communication terminal sends the request to the active server in the active and standby servers, the active server can be switched to the standby server according to the specific response code, and the specific response code supports configuration.
Specifically, the preset transaction retransmission mechanism includes: the method comprises the steps of presetting a signaling retransmission interval, signaling retransmission times and signaling total retransmission time; the failure conditions of the preset transaction retransmission mechanism include: and the number of the retransmission times of the signaling or the total retransmission time of the signaling reaches a preset value.
Preferably, after step S3, the method further includes:
if the communication terminal 10 does not receive the response of the standby server or the standby server is not reachable, the communication terminal retries to send a request to the active server 11.
Specifically, if the communication terminal 10 does not receive the response from the standby server or the standby server is not reachable, the communication terminal retries to send a request to the active server 11, specifically including:
when the communication terminal 10 communicates with the first standby server 12 and the first standby server 12 is not responsive or the first standby server 12 is not reachable when the communication terminal registers for renewal with the first standby server 12, the communication terminal 10 retries to send a request to the primary server 11 or directly sends a request to the second standby server 13.
Preferably, in step S5, if the communication terminal 10 receives a response from the active server 11 or the active server 11 is available, the communication terminal 10 disconnects the data transmission with the standby server, and the communication terminal 10 switches to the active server 11 according to a registration timeout time, a TTL time of DNS query, or a switching time preset by the communication terminal, and communicates with the active server 11.
Specifically, the communication terminal 10 switches to the active server 11 according to the registration timeout time, and communicates with the active server 11, specifically:
the communication terminal 10 performs active-standby server switching according to DNS query priority, when the communication terminal 10 registers on a server with low DNS priority, after registration time-out, the communication terminal preferentially detects the server with highest DNS priority, and when the server with highest DNS priority is available, registration is switched to the server.
The communication terminal 10 switches to the active server 11 according to the TTL time of DNS query, and communicates with the active server 11, specifically:
the communication terminal 10 performs active-standby server switching according to the DNS query priority, when the communication terminal 10 registers on a server with a low DNS priority, after the TTL time of the DNS query is overtime, the communication terminal preferentially detects the server with the highest DNS priority, and when the server with the highest DNS priority is available, the registration is switched to the server.
The communication terminal 10 switches to the main server 11 according to a switching time preset by the communication terminal, and communicates with the main server 11, specifically:
the communication terminal 10 performs active-standby server switching according to DNS query priority, when the communication terminal 10 registers on a server with low DNS priority, after a preset switching time of the communication terminal is overtime, the communication terminal preferentially detects a server with highest DNS priority, and when the server with highest priority is available, the registration is switched to the server.
For example, the priority levels queried according to DNS are the primary server 11, the first standby server 12, and the second standby server 13.
When the communication terminal 10 initiates registration, subscription, or call to the active server 11, the active server 11 is not available;
switching to the first standby server 12 or the second standby server 13 according to the DNS resolution priority, the communication terminal 10 registering, subscribing, or talking normally;
since the first standby server 12 or the second standby server 13 is not the server with the highest priority, the communication terminal 10 will preferentially initiate detection to the active server 11 according to the configured time, and when the active server 11 is available, the registration, subscription or call failure is automatically restored to the active server 11;
the communication terminal 10 configures an automatic recovery time for failure according to a registration timeout time, a TTL time for DNS query, or a switching time preset by the communication terminal, and decides a time for switching to the primary server 11.
Referring to fig. 3, fig. 3 is a schematic diagram of a switching process between a communication terminal and a primary server and a secondary server in another preferred embodiment of a switching method of a primary server and a secondary server of a communication terminal according to the present invention.
The main and standby servers comprise a main server 11, a first standby server 12 and a second standby server 13; after the communication terminal 10 communicates with the first standby server 12, when the communication terminal 10 registers for a duration with the first standby server 12, the first standby server 12 does not respond or the first standby server 12 is not reachable, the communication terminal 10 resends a request to the active server 11, and when the active server 11 does not respond or the active server 11 is not reachable, the communication terminal 10 tries to send the request to the second standby server 13.
For example: the communication terminal 10 initiates registration, subscription or call service to the host server 11; since the primary server 11 is unresponsive or unreachable, the communication terminal 10 fails to transfer to the first standby server 12, and the first standby server 12 can normally register, subscribe or talk, and at the time of registration continuation, the first standby server 12 is unreachable at this time. At this time, the failover process may be performed again by configuring the control communication terminal 10 from the server with the highest priority, that is, the failover sequence of the communication terminal 10 this time is that the primary server 11 (no response or unreachable), the first standby server 12 (normal), the registration renewal failure is initiated to the first standby server 12, the primary server 11 (no response or unreachable), the first standby server 12 (no response or unreachable), and the second standby server 13.
Alternatively, when the registration renewal is not available, the first standby server 12 may be directly switched to the second standby server 13 by configuring the control communication terminal 10, that is, the order of failover of the local communication terminal 10 is the primary server 11 (no response or not available) →the first standby server 12 (normal) →the first standby server 12 initiates the registration renewal failure→the second standby server 13.
Referring to fig. 4, fig. 4 is a flowchart of another preferred embodiment of a method for switching between active and standby servers of a communication terminal according to the present invention. The method for switching the master server and the slave server of the communication terminal comprises the following steps:
s401, acquiring a plurality of groups of main and standby servers; the multiple groups of main and standby servers are distinguished according to DNS SRV inquiry groups, and at least comprise a first group of main and standby servers, a second group of main and standby servers and a third group of main and standby servers;
s402, sending a request to a main server in the first group of main and standby servers through a communication terminal;
s403, if the communication terminal receives the specific switching response code of the main server or the main server is not reachable, switching to a standby server in the first group of main and standby servers according to the DNS resolution priority to normally send a request;
s404, the communication terminal sends a request to a main server in the first group of main and standby servers again;
and S405, if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server.
Referring to fig. 5, fig. 5 is a schematic diagram of a switching process between a communication terminal and a plurality of sets of active/standby servers in another preferred embodiment of a switching method of active/standby servers of a communication terminal provided by the present invention.
Specifically, the primary server 11, the first standby server 12, and the second standby server 13 are used as a first group primary/standby server 21 (hereinafter referred to as SRV group 1), the third standby server 14 is located in a second group primary/standby server 22 (hereinafter referred to as SRV group 2), and the fourth standby server 15 and the fifth standby server 16 are located in a third group primary/standby server 23 (hereinafter referred to as SRV group 3). DNS priority is SRV group 1 > SRV group 2 > SRV group 3.
The communication terminal 10 initiates registration, subscription or call service to the active server 11 in the SRV group 1;
the method for switching the active server and the standby server in the SRV group 1 is the same as that described in the above embodiment, and the specific switching method is controlled by configuration;
when none of the primary server 11, the first standby server 12, and the second standby server 13 in the SRV group 1 is reachable or has no response, switching to the third standby server 14 in the SRV group 2;
when the third standby server 14 in SRV group 2 is not available, then a switch is made to either the fourth standby server 15 or the fifth standby server 16 of SRV group 3.
When the failure automatic recovery occurs in this flow, the server with the highest priority in the SRV group is preferentially switched to, that is, when the failure automatic recovery occurs when the server is registered in the second standby server 13 or the third standby server 14, the server is switched to the active server 11, and when the failure automatic recovery occurs when the server is registered in the fifth standby server 16, the failure automatic recovery occurs to the fourth standby server 15. When the terminal is registered in the third standby server 14 in the SRV group 2, if the active server in the SRV group 2 can be used normally, the terminal is switched to the active server according to the preset time. When the terminal registers in the standby server in the SRV group 2, the terminal sends a request, the request is not reachable or a specific switching response code is received, and the terminal switches to the active server in the SRV group 2.
In addition, the DNS query server has priority in the order of the primary server 11, the first standby server 12, and the second standby server 13, after the communication terminal 10 registers in the primary server 11, the terminal subscribes to the primary server 11, and if the primary server 11 does not respond or is not reachable, the registration can be determined by configuration to perform failover first and then perform the failover of subscription.
Correspondingly, the invention also provides a switching device of the main and standby servers of the communication terminal, which can realize all the flows of the switching method of the main and standby servers of the communication terminal in the embodiment.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a switching device of a primary server and a secondary server of a communication terminal according to a preferred embodiment of the present invention. The switching device of the main server and the standby server of the communication terminal comprises:
an obtaining module 601, configured to obtain a set of active and standby servers;
a first sending module 602, configured to send a request to a primary server of the primary and standby servers through a communication terminal;
a first switching module 603, configured to switch to a standby server according to DNS resolution priority to normally send a request if the communication terminal receives the primary server specific switching response code or the primary server is not reachable;
a second sending module 604, configured to send a request to a primary server of the primary and standby servers again by the communication terminal;
and a second switching module 605, configured to, if the communication terminal receives a response from the active server or the active server is available, disconnect data transmission with the standby server, switch to the active server, and communicate with the active server.
In a specific implementation, the working principle, control flow and technical effects of the switching device of the active and standby servers of the communication terminal provided by the embodiment of the present invention are the same as those of the switching method of the active and standby servers of the communication terminal in the above embodiment, and are not described herein.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a preferred embodiment of a terminal device according to the present invention. The terminal device includes a processor 701, a memory 702, and a computer program stored in the memory 702 and configured to be executed by the processor 701, where the processor 701 implements the method for switching a primary server and a secondary server of a communication terminal according to any of the above embodiments when the processor 701 executes the computer program.
Preferably, the computer program may be divided into one or more modules/units (e.g. computer program 1, computer program 2, … …) stored in the memory 702 and executed by the processor 701 to complete the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the terminal device.
The processor 701 may be a central processing unit (Central Processing Unit, CPU), it may be another general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic devices, discrete hardware components, etc., or the processor 701 may be any conventional processor, and the processor 701 is a control center of the terminal device, and various interfaces and lines are used to connect the various parts of the terminal device.
The memory 702 mainly includes a program storage area, which may store an operating system, application programs required for at least one function, and the like, and a data storage area, which may store related data and the like. In addition, the memory 702 may be a high-speed random access memory, a nonvolatile memory such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc., or the memory 702 may be other volatile solid-state memory devices.
It should be noted that the foregoing terminal device may include, but is not limited to, a processor, a memory, and those skilled in the art will understand that the schematic structural diagram of fig. 7 is merely an example of the foregoing terminal device, and does not limit the foregoing terminal device, and may include more or fewer components than illustrated, or may combine some components, or different components.
The embodiment of the invention also provides a computer readable storage medium, which comprises a stored computer program, wherein when the computer program runs, the equipment where the computer readable storage medium is located is controlled to execute the method for switching the master server and the slave server of the communication terminal.
The embodiment of the invention provides a method, a device, equipment and a storage medium for switching a main server and a standby server of a communication terminal, which have the following beneficial effects: obtaining a group of main and standby servers; a communication terminal sends a request to a main server in the main and standby servers; if the communication terminal receives the specific switching response code of the main server or the main server is not reachable, switching to a standby server according to the DNS analysis priority to normally send a request; the communication terminal sends a request to a main server in the main and standby servers again; and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server. The embodiment of the invention can effectively solve the problem of server switching when the server fails, in particular to solve the registration problem caused by error switching due to unstable network conditions and the registration problem caused by network address change, better realize the switching of the main server and the standby server and improve the stability and the reliability of terminal communication.
It should be noted that the system embodiments described above are merely illustrative, and that the units described as separate units may or may not be physically separate, and that units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the system embodiment of the present invention, the connection relationship between the modules represents that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.

Claims (6)

1. The method for switching the master server and the slave server of the communication terminal is characterized by comprising the following steps:
acquiring a group of active and standby servers; the main and standby servers at least comprise a main server, a first standby server and a second standby server;
sending a request to a main server in the main and standby servers through a communication terminal;
the sending, by the communication terminal, a request to a primary server of the primary and standby servers, specifically includes:
initiating any one of a registration request, a subscription request or a call request to a main server in the main and standby servers through a communication terminal;
if the communication terminal receives a specific switching response code of the main server or the main server is not reachable, carrying out signal retransmission according to a preset transaction retransmission mechanism, and if the main server does not respond or is not reachable in the transaction retransmission process and meets the failure condition of the preset transaction retransmission mechanism, switching to a standby server according to DNS analysis priority so as to normally send a request;
if the communication terminal does not receive the response of the standby server or the standby server is not reachable, the communication terminal retries to send a request to the active server, which specifically includes: when the communication terminal is in communication with the first standby server, if the first standby server does not respond or the first standby server is not reachable when the communication terminal is in registration renewal with the first standby server, the communication terminal retries to send a request to the main server or directly sends a request to the second standby server;
the communication terminal sends a request to a main server in the main and standby servers again;
if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server;
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server, and specifically comprises:
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, and the communication terminal switches to the main server according to the registration timeout time, the TTL time of DNS inquiry or the preset switching time of the communication terminal and communicates with the main server.
2. The method for switching between the active server and the standby server of the communication terminal according to claim 1, wherein the preset transaction retransmission mechanism comprises: the method comprises the steps of presetting a signaling retransmission interval, signaling retransmission times and signaling total retransmission time; the failure conditions of the preset transaction retransmission mechanism include: and the number of the retransmission times of the signaling or the total retransmission time of the signaling reaches a preset value.
3. The method for switching the master server and the slave server of the communication terminal is characterized by comprising the following steps:
acquiring a plurality of groups of main and standby servers; the multi-group main and standby servers at least comprise a first group main and standby server, a second group main and standby server and a third group main and standby server; the main and standby servers at least comprise a main server, a first standby server and a second standby server;
sending a request to a main server in the first group of main and standby servers through a communication terminal;
the sending, by the communication terminal, a request to a primary server in the first group of primary and backup servers specifically includes:
initiating any one of a registration request, a subscription request or a call request to a main server in the first group of main and standby servers through a communication terminal;
if the communication terminal receives a specific switching response code of the main server or the main server is not reachable, retransmitting the command according to a preset transaction retransmission mechanism, and if the main server does not respond or is not reachable in the transaction retransmission process and meets the failure condition of the preset transaction retransmission mechanism, switching to a standby server in the first group of main and standby servers according to DNS analysis priority so as to normally send a request;
if the communication terminal does not receive the response of the standby server in the first group of active-standby servers or the standby server in the first group of active-standby servers is not reachable, the communication terminal retries to send a request to the active server in the first group of active-standby servers, which specifically comprises: when the communication terminal is in communication with a first standby server in the first group of main and standby servers, if the communication terminal is in registration renewal with the first standby server in the first group of main and standby servers, the first standby server in the first group of main and standby servers does not respond or the first standby server in the first group of main and standby servers is not reachable, the communication terminal retries to send a request to the main server in the first group of main and standby servers or directly sends a request to the second standby server in the first group of main and standby servers;
the communication terminal sends a request to a main server in the first group of main and standby servers again;
if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server;
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server, and specifically comprises:
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, and the communication terminal switches to the main server according to the registration timeout time, the TTL time of DNS inquiry or the preset switching time of the communication terminal and communicates with the main server.
4. A switching device of a main server and a standby server of a communication terminal, comprising:
the acquisition module is used for acquiring a group of main and standby servers; the main and standby servers at least comprise a main server, a first standby server and a second standby server;
the first sending module is used for sending a request to a main server in the main and standby servers through the communication terminal;
the sending, by the communication terminal, a request to a primary server of the primary and standby servers, specifically includes:
initiating any one of a registration request, a subscription request or a call request to a main server in the main and standby servers through a communication terminal; the first switching module is used for carrying out signal retransmission according to a preset transaction retransmission mechanism if the communication terminal receives a specific switching response code of the main server or the main server is not reachable, and switching to a standby server according to DNS analysis priority when the main server does not respond or is not reachable in the transaction retransmission process and the failure condition of the preset transaction retransmission mechanism is met so as to normally send a request;
the second sending module is configured to, if the communication terminal does not receive the response from the standby server or the standby server is not reachable, retry sending, by the communication terminal, a request to the active server, where the second sending module specifically includes: when the communication terminal is in communication with the first standby server, if the first standby server does not respond or the first standby server is not reachable when the communication terminal is in registration renewal with the first standby server, the communication terminal retries to send a request to the main server or directly sends a request to the second standby server; the communication terminal sends a request to a main server in the main and standby servers again;
the second switching module is used for switching to the main server to communicate with the main server when the communication terminal receives the response of the main server or the main server is available;
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, switches to the main server and communicates with the main server, and specifically comprises:
and if the communication terminal receives the response of the main server or the main server is available, the communication terminal disconnects the data transmission with the standby server, and the communication terminal switches to the main server according to the registration timeout time, the TTL time of DNS inquiry or the preset switching time of the communication terminal and communicates with the main server.
5. A terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method of switching a primary server of a communication terminal according to any one of claims 1 to 3 when the computer program is executed.
6. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program when run controls a device in which the computer readable storage medium is located to execute the method for switching between the primary and secondary servers of a communication terminal according to any one of claims 1 to 3.
CN202011375344.2A 2020-11-30 2020-11-30 Method, device, equipment and storage medium for switching main server and standby server of communication terminal Active CN112532452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011375344.2A CN112532452B (en) 2020-11-30 2020-11-30 Method, device, equipment and storage medium for switching main server and standby server of communication terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011375344.2A CN112532452B (en) 2020-11-30 2020-11-30 Method, device, equipment and storage medium for switching main server and standby server of communication terminal

Publications (2)

Publication Number Publication Date
CN112532452A CN112532452A (en) 2021-03-19
CN112532452B true CN112532452B (en) 2023-10-31

Family

ID=74995230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011375344.2A Active CN112532452B (en) 2020-11-30 2020-11-30 Method, device, equipment and storage medium for switching main server and standby server of communication terminal

Country Status (1)

Country Link
CN (1) CN112532452B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113595765A (en) * 2021-07-02 2021-11-02 厦门亿联网络技术股份有限公司 Method and device for fault transfer of VoIP terminal registration service
CN113746865B (en) * 2021-09-30 2023-06-20 厦门亿联网络技术股份有限公司 Fault transfer method and device for VoIP terminal communication service
CN113992500A (en) * 2021-11-04 2022-01-28 厦门亿联网络技术股份有限公司 Main/standby server switching method and device suitable for VoIP terminal
CN115604234B (en) * 2022-11-15 2023-03-10 深圳市华曦达科技股份有限公司 VoIP server self-adaptive switching method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674313A (en) * 2009-10-15 2010-03-17 杭州华三通信技术有限公司 SIP registration method for server to actively inform user switching, system and device thereof
CN101964806A (en) * 2010-11-02 2011-02-02 深圳市共进电子有限公司 Method for switching servers of SIP (Session Initiation Protocol) communication terminal
CN103236947A (en) * 2013-04-23 2013-08-07 厦门亿联网络技术股份有限公司 Method for switching main server and standby of VOIP (voice over Internet phone)
CN103685166A (en) * 2012-09-06 2014-03-26 中兴通讯股份有限公司 Method and device for switching between main server and standby server for session initiation protocol terminal
CN110474797A (en) * 2019-07-25 2019-11-19 北京旷视科技有限公司 API operation system, the method and device of active-standby switch

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674313A (en) * 2009-10-15 2010-03-17 杭州华三通信技术有限公司 SIP registration method for server to actively inform user switching, system and device thereof
CN101964806A (en) * 2010-11-02 2011-02-02 深圳市共进电子有限公司 Method for switching servers of SIP (Session Initiation Protocol) communication terminal
CN103685166A (en) * 2012-09-06 2014-03-26 中兴通讯股份有限公司 Method and device for switching between main server and standby server for session initiation protocol terminal
CN103236947A (en) * 2013-04-23 2013-08-07 厦门亿联网络技术股份有限公司 Method for switching main server and standby of VOIP (voice over Internet phone)
CN110474797A (en) * 2019-07-25 2019-11-19 北京旷视科技有限公司 API operation system, the method and device of active-standby switch

Also Published As

Publication number Publication date
CN112532452A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN112532452B (en) Method, device, equipment and storage medium for switching main server and standby server of communication terminal
US9130967B2 (en) Method and system for network element service recovery
US20080285438A1 (en) Methods, systems, and computer program products for providing fault-tolerant service interaction and mediation function in a communications network
CN102006189B (en) Primary access server determination method and device for dual-machine redundancy backup
EP2536118B1 (en) Providing resilient digital telephony services for wireless devices
US9001664B2 (en) Methods, systems, and computer readable media for providing sedation service in a telecommunications network
AU2006200427B2 (en) Network, network terminal device, IP address management method using the same, and program therefor
CN113727464B (en) Method and device for establishing high concurrent call of SIP streaming media server
US20120036390A1 (en) Redundancy configuration of main unit
EP2597818A1 (en) Cluster management system and method
CN105760260A (en) Backup system and backup method
CN102143288A (en) Disaster recovery method and disaster recovery device in call center
US20070230333A1 (en) Information processing apparatus
US6625256B1 (en) Failover mechanisms for remote networked phones
JP3964589B2 (en) Information communication system and call control device connection method
CN109348073B (en) Call center system and service processing method thereof
CN110716827A (en) Hot backup method suitable for distributed system and distributed system
JP2001186194A (en) Information communication system, and switching and connecting method for information communication system
CN113746865B (en) Fault transfer method and device for VoIP terminal communication service
CN113805788B (en) Distributed storage system and exception handling method and related device thereof
CN110784943B (en) Processing method and device for VoWiFi voice service disconnection and reconnection
CN110233761B (en) Redundancy switching method and system based on relay server
CN113645359B (en) Call backup and calling method, device, terminal, server and storage medium
CN103166922A (en) Call request processing method, system and device in peer to peer overlay network
AU2014203385B2 (en) Slot interface access unit, method thereof, and program thereof, as well as redundancy configuration of main unit, and replacing method of the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant