Platform SDK: Web Telephony Engine

Controlling the Web Telephony Service

You can control the Web telephony service by performing the operations described below. Note that the account used to log on to the WTE service must have administrator privileges.

There are several ways to perform the preceding operations:

Using Computer Management to Control the Service

The Computer Management application lets you perform the start, hard stop, hard pause, and resume operations.

To use Computer Management

  1. Click the Start button, point to Programs, point to Administrative Tools, and then click Computer Management.
  2. Open the node System Tools and then click Services.
  3. Right-click Microsoft Web Telephony Engine Service and select the desired command from the menu.

Using the Net Utility to Control the Service

The net utility lets you perform the start, hard stop and hard pause operations from the command line. To perform these operations, use one of the following commands.

net start mswtesrv
 
net stop mswtesrv
 
net pause mswtesrv

Using the SC.exe Utility to Control the Service

The SC.exe utility lets you perform the soft-pause and soft-stop operations, flush logging data to the log file, and reload (refresh) configuration parameters from the persistent storage. To perform these operations, use one of the following commands:

Soft pause:            sc control mswtersv 128
Soft stop:             sc control mswtesrv 129
Flush to the log file: sc control mswtesrv 130
Refresh from storage:  sc control mswtesrv 131

Using the ControlService Function to Control the Service

Web telephony supports two private service-control values that you can use in an application to perform a soft-pause or soft-stop operation. These values are defined in the PrivateWTEControlsType enumeration.

To perform a soft pause, pass the wteServicePauseSoft service-control value to the ControlService function.

To perform a soft stop, pass the wteServiceStopSoft service-control value to the ControlService function. Web telephony responds by playing a shut-down announcement to alert each caller that the service is about to stop.

The ShutdownTime and ShutdownAnnouncement properties of the WTEApplication object specify the amount of time that calls are allowed to continue, and the text or wave file that Web telephony uses for the shutdown announcement. These properties can also be configured through the application's property sheet in the WTE administration tool.

Note that if the ShutdownTime property is set to zero, the soft stop behaves like a hard stop. Also, if the ShutdownTime property is set to -1, the time-out period is infinite; that is, if calls do not disconnect themselves, they will not be disconnected when the service is soft paused or soft stopped. After the ShutdownTime property is set to -1, the service will not pause or stop.