There are a lot of ways to manipulate digits on a voice gateway. The simplest way to do digit manipulation is to use the Cisco global command “num-exp”.
In the first example the incoming called number 2000 is translated to 3050.
num-exp 2000 3050
In this example we are translating 2000 to 5552000:
num-exp 2000 5552000
There are a couple of ways to translate the outgoing caller ID on a PRI. I typically use the a voice translation rule. In the following example I am translating the caller ID of all internal extensions in the 2000-2999 range to a full e.164 number by pre-pending 248555 to the extension number:
voice translation-rule 1
rule 1 /^2/ /2485552/
!
voice translation-profile outboundid
translate calling 1
voice-port 0/0/0:23
translation-profile outgoing outboundid
To pre-pend 91 to incoming Caller-id so you can dial directly from the “Missed Calls” menu on the IP Phone use the following example:
voice translation-rule 2
rule 1 /^\(.*\)/ /91\1/
!
voice translation-profile prepend-91
translate calling 2
!
voice-port 0/0/0:23
translation-profile incoming prepend-91