2.2.4.1.3.76 SetTerminal
The SetTerminal packet is transmitted from a TAPI client to a TAPI server in a remote procedure call. Sending this packet MUST enable an application to specify which terminal information related to the specified line, address, or call is to be routed. This function can be used while calls are in progress on the line to allow an application to route these events to different devices, as required.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Req_Func |
|||||||||||||||||||||||||||||||
Reserved1 |
|||||||||||||||||||||||||||||||
dwRequestID |
|||||||||||||||||||||||||||||||
hLine |
|||||||||||||||||||||||||||||||
dwAddressID |
|||||||||||||||||||||||||||||||
hCall |
|||||||||||||||||||||||||||||||
dwSelect |
|||||||||||||||||||||||||||||||
dwTerminalModes |
|||||||||||||||||||||||||||||||
dwTerminalID |
|||||||||||||||||||||||||||||||
bEnable |
|||||||||||||||||||||||||||||||
Reserved2 |
|||||||||||||||||||||||||||||||
Reserved3 |
|||||||||||||||||||||||||||||||
Reserved4 |
|||||||||||||||||||||||||||||||
Reserved5 |
|||||||||||||||||||||||||||||||
Reserved6 |
Req_Func (4 bytes): An unsigned 32-bit integer. The identifier of the function that will be invoked on the remote server. This value MUST be set to 83.
-
Return Values
-
On completion of ClientRequest, this field MUST contain the result of the encapsulated telephony request. A nonzero request ID value indicates that the request is in progress and will complete asynchronously, and a LINEERR_Constants value indicates synchronous failure.
-
Returns a positive request identifier if the function will be completed asynchronously or a negative error number if an error occurs. The dwParam2 parameter of the corresponding LINE_REPLY packet is zero if the function succeeds, or it is a negative error number if an error occurs. If the client specified a nonzero value in the dwRequestID field of the packet, the same value MUST be used for the returned positive request identifier. Common return values are:
-
Name
Value
LINEERR_INVALADDRESSID
0x80000011
LINEERR_NOMEM
0x80000044
LINEERR_INVALCALLHANDLE
0x80000018
LINEERR_OPERATIONUNAVAIL
0x80000049
LINEERR_INVALCALLSELECT
0x8000001B
LINEERR_OPERATIONFAILED
0x80000048
LINEERR_INVALLINEHANDLE
0x8000002B
LINEERR_RESOURCEUNAVAIL
0x8000004B
LINEERR_INVALTERMINALID
0x80000039
LINEERR_UNINITIALIZED
0x80000050
LINEERR_INVALTERMINALMODE
0x8000003A
Reserved1 (4 bytes): An unsigned 32-bit integer. MUST be set to zero when sent and MUST be ignored on receipt.
dwRequestID (4 bytes): An unsigned 32-bit integer. The identifier of the asynchronous request.
-
Value
Meaning
0x00000000
The server MUST generate a unique positive request ID to return as the Ack_ReturnValue.
0x00000001 — 0x7FFFFFFF
The server MUST use this value instead of generating a unique positive request ID.
hLine (4 bytes): An HLINE. The handle to an open line device. This field MUST have been obtained by sending the Open packet.
dwAddressID (4 bytes): An unsigned 32-bit integer. The address on the specified open line device. An address identifier is permanently associated with an address; the identifier remains constant across operating system upgrades. A valid value of dwAddressID is in the range 0 to dwNumAddresses –1. The client obtains dwNumAddresses from the LINEDEVCAPS obtained by sending a GetDevCaps packet to the remote server.
hCall (4 bytes): An HCALL. The handle to a call. One way of obtaining a valid hCall is by sending the MakeCall packet. Also a valid hCall can be obtained from LINE_CALLSTATE packet sent by the remote server. The call state of hCall can be any state if dwSelect is CALL.
dwSelect (4 bytes): An unsigned 32-bit integer. Specifies whether the terminal setting is requested for the line, the address, or just the specified call. If line or address is specified, events either apply to the line or address itself, or serve as a default initial setting for all new calls on the line or address. This parameter MUST use one of the LINECALLSELECT_Constants.
dwTerminalModes (4 bytes): An unsigned 32-bit integer. The class of low-level events to be routed to the specified terminal. This parameter MUST use one or more of the LINETERMMODE_Constants.
dwTerminalID (4 bytes): An unsigned 32-bit integer. The device identifier of the terminal device where the specified events are to be routed. Terminal identifiers are small integers in the range of zero to one less than dwNumTerminals, where dwNumTerminals, and the terminal modes that each terminal is capable of handling, are obtained by sending the GetDevCaps packet.
-
These terminal identifiers have no relation to other device identifiers and are defined by the service provider using device capabilities.
bEnable (4 bytes): An unsigned 32-bit integer. If TRUE, dwTerminalID is valid and the specified event classes are routed to or from that terminal. If FALSE, these events are not routed to or from the terminal device with identifier equal to dwTerminalID.
Reserved2 (4 bytes): An unsigned 32-bit integer. This field is used for padding and MUST be ignored on receipt. It can be any value.
Reserved3 (4 bytes): An unsigned 32-bit integer. This field is used for padding and MUST be ignored on receipt. It can be any value.
Reserved4 (4 bytes): An unsigned 32-bit integer. This field is used for padding and MUST be ignored on receipt. It can be any value.
Reserved5 (4 bytes): An unsigned 32-bit integer. This field is used for padding and MUST be ignored on receipt. It can be any value.
Reserved6 (4 bytes): An unsigned 32-bit integer. This field is used for padding and MUST be ignored on receipt. It can be any value.