Testing voice circuits in Cisco IOS

The easiest way to test outbound calls is to build a simple plain old telephone service (POTS) dial-peer on the voice gateway. For example:

!
dial-peer voice N pots
 destination-pattern 9T
 port X/Y/Z
!

You can use the csim start dialstring hidden command to initiate simulated calls to whichever real-world E.164 number is desired. This allows you to determine whether you can properly go offhook from the router to the PSTN, send digits, and complete a call to the destination phone. You can modify the POTS dial-peer appropriately to account for long-distance access codes and other prefixed digits as necessary. In the example above, the POTS dial-peer can match on any string of digits starting with “9”, and all digits that follow the “9” are played out voice-port X/Y/Z.

On POTS dial-peers, destination-patterns with wildcards have all exact digit matches stripped off. That means on:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
!

when “12345678” comes into the router, it matches with the dial-peer, but only “5678” gets passed onwards to the PBX since the “1234” are exact digit matches and get stripped off. Depending on what your PBX is looking for to be able to route a call, this may be a problem.

Refer to these commands as workarounds:

Any of these now sends the entire string “12345678” off to the PBX:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
 forward-digits all
!

or:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
 no digit-strip
!

or:

!
dial-peer voice X pots
 destination-pattern 1234....
 port 1/0:0
 prefix 1234
!