cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
443
Views
0
Helpful
8
Replies

Translation Rules question

Chris Deren
Hall of Fame
Hall of Fame

In my environemt users are dialing *[site code]DN in order to reach users in other remote site. While in SRTS mode I trying to allow them to keep that functionallity by translating the number into full e.164 number. It seems that voicetranslation rules cannot accept the * as a dialed digit, neither does the num-exp. Is there a way to accomplish the translation in SRST?

Chris

1 Accepted Solution

Accepted Solutions

Try this config. I haven't had a chance to lab it, but it seems to me you want to apply this to all incoming legs in SRST.

Let me know if this works out for you.

Michael

voice translation-profile blah

translate called 111

voice translation-rule 111

rule 1 /\(\*091\)\(....\)/ /91905337\2/

call-manager-fallback

tranlation-profile incoming blah

router#test voice translation-rule 111 *0915000

Matched with rule 1

Original number: *0915000 Translated number: 919053375000

Original number type: none Translated number type: none

Original number plan: none Translated number plan: none

View solution in original post

8 Replies 8

Chris Deren
Hall of Fame
Hall of Fame

I figured it out b creating a dial-peer with destination pattern starting with *, however I'd still like to know if there is way to do this with translation rules.

Chris

Chris,

If I understand you question, you need to prefix the * with a \ so that the parser knows it is not a special character. Do something like the following:

router(config)#voice translation-rule 999

router(cfg-translation-rule)#rule 1 /\(\*12345\)678/ /12345\1/

router(cfg-translation-rule)#exit

router(config)#exit

router#test voice translation-rule 999 *12345678

Matched with rule 1

Original number: *12345678 Translated number: 12345*12345

Original number type: none Translated number type: none

Original number plan: none Translated number plan: none

HTH

Michael

Thanks Michael,

I am trying to build a translation rule to route when in SRST mode. I have environment where to reach another site users dial *[3 digit site code][4 digit DN], for example *0915000, while in SRST I need to redirect the call via PSTN, so I need to replace the *091 with 91905337, so

Input = *0915000

Output = 919053375000

Chris

Try this config. I haven't had a chance to lab it, but it seems to me you want to apply this to all incoming legs in SRST.

Let me know if this works out for you.

Michael

voice translation-profile blah

translate called 111

voice translation-rule 111

rule 1 /\(\*091\)\(....\)/ /91905337\2/

call-manager-fallback

tranlation-profile incoming blah

router#test voice translation-rule 111 *0915000

Matched with rule 1

Original number: *0915000 Translated number: 919053375000

Original number type: none Translated number type: none

Original number plan: none Translated number plan: none

Thanks Michael,

It worked like a champ, I am getting little lost understaning the rule though, I understand the slicing of the number, but I am unlear with the first two slashes /\ as well as the slash in between the paratethesis. Can you please go through the rule for me, I appricieate your help.

Chris

Let me take a shot at explanation. I'll start at the basics, and try to get to your config. Forgive me if you already know parts of this.

The basic rule format is rule x /12345/ /67890/

This does a straight out replacement of '12345' with '67890'

Now, suppose you want to select a portion of 12345 to keep. To do this, place that portion in parenthesis. For example: /123(45)/

Thing is, in this example the parser doesn't realize that you don't really want to include the '(' or ')' in the string you are replacing. So you have to distiguish the ( or ) from the characters that you want to modify. You do this by placing a \ character in fron of each of the parenthesis.

So now we have:

rule 1 /1\(23\)\(45\)/ /67890/

This will replace 12345 with 67890 much like before, but with the parenthesis, we can determine which field in parenthesis we want to keep. They are numbered from left to right, starting with 1. Preceed the field number with a \. Now, to keep only the '45', place the field, 2 in this case, number in the replacement set like follows:

rule 1 /1\(23\)\(45\)/ /\2/

12345 is replaced with 45. If we want to again extract the 45, but prepend 9999:

rule 1 /1\(23\)\(45\)/ /9999\2/

and if we want to swap fields 2 and 1

rule 1 /1\(23\)\(45\)/ /9999\2\1/ results in 99994523.

In your example to treat the * as a dialed digit, rather than a wild card, preceed it with a '\'. I placed the *091 prefix as field number 1, the the four digit extension .... as field number 2. I replaced all but field 2 with 91905337, and followed it with field 2.

See the link below for additional syntax:

http://www.cisco.com/en/US/tech/tk652/tk90/technologies_tech_note09186a0080325e8e.shtml

Hope this helps,

Michael

Hi Michael,

It worked for me great, but now for some reason, when I dial the string I get fast busy and a "unknown number" message on the phone. When I test the translation in IOS it gets translated properly. Nothing has changed on the routed except of CCM upgrade to 4.1.3. Any ideas?

Chris

tony.saloum
Level 1
Level 1

Chris, how do these calls currently route when not in SRST mode, via PSTN or via WAN Link? I'm guessing via PSTN but want to make sure before I take a shot at a solution.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: