10-04-2011 01:04 AM
Dear All,
Could anyone help me to show example on splicing digit in translation rule.
Diagram.
USA Client ------> Originate GW ( send calling number123456789 ) ------------> Terminate GW ( Translate 123406789 ) --------> PSTN.
Thanks and Regards,
Dan
Solved! Go to Solution.
10-04-2011 01:31 AM
voice translation-rule 1
rule 1 /\(1234\).\(6789\)/ /\10\2/
Basically the format is the string to match, then the string to replace, with / to surround each. So /1234/ /5678/ would replace 1234 with 5678.
If you surround a part of the match string with brackets, you can use the bracketed bit in the replacement string. To use a bracket, you have to prefix a \ to escape it... so the brackets look like \(xxx\) but are wrapped in / / pairs, which can make it look a little confusing. To use a bracketed chunk, you put in a number - again, escaped with \ - so \1 refers to the string from the first bracket pair, and \2 the second. The 0 after \1 is a simple character to insert 0 between the two bracketed string tokens..
Aaron
10-04-2011 01:31 AM
voice translation-rule 1
rule 1 /\(1234\).\(6789\)/ /\10\2/
Basically the format is the string to match, then the string to replace, with / to surround each. So /1234/ /5678/ would replace 1234 with 5678.
If you surround a part of the match string with brackets, you can use the bracketed bit in the replacement string. To use a bracket, you have to prefix a \ to escape it... so the brackets look like \(xxx\) but are wrapped in / / pairs, which can make it look a little confusing. To use a bracketed chunk, you put in a number - again, escaped with \ - so \1 refers to the string from the first bracket pair, and \2 the second. The 0 after \1 is a simple character to insert 0 between the two bracketed string tokens..
Aaron
10-04-2011 01:43 AM
Dear Aaron,
Good, it fixed my issue now.
Thanks so much.
Dan
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