David Stonely & Lawrence Tolman, Department of Electrical and Computer Engineering
Introduction
People who work at an office or home could use more efficient telephone systems. A popular device to help people with telephone communications is the answering machine. However, popular answering machines can only provide generic messaging to all callers. It was proposed to program a personal computer to be an Intelligent Answering Machine that would play selected messages to certain callers using Caller ID to determine different callers. Using funds provided by the Office of Research and Creative Work, a Digital Signal Processor computer add-in board, the IBM Mwave, was purchased along with its development software to provide a basis for the answering machine.
Design
The design was based on the estimated needs of the program. First, it was known that some form of a user interface would be necessary. Initially a window was designed to notify the user that there is an incoming call and also allow the user to make a choice on how the computer treated the call. Second, the design included a data base of names and numbers for the program to match the caller ID information against. The “Phone Book” of names would also have an interface to allow editing previously entered names and adding new names to the data base. Lastly, it was known that the design would need to include a method of searching the phone list by name or by phone number, in order to compare that information with the current caller ID information.
Once the design of the program was complete, it was solidified and implemented in an MS-Windows 3.1 environment. Many of the details of the design were worked out while learning to program Windows and learning the Multimedia Command Interface to the Mwave Board.
Implementation
The main window of the Intelligent Answering Machine contains a menu bar and three control buttons-“Ignore”, “Auto Answer”, and “Pickup” which are self explanatory. The items on the menu bar can be selected to exit the program, setup the answering machine to user preferences, record announcements, playback announcements, and list important persons and their phone numbers in a Phone Book. The main window itself can be minimized when not required, and when calls come in, the window reappears with the control buttons enabled, if the user has decided to be notified about incoming calls.
The Phone Book was implemented as a standard window with a list box containing a list of names and corresponding phone numbers. Also included in the window were several control buttons to designate addition of a name, deletion of a name, and an OK button to close the window. It was known that the list of names would need to be kept in memory so that the program could compare the incoming Caller ID string to user entered data, so a linked list was created with nodes containing first name, last name, and phone number fields as well as pointers to surrounding nodes, The linked list data structure (a group of data nodes which are linked together with pointers) was chosen for its versatility and because it is a dynamic structure which can grow and shrink as nodes are inserted and deleted. This list was used in the Record function to record announcements for people specified by the user.
The Record function was implemented as a dialog box containing a list box for stored (inactive) messages, a list box for active messages, control buttons to move and delete messages, buttons to record and playback announcements, and a pull down menu containing names in the phone book to select for announcement recording. The user selects a name for which to record an announcement, and then pushing the record button, repeats the announcement into the telephone receiver. File names of active announcements are recorded in memory in a linked list so that the program can compare the retrieved Caller ID string to specific phone numbers. Again, the linked list data structure was used for its versatility.
The message playback function was also implemented as a dialog box containing a list box for recorded messages, buttons to control playback of messages, and control buttons to delete old messages, and exit the dialog box. The list of recorded messages is kept in memory in a third linked list with nodes containing the name, phone number, date and time, and an associated file name corresponding to the recorded message.
Problems Encountered
Several problems were encountered during the development of the software. The most difficult to understand and still questioned is a problem with recording an announcement from the handset. Sometimes when recordings are played through the machine and then an attempt is made to make an announcement for a specific telephone number, the software allows the user to talk into the machine, but then doesn’t record the information into a file. Extensive debugging and code testing suggests that the problem lies outside the source code for the answering machine. It is thought to lie within the line drivers for the Mwave board. Attempts to obtain up-to-date drivers and the solution to this problem are in progress.
Several files are initialized into memory by writing them into linked lists. While this is a very economical approach to memory management, it did pose several unforeseen problems. Since data is constantly being written into and read out of the lists, and pointers are used to find correct nodes, it became necessary to assure that the pointers pointed to actual nodes in the list. At the ends of the list, it was necessary to assure that the pointers were not sent to undefined locations. Several unforeseen cases arose where such conditions were not met, and the pointers left the list. The solution to this problem was simple to fix, but there were many cases where this happened.
Conclusion
The device demonstrates that a personal computer can be used as an answering machine to enhance answering efficiency and filter unwanted calls by identifying the caller and leaving specific messages for different callers. The software also allowed the user to successfully playback any messages left by callers on the system speakers. Such a system at present is expensive, but in the future such systems may appear in all homes and businesses.