Dela via


MSS Class

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The MSS class contains members for viewing and modifying Speech Server configuration settings. The MSS class incorporates many of the members in the SES and TAS classes from the previous release of Speech Server. Several members from the SES and TAS classes are now obsolete in the Speech Server. For a list of obsolete properties from the previous version of Speech Server, see the Obsolete Properties section in this topic.

The following syntax is simplified from Managed Object Format (MOF) code.

Syntax

class MSS
{
????????uint32 ShutdownTimeout;
????????uint32 TCPListeningPort;
????????uint32 TLSListeningPort;
????????uint32 InactiveTimeout;
????????string AudioConnectionIP;
????????uint32 AudioConnectionMinPort;
????????uint32 AudioConnectionMaxPort;
????????uint32 MaxIncomingCalls;
????????uint32 MaxOutgoingCalls;
????????uint32 MaxDiskCacheSize;
????????string WorkingFilesLocation;
????????uint32 UpperMemoryThreshold;
????????uint32 WorkerStartupTimeout;
????????string WireCodecList[];
????????uint8 TLSCertSerialNumber[];
????????string TLSCertIssuerName;
????????string InstallDir;
????????boolean UseMss2004TIM;
????????string WorkerProcessRecycleTime;
????????uint32 RemotingPort;
????????uint32 GracefulStop();
????????uint32 InvalidateCache();
????????uint32 RefreshSettings();
????????uint32 Recycle();
};

Methods

The MSS class has the following methods.

GracefulStop

Issues an asynchronous request to stop Speech Server after waiting for call sessions to end. The amount of time the method waits is determined by the value of the ShutdownTimeout property. Stopping the service in this manner differs from a normal stop request, which forcibly disconnects all current sessions and stops the service.

The method returns one of the values in the following table; any other value indicates an error.

Value Description

0

Success

2

Access denied

8

Unknown failure

This method is exposed in the Speech Server Administrator console.

InvalidateCache

Issues asynchronous request to Speech Server to invalidate cached pages. This request causes the service to reload the application manifest file and all associated resources. This request also causes Speech Server to reload the start page for any idle SALT interpreters and to recompile and recache any cached application prompt files or scripts.

The method returns one of the values in the following table; any other value indicates an error.

Value Description

0

Success

2

Access denied

8

Unknown failure

Information about the status of the InvalidateCache request is returned immediately. However, the service requires time to process control commands. The return code from the method indicates that the request was only accepted by the service, not that the request was successfully carried out.

Because this service control method is asynchronous, the client must take steps to obtain the results of the call. There are two possible ways to obtain results:

  • Subscribe to an event that provides a notification when the service reaches the required state.
  • Poll the instance and check the status property until it is correct or a time-out occurs.

This method is exposed in the Speech Server Administrator console.

Note

You can also invoke the InvalidateCache method using the following command at the command prompt: sc control MSSpeechService 131.

RefreshSettings

Issues an asynchronous request to Speech Server to retrieve updated settings from the registry. Use this method if you have changed properties and want them to take effect without restarting the Speech Server service.

Note

RefreshSettings does not affect properties that require a service restart for changes to those properties to take effect. To determine whether a property requires a service restart, see the property descriptions later in this topic.

The method returns one of the values in the following table; any other value indicates an error.

Value Description

0

Success

2

Access denied

8

Unknown failure

This method is not exposed in the Speech Server Administrator console.

Note

You can also invoke the RefreshSettings method using the following command at the command prompt: sc control MSSpeechService 132.

Recycle

Issues an asynchronous request to recycle the Speech Server worker processes. This method waits for active call sessions to complete but no longer than the amount of time specified by the ShutdownTimeout property. After that amount of time, active call sessions are disconnected and the processes are recycled.

The method returns one of the values in the following table; any other value indicates an error.

Value Description

0

Success

2

Access denied

8

Unknown failure

This method is not exposed in the Speech Server Administrator console and can only be issued using a WMI script.

Properties

The MSS class has the following properties.

ShutdownTimeout

Data type: uint32

Specifies the maximum time, in seconds, allowed for Speech Server to finish all ongoing sessions when the service receives a pause or graceful stop request (from the GracefulStop() method or sc command) or during an application domain or process recycle. At the end of this period, any remaining open sessions are forcibly closed and the service pauses, stops, or recycles. This time-out is not applied if the service is issued a request to stop immediately. When an immediate stop request is issued, all calls or sessions are disconnected immediately.

You must restart the Speech Server service for changes to this property to take effect. The default value of ShutdownTimeout is 300. This property is exposed in the Speech Server Administrator console.

TCPListeningPort

Data type: uint32

Specifies the port number on which Speech Server listens for incoming invites from SIP peers using TCP network connections

You must restart the Speech Server service for changes to this property to take effect. The default value of TCPListeningPort is 5060. This property is exposed in the Speech Server Administrator console.

TLSListeningPort

Data type: uint32

Specifies the port number on which Speech Server listens for incoming invites from SIP peers using TLS network connections

You must restart the Speech Server service for changes to this property to take effect. The default value of TLSListeningPort is 5061. This property is exposed in the Speech Server Administrator console.

InactiveTimeout

Data type: uint32

Specifies the maximum time, in seconds, allowed for the application start page to execute before taking a prescribed action. If the property is exceeded, Speech Server responds based on the current state of the application. The following table lists the responses for each case.

Application State Speech Server Response

Start page execution if a SMEX message is not received from the SALT voice response application.

Logs an error and execution of page failures.

A request to download a Web resource if the resource has not yet been downloaded.

Aborts the request and, if there is an active call, redirects the caller to a system error page, if one exists.

Phone call completion if the SALT voice response application fails to exit or begin handling a new call.

Logs an error and the application closes.

Any other state.

Resets the interpreter that was servicing the request.

The default value of InactiveTimeout is 120. This property is exposed in the Speech Server Administrator console. Setting the value to zero (infinite timeout) is not recommended.

AudioConnectionIP

Data type: string

Specifies the specific IP address that Speech Server monitors for audio connection requests from a client. If not otherwise specified, the service listens to all IP addresses on the computer.

You must restart the Speech Server service for changes to this property to take effect. This property is exposed in the Speech Server Administrator console.

AudioConnectionMinPort

Data type: uint32

Specifies the minimum IP port of the port range that Speech Server monitors for audio connection requests from a client.

You must restart the Speech Server service for changes to this property to take effect. The default value of AudioConnectionMinPort is 1024.This property is exposed in the Speech Server Administrator console.

AudioConnectionMaxPort

Data type: uint32

Specifies the maximum IP port of the port range that Speech Server monitors for audio connection requests from a client.

You must restart the Speech Server service for changes to this property to take effect. The default value of AudioConnectionMaxPort is 65535. This property is exposed in the Speech Server Administrator console.

MaxIncomingCalls

Data type: uint32

Specifies the maximum number of simultaneous incoming calls for all telephony channels to the computer running Speech Server. Use this property to ensure that the number of incoming calls does not exceed the capacity of Speech Server.

You must restart the Speech Server service for changes to this property to take effect. This property is exposed in the Speech Server Administrator console.

MaxOutgoingCalls

Data type: uint32

Specifies the maximum number of simultaneous outgoing calls for all telephony channels from the computer running Speech Server. Use this property to ensure that the number of outgoing calls does not exceed the capacity of Speech Server.

You must restart the Speech Server service for changes to this property to take effect. This property is exposed in the Speech Server Administrator console.

MaxDiskCacheSize

Data type: uint32

Specifies the maximum size, in megabytes, of the disk cache used to store application resources, such as grammars and prompt databases.

The default value of MaxDiskCacheSize is 1024. This property is not exposed in the Speech Server Administrator console and can only be configured with a WMI script.

WorkingFilesLocation

Data type: string

Specifies the directory used by Speech Server to store application-specific temporary data.

You must restart the Speech Server service for changes to this property to take effect. The default value of WorkingFilesLocation is %TEMP%. This property is exposed in the Speech Server Administrator console.

UpperMemoryThreshold

Data type: uint32

Specifies the virtual memory usage, in megabytes, above which Speech Server logs an error, rejects requests for new sessions, and begins failover handling for the worker process.

You must restart the Speech Server service for changes to this property to take effect. The default value of UpperMemoryThreshold is 1600 (1.6 GB). The maximum value of this property is 3,072. This property is not exposed in the Speech Server Administrator console and can only be configured with a WMI script. Changes to these settings should be tested in a safe environment before implementing them on live production servers. Changing these settings can cause extensive changes to the entire system.

WorkerStartupTimeout

Data type: uint32

Specifies the maximum time, in milliseconds, that Speech Server waits for a worker process to start.

You must restart the Speech Server service for changes to this property to take effect. The default value of WorkerStartupTimeout is 900. This property is not exposed in the Speech Server Administrator console and can only be configured with a WMI script. Changes to these settings should be tested in a safe environment before implementing them on live production servers. Changing these settings can cause extensive changes to the entire system.

WireCodecList

Data type: string array

Specifies the prioritized list of codecs the platform uses during the media format negotiation with the SIP peer.

The default value of WireCodecList is an array consisting of the following values in priority order: "RTAudio16KHz" "RTAudio8KHz" "G.723.1(6.3)" "G.711u" "G.711a".

The listed order of the codecs determines the priority in which the codecs are used to negotiate the media format with SIP peers. If the SIP peer does not use a listed codec, the next one in the list is used until it is established that both endpoints (Speech Server and the SIP peer) are using the same codec. You can change the order based on the codec preference of the SIP peers communicating with Speech Server.

Note

If either of the RTAudio codecs (16 KHz or 8 KHz) is determined to be the negotiated media format, Speech Server only receives audio in that codec. To send audio, Speech Server uses the next mutually supported non-RTAudio codec in the list.

This property is exposed in the Speech Server Administrator console.

TLSCertSerialNumber

Data type: uint8 array

Specifies the serial number of the certificate to be used by Speech Server for Mutual TLS. The certificate must match the following criteria:

  • The certificate must use the X.509 standard.
  • The intended purpose must include server authentication.
  • The certificate name must be the fully qualified domain name (FQDN) of the server.
  • The date time stamps must make the certificate currently valid.

You must restart the Speech Server service for changes to this property to take effect. This property is exposed in the Speech Server Administrator console.

TLSCertIssuerName

Data type: string

Specifies the name of the issuer of the certificate used by Speech Server for Mutual TLS.

You must restart the Speech Server service for changes to this property to take effect. This property is exposed in the Speech Server Administrator console.

InstallDir

Data type: string

Specifies the directory in which Speech Server has been installed.

The default value of InstallDir is %ProgramFiles%\Microsoft Office Communications Server 2007 Speech Server\. This property is not exposed in the Speech Server Administrator console.

UseMss2004TIM

Data type: boolean

Specifies whether Speech Server expects to use a Telephony Interface Manager (TIM) for the audio connection of phone calls. If this property is set to true, Speech Server uses the protocols appropriate for communicating with TIM and the Telephony Interface Manager Connector (TIMC), a special type of SIP peer. If false, Speech Server communicates with SIP peers using SIP and Real-time Transport Protocol (RTP). Because of the boolean nature of this property, using TIMs and SIP peers (other than TIMC) simultaneously is not possible.

Note

You cannot use the Voice Response Debugging Window dialog box in Microsoft Visual Studio 2005 to call voice response application if UseMss2004TIM is set to true.

The default value of UseMss2004TIM is false. This property is not exposed in the Speech Server Administrator console and can only be configured with a WMI script. You must restart the Speech Server service for changes to this property to take effect.

For more information about TIMC, see TIMC Class.

WorkerProcessRecycleTime

Data type: string

Specifies the local time, in HH:MM format (24-hour clock), to automatically recycle the Speech Server worker processes. The scheduled recycle occurs once per 24-hour period. If this property is set to \"\", there is no scheduled recycle.

You must restart the Speech Server service for changes to this property to take effect. The default value of WorkerProcessRecycleTime is 03:00. This property is not exposed in the Speech Server Administrator console and can only be configured with a WMI script.

RemotingPort

Data type: uint32

Specifies the local remoting port on which the Speech Server service listens for connections from other Speech Server processes on the same computer (such as, SESWorker.exe). This property provides a way to configure the remoting port if another process on the computer running Speech Server is configured to use the same port.

Note

Speech Server does not start if it is configured to use the same remoting port as another process on the computer.

You must restart the Speech Server service for changes to this property to take effect. The default value of RemotingPort is 8036. This property is not exposed in the Speech Server Administrator console and can only be configured with a WMI script.

Obsolete Properties

While many properties from the obsolete SES and TAS classes in the previous version of Speech Server are included in the current MSS class, the following table lists properties that remain obsolete in Speech Server.

Property Class

AllocationTimeout

SES

AllowAnonymousAccess

SES

AudioConnectionPort

SES

AudioConnectionTimeout

SES

AudioDataTimeout

SES

AudioHeaderTimeout

SES

DiskCacheLocation

SES

EnableAppSmex

SES

EnableAudioCompression

SES

EnableFailoverWorkerProcess

SES

EnablePromptEndSignal

SES

EngineAttributes

TAS

Lang

TAS

LoadMemoryLimit

TAS

LowerMemoryThreshold

SES

NumOutInterpOverride

TAS

ProcessMemoryLimit

TAS

RecordingDirectory

TAS

RecycleCallLimit

TAS

ScheduleRecycle

TAS

ScriptTimeout

TAS

SpeechBargeIn

TAS

SpeechServer

TAS

State

SES, TAS

StartPageIn

TAS

StartPageInRefreshTime

TAS

Remarks

Only one instance of the MSS class exists for each computer.

Requirements

Server: Requires Microsoft Windows Server 2003 with Speech Server.

Namespace: Included in \root\mssv2.

Windows Management Instrumentation (WMI) Script Example

The following WMI script retrieves the instance of the MSS class on the local computer and displays the value of each property.

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\MSSV2") 
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM MSS",,48) 
For Each objItem in colItems 
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "MSS instance"
    Wscript.Echo "-----------------------------------"
    Wscript.Echo "AudioConnectionIP: " & objItem.AudioConnectionIP
    Wscript.Echo "AudioConnectionMaxPort: " & objItem.AudioConnectionMaxPort
    Wscript.Echo "AudioConnectionMinPort: " & objItem.AudioConnectionMinPort
    Wscript.Echo "InactiveTimeout: " & objItem.InactiveTimeout
    Wscript.Echo "InstallDir: " & objItem.InstallDir
    Wscript.Echo "MaxDiskCacheSize: " & objItem.MaxDiskCacheSize
    Wscript.Echo "MaxIncomingCalls: " & objItem.MaxIncomingCalls
    Wscript.Echo "MaxOutgoingCalls: " & objItem.MaxOutgoingCalls
    Wscript.Echo "RemotingPort: " & objItem.RemotingPort
    Wscript.Echo "ShutdownTimeout: " & objItem.ShutdownTimeout
    Wscript.Echo "TCPListeningPort: " & objItem.TCPListeningPort
    Wscript.Echo "TLSCertIssuerName: " & objItem.TLSCertIssuerName
    If isNull(objItem.TLSCertSerialNumber) Then
        Wscript.Echo "TLSCertSerialNumber: "
    Else
        Wscript.Echo "TLSCertSerialNumber: " & Join(objItem.TLSCertSerialNumber, ",")
    End If
    Wscript.Echo "TLSListeningPort: " & objItem.TLSListeningPort
    Wscript.Echo "UpperMemoryThreshold: " & objItem.UpperMemoryThreshold
    Wscript.Echo "UseMss2004TIM: " & objItem.UseMss2004TIM
    If isNull(objItem.WireCodecList) Then
        Wscript.Echo "WireCodecList: "
    Else
        Wscript.Echo "WireCodecList: " & Join(objItem.WireCodecList, ",")
    End If
    Wscript.Echo "WorkerProcessRecycleTime: " & objItem.WorkerProcessRecycleTime
    Wscript.Echo "WorkerStartupTimeout: " & objItem.WorkerStartupTimeout
    Wscript.Echo "WorkingFilesLocation: " & objItem.WorkingFilesLocation
Next 

See Also

Other Resources

Speech Server Administration Through WMI
Server Administration