CURRENT ISSUE Contests

bottom corner

Feature Article





Issue #212 March 2008

LESSONS FROM THE TRENCHES
Do You Want to Do a Design?

Linked Lists
by George Martin

Start | Design Challenge |Database Design | Use A Linked List | Design Implementation | Code Review | Sources & PDF

DESIGN CHALLENGE

A few months ago, a customer asked if I would add a feature to their product. The customer wanted me to have their product call out using the telephone interface whenever a problem was detected. The design already had a PBX interface that passed FCC Part 68. The PBX interface was used to permit a user to call the unit and enter commands. After a few more discussions, the customer thought that there might be 10 events that would cause a call out to be initiated and that there should be four telephone numbers to dial for each of the 10 events. The numbers would be dialed and a message played to the user. If the user entered the proper response, the error event would be considered reported; if not, the next number would be called.

This is a straightforward design and coding task, but some issues need to be looked at. First, the hardware interface does not have call progress monitoring. That means that we can not detect activities or conditions such as dial tone, ringing, or call answered. I suggest that we use timers in a state machine design to pace the code through the calling process. We can assume certain times for each of the states of the telephone line interface. Because we’re calling friendly users (their numbers have been determined to be available for calling), this should be acceptable. The detail of interfacing with the PBX hardware is very dependent on the specific interface. With your indulgence, I would like to skip over this part of the design. Your interface will most likely be different than mine, and you’ll need to match your software design to your calling hardware (see Listing 1).

Also, we need a way to enter the numbers to dial for each of the problem types that we can detect. And I would add a log file to log the activity. I would like to have a record that we tried to call and no one answered or we could not get a free line.

Previous | Next

 


bottom corner