PSTN fun
Encrypted phone system based on cheap phones and PC soundcards.
Contents
Test System[edit]
PBX[edit]
Small phones easy to interface with soundcard[edit]
- 3 ordered here
Stereo to mono splitter[edit]
PC with a soundcard and ALSA-libs installed[edit]
Ideas[edit]
Reusing audsl[edit]
audsl is a software modem implementation, using yr soundcard as a DAC/ADC http://www.araneus.fi/audsl/
it's a bit dated using OSS as audio api, we should get it patched to use ALSA
- http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html
- http://www.alsa-project.org/main/index.php/PCM_Ring_Buffer
From [1]:
"AuDSL is an experimental software modem for low-speed Internet connectivity over leased copper lines using PC sound cards as the line interface. The acronym AuDSL stands for Audio Digital Subscriber Line."
Compiling audsl (aka make)[edit]
To avoid g++ errors, include <sys/socket.h> in audsld.cc
Compiling tests (aka make test)[edit]
To avoid compiler errors, include <cstdio> in test/test-hdlc-tx.cc
OSS/ALSA issues[edit]
[/dev/dsp is missing][edit]
AuDSL is based on OSS and needs /dev/dsp and /dev/mixer devices to run. If your Linux distribution supports ALSA oss-emulation (Ubuntu 10.04 LTS and Debian do), load snd-pcm-oss module.
[audsld - playback mmap: Input/output error][edit]
Since AuDSL uses OSS mmap() function, some permissions must be set. That was solved by [2]. Run the code above to solve it:
for pcm in `find /proc/asound -name 'pcm*p'`; do echo erase >${pcm}/oss echo erase >${pcm%p}c/oss
echo audsld 0 0 direct >${pcm}/oss echo audsld 0 0 disable >${pcm%p}c/oss done
[Audio device does not support mono mode][edit]
That's from a ioctl call which sets the MONO mode in your soundcard (audio-io.h,56):
int stereo = 0; if (ioctl(fd, SNDCTL_DSP_STEREO, &stereo) == -1) { fprintf(stderr, "SNDCTL_DSP_STEREO: %s\n", strerror(errno)); exit(1); } if (stereo != 0) { fprintf(stderr, "Audio device does not support mono mode\n"); exit(1); }
Unsolved - hw problem ?
Speex[edit]
Patent-free audio compression format designed for speech [3]
Links[edit]
Books[edit]
- Understanding Telephone Electronics, Fourth Edition book
- Linux Audio Programming (Chapter 5) - Programming Linux Games book