SIP服务器主/备份冗余和配置简介

介绍

主用和备用SIP服务器

SIP服务器冗余机制确保了SIP服务的可靠性和连续性。主/备用服务器部署是这些冗余方法之一。主用和备用服务器共享用户账户、对话信息(取决于服务器冗余实现方式)、注册信息和其他相关数据。在正常条件下,所有SIP请求和响应都由主服务器处理。当主服务器发生故障、正在维护或无法访问时,SIP终端会自动切换到备用服务器进行服务请求,确保用户连续访问。一旦主服务器恢复,SIP终端可以自动切换回主服务器。

SIP服务器主备
                                                                            图1 SIP服务器主备

术语

故障转移:当主服务器不可用时,备用服务器接管所有服务而不影响用户体验的机制。
故障恢复:设备在备用服务器提供服务时检查主服务器是否已恢复,从而能够快速切换回主服务器的机制。
服务器不可用:当客户端尝试注册时,服务器响应500/503,或UDP收到ICMP目标不可达消息,或TCP连接超时。
注册故障恢复:当主服务器不可用且电话注册到备用服务器时,电话创建一个新的注册对话来检测主服务器是否已恢复。此功能具有独立且可配置的探测间隔。

目标受众

本文档适用于电话用户和维护人员。

主用和备用服务器

功能设置

在电话上为SIP线路配置两个服务器条目。SIP服务器1是主服务器,SIP服务器2是备用服务器。

故障转移

电话目前支持Register、Invite和Bye的信令故障转移。其他信令方式暂不支持。

1. 注册故障转移

触发条件:手动注册 / 注册超时 / OPTIONS超时 / CANCEL请求超时
(1) 电话向主服务器发送Register请求;
(2) 电话尝试向主服务器发送Register请求指定次数(V3产品)或在指定时间内(V2产品);
(3) 如果主服务器不可用,电话向备用服务器发送Register请求;
(4) 备用服务器响应200 OK,电话注册成功。
2. Invite故障转移
触发条件:用户拨打电话
(1) 电话A呼叫电话B;
(2) 电话A向主服务器发送Invite请求;
(3) 电话A尝试向主服务器发送Invite请求指定次数(V3产品)或在指定时间内(V2产品);
(4) 如果主服务器不可用,电话向备用服务器发送Register请求;
(5) 备用服务器响应200 OK,电话成功注册到备用服务器;
(6) 电话向备用服务器发送Invite请求;
(7) 备用服务器响应200 OK,电话A和B之间建立通话。
3. Bye故障转移
触发条件:通过主服务器建立通话后,电话挂断
(1) 电话A通过主服务器与电话B建立通话;
(2) 电话A挂断;
(3) 电话A向主服务器发送Bye请求;
(4) 电话A尝试向主服务器发送Bye请求指定次数(V3产品)或在指定时间内(V2产品);
(5) 如果主服务器不可用,电话向备用服务器发送Register请求;
(6) 备用服务器响应200 OK,电话成功注册到备用服务器;
(7) 电话向备用服务器发送Bye消息;
(8) 备用服务器响应200 OK,与电话B的通话终止。
4. 故障转移失败
当所有服务器都不可用时,电话按照主/备优先级依次尝试每个服务器指定次数(V3产品)或在指定时间内(V2产品)。最后一个服务器作为异常处理。根据RFC 3261,SIP将重试64*T1(32秒)。如果当前SIP信令请求仍然失败,则向用户报告失败。

故障恢复

电话支持独立的注册故障恢复。电话成功注册到备用服务器后,会定期向主服务器发送独立的Register请求,以检测主服务器是否已恢复。
触发条件:注册故障恢复计时器超时。
(1) 电话成功注册到备用服务器;
(2) 当注册故障恢复超时时,电话向主服务器发送独立的Register请求;
(3) 如果主服务器响应200 OK,电话切换回主服务器;
(4) 如果主服务器仍然不可用,Register请求根据RFC 3261重传,直到64*T1(32秒)超时。超时后,计时器重新启动,并继续定期探测主服务器。

SIP服务器主备配置

配置项说明

                               配置项
                               说明
                               值
                               SIPN Register Addr:                               主服务器地址。IP / 域名 默认:空
                               SIPN Register Port:                               主服务器端口。数字 默认:5060
                               SIPN Register TTL:                               主服务器注册间隔。数字 默认:3600秒
                               SIPN Transport:                               主服务器传输协议:UDP、TCP或TLS。0: UDP
1: TCP
3: TLS
默认:0
                               SIPN Backup Addr:                               备用服务器地址。IP / 域名 默认:空
                               SIPN Backup Port:                               备用服务器端口。数字 默认:5060
                               SIPN Backup TTL:                               备用服务器注册间隔。数字 默认:3600秒
                               SIPN Backup Transport:                               备用服务器传输协议:UDP、TCP或TLS。0: UDP
1: TCP
3: TLS
默认:0
                               SIPN Enable Failback:                               控制是否为该线路启用注册故障恢复。0 / 1 默认:1
                               SIPN Failback Interval:                               电话注册到备用服务器/代理后,探测主服务器/代理是否已恢复的间隔。数字 默认:1800秒
                               SIPN Signal Retry Counts:                               当服务器/代理不可用时,除最后一个服务器/代理外(32秒超时)的SIP请求重传次数。数字 默认:3

用户配置界面

用户可以登录电话的Web服务器配置主用和备用服务器。
(1) 点击“线路”选项卡,选择SIP子选项卡(这是默认页面);
(2) 从页面内的“线路”下拉列表中选择要配置的线路;
(3) 配置线路注册信息;
(4) 配置SIP Server1(主服务器)和SIP Server2(备用服务器)信息,如图2所示;
(5) 点击当前页面上的“基本设置”配置主备服务器的故障恢复相关设置,如图3所示;
(6) 点击页面底部的“提交”按钮应用配置。
SIP服务器主备配置
                                                 图2 SIP服务器主备配置
故障恢复设置

目录
客服 电话
We use cookie to improve your online experience. By continuing to browse this website, you agree to our use of cookie.

Cookies

This Cookie Policy explains how we use cookies and similar technologies when you access or use our website and related services. Please read this Policy together with our Terms and Conditions and Privacy Policy so that you understand how we collect, use, and protect information.

By continuing to access or use our Services, you acknowledge that cookies and similar technologies may be used as described in this Policy, subject to applicable law and your available choices.

Updates to This Cookie Policy

We may revise this Cookie Policy from time to time to reflect changes in legal requirements, technology, or our business practices. When we make updates, the revised version will be posted on this page and will become effective from the date of publication unless otherwise required by law.

Where required, we will provide additional notice or request your consent before applying material changes that affect your rights or choices.

What Are Cookies?

Cookies are small text files placed on your device when you visit a website or interact with certain online content. They help websites recognize your browser or device, remember your preferences, support essential functionality, and improve the overall user experience.

In this Cookie Policy, the term “cookies” also includes similar technologies such as pixels, tags, web beacons, and other tracking tools that perform comparable functions.

Why We Use Cookies

We use cookies to help our website function properly, remember user preferences, enhance website performance, understand how visitors interact with our pages, and support security, analytics, and marketing activities where permitted by law.

We use cookies to keep our website functional, secure, efficient, and more relevant to your browsing experience.

Categories of Cookies We Use

Strictly Necessary Cookies

These cookies are essential for the operation of the website and cannot be disabled in our systems where they are required to provide the service you request. They are typically set in response to actions such as setting privacy preferences, signing in, or submitting forms.

Without these cookies, certain parts of the website may not function correctly.

Functional Cookies

Functional cookies enable enhanced features and personalization, such as remembering your preferences, language settings, or previously selected options. These cookies may be set by us or by third-party providers whose services are integrated into our website.

If you disable these cookies, some services or features may not work as intended.

Performance and Analytics Cookies

These cookies help us understand how visitors use our website by collecting information such as traffic sources, page visits, navigation behavior, and general interaction patterns. In many cases, this information is aggregated and does not directly identify individual users.

We use this information to improve website performance, usability, and content relevance.

Targeting and Advertising Cookies

These cookies may be placed by our advertising or marketing partners to help deliver more relevant ads and measure the effectiveness of campaigns. They may use information about your browsing activity across different websites and services to build a profile of your interests.

These cookies generally do not store directly identifying personal information, but they may identify your browser or device.

First-Party and Third-Party Cookies

Some cookies are set directly by our website and are referred to as first-party cookies. Other cookies are set by third-party services, such as analytics providers, embedded content providers, or advertising partners, and are referred to as third-party cookies.

Third-party providers may use their own cookies in accordance with their own privacy and cookie policies.

Information Collected Through Cookies

Depending on the type of cookie used, the information collected may include browser type, device type, IP address, referring website, pages viewed, time spent on pages, clickstream behavior, and general usage patterns.

This information helps us maintain the website, improve performance, enhance security, and provide a better user experience.

Your Cookie Choices

You can control or disable cookies through your browser settings and, where available, through our cookie consent or preference management tools. Depending on your location, you may also have the right to accept or reject certain categories of cookies, especially those used for analytics, personalization, or advertising purposes.

Please note that blocking or deleting certain cookies may affect the availability, functionality, or performance of some parts of the website.

Restricting cookies may limit certain features and reduce the quality of your experience on the website.

Cookies in Mobile Applications

Where our mobile applications use cookie-like technologies, they are generally limited to those required for core functionality, security, and service delivery. Disabling these essential technologies may affect the normal operation of the application.

We do not use essential mobile application cookies to store unnecessary personal information.

How to Manage Cookies

Most web browsers allow you to manage cookies through browser settings. You can usually choose to block, delete, or receive alerts before cookies are stored. Because browser controls vary, please refer to your browser provider’s support documentation for details on how to manage cookie settings.

Contact Us

If you have any questions about this Cookie Policy or our use of cookies and similar technologies, please contact us at support@becke.cc .