This post will look at telephone handset part of the console.<p> When you answer the phone you get a voice that gives you launch orders.<p>
The first question is why has the console got a telephone built in?
A) I needed a way of giving out target info for a drill launch.
B) I got a few phone handsets from my tech recycler.
C) Why not?
</center>
I decided that pre-recorded sound bites of numbers and a few words gave me the options to have the phone say all kinds of targets with no real extra work.
All the sound was done using aplay (ALSA sound) but the defualt is to play from the HDMI, it is possable to have the Raspberry Pi output sound to the headphone jack, but switching is fidly, and also I can't play sound from the phone and the TV at the same time
The solution was to add a second sound card, and then when I call aplay I can select which sound card I need.
The electrics of the phone was mostly luck and guessing, I just soldered the phone wires directly to the output of the sound card and it worked. Should I have used some kind of impedance matching system? don't know and don't care :-)
Strange bug was that after playing sound my keypad stopped working.
half a day of testing and reducing to most simple example of bug showed that calling out to os.system() mucking up the interupt stuff that the keypad needed.
The fix was to change to code to use subprocess.call()
</center>
LINK:
tar ball of code that made the phone speak.