11-19-2014 08:18 AM - edited 03-17-2019 01:01 AM
Hello all,
I cannot get this translation rule to take. It is not accepting the match string and I cannot see what is wrong with it.
Here is the rule - /^1919454\(....\)$/ /\1/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Solved! Go to Solution.
11-19-2014 08:45 AM
Hi.
You are configuring a translation-rule but you should configure a voice translation-rule
Voice translation-rule 1
Rule 1 /^1919454\(....\)$/ /\1/ is ok
HTH
Regards
Carlo
11-19-2014 01:33 PM
Hi.
Correct.
In order to be more specific and match number range of the other side (1919454[2-489]...) as per dialpeer 2, you can modify you rule as follows
voice translation-rule 1
rule 1 /^1919454\([2-489]...\)$/ /\1/
HTH
Regards
Carlo
11-19-2014 08:45 AM
Hi.
You are configuring a translation-rule but you should configure a voice translation-rule
Voice translation-rule 1
Rule 1 /^1919454\(....\)$/ /\1/ is ok
HTH
Regards
Carlo
11-19-2014 08:55 AM
Hi,
Can you try it this way:
Rule 1 /^1919454\(....$\)/ /\1/
Usually this rule, should preserve last 4 digit of the string after match is done. $ is basically used to indicate end of string. So makes less usage outside of set.
So if initial number is 19194541234, then after translation it would be 1234.
Hope that helps.
11-19-2014 09:09 AM
Carlo,
Thank you so much, I was racking my brain trying to figure that out. Such a simple fix.... Anyways, again, thank you!
11-19-2014 11:43 AM
I will put my config below, but let me explain the issue first. I am having trouble making outbound calls to my other network. I have the translation rule in place and I thought that alone would route the calls, but I cannot get them to route without dial-peer 2 (see below). I checked the debug and the calls are not being translated from an 11 digit number to a 4 digit number as I had hoped. Any thoughts?
voice translation-rule 1
rule 1 /^1919454\(....\)$/ /\1
!
voice-port 2/0
!
voice-port 2/1
!
voice-port 3/0
station-id name White_Uniden
station-id number 1000
caller-id enable type 1
!
voice-port 3/1
station-id name Orange_Uniden
station-id number 1001
caller-id enable type 1
!
dial-peer voice 1000 pots
destination-pattern 1000
port 3/0
forward-digits all
!
dial-peer voice 1001 pots
destination-pattern 1001
port 3/1
forward-digits all
!
dial-peer voice 1 voip
destination-pattern [2-489]...
session target ipv4:172.16.1.1
!
dial-peer voice 2 voip
destination-pattern 1919454[2-489]...
translate-outgoing called 1
session target ipv4:172.16.1.1
!
dial-peer voice 3 pots
description 10 DIGIT DIALING FOR 3/0
destination-pattern 14043191000
port 3/0
!
dial-peer voice 4 pots
description 10 DIGIT DIALING FOR 3/1
destination-pattern 14043191001
port 3/1
11-19-2014 12:12 PM
Hi.
Please give an example of an example of what you dial and what you expect to route out and I can elaborate a config for you.
Thanks
Regards
Carlo
11-19-2014 12:20 PM
Carlo,
I would like to be able to dial 1919454[2-489]... | This is the range of extensions I have on a neighboring network. Right now, as the config sits, the calls route without issue. I was just under the impression that the translation rule I created would strip the first 7 digits off and only forward out the final 4 dialed digits.
11-19-2014 12:34 PM
Hi.
Sure.
rule 1 /^1919454\(....\)$/ /\1/
means if you match something starting with 1919454 followed by other 4 digits, translate it with rule set 1 (....)
So in this case, with dp 2, you are sending only the last 4 digits following number 1919454.
Is this what you need?
Let me know
Regards
Carlo
11-19-2014 12:59 PM
Ok, great, I understand. So dial-peer 2 is necessary in order for the calls to route? But it is only sending out the last 4 digits? So on the other network it will receive only a four digit number.
11-19-2014 01:33 PM
Hi.
Correct.
In order to be more specific and match number range of the other side (1919454[2-489]...) as per dialpeer 2, you can modify you rule as follows
voice translation-rule 1
rule 1 /^1919454\([2-489]...\)$/ /\1/
HTH
Regards
Carlo
11-20-2014 09:32 AM
Carlo,
I am running into an issue.
So, I am attempting to call the number 1-919-454-4000 from the router with the translation rule I have been having issues with. If everything works as it should, the router should be stripping off "1-919-454" and forwarding out "4000"
To verify, I removed the secondary number of 19194544000 on the dn that number is assigned to and the call fails.
If I revert the number back to its original state, the call routes.
++++++++++++++++++++++++++++++++++
Just for reference, this is my outbound dial-peer for this number range
11-20-2014 10:38 AM
Hi.
So let's try in this way.
voice translation-profile OUT
translate called 1
dial-peer voice 2
no translate-out 1
translation outgoing OUT
Please let me know
Regards
Carlo
11-20-2014 11:37 AM
Carlo,
That did it! Again, thank you very much for taking the time to help me through this learning process.
11-20-2014 11:57 AM
You are welcome my friend and it's a true pleasure helping you.
Regards
Carlo
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