• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C MSR系列路由器典型配置举例(V5)-6W100

目录

46-MSR系列路由器SIP Server本地存活典型配置案例

本章节下载 46-MSR系列路由器SIP Server本地存活典型配置案例  (210.38 KB)

docurl=/cn/Service/Document_Software/Document_Center/Routers/Catalog/MSR/MSR_50/Configure/Typical_Configuration_Example/H3C_MSR_(V5)-6W100/201401/812757_30005_0.htm

46-MSR系列路由器SIP Server本地存活典型配置案例

MSR系列路由器SIP Server本地存活典型配置案例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

H3C_彩色.emf

 



1  介绍

本文主要介绍SIP Server本地存活典型配置。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解SIP特性。

3  独立模式典型配置举例

3.1  组网需求

局域网内不提供专用的SIP Server,使用Router C作为SIP Server运行在局域网内,提供基本号码路由和呼叫管理功能,同时这台设备作为SIP Client,为用户提供呼叫落地功能。

图1 SIP Server独立模式典型组网图

 

3.2  配置思路

·     为实现呼叫路由和呼叫管理功能,配置Router C为SIP Server;

·     为使语音网关可以号码注册及路由,配置语音网关为SIP Client;

·     为使电话与语音网关和目标地址之间建立联系,配置语音实体。

3.3  使用版本

本举例是在Release 2207P14版本上进行配置和验证的。

3.4  配置注意事项

·     配置为独立模式时,保活检测命令probe remote-server ipv4失效。

·     一台设备既作为Client又作为Server的时候,需要通过不同的端口号或不同的IP地址区分。同时需在SIP Client下配置源地址绑定命令,注意不要使用127.0.0.1的本地IP地址。如果是IP地址进行区分的方式,SIP Client绑定的地址和SIP Server绑定的地址要区分开。

3.5  配置步骤

3.5.1  RouterC的配置

# 配置SIP Server服务器。

<RouterC> system-view

[RouterC] voice-setup

[RouterC-voice] sip-server

[RouterC-voice-server] server-bind ipv4 100.0.0.3 port 5061 expires 300

[RouterC-voice-server] server enable

# 配置可信节点100.0.0.2,从PBX过来的号码不进行号码的注册判断。

[RouterC-voice-server] trusted-point ipv4 100.0.0.2

# 配置号码路由,拨打2开头的4位号码路由到100.0.0.2设备。

[RouterC-voice-server] call-route

[RouterC-voice-server-route] trunk 0 called-number 2... ipv4 100.0.0.2

[RouterC-voice-server-route] quit

# 配置注册号码。

[RouterC-voice-server] register-user 1000

[RouterC-voice-server-user1000] number 1000

[RouterC-voice-server-user1000] quit

[RouterC-voice-server] register-user 3000

[RouterC-voice-server-user3000] number 3000

[RouterC-voice-server-user3000] quit

[RouterC-voice-server] register-user 4000

[RouterC-voice-server-user4000] number 4000

[RouterC-voice-server-user4000] quit

[RouterC-voice-server] quit

# 配置SIP Client相关信息。

[RouterC-voice] sip

[RouterC-voice-sip] source-bind signal ipv4 100.0.0.3

[RouterC-voice-sip] source-bind media ipv4 100.0.0.3

[RouterC-voice-sip] registrar ipv4 100.0.0.3 port 5061

[RouterC-voice-sip] proxy ipv4 100.0.0.3 port 5061

[RouterC-voice-sip] register-enable on

[RouterC-voice-sip] quit

# 配置POTS和VOIP实体。

[RouterC-voice] dial-program

[RouterC-voice-dial] entity 1 pots

[RouterC-voice-dial-entity1] line 7/0

[RouterC-voice-dial-entity1] match-template 3000

[RouterC-voice-dial-entity1] quit

[RouterC-voice-dial] entity 100 voip

[RouterC-voice-dial-entity100] address sip proxy

[RouterC-voice-dial-entity100] match-template .T

3.5.2  RouterA的配置

# 配置SIP Client相关信息。

<RouterA> system-view

[RouterA] voice-setup

[RouterA-voice] sip

[RouterA-voice-sip] source-bind signal ipv4 100.0.0.1

[RouterA-voice-sip] source-bind media ipv4 100.0.0.1

[RouterA-voice-sip] registrar ipv4 100.0.0.3 port 5061

[RouterA-voice-sip] proxy ipv4 100.0.0.3 port 5061

[RouterA-voice-sip] register-enable on

[RouterA-voice-sip] quit

# 配置POTS和VOIP实体。

[RouterA-voice] dial-program

[RouterA-voice-dial] entity 1 pots

[RouterA-voice-dial-entity1] line 7/0

[RouterA-voice-dial-entity1] match-template 1000

[RouterA-voice-dial-entity1] quit

[RouterA-voice-dial] entity 100 voip

[RouterA-voice-dial-entity100] address sip proxy

[RouterA-voice-dial-entity100] match-template .T

3.5.3  RouterB的配置

# 配置SIP Client相关信息

<RouterB> system-view

[RouterB] voice-setup

[RouterB-voice] sip

[RouterB-voice-sip] source-bind signal ipv4 100.0.0.2

[RouterB-voice-sip] source-bind media ipv4 100.0.0.2

[RouterB-voice-sip] registrar ipv4 100.0.0.3 port 5061

[RouterB-voice-sip] proxy ipv4 100.0.0.3 port 5061

[RouterB-voice-sip] quit

# 配置POTSVOIP实体

[RouterB-voice] dial-program

[RouterB-voice-dial] entity 1 pots

[RouterB-voice-dial-entity1] line 7/0

[RouterB-voice-dial-entity1] match-template 2...

[RouterB-voice-dial-entity1] send-number all

[RouterB-voice-dial-entity1] quit

[RouterB-voice-dial] entity 100 voip

[RouterB-voice-dial-entity100] address sip proxy

[RouterB-voice-dial-entity100] match-template .T

3.5.4  配置IP电话

配置IP电话号码为4000,注册服务器地址为100.0.0.3,端口号为5061。

3.6  验证配置

(1)     从RouterC上查看注册状态,号码已经成功注册。

[RouterC] display voice sip-server register-user all

user       number                           status    address                  

----------------------------------------------------------------------------

1000       1000                             online    100.0.0.1:5060

3000       3000                             online    100.0.0.3:5060

4000       4000                             online    100.0.0.4:5060

 

(2)     在RouterC上打开debugging voice sip message和debugging voice ssm stack packet ,1000摘机拨打2000,可以看到SIP报文通过RouterC进行路由。

(3)     1000摘机拨打3000,呼叫可以正常建立,不会存在单通等问题,语音质量良好,长时间通话不断线。

(4)     3000摘机拨打1000,呼叫可以正常建立,不会存在单通等问题,语音质量良好,长时间通话不断线。

(5)     3000摘机拨打2000,呼叫可以正常建立,不会存在单通等问题,语音质量良好,长时间通话不断线。

(6)     2000摘机拨打3000,呼叫可以正常建立,不会存在单通等问题,语音质量良好,长时间通话不断线。

3.7  配置文件

·     Router A

#

 sysname RouterA

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 100.0.0.1 255.255.255.0

#

voice-setup

#

 sip

  source-bind signal ipv4 100.0.0.1

  source-bind media ipv4 100.0.0.1

  registrar ipv4 100.0.0.3 port 5061

proxy ipv4 100.0.0.3 port 5061

register-enable on

#

dial-program

#

  entity 1 pots

   line 7/0

   match-template 1000

  #            

  entity 100 voip

   address sip proxy

   match-template .T

#

·     Router B

#

 sysname RouterB

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 100.0.0.2 255.255.255.0

#

voice-setup

 #

 sip

  source-bind signal ipv4 100.0.0.2

  source-bind media ipv4 100.0.0.2

  registrar ipv4 100.0.0.3 port 5061

  proxy ipv4 100.0.0.3 port 5061

#

dial-program

  #

  entity 1 pots

   line 7/0

   send-number all

   match-template 2...

  #            

  entity 100 voip

   address sip proxy

   match-template .T

#

·     Router C

#

 sysname RouterC

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 100.0.0.3 255.255.255.0

#

voice-setup

 #

 sip

  source-bind signal ipv4 100.0.0.3

  source-bind media ipv4 100.0.0.3

  registrar ipv4 100.0.0.3 port 5061

proxy ipv4 100.0.0.3 port 5061

register-enable on

 #

 sip-server

  server-bind ipv4 100.0.0.3 port 5061 expires 300

  server enable

  #

  call-rule-set

  #            

  trusted-point ipv4 100.0.0.2

  #

 call-route

   trunk 0 called-number 2... ipv4 100.0.0.2

  #

  register-user 1000

   number 1000

  #

  register-user 3000

   number 3000

  #

  register-user 4000

   number 4000

  # 

 dial-program

  #

  entity 1 pots

   line 7/0

   match-template 3000

  #            

  entity 100 voip

   address sip proxy

   match-template .T

#

4  本地存活模式典型配置

4.1  组网需求

设备正常情况下都注册到广域网中提供的SIP Server上,由SIP Server进行号码路由和呼叫管理等功能,当与广域网链路断掉,或远端SIP Server出现故障时由Router C作为SIP Server,提供号码路由和呼叫管理功能,同时这台设备作为SIP Client,为用户提供呼叫落地功能。当广域网链路恢复,或远端SIP Server恢复后,重新由远端Server进行呼叫管理等功能。

图2 本地存活模式典型配置图

 

4.2  配置思路

·     为实现本地备份,配置SIP Server服务器为本地存活模式;

·     为使语音数据传输正常,配置号码路由和注册号码;

·     为使电话与语音网关和目标地址之间建立联系,配置语音实体。

4.3  使用版本

本举例是在Release 2207P14版本上进行配置和验证的。

4.4  配置注意事项

一台设备既作为Client又作为Server的时候,需要通过不同的端口号或不同的IP地址区分。同时需在SIP Client下配置源地址绑定命令,注意不要使用127.0.0.1的本地IP地址。如果是IP地址进行区分的方式,SIP Client绑定的地址和SIP Server绑定的地址要区分开。

4.5  配置步骤

4.5.1  RouterC的配置

# 配置SIP Server服务器为本地存活模式,定期探测远端服务器状态。

<RouterC> system-view

[RouterC] voice-setup

[RouterC-voice] sip-server

[RouterC-voice-server] mode alive-server

[RouterC-voice-server] probe remote-server ipv4 98.0.0.100

[RouterC-voice-server] server-bind ipv4 100.0.0.3 expires 300

[RouterC-voice-server] server enable

# 配置可信节点100.0.0.2,从PBX过来的号码不进行号码的鉴权。

[RouterC-voice-server] trusted-point ipv4 100.0.0.2

# 配置号码路由,拨打2开头的4位号码路由到100.0.0.2设备。

[RouterC-voice-server] call-route

[RouterC-voice-server-route] trunk 0 called-number 2... ipv4 100.0.0.2

[RouterC-voice-server-route] quit

# 配置注册号码。

[RouterC-voice-server] register-user 1000

[RouterC-voice-server-user1000] number 1000

[RouterC-voice-server-user1000] quit

[RouterC-voice-server] register-user 3000

[RouterC-voice-server-user3000] number 3000

[RouterC-voice-server-user3000] quit

[RouterC-voice-server] register-user 4000

[RouterC-voice-server-user4000] number 4000

[RouterC-voice-server-user4000] quit

[RouterC-voice-server] quit

# 配置SIP Client相关信息。

[RouterC-voice] sip

[RouterC-voice-sip] source-bind signal ipv4 98.0.0.224

[RouterC-voice-sip] source-bind media ipv4 98.0.0.224

[RouterC-voice-sip] registrar ipv4 98.0.0.100

[RouterC-voice-sip] registrar ipv4 100.0.0.3 slave

[RouterC-voice-sip] register-enable on

[RouterC-voice-sip] quit

# 配置POTS和VOIP实体。

[RouterC-voice] dial-program

[RouterC-voice-dial] entity 1 pots

[RouterC-voice-dial-entity1] line 7/0

[RouterC-voice-dial-entity1] match-template 3000

[RouterC-voice-dial-entity1] quit

[RouterC-voice-dial] entity 100 voip

[RouterC-voice-dial-entity100] address sip proxy

[RouterC-voice-dial-entity100] match-template .T

4.5.2  RouterA的配置

# 配置SIP Client相关信息。

<RouterA> system-view

[RouterA] voice-setup

[RouterA-voice] sip

[RouterA-voice-sip] source-bind signal ipv4 100.0.0.1

[RouterA-voice-sip] source-bind media ipv4 100.0.0.1

[RouterA-voice-sip] registrar ipv4 98.0.0.100

[RouterA-voice-sip] registrar ipv4 100.0.0.3 slave

[RouterA-voice-sip] register-enable on

[RouterA-voice-sip] quit

# 配置POTS和VOIP实体。

[RouterA-voice] dial-program

[RouterA-voice-dial] entity 1 pots

[RouterA-voice-dial-entity1] line 7/0

[RouterA-voice-dial-entity1] match-template 1000

[RouterA-voice-dial-entity1] quit

[RouterA-voice-dial] entity 100 voip

[RouterA-voice-dial-entity100] address sip proxy

[RouterA-voice-dial-entity100] match-template .T

[RouterA-voice-dial-entity100] quit

[RouterA-voice-dial] quit

[RouterA-voice] quit

# 配置路由。

[RouterA] ip route-static 0.0.0.0 0.0.0.0 100.0.0.3

4.5.3  RouterB的配置

# 配置SIP Client相关信息。

<RouterB> system-view

[RouterB] voice-setup

[RouterB-voice] sip

[RouterB-voice-sip] source-bind signal ipv4 100.0.0.2

[RouterB-voice-sip] source-bind media ipv4 100.0.0.2

[RouterB-voice-sip] registrar ipv4 98.0.0.100

[RouterB-voice-sip] registrar ipv4 100.0.0.3 slave

[RouterB-voice-sip] quit

# 配置POTSVOIP实体。

[RouterB-voice] dial-program

[RouterB-voice-dial] entity 1 pots

[RouterB-voice-dial-entity1] line 7/0

[RouterB-voice-dial-entity1] match-template 2...

[RouterB-voice-dial-entity1] send-number all

[RouterB-voice-dial-entity1]quit

[RouterB-voice-dial] entity 100 voip

[RouterB-voice-dial-entity100] address sip proxy

[RouterB-voice-dial-entity100] match-template .T

# 配置路由。

[RouterB] ip route-static 0.0.0.0 0.0.0.0 100.0.0.3

4.5.4  配置IP电话

(1)     正确配置IP电话的IP地址以及路由,使其能够和网络其他设备互通。

(2)     配置IP电话号码为4000,主注册服务器地址为98.0.0.100,从注册服务器地址为100.0.0.3。

4.6  验证配置

(1)     当广域网网络状况良好,测试1000、2000、2001、3000、4000互相能够建立通话,语音质量良好。

(2)     当广域网网络断掉,几分钟后,从RouterC上查看注册状态,号码已经成功注册在SIP本地存活服务器上:

[RouterC] display voice sip-server register-user all

user       number                           status    address                  

----------------------------------------------------------------------------

1000       1000                             online    100.0.0.1:5060

3000       3000                             online    100.0.0.3:5060

4000       4000                             online    100.0.0.4:5060

 

(3)     测试1000,2000,2001,3000,4000互相能够建立通话,语音质量良好。

(4)     当广域网网络恢复后,几分钟后,所有设备重新注册到98.0.0.100服务器上,呼叫都能够正常建立。再次使用命令display voice sip-server register-user all查看,没有设备在本地SIP Server上注册。

4.7  配置文件

·     Router A

#

sysname RouterA

#

ip route-static 0.0.0.0 0.0.0.0 100.0.0.3

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 100.0.0.1 255.255.255.0

#

voice-setup

 #

 sip

source-bind signal ipv4 100.0.0.1

source-bind media ipv4 100.0.0.1

regustrar ipv4 98.0.0.100 

registrar ipv4 100.0.0.3 slave

register-enable on

 #

dial-program

  #

  entity 1 pots

   line 7/0

   match-template 1000

  #            

  entity 100 voip

   address sip proxy

   match-template .T

#

·     Router B

#

sysname RouterB

#

ip route-static 0.0.0.0 0.0.0.0 100.0.0.3

#

interface GigabitEthernet0/0

 port link-mode route

 ip address 100.0.0.2 255.255.255.0

#

voice-setup

 #

 sip

source-bind signal ipv4 100.0.0.2

source-bind media ipv4 100.0.0.2

registrar ipv4 98.0.0.100

registrar ipv4 100.0.0.3 slave

#

dial-program

  #

  entity 1 pots

   line 7/0

   send-number all

   match-template 2...

  #            

  entity 100 voip

   address sip proxy

   match-template .T

#

·     Router C

#

sysname RouterC

#

interface GigabitEthernet0/0

port link-mode route

ip address 100.0.0.3 255.255.255.0

#

interface GigabitEthernet0/1

port link-mode route

ip address 98.0.0.224 255.255.255.0

#

voice-setup

#

sip

 source-bind signal ipv4 98.0.0.224

  source-bind media ipv4 98.0.0.224

registrar ipv4 98.0.0.100 

registrar ipv4 100.0.0.3 slave

register-enable on

#

 sip-server

 mode alive-server

 probe remote-server ipv4 98.0.0.100

 server-bind ipv4 100.0.0.3 expires 300

 server enable

#

  call-rule-set

#

 trusted-point ipv4 100.0.0.2

#

 call-route

 trunk 0 called-number 2... ipv4 100.0.0.2

#

 register-user 1000

 number 1000

#

  register-user 3000

   number 3000

#

  register-user 4000

   number 4000

#            

dial-program

#

  entity 1 pots

   line 7/0

   match-template 3000

  #            

  entity 100 voip

   address sip proxy

   match-template .T

#

5  相关资料

·     H3C MSR 系列路由器 命令参考(V5)-R2311

·     H3C MSR 系列路由器 配置指导(V5)-R2311

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们