几个简单的voip的小例子

实验拓扑

(phone A & phone B)-fxs-local router-----------(serial link,voip link)-------remote router-fxo-PBX--phone C


配置实例:
1、基本配置:



远端: Remote_Router#sh running-config
Building configuration...




hostname Remote_Router
.....................................................

interface Ethernet0
ip address 192.168.1.2 255.255.255.0
no ip directed-broadcast
!




router eigrp 100
network 192.168.1.0
no auto-summary
!
ip classless
no ip http server
!
!
!
voice-port 1/1
!
voice-port 1/2
!
voice-port 1/3
!
dial-peer voice 10 pots
destination-pattern 2203
port 1/1
!

end

本端: Local_Router#sh running-config
Building configuration...

....................................................
hostname Local_Router

interface Ethernet0/0
ip address 192.168.1.1 255.255.255.0
half-duplex
no clns route-cache
!
router eigrp 100
network 192.168.1.0
no auto-summary

voice-port 1/0/0
!
voice-port 1/0/1
!
voice-port 1/1/0
!
voice-port 1/1/1
!

dial-peer voice 10 pots
destination-pattern 2201
port 1/0/0
!
dial-peer voice 20 pots
destination-pattern 2202
port 1/0/1
!
dial-peer voice 30 voip
destination-pattern 2203
session target ipv4:192.168.1.2

end




测试 命令



call 通本端的两部电话机
Local_Router#csim start 2201
csim: called number = 2201, loop count = 1 ping count = 0
.
csim: loop = 1, failed = 0
csim: call attempted = 1, setup failed = 0, tone failed = 1
检查本地配置
Local_Router#sh dial-peer voice summary
dial-peer hunt 0
AD PRE PASS OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT
10 pots up up 2201 0 up 1/0/0
20 pots up up 2202 0 up 1/0/1
30 voip up up 2203 0 syst ipv4:192.168.1.2
call 通远端的电话机(2203call通pbx,pbx提供2次拨号音,然后拨号468,对端电话号码响)
Local_Router#csim start 2203,468
csim: called number = 2203,468, loop count = 1 ping count = 0
.
csim: loop = 1, failed = 0
csim: call attempted = 1, setup failed = 0, tone failed = 1
其中","的含义是等待2秒




下面给出几个需求可以稍作验证:
1、需要配置语音网关的传真速率为9600,同时要消除舒服噪音。

Local_Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Local_Router(config)#dial-peer voice 30
Local_Route(config-dial-peer)#fax rate 9600
Local_Route(config-dial-peer)#end
Local_Router#sh dial-peer voice 30 | in fax
Cisc NSE=100, fax=96, fax-ack=97, dtmf=121, fax-relay=122
fax rate = 9600, payload size = 20 bytes
fax protocol = system
fax-relay ecm enable
fax NSF = 0xAD0051 (default)
---------------------------------------------------------------------
针对舒服噪音,默认情况下
Local_Router#sh voice port 1/0/0



Foreign Exchange Station 1/0/0 Slot is 1, Sub-unit is 0, Port is 0
Type of VoicePort is FXS
Operation State is DORMANT
Administrative State is UP
No Interface Down Failure
Description is not set
Noise Regeneration is enabled-----------------------------〉打开
Non Linear Processing is enabled




配置后:
Local_Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Local_Router(config)#voice-port 1/0/0
Local_Route(config-voiceport)#no comfort-noise
Local_Route(config-voiceport)#end
Local_Router#
*Mar 1 00:37:19.735: %SYS-5-CONFIG_I: Configured from console by console
Local_Router#sh voice port 1/0/0



Foreign Exchange Station 1/0/0 Slot is 1, Sub-unit is 0, Port is 0
Type of VoicePort is FXS
Operation State is DORMANT
Administrative State is UP
No Interface Down Failure
Description is not set
Noise Regeneration is disabled---------------------------〉关掉了
Non Linear Processing is enabled



2、需求配置所有跑到VOIP上面的流量将优先级设置为1(我的设备不支持这一个所以没有作),同时采用缩位拨号。
Local_Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Local_Router(config)#num-exp 0 2201
Local_Router(config)#end
Local_Router#sh num-exp
Dest Digit Pattern = '0' Translation =
'2201'



3、需求配置跑在VOIP上的最大连接数为100,同时要求电话B先响。
Local_Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Local_Router(config)#dial-peer voice 30
Local_Route(config-dial-peer)#max-conn 100
Local_Route(config-dial-peer)#exit
Local_Router(config)#dial-peer voice 10
Local_Route(config-dial-peer)#preference 1
Local_Route(config-dial-peer)#end

Local_Router#sh dial-peer voice 30 | in max
incoming called-number = `', connections/maximum = 0/100,
incoming COR list:maximum capability

Local_Router#sh dial-peer voice su
dial-peer hunt 0
AD PRE PASS OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT
10 pots up up 2201 1 up 1/0/0
20 pots up up 2202 0 up 1/0/1
30 voip up up 2203 0 syst ipv4:192.168.1.2



4、需求配置语音网关2为次选
Local_Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Local_Router(config)#dial-peer voice 40 voip
Local_Route(config-dial-peer)#destination-pattern 2203
Local_Route(config-dial-peer)#session target ipv4:4.1.1.1
Local_Route(config-dial-peer)#preference 1
Local_Route(config-dial-peer)#end



Local_Router#show dial-peer voice summary
dial-peer hunt 0
AD PRE PASS OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT
10 pots up up 2201 1 up 1/0/0
20 pots up up 2202 0 up 1/0/1
30 voip up up 2203 0 syst ipv4:192.168.1.2
40 voip up up 2203 1 syst ipv4:4.1.1.1

你可能感兴趣的:(网络,职场,voip,休闲,实验)