Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Configuring a Router as a PSTN switch simulator

Does anyone have a config of how to convert a router as a PSTN PRI and CAS simulator, if possible? In my lab, I have two sites and need to connect them via PSTN. But I have no PSTN simulator. So, I need to know if I can make the router as a PSTN simulator, to simulate a PRI, CAS, FXO switch.


Re: Configuring a Router as a PSTN switch simulator

If the router has a mixture of T1 (or E1) digital trunks and some FXO ports, then all you need to do is to create POTS dial peers that point out the different ports based on the particular called numbers. To initiate the calls you could use a telephone handset on a FXS port, or take the DNIS on one port and switch the call out the other ports.

The POTS dial peers need to use the prefix command to replace the leading digits that are explicitly matched in the destination pattern as the default behaviour is to strip these digits off.

For example :

Calls out the FXO ports will be in the range 5551XXX. The FXO port is 1/0/0 and 1/0/1

Calls out the T1 CAS trunk will be in the range 5552XXX. The T1 CAS trunk is 2/0:0

Calls out the T1 PRI trunk will be in the range 5553XXX. The T1 PRI port is 2/1:23

The FXS port is 1/1/0

controller t1 2/0

framing esf

linecode b8zs

ds0-group 0 timeslots 1-24 type e&m-wink-start dtmf dnis


controller t1 2/1

framing esf

linecode b8zs

pri-group timeslots 1-24

interface serial 2/1:23

isdn incoming-voice voice



voice-port 1/0/0

description - fxo port 1


voice-port 1/0/1

description - fxo port 2


voice-port 2/0:0

description - T1 CAS


voice-port 2/0:23

description - T1 PRI



dial-peer voice 1 pots

description - enable DID on T1 PRI port

incoming called-number .


port 2/0:23


dial-peer voice 2 pots

description - calls to FXO port 1

destination-pattern 5551...

port 1/0/0

prefix 5551


dial-peer voice 3 pots

description - calls to FXO port 2

destination-pattern 5551...

port 1/0/1

prefix 5551


dial-peer voice 4 pots

description - calls to T1 CAS port 2/0:0

destination-pattern 5552...

port 2/0:0

prefix 5552


dial-peer voice 5 pots

description - calls to T1 PRI port 2/1:23

destination-pattern 5553...

port 2/1:23

prefix 5553



Re: Configuring a Router as a PSTN switch simulator

Hi Paul,

Thanks for your input, that helps! Just a question; last time I tried to make a router1 as a PRI switch, and the router2 on the other end of the PRI asked me for a isdn switch-type when I entered the pri-group timeslots command. I don't know what my PRI switch type is because its a router. What should I enter for the isdn switch-type ??



Re: Configuring a Router as a PSTN switch simulator

It would depend on what you want to connect to. I forgot to add that for the ISDN simulation, you do need to add a switch type. You have the following types available -

multi-2-3(config)#isdn switch-type primary-?

primary-4ess primary-5ess primary-dms100 primary-dpnss primary-net5

primary-ni primary-ntt primary-qsig primary-ts014

Some of these are only used with E1 interfaces - it depends on what the device you are connecting to supports.

You may also need to set up the D channel to be network side (NT) ISDN, as IOS defaults to user side (TE) mode.

To do this, you add the command 'isdn protocol-emulate network' under the D channel config. Please note that this command only works with the following ISDN switch types:





Have a look here for more information on network emulation on BRI and PRI ports:

CreatePlease to create content