ITAgent::CreateSession method (tapi3.h)

The CreateSession method creates a new agent session for the input ACD group and address.

Syntax

HRESULT CreateSession(
  [in]  ITACDGroup     *pACDGroup,
  [in]  ITAddress      *pAddress,
  [out] ITAgentSession **ppAgentSession
);

Parameters

[in] pACDGroup

Pointer to ITACDGroup interface.

[in] pAddress

Pointer to ITAddress object available for receiving ACD calls.

[out] ppAgentSession

Pointer to ITAgentSession interface for object created.

Return value

This method can return one of these values.

Value Meaning
S_OK
Method succeeded.
E_POINTER
The ppAgentSession parameter is not a valid pointer.
E_UNEXPECTED
Failed to open a line for the target Address.
E_INVALIDARG
The pACDGroup or pAddress argument is not valid.
E_OUTOFMEMORY
Insufficient memory exists to perform the operation.
TAPI_E_TIMEOUT
The operation failed because the TAPI 3 DLL timed it out. The timeout interval is two minutes.

Remarks

TAPI calls the AddRef method on the ITAgentSession interface returned by ITAgent::CreateSession. The application must call Release on the ITAgentSession interface to free resources associated with it.

Some telephone environments require a personal identification number to open a session. See CreateSessionWithPIN.

Requirements

   
Target Platform Windows
Header tapi3.h (include Tapi3.h)
Library Uuid.lib
DLL Tapi3.dll

See also

IEnumAgentSession

ITACDGroup

ITAddress

ITAgent

ITAgent::CreateSessionWithPIN

ITAgentSession