/mcpTruncate Called Number to 4 Digits
! voice translation-rule 4 rule 1 /.*(....)/ /\1/ ! voice translation-profile STRIP-TO-4 translate called 4 !
Gateway# test voice translation-rule 4 8675309 Matched with rule 1 Original number: 8675309 Translated number: 5309 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
Stripping Plus + From the Called Number
! voice translation-rule 999 rule 1 /+(.*)/ /\1/ ! voice translation-profile STRIP-PLUS translate called 999 ! Gateway# test voice translation-rule 999 +8675309 Matched with rule 1 Original number: +8675309 Translated number: 8675309 Original number type: none Translated number type: none Original number plan: none Translated number plan: none
Translation Rules can also be applied directly to a dial-peer without first being applied to a translation- profile.
! voice translation-rule 1 rule 1 /1234/ /8678309/ ! voice translation-rule 2 rule 2 /^4...$/ /1408515\0/ ! dial-peer voice 1 voip translate-outgoing called 1 ! dial-peer voice 2 voip translate-outgoing calling 2 !
Translation Profile on Trunk Group