webspace hosting reseller hosting| web hosting| blog| forum| dating| free hosting| openhost| report abuse
Fax to Email

Unlimited Faxes, No Fees, Dedicated Phone Number

Free Website Templates

Telephone stuff

Here are some things related to telephones and telephone systems. This is just a small amount of what I've learned so far. I might add more when I feel like it.

Dialing

There are two ways to dial a number on a modern telephone system. The modern way is Dual-Tone Multi-Frequency (DTMF). The older way is pulse dialing.

DTMF dialing

Here are the tones produced for the DTMF method. The tone for a digit is the sum of two sine waves whose frequencies are the frequencies listed for the row and column of the key.

High Frequencies (Hz)
1209 1336 1477 1633
Low
Frequencies
(Hz)
6971 ABC
2
DEF
3
FO
A
770 GHI
4
JKL
5
MNO
6
F
B
852 PQRS
7
TUV
8
WXYZ
9
I
C
941 * OPER
0
# P
D

You might have noticed there is a column on the right-hand side which is not normally found on a telephone. These buttons are for priority levels and were originally meant to be used by the military or somesuch stuff. I don't really know. Google it if you want to know about them. Here's what I do know about them, though:

Pulse dialing

The older pulse-dialing method involves disconnecting (pulsing) the line rapidly the same number of times as the number you wish to dial (in countries other than the US this might be different). For example, to dial a "5", you'd pulse five times in rapid succession. To dial a "0", though, you would pulse ten times. Optimally it should be between eight and eleven pulses per second.

Computer-generated tones

These are some tones I've generated with simple computer programs. Also included are the source code for the programs I wrote. If you look at the programs you must gouge your eyes out afterwards. I'm just kidding, but not really. Heh.

I also have programs to generate Special Information Tones (SIT) and Call Waiting/Caller ID data (aka an Orange Box), but I just haven't gotten around to putting them on here. If you really want them, you can just ask me nicely, and I'll put them up.

All of these programs produce raw PCM data on standard output, so you'll have to pipe it to another program (or open the raw data in a sound editor) to play the sound. They all output signed 16-bit 1-channel (mono) samples at a 16kHz sampling rate (see telephone.h to change this). One way to play the sound (on a GNU/Linux system) is to run "program | sox -t sw -r 16000 -c 1 - -t ossdsp /dev/dsp", where program is one of these programs. Another way is to run "program | sox -t sw -r 16000 -c 1 - filename.wav" and then play filename.wav with your favourite sound player (or any other sound player; it doesn't have to be your favourite one).

To compile a program, first compile telephone.c into an object file (you can't link it yet), then compile whichever program you want and include telephone.o and the standard math library for linkage. Here's how I like to do it without a Makefile:

export CFLAGS='-Wall -O2'
make telephone.o
LDFLAGS='telephone.o -lm' make dialtone

Banana Phone

Banana Phone! No description necessary.