TSPI_lineSetDefaultMediaDetection

The TSPI_lineSetDefaultMediaDetection procedure tells the service provider the new set of media modes to detect for the indicated line (replacing any previous set). It also sets the initial set of media modes that should be monitored for on subsequent calls (inbound or outbound) on this line.

LONG TSPI_lineSetDefaultMediaDetection(
  HDRVLINE hdLine,    
  DWORD dwMediaModes  
);
 

Parameters

hdLine
The handle to the line to have media monitoring set.
dwMediaModes
The media mode(s) of interest to TAPI. This parameter uses the following LINEMEDIAMODE_ constants:
LINEMEDIAMODE_UNKNOWN
TAPI can handle calls of unknown media type (unclassified calls).
LINEMEDIAMODE_INTERACTIVEVOICE
TAPI can handle calls of the interactive voice media type. That is, it manages live voice calls.
LINEMEDIAMODE_AUTOMATEDVOICE
TAPI can handle calls in which there is voice data managed by an automated application. In cases where the service provider does not distinguish between automated or interactive voice, this is treated the same as interactive voice.
LINEMEDIAMODE_DATAMODEM
TAPI can handle calls with the data modem media mode.
LINEMEDIAMODE_G3FAX
TAPI can handle calls of the group 3 fax media type.
LINEMEDIAMODE_TDD
TAPI can handle calls with the TDD (Telephony Devices for the Deaf) media mode.
LINEMEDIAMODE_G4FAX
TAPI can handle calls of the group 4 fax media type.
LINEMEDIAMODE_DIGITALDATA
TAPI can handle calls of the digital data media type.
LINEMEDIAMODE_TELETEX
TAPI can handle calls with the teletex media mode.
LINEMEDIAMODE_VIDEOTEX
TAPI can handle calls with the videotex media mode.
LINEMEDIAMODE_TELEX
TAPI can handle calls with the telex media mode.
LINEMEDIAMODE_MIXED
TAPI can handle calls with the ISDN mixed media mode.
LINEMEDIAMODE_ADSI
TAPI can handle calls with the ADSI (Analog Display Services Interface) media mode.
LINEMEDIAMODE_VOICEVIEW
The media mode of the call is VoiceView.

Return Values

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

LINEERR_INVALLINEHANDLE, LINEERR_OPERATIONFAILED, LINEERR_INVALMEDIAMODE, LINEERR_RESOURCEUNAVAIL, LINEERR_NOMEM, LINEERR_NODRIVER, LINEERR_OPERATIONUNAVAIL.

Remarks

TAPI typically calls this function to update the set of detected media modes for the line to the union of all modes selected by all outstanding lineOpens whenever a line is Opened or Closed at the TAPI level. A lineOpen call attempt is rejected if media detection is rejected. A single call to this procedure is typically the result of a lineOpen call that does not specify the device identifier LINEMAPPER. The device identifier LINEMAPPER is never used at the TSPI level.

TAPI must compute the union of media modes desired by all clients and pass the result to this function. The service provider uses the set passed to this function by TAPI. TAPI ensures that the dwMediaModes parameter has at least one bit set and that no reserved bits are set. The service provider must perform any further validity checks on the media modes, such as checking whether any media modes are indeed supported by the service provider. The union of all media modes can be the value 0 if the applications that have the line open are all either monitors or not interested in handling incoming calls.

There is no directly corresponding function at the TAPI level. This procedure corresponds to the "request media modes" implied for the specific line by the lineOpen procedure when it is called with the specific device identifier (other than LINEMAPPER).

See Also

LINECALLPARAMS, LINEMEDIAMODE_ Constants, TSPI_lineClose