Dưới đây là đoạn cấu hình dùng router để mô phỏng một tổng đài PSTN.
!
!
no ip domain lookup
ip domain name PSTN
no ipv6 cef
multilink bundle-name authenticated
!
isdn switch-type primary-ni
!
voice-card 0
voice-service dsp-reservation 80
dspfarm
dsp services dspfarm
!
voice service voip
mode border-element
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
sip
bind control source-interface GigabitEthernet0/0
bind media source-interface GigabitEthernet0/0
registrar server
!
voice class sip-profiles 20
!
voice register global
mode cme
source-address 157.26.1.253 port 5060
max-dn 10
max-pool 10
time-format 24
date-format D/M/Y
tftp-path flash:
create profile sync 000112205067174A
ntp-server 157.26.1.253 mode directedbroadcast
conference hardware
camera
video
!
voice register dn 1
number 85151111
name PSTN-Video
label PSTN-Phone
!
voice register pool 1
id mac 203A.07FC.F19B
type 9951
number 1 dn 1
dtmf-relay rtp-nte
description 85151111
camera
video
!
voice translation-rule 1
rule 1 /\(^011\)\(.*\)/ /\2/
rule 2 /\(^1\)\(.*\)/ /\2/
rule 3 /\(^0\)\([^0].*\)/ /\2/
rule 4 /\(^001\)\(.*\)/ /\2/
!
voice translation-rule 2
rule 1 /^85227685555/ /0085227685555/ type any international
rule 2 /^442030276666/ /00442030276666/ type unknown international
!
voice translation-rule 3
rule 1 /^972525\.*/ /525\1/ type any subscriber plan any isdn
!
voice translation-rule 4
rule 1 // // type any national plan any isdn
!
voice translation-rule 5
rule 1 /^852/ /+&/ type any international plan any isdn
!
voice translation-rule 6
rule 1 /^00\.*/ // type any international plan any isdn
!
voice translation-rule 14
rule 1 /1972\.*/ /972\1/ type any national plan any isdn
!
voice translation-rule 15
rule 1 // // type any international plan any isdn
!
voice translation-rule 16
rule 1 /1408\.*/ /408\1/ type any national plan any isdn
!
voice translation-rule 20
rule 1 /8522\.*/ /2\1/ type any subscriber plan any isdn
!
voice translation-rule 30
rule 1 // // type any subscriber plan any isdn
!
voice translation-rule 33
rule 1 /.*\(303\)/ /\1/ type any subscriber plan any isdn
!
voice translation-rule 40
rule 1 /8\(.......\)/ /\1/
!
voice translation-rule 50
rule 1 /.*\(515\)/ /\1/ type any subscriber plan any isdn
!
voice translation-rule 60
rule 1 /82022002/ /2002/
!
voice translation-rule 70
rule 1 /972\.*/ /972\1/ type any national plan any isdn
!
voice translation-profile 50
translate calling 50
!
voice translation-profile 8202
translate called 40
!
voice translation-profile HQ_int
translate calling 5
translate called 6
!
voice translation-profile PSTN
translate called 1
!
voice translation-profile SB_SUB
translate calling 3
!
voice translation-profile SC-TEHO
translate calling 2
!
voice translation-profile int
translate calling 15
translate called 6
!
voice translation-profile nat-to-hq
translate calling 4
translate called 16
!
voice translation-profile national
translate calling 4
translate called 14
!
voice translation-profile national-test
translate calling 4
translate called 70
!
voice translation-profile sip
translate calling 60
translate called 60
!
voice translation-profile sitec-sub
translate calling 20
translate called 30
!
voice translation-profile sub
translate calling 33
!
controller T1 0/0/0
cablelength long 0db
pri-group timeslots 1-3,24
!
controller T1 0/0/1
cablelength long 0db
pri-group timeslots 1-3,24
!
controller E1 0/1/0
pri-group timeslots 1-3,16
!
interface Loopback159
ip address 159.26.1.250 255.255.255.0
!
interface GigabitEthernet0/0
ip address 157.26.1.11 255.255.255.0 secondary
ip address 157.26.1.250 255.255.255.0 secondary
ip address 157.26.1.253 255.255.255.0
duplex auto
speed auto
no keepalive
!
interface GigabitEthernet0/2
ip address 157.26.2.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0:23
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn protocol-emulate network
isdn incoming-voice voice
isdn outgoing display-ie
isdn outgoing ie redirecting-number
no cdp enable
!
interface Serial0/0/1:23
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn protocol-emulate network
isdn incoming-voice voice
isdn outgoing display-ie
isdn outgoing ie redirecting-number
no cdp enable
!
interface Serial0/1/0:15
description Connected to SC
no ip address
encapsulation hdlc
isdn switch-type primary-5ess
isdn protocol-emulate network
isdn incoming-voice voice
no cdp enable
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 157.26.1.1
ip route 142.0.0.0 255.0.0.0 157.26.2.2
!
control-plane
!
voice-port 0/0/0:23
!
voice-port 0/1/0:15
translation-profile incoming PSTN
description ** PRI VOICE TRUNK TO BR2 **
!
voice-port 0/0/1:23
!
mgcp profile default
!
sccp local GigabitEthernet0/0
sccp ccm 157.26.1.253 identifier 1 version 7.0
sccp
!
sccp ccm group 1
associate ccm 1 priority 1
associate profile 1 register X_CONFERE
associate profile 2 register SC_XCODE
!
dspfarm profile 2 transcode universal
codec g729abr8
codec g729ar8
codec g711alaw
codec g711ulaw
codec ilbc
maximum sessions 4
associate application SCCP
!
dspfarm profile 1 conference
codec g729br8
codec g729r8
codec g729abr8
codec g729ar8
codec g711alaw
codec g711ulaw
maximum sessions 1
associate application SCCP
!
dial-peer voice 1 pots
incoming called-number .
direct-inward-dial
!
dial-peer voice 103 pots
translation-profile outgoing nat-to-hq
destination-pattern 14082022...
port 0/0/0:23
forward-digits all
!
dial-peer voice 104 pots
translation-profile outgoing sitec-sub
destination-pattern 24044...
port 0/1/0:15
forward-digits all
!
dial-peer voice 105 pots
translation-profile outgoing 50
destination-pattern 202....
port 0/0/0:23
forward-digits all
!
dial-peer voice 107 pots
translation-profile outgoing int
destination-pattern 0014082022...
port 0/0/0:23
forward-digits all
!
dial-peer voice 109 pots
description " it as old configuration
destination-pattern 8522535....
port 0/1/0:15
forward-digits all
!
dial-peer voice 112 voip
translation-profile outgoing sip
destination-pattern 82022002
session protocol sipv2
session target ipv4:142.102.64.254
incoming called-number 82022002
dtmf-relay rtp-nte
no vad
!
dial-peer voice 101 pots
destination-pattern 4082022...
port 0/0/0:23
forward-digits all
!
dial-peer voice 108 pots
translation-profile outgoing SB_SUB
destination-pattern 3033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 106 pots
translation-profile outgoing national
destination-pattern 19723033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 102 pots
translation-profile outgoing int
destination-pattern 0019723033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 150 pots
translation-profile outgoing national-test
destination-pattern 9723033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 111 voip
translation-profile incoming sip
translation-profile outgoing sip
destination-pattern 85151111
session protocol sipv2
session target ipv4:157.26.1.253
incoming called-number 85151111
voice-class sip asymmetric payload full
!
dial-peer voice 119 pots
description SC International
translation-profile outgoing int
destination-pattern 85224044...
port 0/1/0:15
forward-digits all
!
!
num-exp 076305000 6305000
gateway
timer receive-rtp 1200
!
telephony-service
sdspfarm units 2
sdspfarm transcode sessions 6
sdspfarm tag 2 SC_XCODE
conference hardware
video
xml user admin password cisco 15
max-ephones 20
max-dn 20
ip source-address 157.26.1.253 port 2000
auto assign 1 to 20
service phone videoCapability 1
system message CCIE PSTN
url authentication http://157.26.1.253/...uthenticate.asp pstnphone cisco
load 7960-7940 P00308000500
max-conferences 8 gain -6
web admin system name Admin password cisco
transfer-system full-consult
create cnf-files version-stamp 7960 May 29 2015 22:31:24
!
ephone-dn 1 dual-line
number 911
label U.S. Emergency 911
description U.S. Emergency
name U.S. Emergency
!
ephone-dn 2 dual-line
number 4085151111 secondary 5151111
label Site HQ +1-408-515-1111
!
ephone-dn 3 dual-line
number 9725252222 secondary 5252222
label SiteB +1-972-525-2222
!
ephone-dn 4 dual-line
number 85225353333 secondary 25353333
label SiteC +852-2535-3333
!
ephone-dn 5 dual-line
number 442030276666
label UK +44-20-30276666
!
ephone-dn 6 dual-line
number 85227685555 secondary 27685555
label SITE C 27685555
name Site C
!
ephone-dn 7 dual-line
number 999
label SiteC Emergency 999
description PSTN SiteC Phone
name SiteC Emergency
!
ephone-dn 8 dual-line
number 85151111
!
ephone-dn 9 dual-line
number 82022222
!
ephone-dn 10 dual-line
number 2010
!
ephone-dn 11 dual-line
number 2011
!
ephone-dn 12 dual-line
number 2012
!
ephone 1
mac-address 000A.B8B5.BA48
type 7970
button 1:1 2:2 3:3 4:4
button 5:5 6:6 7:7
!
ephone 2
mac-address 5CFC.665C.1CD8
type 7942
button 1:8
!
ntp source GigabitEthernet0/0
ntp master 3
ntp server 159.26.1.250
!
end
!
!
no ip domain lookup
ip domain name PSTN
no ipv6 cef
multilink bundle-name authenticated
!
isdn switch-type primary-ni
!
voice-card 0
voice-service dsp-reservation 80
dspfarm
dsp services dspfarm
!
voice service voip
mode border-element
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
no supplementary-service sip moved-temporarily
no supplementary-service sip refer
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
sip
bind control source-interface GigabitEthernet0/0
bind media source-interface GigabitEthernet0/0
registrar server
!
voice class sip-profiles 20
!
voice register global
mode cme
source-address 157.26.1.253 port 5060
max-dn 10
max-pool 10
time-format 24
date-format D/M/Y
tftp-path flash:
create profile sync 000112205067174A
ntp-server 157.26.1.253 mode directedbroadcast
conference hardware
camera
video
!
voice register dn 1
number 85151111
name PSTN-Video
label PSTN-Phone
!
voice register pool 1
id mac 203A.07FC.F19B
type 9951
number 1 dn 1
dtmf-relay rtp-nte
description 85151111
camera
video
!
voice translation-rule 1
rule 1 /\(^011\)\(.*\)/ /\2/
rule 2 /\(^1\)\(.*\)/ /\2/
rule 3 /\(^0\)\([^0].*\)/ /\2/
rule 4 /\(^001\)\(.*\)/ /\2/
!
voice translation-rule 2
rule 1 /^85227685555/ /0085227685555/ type any international
rule 2 /^442030276666/ /00442030276666/ type unknown international
!
voice translation-rule 3
rule 1 /^972525\.*/ /525\1/ type any subscriber plan any isdn
!
voice translation-rule 4
rule 1 // // type any national plan any isdn
!
voice translation-rule 5
rule 1 /^852/ /+&/ type any international plan any isdn
!
voice translation-rule 6
rule 1 /^00\.*/ // type any international plan any isdn
!
voice translation-rule 14
rule 1 /1972\.*/ /972\1/ type any national plan any isdn
!
voice translation-rule 15
rule 1 // // type any international plan any isdn
!
voice translation-rule 16
rule 1 /1408\.*/ /408\1/ type any national plan any isdn
!
voice translation-rule 20
rule 1 /8522\.*/ /2\1/ type any subscriber plan any isdn
!
voice translation-rule 30
rule 1 // // type any subscriber plan any isdn
!
voice translation-rule 33
rule 1 /.*\(303\)/ /\1/ type any subscriber plan any isdn
!
voice translation-rule 40
rule 1 /8\(.......\)/ /\1/
!
voice translation-rule 50
rule 1 /.*\(515\)/ /\1/ type any subscriber plan any isdn
!
voice translation-rule 60
rule 1 /82022002/ /2002/
!
voice translation-rule 70
rule 1 /972\.*/ /972\1/ type any national plan any isdn
!
voice translation-profile 50
translate calling 50
!
voice translation-profile 8202
translate called 40
!
voice translation-profile HQ_int
translate calling 5
translate called 6
!
voice translation-profile PSTN
translate called 1
!
voice translation-profile SB_SUB
translate calling 3
!
voice translation-profile SC-TEHO
translate calling 2
!
voice translation-profile int
translate calling 15
translate called 6
!
voice translation-profile nat-to-hq
translate calling 4
translate called 16
!
voice translation-profile national
translate calling 4
translate called 14
!
voice translation-profile national-test
translate calling 4
translate called 70
!
voice translation-profile sip
translate calling 60
translate called 60
!
voice translation-profile sitec-sub
translate calling 20
translate called 30
!
voice translation-profile sub
translate calling 33
!
controller T1 0/0/0
cablelength long 0db
pri-group timeslots 1-3,24
!
controller T1 0/0/1
cablelength long 0db
pri-group timeslots 1-3,24
!
controller E1 0/1/0
pri-group timeslots 1-3,16
!
interface Loopback159
ip address 159.26.1.250 255.255.255.0
!
interface GigabitEthernet0/0
ip address 157.26.1.11 255.255.255.0 secondary
ip address 157.26.1.250 255.255.255.0 secondary
ip address 157.26.1.253 255.255.255.0
duplex auto
speed auto
no keepalive
!
interface GigabitEthernet0/2
ip address 157.26.2.1 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0/0:23
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn protocol-emulate network
isdn incoming-voice voice
isdn outgoing display-ie
isdn outgoing ie redirecting-number
no cdp enable
!
interface Serial0/0/1:23
no ip address
encapsulation hdlc
isdn switch-type primary-ni
isdn protocol-emulate network
isdn incoming-voice voice
isdn outgoing display-ie
isdn outgoing ie redirecting-number
no cdp enable
!
interface Serial0/1/0:15
description Connected to SC
no ip address
encapsulation hdlc
isdn switch-type primary-5ess
isdn protocol-emulate network
isdn incoming-voice voice
no cdp enable
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip route 0.0.0.0 0.0.0.0 157.26.1.1
ip route 142.0.0.0 255.0.0.0 157.26.2.2
!
control-plane
!
voice-port 0/0/0:23
!
voice-port 0/1/0:15
translation-profile incoming PSTN
description ** PRI VOICE TRUNK TO BR2 **
!
voice-port 0/0/1:23
!
mgcp profile default
!
sccp local GigabitEthernet0/0
sccp ccm 157.26.1.253 identifier 1 version 7.0
sccp
!
sccp ccm group 1
associate ccm 1 priority 1
associate profile 1 register X_CONFERE
associate profile 2 register SC_XCODE
!
dspfarm profile 2 transcode universal
codec g729abr8
codec g729ar8
codec g711alaw
codec g711ulaw
codec ilbc
maximum sessions 4
associate application SCCP
!
dspfarm profile 1 conference
codec g729br8
codec g729r8
codec g729abr8
codec g729ar8
codec g711alaw
codec g711ulaw
maximum sessions 1
associate application SCCP
!
dial-peer voice 1 pots
incoming called-number .
direct-inward-dial
!
dial-peer voice 103 pots
translation-profile outgoing nat-to-hq
destination-pattern 14082022...
port 0/0/0:23
forward-digits all
!
dial-peer voice 104 pots
translation-profile outgoing sitec-sub
destination-pattern 24044...
port 0/1/0:15
forward-digits all
!
dial-peer voice 105 pots
translation-profile outgoing 50
destination-pattern 202....
port 0/0/0:23
forward-digits all
!
dial-peer voice 107 pots
translation-profile outgoing int
destination-pattern 0014082022...
port 0/0/0:23
forward-digits all
!
dial-peer voice 109 pots
description " it as old configuration
destination-pattern 8522535....
port 0/1/0:15
forward-digits all
!
dial-peer voice 112 voip
translation-profile outgoing sip
destination-pattern 82022002
session protocol sipv2
session target ipv4:142.102.64.254
incoming called-number 82022002
dtmf-relay rtp-nte
no vad
!
dial-peer voice 101 pots
destination-pattern 4082022...
port 0/0/0:23
forward-digits all
!
dial-peer voice 108 pots
translation-profile outgoing SB_SUB
destination-pattern 3033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 106 pots
translation-profile outgoing national
destination-pattern 19723033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 102 pots
translation-profile outgoing int
destination-pattern 0019723033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 150 pots
translation-profile outgoing national-test
destination-pattern 9723033...
port 0/0/1:23
forward-digits all
!
dial-peer voice 111 voip
translation-profile incoming sip
translation-profile outgoing sip
destination-pattern 85151111
session protocol sipv2
session target ipv4:157.26.1.253
incoming called-number 85151111
voice-class sip asymmetric payload full
!
dial-peer voice 119 pots
description SC International
translation-profile outgoing int
destination-pattern 85224044...
port 0/1/0:15
forward-digits all
!
!
num-exp 076305000 6305000
gateway
timer receive-rtp 1200
!
telephony-service
sdspfarm units 2
sdspfarm transcode sessions 6
sdspfarm tag 2 SC_XCODE
conference hardware
video
xml user admin password cisco 15
max-ephones 20
max-dn 20
ip source-address 157.26.1.253 port 2000
auto assign 1 to 20
service phone videoCapability 1
system message CCIE PSTN
url authentication http://157.26.1.253/...uthenticate.asp pstnphone cisco
load 7960-7940 P00308000500
max-conferences 8 gain -6
web admin system name Admin password cisco
transfer-system full-consult
create cnf-files version-stamp 7960 May 29 2015 22:31:24
!
ephone-dn 1 dual-line
number 911
label U.S. Emergency 911
description U.S. Emergency
name U.S. Emergency
!
ephone-dn 2 dual-line
number 4085151111 secondary 5151111
label Site HQ +1-408-515-1111
!
ephone-dn 3 dual-line
number 9725252222 secondary 5252222
label SiteB +1-972-525-2222
!
ephone-dn 4 dual-line
number 85225353333 secondary 25353333
label SiteC +852-2535-3333
!
ephone-dn 5 dual-line
number 442030276666
label UK +44-20-30276666
!
ephone-dn 6 dual-line
number 85227685555 secondary 27685555
label SITE C 27685555
name Site C
!
ephone-dn 7 dual-line
number 999
label SiteC Emergency 999
description PSTN SiteC Phone
name SiteC Emergency
!
ephone-dn 8 dual-line
number 85151111
!
ephone-dn 9 dual-line
number 82022222
!
ephone-dn 10 dual-line
number 2010
!
ephone-dn 11 dual-line
number 2011
!
ephone-dn 12 dual-line
number 2012
!
ephone 1
mac-address 000A.B8B5.BA48
type 7970
button 1:1 2:2 3:3 4:4
button 5:5 6:6 7:7
!
ephone 2
mac-address 5CFC.665C.1CD8
type 7942
button 1:8
!
ntp source GigabitEthernet0/0
ntp master 3
ntp server 159.26.1.250
!
end