通信人家园

标题: VoIP语音电话的设计与实现[分享]  [查看完整版帖子] [打印本页]

时间:  2006-3-25 08:35
作者: xuhuhu1     标题: VoIP语音电话的设计与实现[分享]

 Voice over IP是在IP网络上传输语音流量(例如,电话和传真)的技术,主要是一种软件特性,但是,要在Cisco2600/3600系列路由器上实现这个功能,必须首先安装语音模块VNM(Voice Network Module),VNM可以装两个或四个语音接口卡(VIC),每个接口卡都对应于与语音接口相关的特定信号类型。
  
   1. 单机实现IP语音电话
  
   (1)在装有两个语音模块的3600路由器上实现IP语音电话(如下图所示)。
  


  
   (2)基本配置
  
   dial-peer voice 1 pots
  
   destination-pattern 111
  
   port 3/0/0
  
   !
  
   dial-peer voice 2 voip
  
   destination-pattern 222
  
   session target ipv4:192.16.12.1
  
   !
  
   dial-peer voice 4 pots
  
   destination-pattern 222
  
   port 3/1/0
  
   !
  
   dial-peer voice 3 voip
  
   destination-pattern 111
  
   session target ipv4:192.16.12.2
  
   !
  
   !
  
   (3)配置概述
  
   本实验是在Cisco3600 Router内部实现的,没有经过链路传输,所以不需要优化拨号点和网络接口的配置,只需配置拨号点:
  
   ● 要配置源和目标之间的所有连接,在voice port 3/0/0上输入下面命令:
  
   dial-peer voice 1 pots
  
   destination-pattern 111
  
   port 3/0/0
  
   !
  
   dial-peer voice 2 voip
  
   destination-pattern 222
  
   session target ipv4:192.16.12.1
  
   ● 要完成在拨号点1和拨号点4之间的端对端呼叫,在voice port3/1/0上输入下面命令:
  
   dial-peer voice 4 pots
  
   destination-pattern 222
  
   port 3/1/0
  
   !
  
   dial-peer voice 3 voip
  
   destination-pattern 111
  
   session target ipv4:192.16.12.2
  
  
  
  
  
  
   2. 路由器间实现IP语音电话
  
   (1) 站点A有一个Cisco3600路由器,站点B有一个Cisco2600路由器,它们通过DCE/DTE V.35电缆背对背地连接起来。在每个路由器中安装了一个含有一个VIC-2FXS的NM-2V,提供两个模拟电话的连接。
  
   (2)创建并实现拨号方案
  
   (3)基本配置:
  
   站点A的基本配置见清单1(站点B的基本配置略)。
  


  
   清单1 站点A RouterA的配置
  


  
   Current configuration:
  
   !
  
   version 12.0
  
   service timestamps debug uptime //设定Debug跟踪日志显示其时间
  
   service timestamps log uptime //设定看Log时显示其时间
  
   no service password-encryption //口令不加密
  
   !
  
   hostname router_A
  
   !
  
   enable password cisco
  
   !
  
   username router_A password 0 cisco
  
   !
  
   !
  
   !
  
   !
  
   ip subnet-zero
  
   no ip domain-lookup
  
   !
  
   !
  
   !
  
   !
  
   voice-port 3/0/0
  
   echo-cancel coverage 16 //启动回声消除功能
  
   !
  
   voice-port 3/0/1
  
   !
  
   !
  
   dial-peer voice 1 pots //定义拨号对等体到语音物理端口
  
   destination-pattern 2222 //定义电话号码
  
   port 3/0/0 //定义电话号码
  
   !
  
   dial-peer voice 2 voip //定义拨号对等体到语音
  
   destination-pattern 1111 //为拨号对等体分配电话号码
  
   req-qos controlled-load //在分配带宽时,RSVP确保即使带宽发生拥塞与过载时,数据流也能得到优先处理。
  
   codec g711ulaw //拨号点的语音编码速率—64000bps
  
   ip precedence 5 //IP优先级,5为关键
  
   no vad //禁用语音活动检测
  
   session target ipv4:192.168.100.1 //定义Voip路由,为对端的IP地址
  
   !
  
   !
  
   interface Ethernet0/0
  
   no ip address
  
   no ip directed-broadcast
  
   shutdown
  
   !
  
   interface Serial0/0
  
   ip address 192.168.100.2 255.255.255.0 // S0/0的IP地址
  
   no ip directed-broadcast
  
   no ip mroute-cache
  
   no fair-queue
  
   clockrate 2000000
  
   ip rtp header-compression //配置RTP头压缩器
  
   ip rtp compression-connections 25
  
   ip rsvp bandwidth 1000 320
  
   !
  
   interface Ethernet0/1
  
   no ip address
  
   no ip directed-broadcast
  
   shutdown
  
   !
  
   ip classless
  
   ip route 192.168.100.0 255.255.255.0 192.168.100.1
  
   no ip http server
  
   !
  
   line con 0
  
   transport input none
  
   line aux 0
  
   line vty 0 4
  
   login
  
   !
  
   end
  
   (4)配置概述
  
   根据公共的功能,站点A的配置分为4个不同的部分。第1部分在清单2中描述,它为日志和调试命令启用时间标记,为路由器指定一个主机名称。
  
   清单2 站点A的配置的第1部分
  
   version 12.0
  
   service timestamps debug uptime //设定Debug跟踪日志显示其时间
  
   service timestamps log uptime //设定看Log时显示其时间
  
   no service password-encryption //口令不加密
  
   !
  
   hostname router_A
  
   !
  
   enable password cisco
  
   !
  
   username router_A password 0 cisco
  
   !
  
     第2部分在清单4中描述,它提供语音连接的实质内容,语音端口简单地标识它们连接到的设备。拨号对等体1把电话号码分配给物理语音端口,拨号对等体2定义VoIP呼叫到站点B。在语音端口3/0/0上启动回声消除功能。IP优先级设置为5,设置资源预留协议RSVP为controlled-load,确保即使带宽发生拥塞与过载时,数据流也能得到优先处理。而且因为多余的带宽,语音活动检测被禁止了,并为拨号点配置了语音编码速率—64000bps。
  
   清单4 站点A的配置的第2部分
  
   voice-port 3/0/0
  
   echo-cancel coverage 16
  
   !
  
   voice-port 3/0/1
  
   !
  
   !
  
   dial-peer voice 1 pots
  
   destination-pattern 2222
  
   port 3/0/0
  
   !
  
   dial-peer voice 2 voip
  
   destination-pattern 1111
  
   req-qos controlled-load
  
   codec g711ulaw
  
   ip precedence 5
  
   no vad
  
   session target ipv4:192.168.100.1
  
   !
  
     第3部分在清单5中描述,它配置路由器上的网络端口。串口0/0连接到DCE V.35电缆,为串行接口增加clockrate接口配置命令。为语音配置RSVP保证在网络中获取特定的QoS。配置RTP头压缩连接的数量为25。
  
   清单5 站点A的配置的第5部分
  
   interface Ethernet0/0
  
   no ip address
  
   no ip directed-broadcast
  
   shutdown
  
   !
  
   interface Serial0/0
  
   ip address 192.168.100.2 255.255.255.0
  
   no ip directed-broadcast
  
   no ip mroute-cache
  
   no fair-queue
  
   clockrate 2000000
  
   ip rtp header-compression
  
   ip rtp compression-connections 25
  
   ip rsvp bandwidth 1000 320
  
   !
  
     第4部分如清单6所示,完成整个配置,它分配一条静态路由到站点B的网络(192.168.100.0),在这个简单环境中,不要求IP路由协议。
  
   清单6 站点A的配置的第4部分
  
   ip classless
  
   ip route 192.168.100.0 255.255.255.0 192.168.100.1
  
   no ip http server

时间:  2006-3-25 17:32
作者: 酷派858

提示: 作者被禁止或删除 内容自动屏蔽




通信人家园 (https://www.txrjy.com/) Powered by C114