Platform SDK: TAPI

lineCreateAgentSession

The lineCreateAgentSession function creates a new AgentSession object. It generates a LINE_PROXYREQUEST message to be sent to a registered proxy function handler, referencing a LINEPROXYREQUEST structure of type LINEPROXYREQUEST_CREATEAGENTSESSION.

LONG lineCreateAgentSession(     
  HLINE hLine,                   
  HAGENT hAgent,                 
  LPWSTR lpszAgentPIN,           
  DWORD dwWorkingAddressID,      
  LPGUID lpGroupID,              
  LPHAGENTSESSION lphAgentSession
);

Parameters

hLine
A handle to the line device.
hAgent
The identifier of the agent for whom the session is to be created.
lpszAgentPIN
A pointer to a null-terminated Unicode string containing the agent PIN or password. Used when working with legacy ACD systems that require a separate PIN for each session created (or group logged into). With an ACD system that uses the operating system's user login for authentication, lpszAgentPIN is set to NULL.
dwWorkingAddressID
The identifier of the address on which the agent will receive calls for this session.
lpGroupID
A pointer to GUID that identifies the group for which the session is being created.
lphAgentSession
A handle of the created agent session, returned by the ACD proxy. It is the responsibility of the agent handler proxy application to generate and maintain uniqueness of these identifiers.

Return Values

Returns a request identifier if the asynchronous operation starts; otherwise, the function returns one of the following error values:

LINEERR_INVALLINEHANDLE
LINEERR_INVALPARAM
LINEERR_NOMEM
LINEERR_OPERATIONFAILED
LINEERR_OPERATIONUNAVAIL
LINEERR_RESOURCEUNAVAIL
LINEERR_UNINITIALIZED

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Version: Requires TAPI 2.2 or later.
  Header: Declared in Tapi.h.
  Library: Use Tapi32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows 2000.

See Also

About TAPI 3.0 Call Center Controls, LINEPROXYREQUEST, LINE_PROXYREQUEST