Skip to content

friedeas/w3FeTAp

Repository files navigation

w3FeTAp

Converting a Fernsprechtischapparat (FeTap) 791-1 into a VoIP phone utilizing a Pi Zero W, Linphone and some Python code. And so an old-fashioned device from the 80s becomes a top modern World Wide Web Telephone Table Device, or in short w3FeTAp.

In the project documentation I show the individual steps of the assembly process.

Seriously?

Actually, I just wanted to show my kids that phones didn't always look like this. I got the FeTap 791-1 cheaply on eBay and didn't want to let it just sit around uselessly. Fortunately, I came across these two websites, which made it easy for me to get started.

Which parts did I use

  • FeTap 791-1
  • Raspberry Pi Zero W v.1.1
  • USB sound card (I used the LogiLink UA0078)
  • USB to micro USB adapter
  • ATTiny25 based circuit to generate 25 Hertz alternating voltage to rin the bell (buck–boost converter solution didn't work well enough for me)
  • A simple, self-designed perfboard for the hook switch and to be able to read the pulses of the dial cleanly
  • A small strip grid board for the Duo-LED control
  • A few small parts like hexagon nylon spacers, jack plugs and cables
  • Superglue and baking soda

Preparing and testing the system

  1. Follow the instruction here: https://github.com/raspberrypi/rpi-imager to install the Raspberry Pi Imager for your operating system

  2. Select your Raspberry Pi version and the OS (I selected Bookworm based Pi OS)

  3. Use the OS customisation menu to

    • Configure the Wi-Fi credentials
    • Your keyboard layout
    • Enable SSH in the services tab
  4. Start the Pi Zero and install the required packages

    $ sudo apt install linphone-nogtk pulseaudio doxygen python3-pip python3-rpi-lgpio python3-pystache python3-six
  5. Poweroff the Pi Zero (to prevent an unwanted restart bacause of the inrush current problem)

    $ sudo poweroff
    • Connect the USB sound card via the micro USB adapter
  6. Set PulseAudio as the audio configuration

    $ sudo raspi-config
    • Advanced Options -> Audio Config -> PulseAudio
  7. Test the audio setup

    • Connect a headphone and an microphone with the USB sound card
    • Check the output
      $ speaker-test -t wav
    • Try to record a short test sequence
      $ arecord -d 5 -f cd test.wav 
    • Check the recording
      $ aplay test.wav

    [!TIP] In case of issues try to solve them. This page could be helpful https://wiki.archlinux.org/title/PulseAudio Troubleshooting#Microphone_not_detected_by_PulseAudio


  8. Configure an IP phone account

  9. Make a test call

    • Prepare Linphone

      $ linphonecsh init
      $ linphonecsh soundcard playback
      $ linphonecsh soundcard ring
      $ linphonecsh register --username YOUR_USER_NAME --host 192.168.178.1 --password YOUR_PASSWORD

      [!TIP] Make sure to use the username and password of your IP phone account Replace the IP 192.168.178.1 with the IP of your Fritzbox or server name of your VoIP provider


    • Initiate an outbound SIP call

      $ linphonecsh dial 'sip:**610@192.168.178.1'

      [!TIP] **610 is the internal number of a phone regisered as a IP phone on a Fritzbox. Replace replace this with your target phone number or matching internal number


      [!NOTE] Apparently the prefix sip: and the @hostname part was or is not necessary, but it already led to the error message "Error from linphone_core_invite" for me dialing without the prefix. But I assume that it is usually because the registration failed


      [!TIP] This command can be used to check if the registration was successful.
      $ linphonecsh status register

  10. Setup Python and install the project

    • Change to the home directory
    $ cd ~
    • Clone the w3FeTAp project repository
    $ git clone https://github.com/friedeas/w3FeTAp
    • Create a virtual Python environment in this folder (allow usage of system packages and name it pyenv)
    $ python3 -m venv --system-site-packages --prompt pyenv ~/w3FeTAp/pyenv
    • Change to the w3FeTAp directory
    $ cd w3FeTAp
    • Install w3FeTAp via pip (the -e switch is optional but would allow you to edit the Python files)
    $ pip install -e .
  11. Start the w3FeTAp app manually

    • Configure your SIP account The sip.config file ned to contain the following variables:

      username=
      host=
      password=

    $ nano ~/w3FeTAp/sip.config
    • Start the app manually
    $ python -m w3_fetap.w3_fetap_app
    • If everything worked well, the green LED should flash briefly and then remain permanently green and no error messages should appear in the console.
    • If you encounter issues try to use the Python scripts in the tests folder to solve them
  12. Automate the start if you wish

    • Use .bashrc to automatically start w3FeTAp
    $ nano .bashrc
    • Add the following line as the last entry in this file. The flock command ensures that w3FeTAp is only launched once.
    flock -n ~/w3FeTAp/w3lockfile ~/w3FeTAp/w3fetap-service.sh &

Third-Party Software

The folder "bell ringer" contains code from the project Telefonklingel mit Tiny25 ansteuern under the GNU General Public License, Version 2.

The folder audio containse the file 1TR110-1_Kap8.1_Waehlton.ogg, created by arvedkrynil, that is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic. Source https://de.wikipedia.org/wiki/Datei:1TR110-1_Kap8.1_Waehlton.ogg

About

Linphone and Python based software for a rotary dial VoIP phone utilizing a Raspberry Pi Zero W

Resources

License

Stars

Watchers

Forks