理解dial-peerpart3
我觉得part 3⾮常重要,所以尽量多写点,写得更详细点。下⾯开始。
三. 理解inbound call和outbound call的匹配规则
1. Match inbound Dial Peers
1)Inbound Dial Peers的参数和特性
呼叫建⽴需要三种参数,有四个可配置的dial peer命令特性来匹配这三个参数。
对源路由器来说,从POTS进⼊的 call leg 关联Inbound POTS dail peers ;
对终端路由器来说,从Voice-Network 进⼊的call leg 关联Inbound Voice-Network  dail peers 。    四种配置命令对应呼叫建⽴元素的关系表:
dial-peer属性描述  呼叫建⽴
元素
gwy(config dial-
peer)#
incoming called-number DNIS_string  该命令定义被叫号,dialed number
identification service (DNIS)。通常该命令使⽤被
叫号来匹配inbound call leg对应的inbound call
dial peer
被叫号
DNIS
gwy(config dial-
peer)#
answer
address
ANI_string    该命令定义主叫号 ,automatic number
identification (ANI) string。通常该命令使⽤主叫
号来匹配inbound call leg对应的inbound call dial
peer
主叫号
ANI
gwy(configdial-
peer)# destination-
pattern
string    当该命令对应outbound call leg时,使⽤的是被
叫号来匹配  outbound call dial peer
当该命令对应inbound call leg时,使⽤的是主叫
号来匹配inbound call dial peer
inbound
时,是
ANI;
outbound
时,是
DNIS
gwy(configdial-
peer)# port port 该命令⽤于定义通过POTS port的呼叫
Voice
Port
呼叫建⽴的三个元素
呼叫建⽴的
元素
描述
called number (DNIS) 呼叫的被叫号码字符串。⼀般起来⾃ISDN的建⽴信息或者CAS的DNIS。
calling number (ANI) 代表呼叫起源的字符串。⼀般来⾃ISDN的建⽴信息或者CAS的ANI
Voice Port 代表POTS的物理语⾳接⼝
2.inbound 呼叫的匹配规则
当cisco ⽹关接到⼀个呼叫建⽴的请求时,dial-peer ⽤于匹配进⼊的呼叫,并将呼叫路由到不同的进程和应⽤上。dial-peer不会逐位匹配字符串,相反,它会接受所有的字符串后再来匹配。
路由器或者是⽹关⽤dial-peer匹配inbound call时,规则如下:
1)Called number (DNIS) with incoming called-number
⾸先,如果dial-peer配置了incoming called- number 命令,那么dial-peer都会去尝试匹配呼叫建⽴时的called number参数。⼀般的呼叫都会有called number ,所以推荐⽤这个命令来做inbound dial peer。这个属性的优先级⾼于answer-address和destination-pattern
2)Calling Number (ANI) with answer-address
如果没有配置 incoming called-number命令。那么,配置了answer-address 的dial-peer会尝试匹配calling number参数。这个命令可以⽤来匹配基于calling number的呼叫
peer3)Calling Number (ANI) with destination-pattern
如果没有匹配answer-number这条命令。那么,配置了destination-pattern的dial-peer会尝试匹配calling number参数。这个在后⾯详解!
4)Voice-port
如果第3条还没匹配,那么⽹关或者路由器会⽤dial-peer port去关联来⾃voice-port呼叫的calling-number参数
5)最后如果都没有匹配的那么会默认调⽤default dial-peer 0 (PID 0)
如果没有⼀个命令能匹配呼叫建⽴,那么⽹关会调⽤default dial-peer 0 来匹配呼叫。
default dial-peer 0 (PID 0)的参数不能修改。并且default dial-peer 0 (PID 0)不能去协商⾮默认的服务参数,例如:
Non-default Voice-Network capabilities: dtmf-relay, no vad
Direct Inward Dial (DID)
TCL Applications
dial-peer 0 对于inbound call 默认的配置有:
any codec
vad enabled
no rsvp support
fax-rate voice
dial-peer 0 对于outbound call 默认的配置有:
no ivr application
在每个阶段最长字符匹配规则仍然适⽤。
3.Matching Outbound Dial Peers
⽹关或者路由器会使⽤destination-pattern called_number来匹配outbound call
1)对于POTS dial peer,port命令⽤于路由呼叫
2)对于Voice-Network dial peers,session target命令⽤于路由呼叫。
另外,当outbound peer被匹配时需要考虑两种情况,DID的或non-DID。
对于DID的情况:
⼀个incoming dial peer被配置为下⾯的命令:
dial-peer voice 1 pots
incoming called-number 81690
voice-port 0:D
direct-inward-dial
对于DID calls,呼叫建⽴时,必须包含所有的号码才会路由。当⽹关或者路由器选择outbound dial peer时,会将号码⼀起发给outbound dial-peer。
例如,下⾯的配置:
dial-peer voice 3 voip
destination-pattern 816
session target ipv4:172.22.10.1
dial-peer voice 4 voip
destination-pattern 81690
session target ipv4:172.22.10.1
outbound会匹配 dial-peer 4!
对于non-DID的情况:
outbound call会逐位匹配号码,所以上⾯的例⼦会匹配dial-peer 3,但是出去的被叫号码是816.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。