Question about Dial Plan
sacredboy
Member Posts: 303 ■■■□□□□□□□
Hello guys.
Please, help me with a little question regarding dial plan. In CCNA Voice 640-461 Off Cert Guide (by J. Cioara) there is an example of configuring a North American PSTN Dial-Plan. Below is a chunk from that configuration:
Please, help me with a little question regarding dial plan. In CCNA Voice 640-461 Off Cert Guide (by J. Cioara) there is an example of configuring a North American PSTN Dial-Plan. Below is a chunk from that configuration:
VOICE_RTR(config)# dial-peer voice 90 pots VOICE_RTR(config-dial-peer)# description Service Dialing VOICE_RTR(config-dial-peer)# destination-pattern 9[469]11 VOICE_RTR(config-dial-peer)# forward-digits 3 VOICE_RTR(config-dial-peer)# port 1/0:1 VOICE_RTR(config-dial-peer)# exit VOICE_RTR(config)# dial-peer voice 91 pots VOICE_RTR(config-dial-peer)# description 10-Digit Dialing VOICE_RTR(config-dial-peer)# destination-pattern 9[2-9]..[2-9]...... VOICE_RTR(config-dial-peer)# port 1/0:1 VOICE_RTR(config-dial-peer)# exit VOICE_RTR(config)# dial-peer voice 92 pots VOICE_RTR(config-dial-peer)# description 11-Digit Long-Distance Dialing VOICE_RTR(config-dial-peer)# destination-pattern 91[2-9]..[2-9]...... VOICE_RTR(config-dial-peer)# forward-digits 11 VOICE_RTR(config-dial-peer)# port 1/0:1I know that the forward-digits <number> command allows to specify the number of right-justified digits to forward. But why it is not configured for dial peer 91?
Best, sacredboy!
Comments
-
Debug all Member Posts: 15 ■□□□□□□□□□It depends on your requirements. By default, POTS dial-peer strips all non-wildcard digits from the left side of your destination-pattern. You might or might not need to send these digits to the remote end. "forward-digits" is required to override the default behavior.
For this given example "10-Digit Dialing" in the description is the answer. "9" is the only specifically defined digit in this pattern, so it is going to be stripped. Remaining 10 digits of the pattern will be sent to the port 1/0:1 completely. -
sacredboy Member Posts: 303 ■■■□□□□□□□Aga. So its not required dial-peer voice 91 because in destination-pattern 9[2-9]..[2-9]...... there are no explicitly specified digits. Right?
Best, sacredboy! -
Debug all Member Posts: 15 ■□□□□□□□□□9[2-9]..[2-9]...... pattern is 11 digits long. Leading "9" is explicitly defined digit, it is going to be dropped.
That results [2-9]..[2-9]...... to be sent to the remote destination.
Though you can specify "forward-digits 10" for this dial-peer. It would give you the same result, but with slightly different logic. -
sacredboy Member Posts: 303 ■■■□□□□□□□Hello guys. Another couple of questions regarding dial plan (voice translation rule and voice translation profile in particular). There is an example in CVOICE book.
1. The incoming DNIS 408552XXX should be modified to 2XXX.
2. The incomng ANI should be prefixed with the appropriate PSTN access code and identifier.voice translation-rule 1 rule 1 /^4085552/ /2/ voice translation-rule 2 rule 1 /^.*/ /9&/ type subscriber subscriber rule 2 /^.*/ /91&/ type national national rule 3 /^.*/ /9011&/ type international international voice translation-profile pstn-in translate called 1 translate calling 2 dial-peer voice 111 pots translation-profile incoming pstn-in
1. Why in the 1st rule it is /2/ but not /2.../?
2. How a CME does know that incoming ANI number should be prefixed with 9 but not 91, or 91 but not 9011 access code?Best, sacredboy! -
shodown Member Posts: 2,271i'll answer one of them someone else can chime in with the second or I'll come back tomorrow if nobody answers it.
2. The numbers have the TON in them, so when a call comes in from the PSTN it has that field populated in the Q931 message so the gateway knows how to match it. The problem is that when it comes to SIP trunks all calls are unknown, so I guess its time to get creative.Currently Reading
CUCM SRND 9x/10, UCCX SRND 10x, QOS SRND, SIP Trunking Guide, anything contact center related -
davenull Member Posts: 173 ■■■□□□□□□□
voice translation-rule 1 rule 1 /^4085552/ /2/
What this says is: match a pattern of 4085552, but only if it's at the beginning of the string, and replace it with 2 (then carry over any extra digits that were not part of the matched pattern).
Input Number > Output Number
4085552345 > 2345
40855523456980 > 23456980
40855521 > 21
4085552 > 2
14085552345 > no match
408555 > no matchvoice translation-rule 2 rule 1 /^.*/ /9&/ type subscriber subscriber rule 2 /^.*/ /91&/ type national national rule 3 /^.*/ /9011&/ type international international
What this says is: match anything that has the Type Of Number (TON) of subscriber, national, or international and prepend the digits according to the TON.
.* matches none or more occurrences of any digit. This will match anything, including null. I'm not sure why we would need to add ^ to the front of it, anything beginning with anything? Or ^ would make it match at least one digit as opposed to nothing?
& is the matched pattern, like a variable. It says "replace me with whatever matched in the first set of brackets". I don't see it used in the wild much, all configs I've seen so far used the structure with the escape character (backslash), for example /^408555\(....\)/ /\1/. It's more flexible than & I guess.
I remember one of the examples in the CVOICE book was incorrect, it was something like rule 1 /555123..../ /3..../ . It did not work when I tried it on a router. The second set of brackets can't have dots in it. Maybe it used to be possible and the book wasn't updated. I tried it in IOS 12.4.
Also, like shodown already mentioned, TON is only applicable to ISDN (not CAS or anything else), and only MGCP or H.323 gateway will pass them along to the CUCM. SIP trunks have no concept of TON.