ITLegacyCallMediaControl2::DetectTonesByCollection method (tapi3if.h)
The DetectTonesByCollection method enables and disables the detection of inband tones on the call. Each time a specified tone is detected, a message is sent to the application.
This method is intended for Visual Basic and scripting applications. C/C++ applications should use the DetectTones method instead.
Syntax
HRESULT DetectTonesByCollection(
[in] ITCollection2 *pDetectToneCollection
);
Parameters
[in] pDetectToneCollection
Pointer to an ITCollection2 interface containing a collection of ITDetectTone interface pointers that represent the tones to monitor. Each tone in the list has an application-defined tag field that is used to identify the individual tones when tone detection is reported by a TE_TONEEVENT event. For more information, see the following Remarks section.
Return value
This method can return one of these values.
Return code | Description |
---|---|
|
Method succeeded. |
|
The pDetectToneCollection parameter is not a valid pointer. |
|
There is not enough memory to allocate the tones buffer. |
|
The call must be in the connected state. |
Remarks
This method translates to a TAPI 2.x lineMonitorTones call.
To cancel tone monitoring in progress, call the DetectTonesByCollection method and specify an empty collection. To change the list of tones to monitor, call this method and specify a new tone collection.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | tapi3if.h |
Library | Uuid.lib |
DLL | Tapi3.dll |