Number Expansion
Number expansion is an alternative method of adding digits to outgoing calls. Whereas
prefixing is applied to a single dial peer, number expansion is applied globally to all calls,
not just to calls matching a single designated dial peer.
The num-exp global command expands a partial telephone number into a full telephone
number or replaces one number with another. The number expansion table manipulates
the called number. Because number expansion occurs before the outbound dial peer is
matched, for the call to be successful you must configure the outbound dial peer with
the expanded number in the destination pattern instead of the original number. The number
expansion table becomes useful when the PSTN changes the dialing requirements
from seven-digit dialing to ten-digit dialing. In this scenario, you can do one of the following:
■ Make all the users dial all ten-digits to match the new POTS dial peer that is pointing
to the PSTN.
■ Allow the users to continue dialing the seven-digit number as they have before, but
expand the number to include the area code before the ten-digit outbound dial peer
is matched.
Consider Figure 7-5 and Example 7-5. Using the number expansion feature, a caller is
using a seven-digit dial string. However, the number expansion feature configured in the
router prepends the area code of 281 to the dial string. This ten-digit dial string is then
passed to the PSTN.
Figure 7-5 Number Expansion Topology Example
Example 7-5 Number Expansion Configuration
Chapter 7: Configuring Advanced Dial Plans 375
281 555-1234
PSTN
Dialed Number:
555-1234
Transmitted Number:
281 555-1234
V
Router(config)#num-exp 5551... 2815551...
Router(config)#dial-peer voice 2000 pots
Router(config-dial-peer)#destination-pattern 2815551...
Router(config-dial-peer)#port 0/1:23
Router(config-dial-peer)#forward-digits all
Note You can use the show num-exp command to view the configured number expansion
table. You can use the show dialplan number string command to confirm the presence
of a valid dial peer to match the newly expanded number.
Simple Digit Manipulation for POTS Dial-Peers Example
Figure 7-6 shows the operation of simple digit manipulation for POTS dial peers.
1 312 555-0123
PSTN
Phone1-1
2001
User Dials
9 1 312 555-0123
H.323 Gateway
DID: 4085552XXX
V
dial-peer voice 9 pots
destination 9T
no digit-strip 913125550123
prefix 9 and digit-strip
forward-digits 4
digit-strip (default)
Command
913125550123
0123
13125550123
DNIS
Figure 7-6 Simple Digit Manipulation for a POTS Dial Peer
A user dials 9 1 312 555-0123, and the call is handled by the dial-peer voice 9 pots command
on the H.323 gateway. Depending on the commands, the Dialed Number
Information Service (DNIS) information will be modified differently:
■ If the no digit-strip command is used, the DNIS will be 913125550123. No digits
are modified.
■ If the digit-strip command is used, which is the default on all POTS dial peers, the
matched 9 will be stripped off, resulting in a DNIS of 13125550123.
■ If the forward-digits 4 command is used, only the last four digits will be forwarded,
resulting in a DNIS of 0123.
■ If the prefix 9 and digit-strip commands are used in combination, the 9 is first
stripped off and then prefixed again, resulting in a DNIS of 913125550123.
Number Expansion Example
Figure 7-7 and Example 7-6 show how the num-exp command defines short dials.
376 Authorized Self-Study Guide Cisco Voice over IP (CVOICE)
13125550123
PSTN
2001
User Dials 0123
Number Is
Expanded to
13125550123 and
Routed to PSTN
Router
V
Phone Rings
1
2
3
Figure 7-7 Digit Manipulation with Number Expansion
Example 7-6 Digit Manipulation with Number Expansion Configuration
Router(config)#num-exp 0... 913125550...
Router(config)#dial-peer voice 9 pots
Router(config-dial-peer)#destination 9T
If a user dials 0123, the call should be routed to DNIS 913125550123:
1. A user dials 0123.
2. Because the gateway has the configuration num-exp 0... 913125550..., DNIS 0123
is matched and modified to 913125550123. This DNIS matches dial-peer 9, which
routes the call to the PSTN.
3. The PSTN phone rings.
Note This example shows how digit manipulation occurs prior to outbound dial-peer
matching.