AddTapi.NET Developer's Manual
WaitForSilence Method (silenceDurationMilliseconds, timeoutSeconds)
NamespacesTraysoft.AddTapiTapiCallWaitForSilence(Int32, Int32)
Waits until either a period of silence has been detected or the specified time interval has elapsed.
Declaration Syntax
C#Visual BasicVisual C++
public bool WaitForSilence(
	int silenceDurationMilliseconds,
	int timeoutSeconds
)
Public Function WaitForSilence ( _
	silenceDurationMilliseconds As Integer, _
	timeoutSeconds As Integer _
) As Boolean
public:
bool WaitForSilence(
	int silenceDurationMilliseconds, 
	int timeoutSeconds
)
Parameters
silenceDurationMilliseconds (Int32)
Duration of time during which the silence should be present before a detection is made, in milliseconds.
timeoutSeconds (Int32)
Timeout period in seconds.
Return Value
This method returns true if the silence was detected or false if the silence was not detected within the specified time interval.
Remarks

WaitForSilence detects a specified period of silence on the call. This method can be useful if the application makes outgoing calls and needs to wait until the end of answering machine greetings before playing a message.

Please note that the telephony hardware must support hardware silence detection for this method to work. Regular voice modems do not support silence detection.

Exceptions
ExceptionCondition
TapiDisconnectExceptionThe call has been disconnected while waiting for silence.

Assembly: Traysoft.AddTapi (Module: Traysoft.AddTapi)