12-08-2015 07:54 PM - edited 03-19-2019 10:28 AM
Hi All
I am trying to understand Translation profiles in CME. Can someone please help me make the following profiles understand ?
As far as I know, we have to go for Match & Replace rule, but I dont understand the same in the following examples.
=====================================================
voice translation-rule 1
rule 1 /\(.*\)/ /9\1/
voice translation-profile PROFILE1
translate calling 1
======================================================
voice translation-rule 1
rule 1 /^.*\(4...$\)/ /\1/
!
voice translation-rule 2
rule 1 /^4\(.*\)/ /115678\1/
voice translation-profile Incoming-Translate
translate called 1
!
voice translation-profile Outgoing-Translate
translate calling 2
======================================================
Regards
Solved! Go to Solution.
12-08-2015 08:07 PM
In first example, (.*) will match all patterns and prefix 9 to all patterns. For example, if the pattern is 222222, it will become 9222222. Then you are applying it to calling number. Later on, you will have to apply it to port or dial-peer in either outbound or inbound direction.
In next example, in rule 1, again you're matching all pattersn with (.*) but if it ends with 4... and if pattern matches, final number will be 4... (any string before it will be stripped). You're applying it to called number then. For example, if pattern is 2224444, it will become 4444.
In next rule 2, any pattern that starts with 4 will matche rule 2 and prefix it with 115678, so final number will be 115678 plus any pattern that starts with 4 (4 will be stripped). You're applying it to calling number then. For example, if the pattern is 42222222, it will become 1156782222222.
You should see following links useful;
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html
http://www.voicecerts.com/2011/04/voice-translation-rules-examples.html
https://supportforums.cisco.com/document/31816/custom-made-guide-translation-rulesprofiles-and-some-common-uses
- Vivek
12-08-2015 08:51 PM
Akash,
(+5) for vivek , here is some output test result which you have validate on the GW . here is the output
Frist Rule
voice translation-rule 1
rule 1 /\(.*\)/ /9\1/
voice translation-profile PROFILE1
translate calling 1
Result output: If any ANI (Calling Party number) start with Any digit example below like calling number 1234567890 then it will prefix 9 with 1234567890
test voice translation-rule 1 1234567890
Matched with rule 1
Original number: 1234567890 Translated number: 91234567890
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
Second Rule
voice translation-rule 1
rule 1 /^.*\(4...$\)/ /\1/
!
First result ouput: if any called number start with any digit however ends with last 4123 or 4XXX any digit it strip all the digit except 4XXX
test voice translation-rule 1 1234567
Matched with rule 1
Original number: 1234567 Translated number: 4567
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
voice translation-rule 2
rule 1 /^4\(.*\)/ /115678\1/
Result output:If any called number start digit 4 and ends with any digit it will append/add the called number with 115678 + stripped 4 and add rest digit.
test voice translation-rule 2 4567890
Matched with rule 1
Original number: 4567890 Translated number: 115678567890
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
br,
Nadeem
12-08-2015 08:07 PM
In first example, (.*) will match all patterns and prefix 9 to all patterns. For example, if the pattern is 222222, it will become 9222222. Then you are applying it to calling number. Later on, you will have to apply it to port or dial-peer in either outbound or inbound direction.
In next example, in rule 1, again you're matching all pattersn with (.*) but if it ends with 4... and if pattern matches, final number will be 4... (any string before it will be stripped). You're applying it to called number then. For example, if pattern is 2224444, it will become 4444.
In next rule 2, any pattern that starts with 4 will matche rule 2 and prefix it with 115678, so final number will be 115678 plus any pattern that starts with 4 (4 will be stripped). You're applying it to calling number then. For example, if the pattern is 42222222, it will become 1156782222222.
You should see following links useful;
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html
http://www.voicecerts.com/2011/04/voice-translation-rules-examples.html
https://supportforums.cisco.com/document/31816/custom-made-guide-translation-rulesprofiles-and-some-common-uses
- Vivek
12-08-2015 08:45 PM
Hi Vikram
Realy athanks a lot for your help !!!
Translation patterns are quite confusing but interesting too. Thanks again for your help !!!
Regards
Akash
12-08-2015 08:50 PM
You are right Akash. It was also hard time for me when I initially started with this and really it was not less than fun.
And thanks for giving me new name :)
- Vivek
12-08-2015 10:56 PM
Ooops sorry for the name but thanks for your help really :)
12-08-2015 11:35 PM
No issues, glad to help :)
- Vivek
12-08-2015 08:51 PM
Akash,
(+5) for vivek , here is some output test result which you have validate on the GW . here is the output
Frist Rule
voice translation-rule 1
rule 1 /\(.*\)/ /9\1/
voice translation-profile PROFILE1
translate calling 1
Result output: If any ANI (Calling Party number) start with Any digit example below like calling number 1234567890 then it will prefix 9 with 1234567890
test voice translation-rule 1 1234567890
Matched with rule 1
Original number: 1234567890 Translated number: 91234567890
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
Second Rule
voice translation-rule 1
rule 1 /^.*\(4...$\)/ /\1/
!
First result ouput: if any called number start with any digit however ends with last 4123 or 4XXX any digit it strip all the digit except 4XXX
test voice translation-rule 1 1234567
Matched with rule 1
Original number: 1234567 Translated number: 4567
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
voice translation-rule 2
rule 1 /^4\(.*\)/ /115678\1/
Result output:If any called number start digit 4 and ends with any digit it will append/add the called number with 115678 + stripped 4 and add rest digit.
test voice translation-rule 2 4567890
Matched with rule 1
Original number: 4567890 Translated number: 115678567890
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
br,
Nadeem
12-08-2015 10:57 PM
HI Nadeem Thanks for the explanation !!!
Testing rules will make them understand more and also helpful in many other ways .
Thanks a lot :)
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