09-29-2012 06:43 AM - edited 03-16-2019 01:27 PM
I have a SIP provider and they want the phone number to be presented as 12016543343 I have to dial a 9 to get out of CME. I do not want to dial an extra "1" and then the 10 digit phone number. A simple translation rule to strip the 9 and add a 1 to a 10 digit dialed number would be
Rule 1 /^9\(..........\)//1\1/
I have tried this on a website translation tester and it worked but CME 4.1 just won't take it. It gives error:
Incorrect format for Translation Match Pattern
regular expression must be of the form ^(\^)?(\+)?([0-9,A-F.*%?#]+)$
What could be wrong?
Solved! Go to Solution.
09-29-2012 08:41 AM
I believe the syntax of the translation rule is not what it should be.
If you are going to use the old command "translate-outgoing called", then you also need to use the translation-rule command...However if you are going to use voice translation-profile with the voice translation rule. then you need to apply it to the dial-peer using "translation-profile outgoing" command
So please change your config to this..
dial-peer voice 1 voip
translation-profile outgoing outgoing
Please rate all useful posts
"'Nature is too thin a screen, the glory of the omnipresent God bursts through it everywhere"-Ralph Waldo Emerson
09-29-2012 08:44 AM
yes the syntax was not correct
i came back with the edit and made the correction
09-29-2012 06:53 AM
Hi
Its more simple to proceed with the below
rule 1 /^9/ //
Now in the pots dial peer for PSTN just add the command
prefix 1
Regards
cc
09-29-2012 07:12 AM
Looks simple enough, but I have VOIP dial peer , thus no prefix command. So how do you apply it now?
09-29-2012 07:23 AM
Make sure you have a space in between the match and replace part. From your post it doesn't look like you have that.
voice translation-rule 10
rule 1 /^9\(..........\)$/ /1\1/
Also add a $ to the end of your match string, so that you only will match on the exact pattern that you want it to do. A good rule of thumb is to always make your match as specific as possible to avoid it to match unwanted patterns.
Please rate all useful posts.
Sent from Cisco Technical Support iPhone App
09-29-2012 07:24 AM
Hi
Sorry i forgot that it was a sip trunk
here we are
voice translation-rule 1000
rule 1 /^9/ /1\1/
Note:
The translation that roger provided was also correct and more specific than my.But if you go ahead with roger translation then just remove one (.)
You need nine . not ten !
Regards
chrysostomos
09-29-2012 08:13 AM
I tried this. The phone just resets after you dial a number. Am I configed wrong?
voice translation-rule 1
rule 1 /^9\(..........\)$/ /1\1/ (10 dots for phone number)
dial-peer voice 1 voip
destination-pattern 9.......... (10 dots for phone number)
translate-outgoing called 1
voice-class codec 1
session protocol sipv2
session target ipv4:216.115.69.144
dtmf-relay rtp-nte dial-peer voice 1 voip
09-29-2012 07:39 AM
Nice catch chrysostomos! (+5)
I didn't count the dots.
Edit: Took a look at the original post and he states that he need to send a 1 + 10 dialed digits. So in that case there should be 10 dots in the translation rule.
Sent from Cisco Technical Support iPhone App
09-29-2012 07:59 AM
Roger
You are Absolutely correct
The (+5) is yours
Thank you for the correction
09-29-2012 08:28 AM
Hi
You need
voice translation-profile dnis
translate called 1
dial-peer voice 1 voip
destination-pattern 1.......... (10 dots for phone number) or .T
translation-profile outgoing dnis
voice-class codec 1
session protocol sipv2
session target ipv4:216.115.69.144
dtmf-relay rtp-nte
09-29-2012 08:41 AM
I believe the syntax of the translation rule is not what it should be.
If you are going to use the old command "translate-outgoing called", then you also need to use the translation-rule command...However if you are going to use voice translation-profile with the voice translation rule. then you need to apply it to the dial-peer using "translation-profile outgoing" command
So please change your config to this..
dial-peer voice 1 voip
translation-profile outgoing outgoing
Please rate all useful posts
"'Nature is too thin a screen, the glory of the omnipresent God bursts through it everywhere"-Ralph Waldo Emerson
09-29-2012 08:44 AM
yes the syntax was not correct
i came back with the edit and made the correction
09-29-2012 08:52 AM
I really, REALLY appreciate you guys help. I corrected the syntax to translation-profile outgoing outgoing and now it works. Beautifull. I am in regular CCNA class now and just dived into CME by myself and am learning it. I personally think translations and it's syntax is harder than supernetting..hahah
09-29-2012 09:02 AM
Chrys (+5) Point for your great help on this thread and the great job you are doing on the forum...Well done..Lets continue to make this the best forum ever!
Please rate all useful posts
"'Nature is too thin a screen, the glory of the omnipresent God bursts through it everywhere"-Ralph Waldo Emerson
09-29-2012 09:05 AM
Hi Aokanlawon
Also (+5) for you mate
you deserve it 100%
Regards
chrysostomos
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