JohnConover_medium.jpg 
john@email.johncon.com
http://www.johncon.com/john/

Modem Telephone Dialing and CID Acquisition


Home | John | Connie | Publications | Software | Correspondence | NtropiX | NdustriX | NformatiX | NdeX | Thanks



home.jpg
john.jpg
connie.jpg
publications.jpg
software.jpg
correspondence.jpg
ntropix.jpg
ndustrix.jpg
nformatix.jpg
ndex.jpg
thanks.jpg

A modem can be used to acquire telephone Caller Identification Data, (CID,) and auto dial phone numbers remotely from a computer. Almost any modem manufactured in the last decade supports CID.

The spcid from the sp.tar.gz source archive is a program written in C that interfaces a computer to a modem for acquisition of CID data, and auto dial telephone numbers from a database. The archive also contains a shell script database, phone.sh, for dialing numbers from a Unix/Linux tab delimited flat file, and the spgettermios and spsettermios programs which are useful for getting and setting serial port termios(3) attributes.

Although there are command line options for configuration, the first few lines of each C program contains default "#define" statements for hard coding program parameters, such as area code, etc. The command to dial a number must be included in the phone.sh, that depends on the system configuration, too. Something like:



            mknod /var/log/cid/scid.dial -p
            spcid /var/log/cid/scid.dial

        

will work using a named pipe to dial numbers. For example, echo 654321 > /var/log/cid/scid.dial would tell the modem to dial phone number 564321. The default command set is for US Robotics modems, (33.6/56K/V.92 modems have been tested.) For listening for CID data, the command is AT&F1E1V1Q0S0=0#CID=1, which specified hardware flow control, display modem commands, display result codes, never answer, and display CID data. The default CID database for the spcid program is /var/log/cid/spcid.log in addition to printing the CID data to stdout. There is a simple Perl(1) script in the source archive, spcid.pl, to query the CID database.

The spcid program also dials numbers from its stdin, (which can be a named pipe, too-perhaps for network wide phone dialing,) and uses ATDTNNNNNNN;H0 to dial the phone number NNNNNNN, and instructs the modem to dial the number using touch tones, and then hang up. So, a user could retrieve a phone number from a data base, take the phone off hook, and instruct the modem to dial the number. The phone.sh shell script is a simple database retrieval mechanism for fetching phone numbers from a tab delimited flat file database using partial key searches. The database schema is the person's first name and last name, separated by spaces in the first field, the type/place of phone, (cellular, home, work, etc.) in the second field, and the phone number in the third field. The fields are separated by a single tab character. The database can be updated using the standard Unix text manipulation utilities, sort(1), paste(1), cut(1), etc.

A note about the C source code. The serial port routines were written for re-usability, and are a template for constructing serial port programs. As a demonstration, there are four additional programs, spttyS0, and, spttyS1, sprawS0, and, sprawS1, that demonstrate the simplicity of re-usability. The spttyS0 and spttyS1 programs are a 9600 baud serial port monitors, (useful as serial consoles,) and the sprawS0 and sprawS1 programs are 9600 baud serial communication programs for simple devices.


License

A license is hereby granted to reproduce this software for personal, non-commercial use.

THIS PROGRAM IS PROVIDED "AS IS". THE AUTHOR PROVIDES NO WARRANTIES WHATSOEVER, EXPRESSED OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, TITLE, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT USE OF THIS PROGRAM DOES NOT INFRINGE THE INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY IN ANY COUNTRY.

So there.

Copyright © 1992-2006, John Conover, All Rights Reserved.

Comments and/or problem reports should be addressed to:

john@email.johncon.com

http://www.johncon.com/john/
http://www.johncon.com/ntropix/
http://www.johncon.com/ndustrix/
http://www.johncon.com/nformatix/
http://www.johncon.com/ndex/



Home | John | Connie | Publications | Software | Correspondence | NtropiX | NdustriX | NformatiX | NdeX | Thanks


Copyright © 1992-2006 John Conover, john@email.johncon.com. All Rights Reserved.
Last modified: Thu Nov 2 18:52:29 PST 2006 $Id: index.html,v 1.0 2006/11/03 02:52:48 conover Exp $
Valid HTML 4.0!