Caller ID

 BBS: Inland Empire Archive
Date: 03-22-93 (17:36)             Number: 338
From: DIRK THEURER                 Refer#: NONE
  To: JIM MACALUSO                  Recvd: NO  
Subj: Caller ID                      Conf: (2) Quik_Bas
JM> Has anyone have a QuickBasic routine to grab and decode the
JM> Caller ID information

I wrote a small app to do exactly this. With the
moderator's permission, I can post the retrieval portion
(about 460 lines). In the mean time, here's the CID packet
info (up here they call it "Calling Number Display" or CND):

  '-----8<----------------------snip here---------------------------->8-----
  '
  ' CND data stream:
  '
  '   UUUUUUUUUUUUUUUUUUUUUUUUUUUUUU*nmmddhhmm###############c
  '
  '   ^                             ^^^ ^ ^ ^ ^              ^
  '   ÀÄÄÄÄÄÄÄ series of 30 'U's    ³³³ ³ ³ ³ ³              ³
  '      start of data (ASCII 4) ÄÄÄÙ³³ ³ ³ ³ ³              ³
  ' number of characters in data ÄÄÄÄÙ³ ³ ³ ³ ³              ³
  '    2 digit month (leading 0) ÄÄÄÄÄÙ ³ ³ ³ ³              ³
  '      2 digit day (leading 0) ÄÄÄÄÄÄÄÙ ³ ³ ³              ³
  '     2 digit hour (leading 0) ÄÄÄÄÄÄÄÄÄÙ ³ ³              ³
  '   2 digit minute (leading 0) ÄÄÄÄÄÄÄÄÄÄÄÙ ³              ³
  '   phone number data (if any) ÄÄÄÄÄÄÄÄÄÄÄÄÄÙ              ³
  '                    crc (???) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  '
  ' Notes:
  '
  '  - I have NO idea why an "End of transmission" (ASCII 4) is used to
  '    signal the START of the actual phone number data stream!... and
  '    nothing is used to signal the actual END of data! What gives?!?!
  '  - number of characters in data indicates exactly how many characters
  '    there are between itself and the CRC value
  '  - phone number data can be single character indicating some "other"
  '    condition:
  '    - out of area (a single upper-case O)
  '    - private (a single upper-case P)
  '    - others??? (I haven't seen any yet)
  '  - I have not been able to completely figure out how the CRC is
  '    calculated. I got this 'explanation' from a friend:
  '      "The CRC is the twos compliment of the modulo 256 sum of the other
  '      words in the data message". I suppose that the 'data message' is
  '      just the date/time/phone number portion...???
  '
  '-----8<----------------------snip here---------------------------->8-----

I don't have exact timing info but the data is always sent
between first and second ring at 1200bps, 8 data bits, no
parity, 1 stop bit. (I think the "guard time" is about 50
milliseconds after first ring is complete. I've set up
Telix to receive this data with no problems! %-) )

Oh, it's not completely clear from your message but I guess
you realize that (most) modems do NOT transmit info between
rings... I use a little RS232 adapter called the 'ANI-232'

from:

  Rochelle Communications, Inc.
  8716 North Mopac, Suite 200
  Austin, Texas 78759

  Tel: (512) 794-0088
  Fax: (512) 794-9997

(I paid $80US for mine about 1 1/2 years ago.) I believe
there are other manufacturers as well but don't have
specific info...

Enjoy!

Dirk

PS. Anyone figure out that CRC description and mebbe have
some code to re-generate it?



---
 * Origin: RAVE * Burnaby, BC (1:153/810)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET