T1 and PSTN Access Labs

In this activity we will configure your Asterisk server to contact the Public Switched Telephone Network (PSTN) using a dedicated T1 PRI voice trunk to a telephone company. This would normally be a service which you would pay for incoming and outgoing (termination and origination) connections to the PSTN and which you would access over a dedicated digital T1 voice trunk. In our case you will connect to a simulated PSTN connection which will be able to call several test numbers and other pods but is not actually connected to the real PSTN.

Topology Diagram

VoIP Labs Logical Topology

Physical Wiring

For the T1 portion of this lab you will need to physically connect the router serving as a T1 gateway for your pod to the "phone company" which is the T1 PSTN Simulator. There is a specific port on the T1 PSTN Simulator which has the correct phone numbers assigned to it for your pod (this would be the set of T1 wires coming into your business) so it is important you connect to the correct port. See the diagram below which indicates which port on your T1 gateway router should be connected to the T1 PSTN Simulator.

T1 Physical Port Connection Diagram
Pod 1 is the same as Pod A, Pod 2 as Pod B, etc.

IP Addressing & Phone Numbers

These are the IP addresses and phone extension numbers assigned to your pod which you can use for your pod.

Pod Phone Extension Range VoIP Classroom Switch Uplink Port T1 PSTN Numbers Assigned ITSP PSTN Numbers Assigned

Pod A

0100-0199

Gi1/0/1

5105550100-5105550199

5104440100-5104440199

Pod B

0200-0299

Gi1/0/2

5105550200-5105550299

5104440200-5104440299

Pod C

0300-0399

Gi1/0/3

5105550300-5105550399

5104440300-5104440399

Pod D

0400-0499

Gi1/0/4

5105550400-5105550499

5104440400-5104440499

Pod E

0500-0599

Gi1/0/5

5105550500-5105550599

5104440500-5104440599

Pod F

0600-0699

Gi1/0/6

5105550600-5105550699

5104440600-5104440699

Pod G

0700-0799

Gi1/0/7

5105550700-5105550799

5104440700-5104440799

Pod H

0800-0899

Gi1/0/8

5105550800-5105550899

5104440800-5104440899

Pod I

0900-0999

Gi1/0/9

5105550900-5105550999

5104440900-5104440999

Pod J

1000-1099

Gi1/0/10

5105551000-5105551099

5104441000-5104441099

If you previously used different extension numbers for your phones you should probably change to using these extension numbers for simplicity.

Instructions

  1. Connect for Gi 0/0/0 on your pod router to a port on your pod switch.

  2. Connect a serial console cable to your pod router for programming

  3. Get an ISDN PRI T1 connection from the "phone company" (your instructor) to your router. This will require connecting a T1 crossover cable to the correct port on the PSTN ISDN Switch Simulator. See the diagram above for what the correct T1 port on the PSTN simulator is for you to connect to based on your pod.

    Just like with a regular phone line coming in the wall you need to plug your Pod into the correct port on the PSTN ISDN Switch Simulator. This is not an IP network where you can plug in wherever you’d like. Also, be sure to use a special T1 crossover cable for this connection.
  4. Update your router configuration to allow it to serve as an ISDN<→SIP gateway device which will convert ISDN T1 calls to and from SIP VoIP calls which can be routed by Asterisk.

  5. Configure the basic configuration on your PodX VoIP Router which is acting as the PSTN T1 gateway device. Make sure you can ping to and from your Asterisk server. .

  6. Update your pjsip.conf file to add the required registration, endpoint, aors, and identity sections required to connect to your ISDN Router (T1 Gateway device).

  7. Modify your extensions.conf file to allow internal extensions to place calls out to the PSTN through the ISDN Router device (which is the connection to your T1) if the number begins with a 9 for an outside line. If you had a working ITSP SIP PSTN conneciton this will just involve changing which endpoint those calls are being directed to.

    You will want to think about all the different types of numbers someone could call and create dialplan rules in Asterisk to handle all of them. For some of these you will need to use pattern matching, for others like 911, you probably want to match the exact number for dialing timeout speed reasons.
    Most states now require phone systems to allow people to dial 911 directly, without needing to dial 9-911 for an outside line. You should program your system to call 911 on the PSTN for BOTH 911 and 9-911.
  8. Try placing calls out to the PSTN and make sure things are all working and that they are going through the T1 and NOT the ITSP connection. You can verify how the call is being handled by watching the Asterisk console while you place the call and ensuring it shows ISDNrouter.

    • Test at least the following types of calls:

      1. Local calls (both by dialing 7-digit numbers and 10-digit numbers)

      2. Long distance calls (calls to a different area code than the 510 area code, and which begin with a 1)

      3. Toll-free numbers (1-800, 1-888, etc.)

      4. Per-minute premium charge numbers (1-900)

      5. Emergency Services (911, 9-911)

      6. Directory Assistance (411)

      7. International Numbers (Numbers beginning with 011)

  9. Verify all your toll-fraud preventions you had in place for calling out from various types of extensions to the PSTN for the ITSP SIP PSTN provider are still working.

  10. Verify your extensions.conf file is still setup to allow calls FROM the PSTN to your internal phones (each extension has a phone number like 510555XXXX where XXXX is the extension number when calls come through the T1 PSTN provider). Note that the phone number for calls coming in over the T1 starts with 510-555-XXXX which is a different prefix then when calls came in over the SIP PSTN ITSP provider. This will require adding these new incoming numbers to your dialplan so that Asterisk can route the calls appropriately.

  11. Find another pod who has calling out to the PSTN working and try placing calls from each pod to the other pod to verify incoming PSTN calls are working. You can also try calling the the test number at 510-555-0000 and hanging up as soon as the call is answered and you should get a call back from the phone company test system.

Cleanup

  1. Safely shutdown your Debian system

  2. Erase your switch/router configuration

  3. Put away all equipment and cables. Be sure to note which phones you have so that next week you’ll be able to get the same phones.


Document Build Time: 2026-11-04 20:50:41 UTC
Page Version: 2026.08
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License