The Alerter Service, Part 2: E-mail by Phone

Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

By Brien M. Posey, MCSE for TechRepublic.com

In our first article on the Alerter Service, I showed you how to configure the service to send you an e-mail message when a threshold limit is reached. I also showed you how to correct the threshold limit problem. As good as this technique is, it still has its disadvantages because you're not on e-mail 24 hours per day. But how cool would it be if your server could detect a problem and then call you on your cellular phone and tell you all about it? In this article, I'll show you how to accomplish just that. As an added bonus, I'll even illustrate how you can use any Touch-Tone phone to check your e-mail.

On This Page

What's the Catch?
What's the Microsoft Cordless Phone System?
The Overall Concept
Setting Up Microsoft Outlook Express
Setting Up Call Manager
Configuring the Alerter Service
The Batch File
Paging
When an Alert Occurs
Conclusion

What's the Catch?

Admittedly, such capabilities sound like tall tales at best, but it is possible to make your server call you when something goes wrong. The catch is that this functionality isn't built directly into Microsoft® Windows NT®. To accomplish such a feat, you'll need a PC running Microsoft Windows® 9x, and you'll need the Microsoft Cordless Phone System and the software that comes with it.

What's the Microsoft Cordless Phone System?

The Microsoft Cordless Phone System is a cordless phone that interfaces with your PC. In addition to providing voice-controlled dialing and message review, the system:

  • Blocks unwanted callers

  • Manages multiple voice mailboxes

  • Verbally announces each incoming call and the caller's name

Microsoft sells the Cordless Phone System for about $200(U.S.).

The Overall Concept

The concept behind making the Alerter Service call you and tell you about an error message is fairly simple. However, setting it up to actually work can be fairly tedious. Before you begin with the setup, it helps to have a general idea of what you're working toward.

Remember that when a Windows NT Performance Monitor counter exceeds a threshold value, the Alerter Service can send a pop-up message, run a batch file, or both. As you've probably already guessed, the first thing that you'll have to do to accomplish your goal is to make the Alerter Service run a batch file. This batch file must generate an e-mail message that the computer can read to you over the phone. The other thing you'll have to do is make the Microsoft Cordless Phone System call you and read that message. Because the Call Manager software that comes with the Microsoft Cordless Phone System isn't capable of responding directly to an e-mail message, you must trigger the call via an inbound call. This is done by building paging capability into your batch file.

Basically what happens is that when a Performance Monitor counter exceeds the threshold you've set, it must run a batch file that generates an e-mail message. The e-mail message is sent to a mailbox that's opened with Microsoft Outlook Express on the Windows 9x PC controlling the Microsoft Cordless Phone System. The batch file must then call the PC that's running the Call Manager software. Because such an operation can only transmit numbers, you must enter the numbers so they to evoke a response from the Call Manager software. Specifically, this means configuring the system so that it forces the page to be left in a message mailbox that's programmed to call your cell phone when a new voice message arrives. When the Windows 9x PC calls you, you'll have a choice between listening to voice messages and listening to e-mail messages. When you choose to listen to e-mail messages, the error report generated by the Alerter Service should be waiting for you.

Before I begin, I should say a couple of quick words about compatibility, to save you some heartache later. First, the Call Manager software that comes with the Microsoft Cordless Phone System requires Windows 95 or Windows 98—it won't run on Windows NT. Second, in order for the Call Manager to be able to read e-mail messages to you, the computer running Call Manager must be running Microsoft Outlook Express. Microsoft Outlook 97, Microsoft Outlook 98, or Microsoft Exchange client cannot be installed on this machine, or the techniques I describe in this article won't work.

Setting Up Microsoft Outlook Express

The first step in the configuration process is to load Windows 9x onto a PC and connect the PC to the network. When you've connected this PC, create a mailbox on your mail server that you can use specifically for server messages. Next, you must configure Microsoft Outlook Express to access this mailbox. To do so, first double-click the Outlook Express icon. When you do, you'll be asked to select a folder where Outlook Express can store your messages. You can use any folder you like, as long as it resides on a volume with lots of free space.

At this point,Outlook Express will launch and open a screen asking for your display name. This is the name that you want other people to see when you send them a message. When you've entered a display name, click Next and you'll be asked for your e-mail address. Enter the e-mail address associated with the special mailbox you've already created and click Next. Now, enter the IP address of your e-mail server in the Incoming Mail Server and Outgoing Mail Server fields, as shown in Figure A, and click Next. If you don't know your mail server's IP address, you can find it by opening an MS-DOS prompt window and pinging it. For example, to ping our mail server, I'd type ping mailroom.xpressions.com.

Cc749959.alert2a(en-us,TechNet.10).gif

Figure A: Enter the IP address of your mail server.

Next, you'll see an authentication screen. Enter the primary user account and password for the mailbox you created, and click Next. At this point, enter the name of the mailbox and click Next. Finally, you'll be asked how you want Microsoft Outlook Express to connect to the Internet. Tell it to connect via your local area network. Outlook Express is now set up.

Remember that in order for our technique to work, Outlook Express must be running at all times. Therefore, it's a good idea to keep this PC in a secured area since it must remain logged on for Outlook Express to work.

Setting Up Call Manager

When you have Outlook Express running successfully, shut down the Windows 9x PC and attach the cordless phone's base station to the PC's serial port. Next, reboot the PC and load the Call Manager software, using the default settings.

Up to this point, you should have your PC connected to the network in a manner that allows Outlook Express to receive messages from a dedicated mailbox. You should also have the Call Manager software installed and the Microsoft Cordless Phone System should be working.

The next step is to create any voice mailboxes that you want the Microsoft Cordless Phone System to use for normal voice mail. You can do this by clicking the Mailbox Setup tab, selecting the Main Greeting option, and clicking the plus sign. For voice mailboxes, use the Message Mailbox option.

When you've created your normal mailboxes, create another mailbox that you can use for alert messages. To do so, select Main Greeting, click the plus sign, and create the mailbox using the Message Mailbox option.

When you've created the mailboxes, they should look similar to the ones shown in Figure B. Notice that our Server Alerts mailbox has the number 6 beside it. This will be important later, because your server must know which mailbox to send an alert to.

Cc749959.alert2b(en-us,TechNet.10).gif

Figure B: Use the Mailbox Setup tab to create your voice mailboxes and your alert mailbox.

When you tell Call Manager to create the Server Alerts mailbox, you'll see the Add Message Mailbox dialog box. Simply fill in the Mailbox Name text box with Server Alerts. You should also select both check boxes, as shown in Figure C. Next, click the Settings button in the Remote Access Number section. When you do, you'll be asked to type and confirm an access number. This number acts as your password when you're accessing voice mail. Now, click OK to return to the Add Message Mailbox dialog box. Click the Settings button in the Notification section. Enter your cellular phone number and click OK. Click OK again to close the Add Message Mailbox dialog box.

Figure C: Your Add Message Mailbox dialog box should contain options similar to these.

Figure C: Your Add Message Mailbox dialog box should contain options similar to these.

Configuring the Alerter Service

Now that the necessary components are in place on the Windows 9x end of things, you must configure the Alerter Service on the Windows NT Server. To do so, simply follow the instructions in our previous article for making the Alerter Service run a batch file when the desired threshold is reached.

The Batch File

As I discussed in The Alerter Service, Part 1: Your New Best Friend, you'll have to create a separate batch file for each alert. However, these batch files can be almost identical. The purpose of the batch files is to send an e-mail message with the alert and to send a voice message that triggers a call from Call Manager.

You can make the batch file send an e-mail message by using the MAPISEND program from the Microsoft Exchange Resource Kit CD. Although I won't go into detail about the specifics of setting up MAPISEND, you can see an outline of the command syntax in Figure D. However, keep in mind that there's more to using MAPISEND than just the batch file portion. To use MAPISEND, you must create a special profile under Microsoft Exchange Client or Microsoft Outlook on the Windows NT machine. You must also enable the Scheduler Service. You can find detailed instructions on setting up MAPISEND in the TOOLS.DOC file on the Exchange Resource Kit CD. If you subscribe to Microsoft TechNet, you can find a copy of the Exchange Resource Kit on the Microsoft BackOffice® Resource Kit 2 Utilities CD.

Cc749959.alert2d(en-us,TechNet.10).gif

Figure D: This is the command-line syntax for the MAPISEND utility.

Paging

As I mentioned earlier, you must configure the Alerter Service to send a special sequence of numbers to the Call Manager software. The first digit you'll want to send is the number of the voice mailbox you've dedicated to server messages. For example, in Figure B, you can see that I'm using mailbox number 6 for server messages. Therefore, if your system is set up like ours, the first digit you'd enter is 6. However, keep in mind that you'll want a delay before you start sending digits. This allows the Call Manager software, which is expecting a voice message from a human, to have time to play its greeting and wait for a mailbox number before you actually send the mailbox number. To do this, place several commas in front of the mailbox number. The number of commas you need depends on the length of your main greeting. You can experiment with the values to determine the optimum number of commas.

Next, you'll want to enter a few more commas to create a second delay. This gives Call Manager a chance to switch to the appropriate mailbox and play the mailbox greeting. Finally, enter five or six random numbers. These numbers will be the actual elements of the voice message.

Now that you know what numbers to send to the pager mailbox, you may be wondering how to send them. After all, the Alerter Service doesn't have native paging capabilities. To send a page, you must use dial-up networking. To do so, go to your Windows NT Server and select the Dial-Up Networking command from the Accessories menu. When you do, you'll see a message stating that the phone book is empty. Click OK to clear this message. Next, Windows NT will prompt you to enter a name for a new phone book entry. Enter ServerAlerts in the text box and click the check box, as shown in Figure E. Click Finish to continue.

Cc749959.alert2e(en-us,TechNet.10).gif

Figure E: Create a new phone book entry using these settings.

At this point, you'll see the New Phonebook Entry dialog box. Enter the phone number for the computer controlling Call Manager in the Phone Number text box. You should enter this number in the manner I described earlier with the commas, mailbox number, and other information. Select your modem from the Dial Using drop-down list. When you've finished, your options should resemble those shown in Figure F. Click OK to close the New Phonebook Entry dialog box.

Cc749959.alert2f(en-us,TechNet.10).gif

Figure F: Enter the phone number in the manner I described earlier.

When you've configured a phone book entry that can dial Call Manager and leave a numeric message in the ServerAlerts mailbox, you must instruct your batch file to use it. You can do this by using the RASDIAL command. Simply place the following commands at the end of your batch file:

RASDIAL SERVERALERTS
RASDIAL /DISCONNECT

The first RASDIAL command forces the batch file to dial the string of numbers you specified in the ServerAlerts phone book entry. The second command hangs up the modem after it's dialed the number. Not all modems require the second command, so you'll have to experiment to see what works best for you.

When an Alert Occurs

When an alert occurs, the Alerter Service will launch the batch file you've created, which in turn sends an e-mail message to your inbox and dials Call Manager and leaves a numeric message. After the hang-up command is issued, Call Manager will call your cellular phone and tell you that you have a new voice message. Next, it will ask you for the mailbox number. When you enter your mailbox number and remote access code, you'll hear a message that will say something like, "You have one new voice message and one new e-mail message. To listen to your voice message, press 1. To listen to your e-mail messages, press 2." Select the option to listen to your e-mail messages, and you'll hear the message generated by the server alert. Isn't technology great!

Conclusion

In this article, I've shown you how to make the Alerter Service call you on the phone and verbally describe the current state of the server. I've also explained all of the special considerations you need to know about when setting up such a configuration.

Brien M. Posey is an MCSE who works as a freelance writer. He also works as a network engineer for the United States Department of Defense. You can contact him via e-mail at Brien_Posey@xpressions.com. Due to the high volume of e-mail that he receives, it's impossible for him to respond to every message, but he does read all messages and responds when possible.

flaglogo

We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages. All prices for products mentioned in this document are subject to change without notice.