cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
757
Views
20
Helpful
6
Replies

help with striping numbers in cme voip dial peer

baselzind
Level 6
Level 6

im trying to strip 5300 from the dialed number for a sip trunk but im not sure if my approach is correct:

voice translation-rule 100
rule 1 /^5300/ //
!

voice translation-profile DDD
translate called 100


dial-peer voice 301 voip
translation-profile outgoing DDD
destination-pattern 5300.T
session protocol sipv2
session target ipv4:192.168.15.2
codec g711ulaw

 

im copying an existing dial-peer with the same method but im not sure if this method strip 5300 like i want? what does the "." do?

1 Accepted Solution

Accepted Solutions

Chris Deren
Hall of Fame
Hall of Fame

.T will match one or more digits, so destination-pattern 5300.T will match 5300 + one more more any digits.

Your translation looks fine.

You can test it with as:

test voice translation-rule 100 5300555555555

 And then you can also debug it:

debug voice translation

 

View solution in original post

6 Replies 6

Chris Deren
Hall of Fame
Hall of Fame

.T will match one or more digits, so destination-pattern 5300.T will match 5300 + one more more any digits.

Your translation looks fine.

You can test it with as:

test voice translation-rule 100 5300555555555

 And then you can also debug it:

debug voice translation

 

But what does the . Do in the 5300.T?

It will match patterns that start with 5300 and are followed by any single digit or multiple any digits, for example:

53005, 53009, 5300333, 530099999999, etc.

but what does the . in the "destination-pattern 5300.T" do? i tested with the "." but it didnt work when i removed it , it was working fine , yet another dial peer who does the same job there was a dot and it is working fine?

Again "." indicates any digit, and if you are trying to match wildcard number of digits you represent it as ".T", which means match single or more any digits.  If you leave it as 5300 then only 5300 is matched, if you set it to 5300. then it will match 53000 thru 53009, if you set it to 5300.T than any number of any digits following 5300 is accepted.  

When you removed it what did you dial? What is the other dial peer destination-pattern you refer to and what did that match?

 

ah it makes sense now , i was under the impression it is like the dot in the cucm