Altitude RTA protocol

The RTA service sends periodic status messages of Altitude agents through a TCP/IP connection.

Protocol description

The protocol runs as follows:

  1. When the RTA service starts, the RTA service sends an agent state message for each agent with the parameter time_in_state set to 0 seconds.
  2. The RTA service sends a message every 10 seconds, as follows:
    • A timestamp message if there are no changes to the status of the agents.
    • An agent state message if there are changes to the status of the agents.

Timestamp message

A timestamp message reports the number of milliseconds since January 1st 1970.

The message is a single line with an integer enclosed in double underline characters (__) and ending with the line feed character, as shown below.

__ddddddddd__[LF]

For example, if the RTA service sends a message at 14:26:35 21st September 2009 UTC, which accounts for 1253543195111 milliseconds, the message is:

__1253543195111__

Agent state message

An agent state message reports the status of a set of agents.

The message is a sequence of lines ending with the line feed character, starting with the line __BEGIN__ and ending with the line __END__, as shown below.

__BEGIN__[LF]

...[LF]

...[LF]

__END__[LF]

Each agent state line has a sequence of values separated by commas (,) as described by the following table:

Attribute

Type

Description

uCI_agent_username

varchar(1,16)

The user name of the agent in Altitude.

telephony_extension

varchar(4,32)

Telephony extension being used by the agent.

status_code

integer

Status of the agent.

status_descriptionvar

char(1,14)

Human readable description of the status_code.

campaign_name

char(20)

Name of the campaign associated with the interaction.

time_in_state

integer

Reports the time that the agent spends in the reported state during the elapsed time interval.

not_ready_reason

char(32)

Not ready reason.

event_time

integer

Moment when the agent state changed. Follows the same rules as the timestamp message.

The attributes campaign_name and not_ready_reason is only included in the connector messages if the connector is configured to include the attributes. If one of the attributes is disabled, the matching attribute does not appear in the agent state line.

For example, if the attribute campaign_name is disabled, the attribute does not appear, and the format of the agent state line is the following:

ag01,1001,1,The agent is logged in,100,Coffee,1253543195111

The attribute status_code has a value within the range of 0 to 18, and above 40 for the custom media states.

The attribute status_descriptionvar has one of the following values for the custom media states:

  • Inbound<media name>
  • Outbound<media name>
  • Internal<media name>.

The Altitude uCI Server calculates the media state value as follows:

  • If the media state is Inbound<media name>, the state value is (ID-5)*3 + 40.
  • If the media state is Outbound<media name>, the state value is (ID-5)*3 + 41.
  • If the media state is Internal<media name>, the state value is (ID-5)*3 + 42.

For example, if the <media name> is Facebook and has ID = 7, the media state values are:

  • 46 = InboundFacebook
  • 47 = OutboundFacebook
  • 48 = InternalFacebook.

The meaning of the status_code is the following:

Code

Status

Description

0

Unknown

The status is unknown.

1

SignOn

The agent is logged in.

2

SignOut

The agent is logged out.

3

Available

The agent is ready in one or more campaigns.

4

UnAvailable

The agent is not ready in all campaigns.

5

ExtensionChanged

The agent changed the extension.

6

NoExtension

The agent does not have an extension.

7

InboundCall

The agent is working on an inbound call.

8

OutboundCall

The agent is working on an outbound call.

9

Hold

The agent has a call on hold.

10

InternalCall

The agent is on a call between two extensions.

11

AfterCallWork

The agent is doing wrap-up work.

12

Conference

The agent is in a conference call.

13

InboundEmail

The agent is working on an inbound email.

14

OutboundEmail

The agent is working on an outbound email.

15

InboundIM

The agent is working on an inbound instant messaging interaction.

16

OutboundIM

The agent is working on an outbound instant messaging interaction.

17

Workflow

The agent is working on a workflow task.

18

Preview

The agent is working on a preview dial call.

(ID-5)*3+40

Inbound<media name>

The agent is working on an inbound <media name> interaction.

(ID-5)*3+41

Outbound<media name>

The agent is working on an outbound <media name> interaction.

(ID-5)*3+42

Internal<media name>

The agent is working on an internal <media name> interaction.