AGENT_STATE_EVENT

An agent-state change (such as logging on, becoming available to handle incoming calls, and so on) sends to the client an AGENT_STATE_EVENT message, defined in the following tables.

AGENT_STATE_EVENT Fixed Part Message Body Format

Fixed part

Field name

Description

Data type

Byte size

reserved

A value of 0.

UINT

4

reserved

A value of 1.

UINT

4

reserved

A value of 0.

UINT

4

reserved

A value of 21.

USHORT

2

CSQState

One of the values representing the current state of the agent (see Table 1).

If only one event is sent for the agent (Not one for each CSQ to which the agent belongs) this is set to 0.

USHORT

2

StateDuration

The number of seconds since the agent entered this state (typically 0).

UINT

4

CSQID

The Customer Service Queue ID affected by the state change, as known by CCX.

UINT

4

reserved

A value of 0XFFFFFFFF.

UINT

4

reserved

A value of 0.

USHORT

2

AgentState

The value representing the current state of the associated agent (see Table 1).

USHORT

2

EventReasonCode

A Unified CCX code indicating the reason for the state change. (see Reason Codes for Agent State Change)

USHORT

2

reserved

A value of 1.

INT

4

reserved

A value of 0.

UINT

4

reserved

A value of 0.

USHORT

2

reserved

A value of 0.

UINT

4

reserved

A value of 0.

INT

4

reserved

A value of 1.

INT

4

numCSQs

If information for more than one CSQ is passed, this must be non-zero and indicates the number of records (CSQID, and CSQState, Reserved[63], and Reserved[64] fields) present in the floating part of the message.

There can be up to 99 records.

If more than 99 are required, then another AGENT_STATE_EVENT message must be sent.

If there are 0 records in the floating part of the message, then a single record (of CSQID and CSQState) is specified in the fixed part of the message.

USHORT

2

AGENT_STATE_EVENT Floating Part Message Body Format

Floating part

Field name

Value

Data type

Maximum size

CTIClientSignature[23] (optional)

The signature of the client that is associated with this agent.

STRING

64

reserved[5]

Ignore this value.

STRING

12

AgentExtension[4]

The agent’s IP phone extension.

STRING

16

AgentInstrument[6] (optional)

The agent’s IP phone number.

STRING

64

AgentID[194] (optional)

The agent’s Unified CCX login.

STRING

129

Duration [150] (optional)

If present specifies in seconds the anticipated time in the state specified. This is useful for work states to estimate the time before going ready or not ready.

UINT

4

NextAgentState[123]

The next agent state (if known).

USHORT

2

CSQID[62]

The ID of the CSQ affected by the state change. If a particular CSQ is specified, the state in all other CSQs is implicitly made BUSY_OTHER.

UINT

4

reserved[63]

Set this value to 0XFFFFFFFF.

UINT

4

reserved[64]

A value of 0.

USHORT

2

CSQState[65]

One of the values from Table 1 representing the current state of the associated agent about the CSQ. There can be more than one CSQ field in the message (see numCSQs above).

USHORT

2

ActiveTerminal[303]

(Version 18 and later)

This field contains the device name of the selected terminal if the agent device selection feature is enabled.

STRING

64