Any translation rule gurus

Unanswered Question
Feb 9th, 2007

The documentation is baffling to me and is probably right before my eyes, but here is what I want to do.

In normal mode with MGCP gateways, we are taking 10 digits inbound on our PRI. In CCM, I am taking the last 4 digits and prepending a 4. So 1234 turns into 41234 as a DN

I want to be able to do the same thing in SRST mode. So I need a translation rule that says take the last 4 and add a 4.

So for example even if wrong

/..../ /4..../ Whatever the proper wilcards are.

Thanks to all

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (2 ratings)
Brandon Buffin Fri, 02/09/2007 - 11:18

Assuming that inbound calls are to number in the block 1112223XXX, the following translation rule will translate anything beginning with 1112223 to a number beginning with 43. The remaining digits will be carried through.

voice translation-rule 1

rule 1 /^1112223/ /43/

voice translation-profile 1

translate called 1

dial-peer voice 1 pots

incoming called-n .


translation-profile incoming 1

Hope this helps. If so, please rate the post.


PETER NEGUS Mon, 02/12/2007 - 09:44

a slightly nicer way is

voice translation-rule 4

rule 1 /.*\(....\)$/ /4\1/

voice translation-profile STRIP-DNIS

translate called 1

dial-peer voice 9 pots

translation-profile in STRIP-DNIS

incoming called-number .

Or try [assuming your DID is 666555xxxx]


dialplan-pattern 666555.... extension-length 5

extension-pattern 4....

Which does it all in one command, but litters the system with hidden dial-peers.


This Discussion