| VoIP语音电话的设计与实现(2) 2. 路由器间实现IP语音电话 (1) 站点A有一个Cisco3600路由器,站点B有一个Cisco2600路由器,它们通过DCE/DTE V.35电缆背对背地连接起来。在每个路由器中安装了一个含有一个VIC-2FXS的NM-2V,提供两个模拟电话的连接。 (2)创建并实现拨号方案 (3)基本配置:
站点A的基本配置见清单1(站点B的基本配置略)。 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 |









