10-30-2019 02:24 AM
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?
Solved! Go to Solution.
10-30-2019 04:36 AM
.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
10-30-2019 04:36 AM
.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
10-30-2019 05:02 AM
10-30-2019 06:08 AM
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.
11-03-2019 08:41 PM
11-04-2019 05:36 AM
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?
11-06-2019 04:32 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide