cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
310
Views
8
Helpful
2
Replies

Any translation rule gurus

e.huntley
Level 1
Level 1

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

2 Replies 2

Brandon Buffin
VIP Alumni
VIP Alumni

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 .

direct-inward-dial

translation-profile incoming 1

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

Brandon

PETER NEGUS
Level 1
Level 1

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]

call-manager-fallback

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

extension-pattern 4....

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