No description
Find a file
2024-12-12 00:02:10 +00:00
pi-phone Remove pointless line 2024-12-12 00:02:10 +00:00
stupid-option-2 intense stupidity ensues 2024-11-01 13:34:22 +00:00
track-generator Add requirements.txt 2024-11-02 11:03:50 +00:00
.dockerignore Alter 3 files 2024-11-01 19:53:36 +00:00
.gitignore Update .gitignore 2024-11-04 23:43:56 +00:00
build.sh Add build.sh 2024-11-02 11:09:50 +00:00
deploy.sh Add deploy.sh 2024-11-04 10:43:30 +00:00
Dockerfile Alter 2 files 2024-11-01 20:54:02 +00:00
elevator-music.mp3 intense stupidity ensues 2024-11-01 13:34:22 +00:00
flow.jpg Update README 2024-11-07 15:32:16 +00:00
go.mod intense stupidity ensues 2024-11-01 13:34:22 +00:00
go.sum intense stupidity ensues 2024-11-01 13:34:22 +00:00
piphone.system Add systemd service file 2024-11-07 15:22:09 +00:00
README.md Update README.md 2024-11-07 15:36:53 +00:00

pi-phone

In a pinch? Need 100 digits of Pi? Call the Pi Hotline! 01834 820860


This codebase and the associated audio files forms the basis of a Twilio TwiML application that plays out a little something like this:

flow chart of the phone line

Twilio is configured to, when the phone is called, run a webhook that points to the /api/calls/new route of the Go app contained in this repository.

There is a small web page that is used to manually initiate phone calls, and the backend can be configured to schedule calls to be made at certain times.

The project structure is:

  • /pi-phone - the main Go code that runs the TwiML server
    • /pi-phone/static/audio - the source audio files to be played down the phone line - these were lifted from this online TTS service with minor modifications.
  • /stupid-option-2 - source audio files that were compiled to make /pi-phone/static/audio/option-two.mp3
  • /track-generator - a small Python script used to generate an audio file reading the digits of Pi at a suitable speed

A systemd service is included in the base of this repository, and serves as an example of how to configure the server's environment variables.