Skip to content

Latest commit

 

History

History
167 lines (102 loc) · 7.27 KB

nf-tspi-tspi_linesetmediacontrol.md

File metadata and controls

167 lines (102 loc) · 7.27 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:tspi.TSPI_lineSetMediaControl
TSPI_lineSetMediaControl function (tspi.h)
The TSPI_lineSetMediaControl function enables and disables control actions on the media stream associated with the specified line, address, or call.
TSPI_lineSetMediaControl
TSPI_lineSetMediaControl function [TAPI 2.2]
_tspi_tspi_linesetmediacontrol
tspi.tspi_linesetmediacontrol
tspi/TSPI_lineSetMediaControl
tspi\tspi_linesetmediacontrol.htm
tapi3
e9273bd6-8dc3-4b45-bf0e-a1a10d78a604
12/05/2018
TSPI_lineSetMediaControl, TSPI_lineSetMediaControl function [TAPI 2.2], _tspi_tspi_linesetmediacontrol, tspi.tspi_linesetmediacontrol, tspi/TSPI_lineSetMediaControl
tspi.h
Windows
Windows
19H1
TSPI_lineSetMediaControl
tspi/TSPI_lineSetMediaControl
c++
APIRef
kbSyntax
UserDefined
Tspi.h
TSPI_lineSetMediaControl

TSPI_lineSetMediaControl function

-description

The TSPI_lineSetMediaControl function enables and disables control actions on the media stream associated with the specified line, address, or call. Media control actions can be triggered by the detection of specified digits, media types, custom tones, and call states. The new specified media controls replace all the ones that were in effect for this line, address, or call prior to this request.

-parameters

-param hdLine

The handle to a line.

-param dwAddressID

An address on the given open line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades. TAPI does not validate this parameter when this function is called.

-param hdCall

The handle to a call. The call state of hdCall can be any state.

-param dwSelect

Specifies whether media control is requested is associated with a single call, is the default for all calls on an address, or is the default for all calls on a line. This parameter uses the following LINECALLSELECT_ constants.

-param lpDigitList

A pointer to the array that contains the digits that are to trigger media control actions, of type LINEMEDIACONTROLDIGIT. Each time a digit listed in the digit list is detected, the specified media control action is carried out on the call's media stream.

Valid digits for pulse mode are '0' through '9'. Valid digits for DTMF mode are '0' through '9', 'A', 'B', 'C', 'D', '*', '#'.

-param dwDigitNumEntries

The number of entries in the lpDigitList. TAPI does not validate this parameter when this function is called.

-param lpMediaList

A pointer to an array with entries of type LINEMEDIACONTROLMEDIA. The array has dwMediaNumEntries entries. Each entry contains a media type to be monitored, media-type specific information (such as duration), and a media control field. If a media type in the list is detected, the corresponding media control action is performed on the call's media stream.

-param dwMediaNumEntries

The number of entries in lpMediaList. TAPI does not validate this parameter when this function is called.

-param lpToneList

A pointer to an array with entries of type LINEMEDIACONTROLTONE. The array has dwToneNumEntries entries. Each entry contains a description of a tone to be monitored, duration of the tone, and a media control field. If a tone in the list is detected, the corresponding media control action is performed on the call's media stream.

-param dwToneNumEntries

The number of entries in lpToneList. TAPI does not validate this parameter when this function is called.

-param lpCallStateList

A pointer to an array with entries of type LINEMEDIACONTROLCALLSTATE. The array has dwCallStateNumEntries entries. Each entry contains a call state and a media control action.

-param dwCallStateNumEntries

The number of entries in lpCallStateList. TAPI does not validate this parameter when this function is called.

-returns

Returns zero if the function succeeds, or an error number if an error occurs. Possible return values are as follows:

LINEERR_INVALADDRESSID, LINEERR_INVALPOINTER, LINEERR_INVALCALLHANDLE, LINEERR_INVALTONELIST, LINEERR_INVALCALLSELECT, LINEERR_NOMEM, LINEERR_INVALCALLSTATELIST, LINEERR_OPERATIONUNAVAIL, LINEERR_INVALDIGITLIST, LINEERR_OPERATIONFAILED, LINEERR_INVALLINEHANDLE, LINEERR_RESOURCEUNAVAIL, LINEERR_INVALMEDIALIST.

-remarks

This function returns zero (success) when media control is correctly initiated, not when any media control takes effect. Media control in progress is changed or is canceled when this function is called again with either different parameters or NULLs.

Only a single media control request can be outstanding on a call at one time. A request replaces any that may be outstanding.

Depending on the service provider and other activities that compete for such resources, the amount of simultaneous detections that can be made can vary over time. If service provider resources are overcommitted, it returns LINEERR_RESOURCEUNAVAIL.

Whether or not media control is supported by the service provider is a device capability indicated in LINEDEVCAPS.

Each time TSPI_lineSetMediaControl is called, the new request overrides any media control currently in effect. If one or more of the parameters lpDigitList, lpMediaList, lpToneList, and lpCallStateList are NULL, the corresponding digit, media type, tone, or call state-triggered media control is disabled. To modify just a portion of the media control parameters while leaving the remaining settings in effect, the application should invoke TSPI_lineSetMediaControl supplying the previous parameters for those portions that must remain in effect, and new parameters for those parts that are to be modified.

-see-also

LINEDEVCAPS

LINEDIGITMODE_ Constants

LINEMEDIACONTROLCALLSTATE

LINEMEDIACONTROLDIGIT

LINEMEDIACONTROLMEDIA

LINEMEDIACONTROLTONE

LINEMEDIAMODE_ Constants

TSPI_lineGetDevCaps