02-26-2015 12:23 AM - edited 03-19-2019 09:14 AM
Hi guys,
We have a ISDN PRI numbers in CME, for example 5607500 and internal DN beginning 51XX, the Internal translation rule is working properly, for example when I call the number 5607575 but is forwarded to the DN 5175.
How to create an outbound translation rule?
When I call from the number 5175, he went into the city through 5607575?
Thank you.
!
voice translation-rule 1
rule 1 /56075\(..\)/ /51\1/
!
voice translation-rule 2
rule 1 ????????????
!
!
voice translation-profile DID
translate called 1
!
voice translation-profile OutDID
translate called 2
!
!
dial-peer voice 1 void
description ***Cucm1***
destination-pattern [1-4]...$
session protocol sipv2
session target ipv4:10.x.x.x
voice-class codec 1
dtmf-relay h245-alphanumeric
no vad
!
dial-peer voice 2 voip
description ***Cucm2***
destination-pattern 50..$
session protocol sipv2
session target ipv4:192.x.x.x
voice-class codec 1
dtmf-relay h245-alphanumeric
no vad
!
dial-peer voice 10000 pots
description Incoming
translation-profile incoming DID
incoming called-number .
no digit-strip
direct-inward-dial
port 0/0/0:15
!
dial-peer voice 1000 pots
description Local city
preference 3
translation-profile outgoing OutDID
destination-pattern 9.......T
port 0/0/0:15
forward-digits 7
!
dial-peer voice 1001 pots
description Shirt no
preference 3
translation-profile outgoing OutDID
destination-pattern 91..
port 0/0/0:15
forward-digits 3
!
dial-peer voice 1002 pots
description Long distance1
preference 2
translation-profile outgoing OutDID
destination-pattern 90[2-8].........
port 0/0/0:15
forward-digits 11
!
dial-peer voice 1003 pots
description Long distance2
preference 1
translation-profile outgoing OutDID
destination-pattern 905[0345]........
port 0/0/0:15
forward-digits 11
!
dial-peer voice 1004 pots
description International
translation-profile outgoing OutDID
destination-pattern 900.T
port 0/0/0:15
forward-digits 14
!
Solved! Go to Solution.
02-26-2015 05:17 AM
You need two types of translation in your scenario:
1) Outbound Calling Party Number: This one is to present calling number in full DID format when calling out. So we are translating it using the rule 2 and apply the profile for outgoing calls, which will translate calling party. Your called number doesnt need any translation, it will just match the destination-pattern defined on the dial-peer.
2) Inbound Called party number translation: This is when someone dials your company DID number, you translate it to your extensions, that you have informed ia already working. Its using rule 1 and is working on incoming dial-peer.
Refer to below documents for a deeper understanding of translation rules and dial-peers:
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/14074-in-dial-peer-match.html
Also change your dial-peers destination-pattern :
dial-peer voice 1000 pots
description Local city
translation-profile outgoing OutDID
preference 3
destination-pattern 9.......$ << For 7 digit dialling, remove T replace with$
port 0/0/0:15
forward-digits 7
Also do try to rate all helpful posts, if someone is trying to help you.
-Terry
02-26-2015 02:16 AM
You can do it two ways:
1)CUCM: This is the preffered way and you should do it this way.
In CUCM, You should set the external phone number mask to 56075XX under the phone, Line configuration page.
And in your route patterns, under calling party transformations check the box: Use Calling party's external phone number mask.
This would then send the complete calling number when a call is made and you wouldn't need any translation.
2) Second method is using translation rule:
Try below:
voice translation-rule 2
rule 1 /^51\(..$\)/ /56075\1/
!
voice translation-profile TEST
translate calling 2
dial-peer voice 1 voip
translation profile incoming TEST
incomin called-number . (add this to match the incoming calls from CUCM)
Please test the voice translation ruke before applying using command test voice translation-rule 2
5110 (I am not in front of a console to test, so just confirm the above translation rule is correct, if not let me know)
Let me know how you go.
-Terry
Please rate all helpful posts
02-26-2015 03:33 AM
Dear Terry Cheema,
Thank you for your prompt response,
I want to call out from CME and change number for each dn,
For example when i calling from dn's 5100-5199 i call from 5607500, but i want call for each dn each PRI number.
5101-5607501
5102-5607502
5103-5607503
etc..
02-26-2015 03:47 AM
Ok then try:
voice translation-rule 2
rule 1 /^51\(..$\)/ /56075\1/
!
voice translation-profile OutDID
translate calling 2
You have already applied this OutDID profile to your outgoing dial peers.
Try this and let me know how you go.
-Terry
Please rate helpful posts
02-26-2015 04:01 AM
I checked does not work
voice translation-rule 2
rule 1 /^51\(..$\)/ /56075\1/
!
voice translation-profile OutDID
translate calling 2
!
dial-peer voice 10000 pots
description Incoming
translation-profile incoming DID
incoming called-number .
no digit-strip
direct-inward-dial
port 0/0/0:15
!
!
dial-peer voice 1000 pots
description Local city
translation-profile outgoing OutDID
preference 3
destination-pattern 9.......T
port 0/0/0:15
forward-digits 7
!
VGW#test voice translation-rule 2 5100
Matched with rule 1
Original number: 5100 Translated number: 5607500
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
VGW#test voice translation-rule 2 5105
Matched with rule 1
Original number: 5105 Translated number: 5607505
Original number type: none Translated number type: none
Original number plan: none Translated number plan: none
VGW#test voice translation-rule 2 95607500
95607500 Didn't match with any of rules
02-26-2015 04:49 AM
Did you make a test call? Can you make a test call and post debug voip ccapi inout?
Why are you testing with 95607500? We are translating the calling number on outbound dial peer from 51XX to 5607xx which appears to be working fine from testing of the translation rule.
-Terry
02-26-2015 04:54 AM
make sure you are applying as per my post:
voice translation-rule 2
rule 1 /^51\(..$\)/ /56075\1/
!
voice translation-profile OutDID
translate calling 2 <<< translation rule is translating calling number not called number
02-26-2015 05:11 AM
ok, how can i create rule for called number?
I want every caller called in accordance with its own number, which could then be call back
02-26-2015 05:17 AM
You need two types of translation in your scenario:
1) Outbound Calling Party Number: This one is to present calling number in full DID format when calling out. So we are translating it using the rule 2 and apply the profile for outgoing calls, which will translate calling party. Your called number doesnt need any translation, it will just match the destination-pattern defined on the dial-peer.
2) Inbound Called party number translation: This is when someone dials your company DID number, you translate it to your extensions, that you have informed ia already working. Its using rule 1 and is working on incoming dial-peer.
Refer to below documents for a deeper understanding of translation rules and dial-peers:
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/61083-voice-transla-rules.html
http://www.cisco.com/c/en/us/support/docs/voice/call-routing-dial-plans/14074-in-dial-peer-match.html
Also change your dial-peers destination-pattern :
dial-peer voice 1000 pots
description Local city
translation-profile outgoing OutDID
preference 3
destination-pattern 9.......$ << For 7 digit dialling, remove T replace with$
port 0/0/0:15
forward-digits 7
Also do try to rate all helpful posts, if someone is trying to help you.
-Terry
03-03-2015 03:49 AM
Thank you for all, already working
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