Here's my rough plan:

Phase 1: Experiments

Small scale breadboard experiments to figure out different elements needed for the full solution, and work out how the overall circuit will need to look.

  • Powering two telephones so they can talk to each other
  • Powering two telephones without them talking to each other
  • Creating a "voice bus" that phones can be connected to using relays (or SSRs)
  • Making a telephone ring (generating the 25Hz 90V ringing signal)
  • Detecting hook status (when the phone is picked up, and also when it is answered while ringing)
  • Getting audio into the bus (to provide dial tone, etc)
  • Getting audio from the bus (to listen for DTMF tones)

Phase 2: Bare-bones build with microcontroller

Build a fully working, but basic, PBX.

  • Selecting a microcontroller or SBC to be the brains of the solution (currently leaning towards a Raspberry Pi as it's powerful enough to be able to do the tone generation and DTMF detection in software and has a built-in ADC/DAC).
  • Connecting all the digital and analogue inputs and outputs required to monitor each line, connect them to the voice bus and make them ring as required.
  • Writing the software to control everything and connect calls.

Phase 3: Add features

At this point most of the hardware will be in place to start adding cool features in software. Things I want to add include:

  • SIP-based outside line support
  • Caller ID
  • Blinkenlights! To monitor hook status, ringing, anything else I can think of