Digit Prefixing

Digit Prefixing
Digit prefixing adds digits to the front of a dial string before it is forwarded to a telephony
interface. Use the prefix command when the dialed digits leaving the router must be
changed from the dialed digits that had originally matched the dial peer. For example,
consider Figure 7-4. A call is dialed using a four-digit extension, such as 2123, but the
call needs to be routed to the PSTN, which requires 10-digit dialing. If the four-digit
extension matches the last four digits of the actual PSTN number, you can use the prefix
5125552 command to prepend the seven additional digits needed for the PSTN to route
the call to 512 555-2123. After the POTS dial peer is matched with the destination pattern
of 2123, the prefix command prepends the additional digits and the string
“5125552123” is sent out of the voice port to the PSTN.
dial-peer voice 2000 pots
destination-pattern 2…
preference 1
prefix 5125552
port 0/1:23
dial-peer voice 2000 pots
destination-pattern 2…
session target ipv4:10.1.1.1
Dialed Number:
2123
Transmitted Number:
5125552123
10.1.1.1 512 555-2123
V V
WAN
WAN is down!
PSTN
Figure 7-4 Digit Prefixing Example