最近帮客户调试VOIP,用户需求是总部与香港分部通过专线实现VOIP电话,节省电话费用。
用户环境是电信通过汇线通接入用户,其中有四根线接入2801的语音卡上,香港也一样。总部用户只要拔这四根线上的一个电话号码,就出现语音提示***这是拔打香港的电话,请拔分机号,查号拔"0"***,香港那边只要在打电话前加拔“7”就可以,下面是总部的2801配置,提供参考:
***#sh run
Building configuration...
Building configuration...
Current configuration : 4189 bytes
!
version 12.4
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption
no service dhcp
!
hostname ***!
boot-start-marker
boot system flash flash:c2801-spservicesk9-mz.124-3e.bin
boot-end-marker
!
logging buffered 512000 notifications
enable secret 5 $1$PNEw$F7U12ek57NSo.mguBFc8u1
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization console
aaa authorization exec default local
!
aaa session-id common
!
resource policy
!
clock timezone HK 8
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
ip subnet-zero
no ip source-route
ip cef
!
no ip domain lookup
ip host hk 10.0.1.2
!
voice-card 0
!
username hgcadmin privilege 15 secret 5 $
username mtladmin privilege 15 secret 5 $
username mtlops privilege 15 password 7 1
!
!
class-map match-all silver
match any
class-map match-any voice-traffic
match access-group name voip
!
policy-map wanqos
class voice-traffic
set precedence 5
priority 80
class class-default
set precedence 0
fair-queue
random-detect
!
interface FastEthernet0/0
ip address 192.168.168.12 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.111.254 255.255.255.0
duplex auto
speed auto
!
interface Serial0/1/0
bandwidth 256
no ip address
encapsulation frame-relay IETF
load-interval 30
no fair-queue
frame-relay traffic-shaping
max-reserved-bandwidth 100
!
interface Serial0/1/0.999 point-to-point
ip address 10.0.2.2 255.255.255.252
frame-relay interface-dlci 16
class VOIPovFR
load-interval 30
h323-gateway voip interface
h323-gateway voip bind srcaddr 10.0.2.2
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.168.254
ip route 10.0.1.0 255.255.255.252 10.0.2.1
ip route 192.168.0.0 255.255.255.0 10.0.2.1
!
!
no ip http server
no ip http secure-server
!
ip access-list extended voip
permit udp any any range 16384 32767
permit tcp any eq 1720 any
permit tcp any any eq 1720
!
!
map-class frame-relay VOIPovFR
frame-relay cir 256000
frame-relay bc 2560
frame-relay be 0
frame-relay mincir 256000
service-policy output wanqos
no cdp run
!
!
!
version 12.4
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime localtime
service timestamps log datetime localtime
service password-encryption
no service dhcp
!
hostname ***!
boot-start-marker
boot system flash flash:c2801-spservicesk9-mz.124-3e.bin
boot-end-marker
!
logging buffered 512000 notifications
enable secret 5 $1$PNEw$F7U12ek57NSo.mguBFc8u1
!
aaa new-model
!
!
aaa authentication login default local
aaa authorization console
aaa authorization exec default local
!
aaa session-id common
!
resource policy
!
clock timezone HK 8
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
ip subnet-zero
no ip source-route
ip cef
!
no ip domain lookup
ip host hk 10.0.1.2
!
voice-card 0
!
username hgcadmin privilege 15 secret 5 $
username mtladmin privilege 15 secret 5 $
username mtlops privilege 15 password 7 1
!
!
class-map match-all silver
match any
class-map match-any voice-traffic
match access-group name voip
!
policy-map wanqos
class voice-traffic
set precedence 5
priority 80
class class-default
set precedence 0
fair-queue
random-detect
!
interface FastEthernet0/0
ip address 192.168.168.12 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.111.254 255.255.255.0
duplex auto
speed auto
!
interface Serial0/1/0
bandwidth 256
no ip address
encapsulation frame-relay IETF
load-interval 30
no fair-queue
frame-relay traffic-shaping
max-reserved-bandwidth 100
!
interface Serial0/1/0.999 point-to-point
ip address 10.0.2.2 255.255.255.252
frame-relay interface-dlci 16
class VOIPovFR
load-interval 30
h323-gateway voip interface
h323-gateway voip bind srcaddr 10.0.2.2
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.168.254
ip route 10.0.1.0 255.255.255.252 10.0.2.1
ip route 192.168.0.0 255.255.255.0 10.0.2.1
!
!
no ip http server
no ip http secure-server
!
ip access-list extended voip
permit udp any any range 16384 32767
permit tcp any eq 1720 any
permit tcp any any eq 1720
!
!
map-class frame-relay VOIPovFR
frame-relay cir 256000
frame-relay bc 2560
frame-relay be 0
frame-relay mincir 256000
service-policy output wanqos
no cdp run
!
!
!
control-plane
!
!
!
voice-port 0/0/0
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
control-plane
!
!
!
voice-port 0/0/0
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
voice-port 0/0/1
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
voice-port 0/0/2
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
!
voice-port 0/0/3
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
!
dial-peer voice 10 pots
description connected to HuiZhou's phone# 1767
destination-pattern 7
port 0/0/0
!
dial-peer voice 20 pots
description connected to HuiZhou's phone# 1021
destination-pattern 7
port 0/0/1
!
dial-peer voice 30 pots
description connected to HuiZhou's phone# 1768
destination-pattern 7
port 0/0/2
!
dial-peer voice 40 pots
description connected to HuiZhou's phone# 1781
destination-pattern 7
port 0/0/3
!
dial-peer voice 100 voip
description *** To HK local extension ***
destination-pattern 1
session target ipv4:10.0.1.2
dtmf-relay h245-alphanumeric
codec g729r8 bytes 80
fax-relay ecm disable
fax rate 9600
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
no vad
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
!
voice-port 0/0/3
supervisory disconnect dualtone mid-call
input gain 3
cptone CN
timeouts interdigit 3
timeouts call-disconnect 15
timeouts ringing 15
timeouts wait-release 15
connection plar 1
description HZ FXO
!
dial-peer voice 10 pots
description connected to HuiZhou's phone# 1767
destination-pattern 7
port 0/0/0
!
dial-peer voice 20 pots
description connected to HuiZhou's phone# 1021
destination-pattern 7
port 0/0/1
!
dial-peer voice 30 pots
description connected to HuiZhou's phone# 1768
destination-pattern 7
port 0/0/2
!
dial-peer voice 40 pots
description connected to HuiZhou's phone# 1781
destination-pattern 7
port 0/0/3
!
dial-peer voice 100 voip
description *** To HK local extension ***
destination-pattern 1
session target ipv4:10.0.1.2
dtmf-relay h245-alphanumeric
codec g729r8 bytes 80
fax-relay ecm disable
fax rate 9600
fax protocol t38 ls-redundancy 0 hs-redundancy 0 fallback cisco
no vad
anner login ^C
f you do not have formal authorization to use this system,
ou must not proceed with your logon.
C
f you do not have formal authorization to use this system,
ou must not proceed with your logon.
C
ine con 0
exec-timeout 0 0
logging synchronous
ine aux 0
ine vty 0 4
transport input telnet
exec-timeout 0 0
logging synchronous
ine aux 0
ine vty 0 4
transport input telnet
转载于:https://blog.51cto.com/nicklyj/154313