The lineOpen function opens the line device that its device identifier specifies and returns a line handle for the corresponding opened line device. Subsequent operations on the line device use this line handle.
Function Details:
LONG lineOpen( HLINEAPP hLineApp,
DWORD dwDeviceID,
LPHLINE lphLine,
DWORD dwAPIVersion,
DWORD dwExtVersion,
DWORD dwCallbackInstance,
DWORD dwPrivileges,
DWORD dwMediaModes,
LPLINECALLPARAMS const lpCallParams
);
Parameters:
hLineApp: The handle by which the application is registered with TAPI.
dwDeviceID: Identifies the line device to be opened. It can either be a valid device identifier or the value LINEMAPPER.
n.b: The Cisco Unified TSP does not support LINEMAPPER at this time.
lphLine: A pointer to an HLINE handle that isthen loaded with the handle that representsthe opened line device. Use this handle to identify the device when you are invoking other functions on the open line device.
dwAPIVersion: The API version number under which the application and Telephony API operate. Obtain this number with lineNegotiateAPIVersion.
dwExtVersion: The extension version number under which the application and the service provider operate. This number remains zero if the application does not use any extensions. Obtain this number with lineNegotiateExtVersion.
dwCallbackInstance: User-instance data that is passed back to the application with each message that is associated with this line or with addresses or calls on this line. The Telephony API does not interpret this parameter.
dwPrivileges: The privilege that the application wants for the calls for which it is notified. This parameter can be a combination of the LINECALLPRIVILEGE_ constants. For applications that are using TAPI version 2.0 or later, values for this parameter can also be combined with the LINEOPENOPTION_constants:
- LINECALLPRIVILEGE_NONE -The application can make only outgoing calls.
- LINECALLPRIVILEGE_MONITOR -The application can monitor only incoming and outgoing
calls. - LINECALLPRIVILEGE_OWNER -The application can own only incoming calls of the types
that are specified in dwMediaModes. - LINECALLPRIVILEGE_MONITOR + LINECALLPRIVILEGE_OWNER -The application can
own only incoming calls of the types that are specified in dwMediaModes, but if the application does not represent an owner of a call, it acts as a monitor. - Other flag combinations return the LINEERR_INVALPRIVSELECT error
dwMediaModes: The media mode or modes of interest to the application. Use this parameter to register the application as a potential target for incoming call and call handoff for the specified media mode. This parameter proves meaningful only if the bit LINECALLPRIVILEGE_OWNER in dwPrivilegesisset (and ignored if it is not). This parameter uses the following LINEMEDIAMODE_constant:
- LINEMEDIAMODE_INTERACTIVEVOICE -The application can handle calls of the interactive
voice media type; that is, it manages voice calls with the user on this end of the call. Use this parameter for third-party call control of physical phones and CTI port and CTI route point devices that other applications opened. - LINEMEDIAMODE_AUTOMATEDVOICE -Voice energy exists on the call. An automated application locally handles the voice. This represents first-party call control and is used with CTI port and CTI route point devices.
lpCallParams: The dwNoAnswerTimeout attribute of the lpCallParams field is checked and if it is non-zero, automatically disconnects a call if it is not answered after the specified time.
Comments
0 comments
Please sign in to leave a comment.