The lineSetCallTreatment function sets the sounds a party on a call that is unanswered or on hold hears. Except for basic parameter validation, it is a straight pass-through by TAPI to the service provider.
LONG lineSetCallTreatment(
HCALL hCall,
DWORD dwCallTreatment
);
Returns a positive request identifier if the asynchronous operation starts; otherwise, the function returns one of these negative error values:
LINEERR_INVALCALLHANDLE, LINEERR_INVALCALLSTATE, LINEERR_INVALPARAM, LINEERR_NOMEM, LINEERR_NOTOWNER, LINEERR_OPERATIONFAILED, LINEERR_OPERATIONUNAVAIL, LINEERR_RESOURCEUNAVAIL, LINEERR_UNINITIALIZED.
The use of call treatment functionality should be limited to controlling of legacy equipment. New equipment is generally designed so that instead of call treatments being generated by external switching equipment, calls would be connected to PC-based audio sources and signals generated using standard Win32 functions such as the multimedia Wave API.
Version: Use TAPI version 2.0 and later
Header: Declared in tapi.h.
Import Library: Link with tapi32.lib.
TAPI Reference Overview, Supplementary Line Services Functions, LINEADDRESSCAPS