The TSPI_lineSetCallTreatment function service provider stores the indicated dwCallTreatment in LINECALLINFO, and sends a LINE_CALLINFO message to indicate the updated information. If the call is currently in a state where the call treatment is relevant, the new treatment goes into effect at once; otherwise, it goes into effect the next time the call enters a relevant state.
LONG TSPIAPI TSPI_lineSetCallTreatment(
  DRV_REQUESTID dwRequestID,  
  HDRVCALL hdCall,            
  DWORD dwCallTreatment       
);
 Returns dwRequestID if the asynchronous operation starts; otherwise, one of these negative error values:
LINEERR_INVALCALLSTATE, LINEERR_INVALPARAM, LINEERR_NOMEM, LINEERR_OPERATIONFAILED, LINEERR_RESOURCEUNAVAIL.