3.1.4.2 ClientRequest (Opnum 1)

The ClientRequest method is called by the client to submit requests to the server.

 void ClientRequest(
   [in] PCONTEXT_HANDLE_TYPE phContext,
   [in, out, length_is(*plUsedSize), size_is(lNeededSize)] 
     unsigned char* pBuffer,
   [in] long lNeededSize,
   [in, out] long* plUsedSize
 );

phContext: Parameter that MUST contain the context handle of type PCONTEXT_HANDLE_TYPE.

pBuffer: Packet that MUST contain event packets or function calls. The packet follows the structure of a TAPI32_MSG (section 2.2.5.2) packet. The Req_Func field of this packet contains information about the operation to be performed on the server.

lNeededSize: The size, in bytes, of a valid pBuffer.

plUsedSize: The size, in bytes, of a valid pBuffer data. If any variable-length input data is specified, both the size of the input data length and all the padding bytes are included, or else all the padding bytes are excluded.

Return Values: This method has no return values. However, the status of the request is encapsulated within the pBuffer parameter and contained in the TAPI32_MSG.Ack_ReturnValue field.

Exceptions Thrown:

No exceptions are thrown beyond those thrown by the underlying RPC protocol as specified in [MS-RPCE].

The opnum field value for this method is 1.

When processing a call, the server MUST do the following:

  • Fail the request if lNeededSize is less than the size of the structure TAPI32_MSG.

  • Fail the request if the value in plUsedSize is less than the size of a ULONG_PTR.

  • Fail the request if phContext is not a valid handle.

  • Fail the request if Req_Func in pBuffer is not a valid value.

Depending on the value of Req_Func in pBuffer, the server performs additional checks described as follows:

When Req_Func is equal to 47 (Initialize):

  • The server MUST fail if dwFriendlyNameOffset is not WCHAR-aligned.

  • The server MUST fail if dwFriendlyNameOffset lies outside the variable data area (VarData).

  • The server MUST fail if the string pointed by dwFriendlyNameOffset is not NULL-terminated.

  • The server MUST fail if dwModuleNameOffset is not WCHAR-aligned.

  • The server MUST fail if dwModuleNameOffset lies outside the variable data area (VarData).

  • The server MUST fail if the string pointed by dwModuleNameOffset is not NULL-terminated.

  • On success, the server creates a new client's usage handle (HLINEAPP) and adds it to the LineApp Handle List. The server also adds the handle to the list of usage handles for the client in the Client List. The server queries the number of lines from service providers installed on the machine and updates the Provider List with this information.

When Req_Func is equal to 52 (NegotiateAPIVersion):

  • The server MUST fail if the size of VarData is less than the size of the LINEEXTENSIONID structure.

  • The server MUST fail if dwDeviceID is invalid.

  • The server MUST fail if hLineApp is an invalid handle.

  • The server MUST fail if dwVersion is greater than dwVersionCurrent.

  • The server MUST fail if no valid TAPI version exists between dwVersion or dwVersionCurrent (both inclusive). The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000 and 0x00030001.

When Req_Func is equal to 34 (GetDevCaps):

  • The server MUST fail if the size of VarData is less than the size of lpLineDevCaps.

  • The server MUST fail if the size of lpLineDevCaps is less than the size of the LINEDEVCAPS packet.

  • The server MUST fail if dwDeviceID is invalid.

  • The server MUST fail if dwTSPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000 and 0x00030001.

  • The server MUST fail if dwExtVersion is invalid.

  • The server MUST fail if hLineApp is an invalid handle.

When Req_Func is equal to 21 (GetAddressCaps):

  • The server MUST fail if hLineApp is an invalid handle.

  • The server MUST fail if the size of VarData is less than the size of lpAddressCaps.

  • The server MUST fail if the size of lpAddressCaps is less than size of the LINEADDRESSCAPS packet.

  • The server MUST fail if VarData is less than the size of the LINEADDRESSCAPS packet.

  • The server MUST fail if dwDeviceID is invalid.

  • The server MUST fail if dwTSPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000 and 0x00030001.

  • The server MUST fail if dwExtVersion is invalid.

When Req_Func is equal to 9 (Close):

  • The server MUST fail if hLine is an invalid handle.

  • On success, the server removes the handle (HLINE) and removes the client from the List of Opened Lines.

When Req_Func is equal to 86 (Shutdown):

  • The server MUST fail if hLineApp is an invalid handle.

  • On success, the server removes the handle from the LineApp Handle List and from the list of usage handles for the client in the Client List.

When Req_Func is equal to 4 (Accept):

  • If lpsUserUserInfo is not set to -1(0xFFFFFFFF), the server MUST check that lpsUserUserInfo (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • If lpsUserUserInfo is not set to -1(0xFFFFFFFF), the server MUST fail if the sum of lpsUserUserInfo (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 5 (AddToConference):

  • The server MUST fail if hConfCall is an invalid handle.

  • The server MUST fail if hConsultCall is an invalid handle.

When Req_Func is equal to 6 (AgentSpecific):

  • The server MUST check that lpParams (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpParams (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 7 (Answer):

  • The server MUST check that lpsUserUserInfo (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpsUserUserInfo (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 8 (BlindTransfer):

  • The server MUST fail if the string pointed to by lpszDestAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 12 (DeallocateCall):

  • The server MUST fail if hCall is an invalid handle.

  • On success, the server removes the client for the call from the Call List.

When Req_Func is equal to 10 (CompleteCall):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwCompletionMode has more than one bit set or its value is not one among LINECALLCOMPLMODE_Constants.

When Req_Func is equal to 11 (CompleteTransfer):

  • The server MUST fail if dwTransferMode is not one among LINETRANSFERMODE_Constants.

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if hConsultCall is an invalid handle.

  • The server MUST fail if hCall and hConsultCall are the same.

  • The server MUST fail if hCall and hConsultCall are not on the same line.

  • On success, if dwTransferMode is set to LINETRANSFERMODE_CONFERENCE, the server creates a conference call with a new handle (HCALL) and adds it to the Conference List. The server adds the hCall and hConsultCall to the list of calls maintained for the conference call in the Conference List.

When Req_Func is equal to 146 (CreateAgent):

  • If lpszAgentPIN is not set to TAPI_NO_DATA (0xffffffff), the server MUST fail if the string pointed to by lpszAgentPIN is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • If lpszAgentID is not set to TAPI_NO_DATA (0xffffffff), the server MUST fail if the string pointed to by lpszAgentID is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 147 (CreateAgentSession):

  • If lpszAgentPIN is not set to TAPI_NO_DATA (0xffffffff), the server MUST fail if the string pointed to by lpszAgentPIN is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST check that lpGroupID (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpGroupID (offset) and dwSize falls beyond VarData.

  • The server MUST fail if dwSize is less than the size of GUID.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwWorkingAddressID is invalid.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 13 (DevSpecific):

  • The server MUST fail if hCall is specified and is an invalid handle.

  • The server MUST fail if hCall is not specified and hLine is an invalid handle.

  • The server MUST check that lpParams (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpParams (offset) and dwSize falls beyond VarData.

  • If hCall is passed, the server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 14 (DevSpecificFeature):

  • The server MUST check that lpParams (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpParams (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwFeature is invalid.

When Req_Func is equal to 15 (Dial):

  • The server MUST fail if the string pointed to by lpszDestAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 16 (Drop):

  • The server MUST check that lpsUserUserInfo (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpsUserUserInfo (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 18 (GatherDigits):

  • If lpszTerminationDigits is not set to TAPI_NO_DATA (0xffffffff), the server MUST fail if the string pointed to by lpszTerminationDigits is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwDigitModes does not have value either LINEDIGITMODE_PULSE or LINEDIGITMODE_DTMF (LINEDIGITMODE_Constants).

  • The server MUST fail if lpsDigitsContext is not set to 0 and the value of dwNumDigits is set to 0.

When Req_Func is equal to 19 (GenerateDigits):

  • If lpszDigits is not set to 0xffffffff, server MUST fail if the string pointed to by lpszDigits is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwDigitMode does not have a value of either LINEDIGITMODE_PULSE or LINEDIGITMODE_DTMF.

When Req_Func is equal to 20 (GenerateTone):

  • If dwToneMode is set to LINETONEMODE_CUSTOM, the server MUST fail if the size of VarData is less than the size of the LINEGENERATETONE packets which will be dwNumTones in number.

  • For dwToneMode = LINETONEMODE_CUSTOM, the server MUST check that lpTones (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • For dwToneMode = LINETONEMODE_CUSTOM, the server MUST fail if the sum of lpTones (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwToneMode has more than one bit set or its value is not one among LINETONEMODE_Constants.

When Req_Func is equal to 22 (GetAddressID):

  • The server MUST check that lpsAddress (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpsAddress (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwAddressMode does not have value LINEADDRESSMODE_DIALABLEADDR.

When Req_Func is equal to 23 (GetAddressStatus):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the size of VarData is less than lpAddressCaps.

  • The server MUST fail if lpAddressCaps is less than size of the LINEADDRESSSTATUS packet.

When Req_Func is equal to 24 (GetAgentActivityList):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwAddressID is invalid or there is no agent associated with dwAddressID.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • The server MUST fail if lpAgentActivityList is greater than 0x40000.

  • The server MUST fail if lpAgentActivityList is less than size of LINEAGENTACTIVITYLIST packet.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 25 (GetAgentCaps):

  • The server MUST fail if hLineApp is an invalid handle.

  • The server MUST fail if the size of VarData is less than lpAgentCapsSize.

  • The server MUST fail if lpAgentCapsSize is less than the size of LINEAGENTCAPS packet.

  • The server MUST fail if dwAppAPIVersion is invalid. The valid values are 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

  • The server MUST fail if there is no registered proxy function handler for the line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 26 (GetAgentGroupList):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwAddressID is invalid or there is no agent associated with dwAddressID.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • The server MUST fail if lpAgentGroupListSize is greater than 0x40000.

  • The server MUST fail if lpAgentGroupListSize is less than the size of the LINEAGENTGROUPLIST packet.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 148 (GetAgentInfo):

  • The server MUST fail if lpAgentInfo is greater than 0x40000.

  • The server MUST fail if lpAgentInfo is less than the size of the LINEAGENTINFO packet.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if hAgent is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 149 (GetAgentSessionInfo):

  • The server MUST fail if lpAgentSessionInfo is greater than 0x40000.

  • The server MUST fail if lpAgentSessionInfo is less than the size of the LINEAGENTSESSIONINFO packet.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if hAgentSession is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 150 (GetAgentSessionList):

  • The server MUST fail if lpAgentSessionList is greater than 0x40000.

  • The server MUST fail if lpAgentSessionList is less than the size of the LINEAGENTSESSIONLIST packet.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if hAgent is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 27 (GetAgentStatus):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwAddressID is invalid or there is no agent associated with dwAddressID.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • The server MUST fail if lpAgentStatusSize is greater than 0x40000.

  • The server MUST fail if lpAgentStatusSize is less than the size of the LINEAGENTSTATUS packet.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 140 (GetCallHubTracking):

  • The server MUST fail if the size of VarData is less than lpTrackingInfo.

  • The server MUST fail if the size of lpTrackingInfo is less than the size of the LINECALLHUBTRACKINGINFO packet.

  • The server MUST fail if the size of VarData is less than the size of the LINECALLHUBTRACKINGINFO packet.

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 141 (GetCallIDs):

  • The server MUST fail if no lines are initialized on the server.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 30 (GetCallInfo):

  • The server MUST fail if the size of VarData is less than lpCallInfo.

  • The server MUST fail if lpCallInfo is less than size of the LINECALLINFO packet.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 31 (GetCallStatus):

  • The server MUST fail if the size of VarData is less than lpCallStatus.

  • The server MUST fail if lpCallStatus is less than size of the LINECALLSTATUS packet.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 35 (GetDevConfig):

  • The server MUST fail if the size of VarData is less than the size of the VARSTRING packet.

  • The server MUST fail if the string pointed to by lpszDeviceClass is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if dwDeviceID is invalid.

When Req_Func is equal to 152 (GetGroupList):

  • The server MUST fail if lpAgentGroupListSize is greater than 0x40000.

  • The server MUST fail if lpAgentGroupListSize is less than the size of the LINEAGENTGROUPLIST packet.

  • The server MUST fail if the size of VarData is less than the size of the LINEAGENTGROUPLIST packet.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for the line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 37 (GetID):

  • The Server MUST fail if lpDeviceId is less than size of the VARSTRING packet.

  • The server MUST fail if the size of VarData is less than lpDeviceID.

  • The server MUST fail if the string pointed to by lpszDeviceClass is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • Depending upon the type of parameter passed in dwSelect, the server MUST check that hCall and hLine handles are valid and fail otherwise.

  • The server MUST fail if dwSelect is set to LINECALLSELECT_DEVICEID and dwAddressID is invalid.

  • The server MUST fail if dwSelect is invalid.

When Req_Func is equal to 38 (GetLineDevStatus):

  • The server MUST fail if the size of VarData is less than lpLineDevStatus.

  • The server MUST fail if lpLineDevStatus is less than size of the LINEDEVSTATUS packet.

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 39 (GetNewCalls):

  • The server MUST fail if the size of VarData is less than pCallList.

  • The server MUST fail if the pCallList is less than size of the LINECALLLIST packet.

  • The server MUST fail if dwSelect does not have value either LINECALLSELECT_ADDRESS or LINECALLSELECT_LINE.

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 40 (GetNumAddressIDs):

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 158 (GetProxyStatus):

  • The server MUST fail if dwDeviceID is invalid.

  • The server MUST fail if dwAppAPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

  • The server MUST fail if the size of VarData is less than lpLineProxyRequestList.

  • The server MUST fail if the lpLineProxyRequestList is less than size of the LINEPROXYREQUESTLIST packet.

When Req_Func is equal to 151 (GetQueueInfo):

  • The server MUST fail if lpQueueInfo is less than the size of the LINEQUEUEINFO packet.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the size of lpQueueInfo is greater than 0x40000.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 153 (GetQueueList):

  • The server MUST fail if the size of VarData is less than the size of the LINEQUEUELIST packet.

  • The server MUST check that pGroupID (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of pGroupID (offset) and cbGUID falls beyond VarData.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler doesn't handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 46 (Hold):

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 49 ( MonitorDigits):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwDigitModes is invalid.

When Req_Func is equal to 50 (MonitorMedia):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwMediaModes is invalid.

When Req_Func is equal to 51 (MonitorTones):

  • If lpTones is not set to -1(0xFFFFFFFF), the server MUST check that lpToneList (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpToneList (offset) and dwNumEntries falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 53 (NegotiateExtVersion):

  • The Server MUST fail if hLineApp is an invalid handle.

  • The server MUST fail if dwDeviceID is invalid.

  • The server MUST fail if dwTSPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

When Req_Func is equal to 55 (Park):

  • The Server MUST fail if dwParkMode is invalid.

  • If dwParkMode is equal to LINEPARKMODE_DIRECTED, the server MUST fail if the string pointed to by lpszDirAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • If dwParkMode is equal to LINEPARKMODE_NONDIRECTED, the server MUST fail if the size of lpNonDirAddress is less than the size of the VARSTRING packet.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 56 (Pickup):

  • If lpszDestAddress is not set to 0xffffffff, the server MUST fail if the string pointed to by lpszDestAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • If lpszGroupID is not set to 0xffffffff, the server MUST fail if the string pointed to by lpszGroupID is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hLine is an invalid handle.

  • On success, the server creates a call with a new handle (HCALL) and add it to the Call List. The server updates the call with the handle of the line on which the call is made and adds this call to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List.

When Req_Func is equal to 60 (Redirect):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if the string pointed to by lpszDestAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

When Req_Func is equal to 62 (ReleaseUseruserInfo):

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 63 (RemoveFromConference):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if the call is not currently conferenced.

When Req_Func is equal to 64 (SecureCall):

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 128 (SelectExtVersion):

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 65 (SendUserUserInfo):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST check that lpsUserUserInfo (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpsUserUserInfo (offset) and dwSize falls beyond VarData.

When Req_Func is equal to 66 (SetAgentActivity):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 67 (SetAgentGroup):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the LINEAGENTGROUPLIST packet pointed by lpAgentGroupList (offset) lies outside VarData or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate LINEAGENTGROUPLIST packet.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 154 (SetAgentMeasurementPeriod):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the value of dwMeasurementPeriod is zero.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 155 (SetAgentSessionState):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the values of both dwAgentSessionState and dwNextAgentSessionState are zero.

  • If the value of dwAgentSessionState is nonzero, the server MUST fail if dwAgentSessionState has more than one bit set or its value is not one among LINEAGENTSESSIONSTATE_Constants.

  • If the value of dwNextAgentSessionState is nonzero, the server MUST fail if dwNextAgentSessionState has more than one bit set or its value is not one among LINEAGENTSESSIONSTATE_Constants.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 68 (SetAgentState):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the values of both dwAgentState and dwNextAgentState are zero.

  • If the value of dwAgentState is nonzero, server MUST fail if dwAgentState has more than one bit set or its value is not one among LINEAGENTSESSIONSTATE_Constants.

  • If the value of dwNextAgentState is nonzero, the server MUST fail if dwNextAgentState has more than one bit set or its value is not one among LINEAGENTSESSIONSTATE_Constants.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 157 (SetAgentStateEx):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the values of both dwAgentState and dwNextAgentState are zero.

  • If the value of dwAgentState is nonzero, the server MUST fail if dwAgentState has more than one bit set or its value is not one among LINEAGENTSTATEEX_Constants.

  • If the value of dwNextAgentState is nonzero, the server MUST fail if dwBearerMode has more than one bit set or its value is not one among LINEAGENTSTATEEX_Constants.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

When Req_Func is equal to 70 (SetAppSpecific):

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 71 (SetCallData):

  • The server MUST check that lpCallData (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpCallData (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 143 (SetCallhubTracking):

  • The server MUST fail if the LINECALLHUBTRACKINGINFO packet pointed by lpTrackingInfo lies outside VarData or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate the LINECALLHUBTRACKINGINFO packet.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if LINECALLHUBTRACKINGINFO.dwCurrentTracking is invalid.

When Req_Func is equal to 72 (SetCallParams):

  • If lpDialParams is not set to -1(0xffffffff), the server MUST check that lpDialParams (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • If lpDialParams is not set to -1(0xffffffff), the server MUST fail if the sum of lpDialParams (offset) and dwSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if dwBearerMode has more than one bit set or its value is not one among LINEBEARERMODE_Constants.

When Req_Func is equal to 74 (SetCallqualityofservice):

  • The server MUST check that lpSendingFlowspec (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpSendingFlowspec (offset) and dwSendingFlowspecSize falls beyond VarData.

  • The server MUST check that lpReceivingFlowspec (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpReceivingFlowspec (offset) and dwSendingFlowspecSize falls beyond VarData.

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 75 (SetCallTreatment):

  • The server MUST fail if hCall is an invalid handle.

  • The server MUST fail if the value of dwTreatment is zero or between 4 to 256.

When Req_Func is equal to 76 (SetDefaultMediaDetection):

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 77 (SetDevConfig):

  • The server MUST check that lpDeviceConfig (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpDeviceConfig (offset) and dwSize falls beyond VarData.

  • The server MUST fail if the string pointed to by lpszDeviceClass is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if dwDeviceID is invalid.

When Req_Func is equal to 78 (SetLineDevStatus):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwStatusToChange is zero or does not have a value among LINEDEVSTATUSFLAGS_Constants.

When Req_Func is equal to 79 (SetMediaControl):

  • The server MUST check that lpDigitList (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpDigitList (offset) and dwDigitNumEntries falls beyond VarData.

  • The server MUST check that lpMediaList (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpMediaList (offset) and dwMediaNumEntries falls beyond VarData.

  • The server MUST check that lpToneList (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpToneList (offset) and dwToneNumEntries falls beyond VarData.

  • The server MUST check that lpCallStateList (offset) is DWORD-aligned and lies within VarData and fail otherwise.

  • The server MUST fail if the sum of lpCallStateList (offset) and dwCallStateNumEntries falls beyond VarData.

  • Depending upon the type of parameter passed in dwSelect, the server MUST check that hCall and hLine handles are valid or fail otherwise.

When Req_Func is equal to 80 (SetMediaMode):

  • The server MUST fail if hCall is an invalid handle.

  • For version < = 2.1, the server MUST fail if there is more than one bit set in dwMediaModes without the UNKNOWN flag set or its value is not one among LINEMEDIAMODE_Constants.

When Req_Func is equal to 156 (SetQueueMeasurementPeriod):

  • The Server MUST fail if dwMeasurementPeriod is set to zero.

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if there is no registered proxy function handler for line handle.

  • The server MUST fail if the registered proxy function handler does not handle this request.

  • On success, the server sends the request to the registered proxy function handler.

When Req_Func is equal to 82 (SetStatusMessages):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if dwLineStates value is not one among valid LINEDEVSTATE_Constants.

  • The server MUST fail if the dwAddressStates value is not one among valid LINEADDRESSSTATE_Constants.

When Req_Func is equal to 83 (SetTerminal):

  • Depending upon the type of parameter passed in dwSelect, the server MUST check that hCall and hLine handles are valid or fail otherwise.

  • The server MUST fail if dwSelect has more than one bit set or its value is not one among LINECALLSELECT_Constants.

  • The server MUST fail if the dwTerminalModes is zero or its value is not one among valid LINETERMMODE_Constants.

When Req_Func is equal to 87 (SwapHold):

  • The server MUST fail if hActiveCall is an invalid handle.

  • The server MUST fail if hHeldCall is an invalid handle.

  • The server MUST fail if call handle for HeldCall and ActiveCall are the same.

When Req_Func is equal to 88 (UncompleteCall):

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 89 (Unhold):

  • The server MUST fail if hCall is an invalid handle.

When Req_Func is equal to 90 (Unpark):

  • The server MUST fail if the string pointed to by lpszDestAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • The server MUST fail if hLine is an invalid handle.

  • On success, the server creates a call with a new handle (HCALL) and adds it to the Call List. The server updates the call with the handle of the line on which the call is made and adds this call to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List.

When Req_Func is equal to 54 (Open):

  • The server MUST fail if hLineApp is an invalid handle.

  • The server MUST fail if dwAPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

  • The server MUST fail if none of the privilege bits are set in dwPrivileges or LINECALLPRIVILEGE_NONE is set with either LINECALLPRIVILEGE_MONITOR and LINECALLPRIVILEGE_OWNER also being set.

  • The server MUST fail if any bit other than a valid bit is set in dwPrivileges.

  • The server MUST fail if dwPrivileges is set to LINEOPENOPTION_SINGLEADDRESS or LINEOPENOPTION_PROXY and the LINECALLPARAMS packet pointed to by pCallParams lies outside VarData or is not DWORD-aligned.

  • The server MUST fail if dwPrivileges has LINEOPENOPTION_SINGLEADDRESS set and dwAddressMode is not set to LINEADDRESSMODE_ADDRESSID.

  • The server MUST fail if dwPrivileges has LINEOPENOPTION_OWNER set and dwMediaModes is invalid.

  • The server MUST fail if dwExtVersion is invalid.

  • The server MUST fail if dwPrivileges has LINEOPENOPTION_SINGLEADDRESS set and dwAddressID is invalid.

  • The server MUST fail if dwPrivileges is set to LINEOPENOPTION_SINGLEADDRESS or LINEOPENOPTION_PROXY and the LINECALLPARAMS packet pointed by pCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • On success, the server creates a line with a new handle (HLINE) and adds it to the List of Opened Lines. The server updates the client and provider information for the added line handle (HLINE). If dwPrivileges is set to LINEOPENOPTION_PROXY, add the client as a registered proxy function handler to the line in the Provider List.

When Req_Func is equal to 127 (ConditionalMediaDetection):

  • The server MUST fail if LINECALLPARAMS packet pointed by lpCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • The server MUST fail if the lpCallParams(offset) lies outside VarData or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate LINECALLPARAMS packet.

  • The server MUST fail if hLine is an invalid handle.

When Req_Func is equal to 17 (Forward):

  • The server MUST fail if hLine is an invalid handle.

  • If lpForwardList is not set to 0xffffffff, the server MUST fail if the LINEFORWARDLIST packet pointed by lpForwardList lies outside VarData or is not DWORD-aligned.

  • If lpCallParams is not set to 0xffffffff, the server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams lies outside VarData or is not DWORD-aligned.

  • The server MUST fail if the size of lpForwardList is less than size of LINEFORWARDLIST packet.

  • For each LINEFORWARD in LINEFORWARDLIST packet:

    • The server MUST fail if dwForwardMode has more than one bit set or its value is not one among LINEFORWARDMODE_Constants.

    • The server MUST check that dwCallerAddressOffset is DWORD-aligned and lies within VarData and fail otherwise.

    • The server MUST fail if the sum of dwCallerAddressOffset and dwSize falls beyond VarData.

    • The server MUST check that dwDestAddressOffset is DWORD-aligned and lies within VarData and fail otherwise.

    • The server MUST fail if the sum of dwDestAddressOffset and dwSize falls beyond VarData.

  • The server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • On success, the server creates a call with a new handle (HCALL) and adds it to the Call List. The server updates the call with the handle of the line on which the call is made and adds this call to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List.

When Req_Func is equal to 48 (MakeCall):

  • The server MUST fail if hLine is an invalid handle.

  • The server MUST fail if the string pointed to by lpszDestAddress is not WCHAR-aligned, not NULL-terminated, or lies outside VarData.

  • If lpszDigits is not set to 0xffffffff, the server MUST fail if the LINECALLPARAMS packet pointed by dwCallParamsOffset lies outside VarData or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate LINECALLPARAMS packet.

  • The server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • On success, the server creates a call with a new handle (HCALL) and adds it to the Call List. The server updates the call with the handle of the line on which the call is made and adds this call to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List.

When Req_Func is equal to 57 (PrepareAddtoConference):

  • The server MUST fail if hConfCall is an invalid handle.

  • The server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams lies outside VarData buffer or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate LINECALLPARAMS packet.

  • The server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • On success, the server creates a consultation call with a new handle (HCALL) and adds it to the Call List. The server updates the call with the handle of the line on which the call is made and adds this call to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List.

When Req_Func is equal to 84 (SetUpConference):

  • The server MUST check that hCall and hLine handles are valid or fail otherwise.

  • If lpCallParams is not set to 0xffffffff, the server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams lies outside VarData buffer or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate the LINECALLPARAMS packet.

  • The server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • On success, the server creates a conference call with a new handle (HCALL) and adds it to the Conference List. The server also creates a consultation call with a new handle (HCALL) and adds it to the call list. The server updates the calls with the handle of the line on which the call is made and adds the calls to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List. If hCall is specified, the server adds the call to the list of calls maintained for the conference call in the Conference List.

When Req_Func is equal to 85 (SetUpTransfer):

  • The server MUST fail if hCall is an invalid handle.

  • If lpCallParams is not set to 0xffffffff, the server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams lies outside VarData buffer or is not DWORD-aligned.

  • The server MUST fail if VarData is not big enough to accommodate the LINECALLPARAMS packet.

  • The server MUST fail if the LINECALLPARAMS packet pointed by lpCallParams is invalid. The invalidity of the LINECALLPARAMS packet is defined directly after the processing rules for SetUpTransfer.

  • On success, the server creates a consultation call with a new handle (HCALL) and adds it to the Call List. The server updates the call with the handle of the line on which the call is made and adds this call to the list of calls maintained for an opened line. The server adds the client to the list of clients maintained for the call handle (HCALL) in the Call List.

LINECALLPARAMS packet is invalid if (this validity is checked as part of Open, ConditionalMediaDetection, Forward, MakeCall, PrepareAddtoConference, SetUpConference, and SetUpTransfer requests):

  • dwTotalSize is less than size of fixed portion of LINECALLPARAMS.

  • dwBearerMode is invalid.

  • More than one bit is set for dwBearerMode; this is valid for API versions greater than 0x00020000.

  • dwMediaMode, dwCallParamFlags, dwAddressMode, dwPredictiveAutoTransferStates, or dwAddressType are invalid.

  • dwOrigAddressOffset, dwUserUserInfoOffset, dwHighLevelCompOffset, dwLowLevelCompOffset, dwDevSpecificOffset, dwDisplayableAddressOffset, dwCalledPartyOffset, dwCommentOffset, dwTargetAddressOffset, dwSendingFlowspecOffset, dwReceivingFlowspecOffset, dwDeviceClassOffset, dwDeviceConfigOffset, dwCallDataOffset, dwCallingPartyIDOffset are not DWORD-aligned or do not lie within VarData.

  • The sum of dwOrigAddressSize and dwOrigAddressOffset, or sum of dwUserUserInfoSize and dwUserUserInfoOffset, or sum of dwHighLevelCompSize and dwHighLevelCompOffset, or sum of dwLowLevelCompSize and dwLowLevelCompOffset, or sum of dwDevSpecificSize and dwDevSpecificOffset, or sum of dwTargetAddressSize and dwTargetAddressOffset, or sum of dwSendingFlowspecSize and dwSendingFlowspecOffset, or sum of dwReceivingFlowspecSize and dwReceivingFlowspecOffset, or sum of dwDeviceClassSize and dwDeviceClassOffset, or sum of dwDeviceConfigSize and dwDeviceConfigOffset, or sum of dwCallDataSize and dwCallDataOffset, or sum of dwCallingPartyIDSize and dwCallingPartyIDOffset do not lie within varData.

  • For API version greater than 0x00020000, the sum of dwDisplayableAddressSize and dwDisplayableAddressOffset or sum of dwCalledPartySize and dwCalledPartyOffset or sum of dwCommentSize and dwCommentOffset do not lie within varData.

When Req_Func is equal to 106 (Initialize):

  • The server MUST fail if dwFriendlyNameOffset is not WCHAR-aligned.

  • The server MUST fail if the string pointed by dwFriendlyNameOffset lies outside the variable data area (VarData).

  • The server MUST fail if the string pointed by dwFriendlyNameOffset is not NULL-terminated.

  • The server MUST fail if dwModuleNameOffset is not WCHAR-aligned.

  • The server MUST fail if the string pointed by dwModuleNameOffset lies outside the variable data area.

  • The server MUST fail if the string pointed by dwModuleNameOffset is not NULL-terminated.

  • On success, the server creates a new client's usage handle (HPHONEAPP) and adds it to the PhoneApp Handle List. The server also adds the handle to the list of usage handles for the client in the Client List. The server queries the number of phones from service providers installed on the machine and updates the Provider List with this information.

When Req_Func is equal to 108 (NegotiateAPIVersion):

  • The server MUST fail if the size of vardata is less than the size of the PHONEEXTENSIONID structure.

  • The server MUST fail if dwDeviceIDLocal is invalid.

  • The server MUST fail if hPhoneApp is invalid.

  • The server MUST fail if dwVersion is greater than dwVersionCurrent.

  • The server MUST fail if no valid TAPI version exists between dwVersion or dwVersionCurrent (both inclusive). The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

When Req_Func is equal to 95 (GetDevCaps):

  • The server MUST fail if the size of VarData is less than the size of the PHONECAPS structure.

  • The server MUST fail if dwExtVersion is invalid.

  • The server MUST fail if dwDeviceID is invalid.

When Req_Func is equal to 107 (Open):

  • The server MUST fail if hPhoneApp is an invalid handle.

  • The server MUST fail if dwPrivilege is invalid. The valid values are PHONEPRIVILEGE_MONITOR and PHONEPRIVILEGE_OWNER.

  • The server MUST fail if dwNegotiatedVersion is invalid.

  • The server MUST fail if dwExtVersion is invalid.

  • On success, the server creates a phone with a new handle (HPHONE) and adds it to the List of Opened Phones. The server updates the client and provider information for the added phone handle (HPHONE).

When Req_Func is equal to 91 (Close):

  • The server MUST fail if hPhone is an invalid handle.

  • On success, the server removes the handle (HPHONE) and the client from the List of Opened Phones.

When Req_Func is equal to 119 (Shutdown):

  • The server MUST fail if hPhoneApp is an invalid handle.

  • On success, the server removes the handle from PhoneApp Handle List and from the list of usage handles for the client in the Client List.

When Req_Func is equal to 92 (DevSpecific):

  • The server MUST fail if lpParams is invalid (negative) or dwSize + lpParams points outside VarData.

  • The server MUST fail if hPhone is an invalid handle.

When Req_Func is equal to 93 (GetButtonInfo):

  • The server MUST fail if lpButtonInfo is greater than the size of the VarData.

  • The server MUST fail if hPhone is an invalid handle.

  • The server MUST fail if lpButtonInfo is less than size of PHONEBUTTONINFO.

When Req_Func is equal to 94 (GetData):

  • The server MUST fail if dwSize is greater than the size of VarData.

When Req_Func is equal to 96 (GetDisplay):

  • The server MUST fail if hPhone is an invalid handle.

  • The server MUST fail if lpDisplay greater than the size of VarData.

  • The server MUST fail if lpDisplay is less than the size of VARSTRING structure.

When Req_Func is equal to 97 (GetGain):

  • The server MUST fail if hPhone is an invalid handle.

  • The server MUST fail if dwHookSwitchDev has more than one bit set or its value is not one among PHONEHOOKSWITCHDEV_Constants.

When Req_Func is equal to 98 (GetHookSwitch):

  • The server MUST fail if hPhone is an invalid handle.

When Req_Func is equal to 99 (GetID):

  • The server MUST fail if lpDeviceID is greater than the size of varData.

  • The server MUST fail if lpDeviceID is less than the size of VARSTRING packet.

  • The server MUST fail if the string pointed to by lpszDeviceClass is not WCHAR-aligned, not NULL-terminated, or lies outside varData.

  • The server MUST fail if hPhone is an invalid handle.

When Req_Func is equal to 101 (GetLamp):

  • The server MUST fail if hPhone is an invalid handle.

When Req_Func is equal to 102 (GetRing):

  • The server MUST fail if hPhone is an invalid handle.

When Req_Func is equal to 103 (GetStatus):

  • The server MUST fail if lpPhoneStatus is greater than the size of varData.

  • The server MUST fail if hPhone is an invalid handle.

  • The server MUST fail if lpPhoneStatus is not equal to the size of the PHONESTATUS packet.

When Req_Func is equal to 105 (GetVolume):

  • The server MUST fail if hPhone is an invalid handle.

  • The server MUST fail if exactly one of the following bits are not set in dwHookSwitchDev:

    • PHONEHOOKSWITCHDEV_HANDSET

    • PHONEHOOKSWITCHDEV_SPEAKER

    • PHONEHOOKSWITCHDEV_HEADSET

When Req_Func is equal to 109 (NegotiateExtVersion):

  • The server MUST fail if hPhoneApp is an invalid handle.

  • The server MUST fail if dwDeviceID is an invalid handle.

  • The server MUST fail if dwTSPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

When Req_Func is equal to 129 (SelectExtVersion):

  • The server MUST fail if hPhone is an invalid handle.

When Req_Func is equal to 110 (SetButtonInfo):

  • The server MUST fail if hPhone is an invalid handle.

  • The server MUST fail if the PHONEBUTTIONINFO packet lies outside varData buffer or is not DWORD-aligned.

When Req_Func is equal to 111 (SetData):

  • The server MUST fail if hPhone is invalid.

  • The server MUST check that lpData (offset) is DWORD-aligned and lies within varData and fail otherwise.

  • The server MUST fail if the sum of lpData (offset) and dwSize falls beyond varData.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

When Req_Func is equal to 112 (SetDisplay):

  • The server MUST fail if hPhone is invalid.

  • The server MUST check that lpsDisplay (offset) is DWORD-aligned and lies within varData and fail otherwise.

  • The server MUST fail if the sum of lpsDisplay (offset) and dwSize falls beyond varData.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

When Req_Func is equal to 113 (SetGain):

  • The server MUST fail if hPhone is invalid.

  • The server MUST fail if dwHookSwitchDev is invalid.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

When Req_Func is equal to 114 (SetHookSwitch):

  • The server MUST fail if hPhone is invalid.

  • The server MUST fail if dwHookSwitchDev is invalid.

  • The server MUST fail if dwHookSwitchMode is invalid.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

When Req_Func is equal to 115 (SetLamp):

  • The server MUST fail if hPhone is invalid.

  • The server MUST fail if dwLampMode is invalid.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

When Req_Func is equal to 116 (SetRing):

  • The server MUST fail if hPhone is invalid.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

When Req_Func is equal to 117 (SetStatusMessages):

  • The server MUST fail if hPhone is invalid.

  • The server MUST fail if dwPhoneStates is invalid.

  • The server MUST fail if dwButtonModes is invalid.

  • The server MUST fail if dwButtonStates is invalid.

  • The server MUST fail if dwButtonModes has at least one valid flag set and dwButtonStates has no valid flag set.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_MONITOR.

When Req_Func is equal to 118 (SetVolume):

  • The server MUST fail if hPhone is invalid.

  • The server MUST fail if dwHookSwitchDev is invalid.

  • The server MUST fail if the client does not have privileges greater than or equal to PHONEPRIVILEGE_OWNER.

  • The server MUST fail if VarData is not big enough to accommodate PHONEBUTTONINFO.

When Req_Func is equal to 131 (GetAvailableProviders):

  • The server MUST fail if lpProviderList is greater than size of VarData.

  • The server MUST fail if lpProviderList is less than size of AVAILABLEPROVIDERLIST.

When Req_Func is equal to 165 (GetDeviceFlags):

  • The server MUST fail if dwProviderID is invalid.

When Req_Func is equal to 132 (GetLineInfo):

  • The server MUST fail if lpDeviceInfoList is greater than size of VarData.

  • The server MUST fail if VarData is not big enough to accommodate DEVICEINFOLIST.

When Req_Func is equal to 133 (GetPhoneInfo):

  • The server MUST fail if lpDeviceInfoList is greater than size of VarData.

  • The server MUST fail if VarData is not big enough to accommodate DEVICEINFOLIST.

When Req_Func is equal to 42 (GetProviderList):

  • The server MUST fail if lpProviderList is greater than size of VarData.

  • The server MUST fail if dwAPIVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

  • The server MUST fail if lpProviderList is less than size of LINEPROVIDERLIST.

When Req_Func is equal to 134 (GetServerConfig):

  • The server MUST fail if lpProviderList is greater than size of VarData.

  • The server MUST fail if VarData is not big enough to accommodate TAPISERVERCONFIG.

When Req_Func is equal to 135 (SetLineInfo):

  • The server MUST fail if client does not have admin privileges.

  • The server MUST fail if lpDeviceInfoList is not a multiple of 4.

  • The server MUST fail if VarData is not big enough to accommodate DEVICEINFOLIST.

When Req_Func is equal to 136 (SetPhoneInfo):

  • The server MUST fail if client does not have admin privileges.

  • The server MUST fail if lpDeviceInfoList is not a multiple of 4.

  • The server MUST fail if VarData is not big enough to accommodate DEVICEINFOLIST.

When Req_Func is equal to 1 (GetUIDllName):

  • The server MUST fail if dwObjectType is set to TUISPIDLL_OBJECT_LINEID or TUISPIDLL_OBJECT_PHONEID and the client does not have admin privileges.

  • The server MUST fail if dwObjectType is set to TUISPIDLL_OBJECT_PROVIDERID and the client is trying to install or uninstall the TSP and does not have admin privileges. The server MUST fail if dwObjectID is invalid.

  • The following failures are valid if dwProviderFileNameOffset is not set to 0xffffffff.

    • The server MUST fail if dwProviderFileNameOffset is not WCHAR-aligned.

    • The server MUST fail if the string pointed by dwProviderFileNameOffset lies outside the variable data area (VarData).

    • The server MUST fail if the string pointed by dwProviderFileNameOffset is not NULL-terminated.

When Req_Func is equal to 2 (TUISPIDLLCallBack):

  • The server MUST check that dwParamsInOffset is DWORD-aligned and lies within varData and fail otherwise.

  • The server MUST fail if the sum of dwParamsInOffset and dwParamsInSize falls beyond varData.

  • The server MUST fail if dwObjectType is set to TUISPIDLL_OBJECT_LINEID or TUISPIDLL_OBJECT_PHONEID and the client does not have admin privileges.

  • The server MUST fail if dwObjectID is invalid.

When Req_Func is equal to 3 (FreeDialogInstance):

  • The server MUST fail if htDlgInst is an invalid handle.

  • On success, the server adds (or removes) a provider to (or from) the provider list if the operation that is initiated using the GetUIDllName packet is installation (or removal) of the provider. If added, the server updates the provider with the provider name, service provider version, provider ID, and the list of lines available on the service provider.

When Req_Func is equal to 137 (SetServerConfig):

  • The server MUST fail if client does not have admin privileges.

  • The server MUST fail if VarData is not big enough to accommodate TAPISERVERCONFIG.

When Req_Func is equal to 0 (GetAsyncEvents):

  • The server MUST fail if dwTotalBufferSize is greater than the size of VarData.

When Req_Func is equal to 130 (NegotiateAPIVersionForAllDevices):

  • The server MUST fail if VarData is not big enough to accommodate a LINEEXTENSIONID packet, a PHONEEXTENSIONID packet, and DWORD-arrays of Line API Version and Phone API Version.

  • The server MUST fail if dwNumLineDevices or dwNumPhoneDevices is invalid.

  • The server MUST fail if dwLineAPIVersionListSize is not a multiple of 4 and dwNumLineDevices.

  • The server MUST fail if dwPhoneAPIVersionListSize is not a multiple of 4 and dwNumPhoneDevices.

  • The server MUST fail if dwLineExtensionIDListSize is not equal to a multiple of the size of LINEEXTENSIONID and dwNumLineDevices.

  • The server MUST fail if dwPhoneExtensionIDListSize is not equal to a multiple of the size of PHONEEXTENSIONID and dwNumPhoneDevices.

  • The server MUST fail if dwAPIHighVersion is invalid. The valid values are 0x00010003, 0x00010004, 0x00020000, 0x00020001, 0x00020002, 0x00030000, and 0x00030001.

When Req_Func is equal to 161 (RSPSetEventFilterMasks):

  • The server MUST fail if dwObjType is invalid.

  • The server MUST fail if lObjectID is invalid.