How Caller ID Works
Caller ID is a data stream sent by the phone company to your line
between the first and second ring. The data stream conforms to Bell
202, which is a 1200 baud half-duplex FSK modulation. That is why
serial Caller ID boxes run at 1200 baud.
The data stream itself is pretty straightforward. Here's an example:
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUĐ‚'^D 032415122503806467x
The first thing of note is the 30 U's. Those are actually sync pulses. A "U" is 55 hex, or 01010101 binary. This is called the "Channel Siezure Signal."
After that comes 130 milliseconds of 1200 Hz (the Bell 202 "mark" frequency) which usually shows up in the datastream as a character or two of garbage.
That is followed by the "message type word", which is 04 hex for standard Caller ID, 07 hex for Name & Number. A word, by the way, is 8 bits for our purposes.
That is followed by the "message length word" which tells us how many bytes follow.
The next four bytes are the date, in ASCII. In the example above, the date is 0324, or March 24th.
The next four bytes after the date are the time, also in ASCII. In the example, the time is 1512, or 3:12pm.
The next 10 digits are the phone number that is calling. In the example, the phone number is 250-380-6467. The number is also in ASCII and doesn't contain the hyphens. Some phone companies will leave out the area code and only transmit 7 digits for a local call, others will always send the area code as well.
If this were a name-and-number Caller ID data stream, the number would be followed by a delimiter (01h) and another message length byte to indicate the number of bytes in the name. This would be followed by the name itself, in ASCII.
If this call originated from an area that doesn't support Caller ID, then instead of the phone number, a capital "O" is transmitted (4F hex).
If the call was marked "private" as a result of the caller using *67 or having a permanent call blocking service, then instead of the phone number, a capital "P" (50 hex) would be sent.
The very last byte of the data stream is a checksum. This is calculated by adding the value of all the other bytes in the data message (the message type, length, number and name data, and any delimiters) and taking the two's complement of the low byte of the result (in other words, the two's complement of the modulo-256 simple checksum of the CID data).
Do you have a favorite electronics topic that you can write about? Please add a link, and then add your article... Is there a topic you would like to know more about? Post your answer here! Or email us at [our contact page] with your story, and we'll put it online here!
Check out [Facts About Trees]
Search for books about:
|
Interested in AMSOnline January 26 2004 Press Release/PRNewswire?