A Microcontroller-Based System For

Intelligent Telephony


Barry Fagin

Olivier Beillard*

Thayer School of Engineering

Dartmouth College

Hanover, NH  03755  USA


*IRESTE, University of Nantes, France.






We present the design of a microcontroller-based system for intelligent telephony.  In addition to providing the ability to play different messages in response to distinct calling parties, our system combines calling number identification with digital recording and playback capabilities to permit audible announcement of the calling party between rings, using the calling party's voice.  We discuss implementation issues and plans for future prototypes using newer technology. 


1.0 Introduction


            With the introduction of Combined Local Access Signaling Service technology, or CLASS, telephone companies are providing an increasing number of powerful services to subscribers [1].  One such service, Calling Number ID, permits the identification of the number of the calling party at the receiver [2].  We have designed a system for intelligent telephony that makes extensive use of this technology, to provide features not found in many existing devices.


            We present an overview of system functionality, discussing basic subcomponents and their interaction.  Software and hardware are described, along with suggestions for future work.


2.0 System Functionality


            Our device is capable of a variety of functions, including


1) Calling number identification.  Our system is equipped to identify and display the number of the calling party if the phone network supports calling number ID.


2) Caller-specific answering messages.  If calling number ID is supported by the network, the system can play an answering message specific to the number of the calling party.


3) Call database management.  The system maintains a database of recorded calls, including the number, time of call, and message left.  Any information in the database may be accessed through the keyboard.  Database size is limited by available memory; the current prototype can store information for 100 calls.  The device also contains an autodialer, and can dial any number in the databook with the push of a button.


4) Caller-specific audio identification.  The device can play a prerecorded message on a loudspeaker, based on the number of the calling party.  Thus the voice of the calling party can be heard in between rings, announcing the identity of the caller.


3.0 The Prototype System


            A block diagram of the device is shown in Figure 1.  It consists of three subsystems: a telephone interface, a speech subsystem, and a microcontroller/memory subsystem.  Each of these is connected to an 8-bit data bus.  An analog output is used by the speech subsystem and telephone interface. 


            The device itself connects to a standard telephone network and telephone.  Commands are input through a keyboard, with characters output on a liquid crystal display. A microphone and speaker are also provided for recording and playback of messages, along with an autodialer for the rapid dialing of databook numbers.


 3.1 The Telephone Interface


            The telephone interface connects the telephone and network with the rest of the system.  A diagram of the telephone interface is shown in Figure 2.  The telephone and network connect to an FCC Part 68 approved Data Access Arrangement circuit, or DAA.  The DAA in turn has a bidirectional connection to the system audio output.  The network also connects to a caller ID circuit, or CID.  When calling party information is detected on an incoming call, the resulting bit-serial stream is placed on the data bus for consumption by the microcontroller.  Finally, the telephone interface includes the dialer, which has a unidirectional connection to the system audio output.


 3.2 The Speech Subsystem


            The speech subsystem is responsible for all recording and playback of speech signals, as shown in Figure 3.  An 8-bit PCM CODEC provides A/D and D/A signal conversion.  Digital CODEC values can be written to or driven by a 1-Mbyte RAM, addressed by a 20-bit counter.  Portions of this counter can be loaded from the data bus if the appropriate driver is enabled, to select appropriate messages for recording and playback.


            The RAM stores all system messages, both incoming and outgoing.  The number of messages and the length of each are a function of available memory.  Based on an 8KHz sampling rate for 8-bit samples, we obtain _130 seconds of time for each megabyte of memory.  Tradeoffs may be made for with regard to the number of messages and message length at the convenience of the user.


 3.3 Microcontroller/Memory Subsystem


            Like other systems for intelligent telephony (see for example [3]) our device is microcontroller-based.  The microcontroller and its attached memory are shown in Figure 4.


            The microcontroller executes instructions from the ROM chips, while the RAM holds the database and other runtime-dependent values. Currently, both RAM and ROM chips are 8Kx8.  The microcontroller issues 16-bit addresses, the upper 3 of which are decoded to activate various control points in the machine: the RAM and ROM chip select lines, the keyboard, the LCD display, the message RAM counter, and a parallel I/O controller (not shown).  The remaining 13 bits are sent directly to the ROM and RAM chips.


4.0 System Operation


            The microcontroller executes instructions stored in ROM.  All system code fits in one 8Kx8 ROM; the other is currently unused  The system operates in two modes: automatic mode and user mode.


 4.1  Automatic Mode


            When the machine is not being employed by the user, it monitors the phone line for an incoming call.  The device handles these calls in the following manner:


1) Ring signal detection.   The DAA is polled for the occurrence of a ring signal.  Once one is detected, the CID circuit is powered up and activated.


2)  Calling number identification.   The CID circuit extracts the caller-ID string from the phone line and places it bit-serially on the data bus.  The microcontroller processes this information and looks for entries in the database that match it.  If the information is garbled or unavailable then the database is not searched.  This could be caused by noisy phone lines, connection to a non-CLASS network, or the blocking of ID information by the calling party [4].


3)  Caller-specific audio identification.    If a matching database entry is found, the microcontroller retrieves its address in the message RAM and loads the message RAM counter.  The announcement message associated with the calling number is then played back from RAM through the CODEC to the speaker, in between each ring. 


4)  Caller-specific response.   After a user-selectable number of rings, the phone is forced off hook by the microcontroller, and the answering message stored in the appropriate databook entry is played back..This time, the output of the CODEC is sent through the DAA to the phone network.


5)  Recording of message.   Any message from the caller is recorded in the message RAM.  The data and time of the call are stored in the database.


            At any time during this process, the user may pick up the phone.  This cancels all remaining operations.


 4.2 User Mode


            The system may also be interrogated by the user through the keyboard.  The user can examine the database, add or delete entries, dial entries with the push of a button, and play back all messages associated with the database. Autoanswering capabilities can be disabled, the time can be set, and all messages associated with incoming calls since the last use of the machine can be examined.


5.0  Hardware Description and Future Work


            Our device measures 14" x 12" x 3", about the size of a conventional answering machine.The design was developed using the techniques described in [5].  The prototype is a wire-wrapped design containing approximately 40 discrete components.  We estimate the size could be reduced by a factor of two by replacing logic chips with a single field programmable gate array, a special kind of user-programmable integrated circuit that can replace large numbers of chips [6].  Further reductions might be possible through the use of application-specific integrated circuits, and by replacing the microcontroller with a more advanced processor.  A truly aggressive approach employing full custom VLSI design might produce a prototype  the size of a large calculator.


            Future improvements include backup battery circuitry so that database contents are not lost on power down, and the addition of more memory to increase database size and message length.


6.0 Acknowledgement


            The authors would like to thank Doug Dapice and New England Telephone for their assistance in procuring a CLASS network simulator.  We also thank Professor Yves Thomas and IRESTE at the University of Nantes for their support of the Dartmouth/Thayer exchange program. Finally, we thank Thayer School Staff Engineer Doug Fraser and Tad Truex for their technical expertise and assistance.


            This project was designed at the Thayer Rapid Prototyping Facility, a laboratory for the rapid design and construction of electronic systems.


7.0 References


[1] Perry, T.S., "Telephone Challenges: A Plethora of Services",   IEEE Spectrum,   July 1990, pp 25-28.


[2] CLASSSM Feature: Calling Number Delivery,  Bellcore Technical Reference TR-TSY-000031,   Issue 3, January 1990.


[3] Ooi, T.H. and Lau, K.T., "Enhanced Telephone Set on the Inter-IC Bus",  IEEE Transactions on Consumer Electronics,   Vol. 36 No. 1, February 1990, pp 18-22.


[4] CLASSSM Feature: Calling Number Delivery Blocking,  Bellcore Technical Reference TR-TSY-000391,   Issue 2, January 1988.


[5] "Embedded Real-Time Systems: A Specification And Design Methodology",  John Wiley Publishing, October 1992.


[6] Fagin, B., "Quantitative Evidence of FPGA Utility in Special and General Purpose Processors",  Journal of VLSI Signal Processing   Special Issue on Field Programmable Gate Arrays, 1993, in press.


Figure 1: System Diagram




Figure 2: Telephone Interface



Figure 3: Speech Subsystem



Figure 4: Microcontroller/Memory Subsystem










Barry Fagin (S'84 - M'87) received the A.B. degree in engineering from Brown University, Providence, RI, in 1982, and the M.S. and Ph.D. degrees in computer science from the University of California, Berkeley, in 1984 and 1987.  Currently, he is an Assistant Professor of Computer Engineering at the Thayer School of Engineering, Dartmouth College, Hanover, NH, where he is Director of the Thayer Rapid Prototyping Facility.  His research interests include computer architecture, special purpose processor design, and rapid system prototyping.  Dr. Fagin is a member of the IEEE Computer Society, the Association for Computing Machinery, SIGARCH, SIGCAS, and Sigma Xi.














Olivier Beillard received the Baccalaureat Degree from the Institut Universitaire de Technologie (IUT) at Angers, France, in 1989, and the Master's Degree in electrical and computer engineering from the Institut de Recherche et d'Enseignement Superieur aux Techniques de l'Electronique (IRESTE), at the University of Nantes, France, in 1992.  He is currently serving in the French armed forces, and looks forward to a career in industry.