Messages issued

CATS issues messages to the Hub due to internal status changes and in response to hub requests for status changes via dispatch functions described in the dispatch function documentation.

Server status

When reinitialized, or in response to the query status dispatch function, CATS sends a frame to the hub reporting its current status. This frame has the following form:

{c cats
   :server_response <integer: indicates response to an external query>
   :query_status <integer: 1>
   :barge_in_enabled <integer: indicates barge-in mode>
   :half_duplex_enabled <integer: indicates half- or full-duplex mode>
   :ptt_enabled <integer: indicates push-to-talk mode>
   :streaming_enabled <integer: indicates streaming mode>
   :playbox_enabled <integer: indicates MIT playbox compatibility mode>
   :mute_active <integer: indicates mute activation>
   :on_hook <integer: indicates hook status>
   :record_started <integer: indicates if recording is started>
   :record_startable <integer: indicates if recording is startable>
   :voice_active <integer: indicates if voice activity is detected>
   :audio_resendable <integer: indicates whether audio may be resent>
}

Off hook

When an off hook state is detected by CATS, or in response to the off hook dispatch function, CATS sends a frame to the hub of the following form:

 
{c cats
   :server_response <integer: indicates if off-hook was hub-driven>
   :on_hook <integer: 0>
   :record_startable <integer: indicates whether recording is startable>
   :mute_active <integer: indicates if muting is active>
}

On hook

When an on hook state is detected by CATS, or in response to the on hook dispatch function, CATS sends a frame to the hub of the following form:

 
{c cats
   :server_response <integer: indicates if on-hook was hub-driven>
   :on_hook <integer: 1>
   :record_startable <integer: indicates whether recording is startable>
}

Touch tone

In response to the touchtone dispatch function, CATS sends a frame to the hub indicating the key "pressed" by the hub:

{c cats
   :server_response <integer: 0 (bzzt! That's a bug)>
   :touchtone <string: "1"-"9","*","0","#">
}

Audio available

When audio is available, CATS issues the following frame to the hub:

{c cats
   :binary_host <string: host ID of CATS server, when brokers are used for sending audio>
   :binary_port <integer: port of broker listener, when brokers are used for sending audio>
   :call_id <string: unique broker ID, when brokers are used for sending audio>
   :binary_proxy <proxy: when broker proxies are used for sending audio>
   :encoding <string: sample encoding; see reinitialize>
   :sample_rate <integer: sample rate; see reinitialize>
   :sample_size_in_bits <integer: sample size; see reinitialize>
   :channels <integer: sample channels; see reinitialize>
   :frame_size <integer: frame size in bytes; see reinitialize>
   :frame_rate <integer: frames per second; see reinitialize>
   :big_endian <string: big endian byte ordering indicator; see reinitialize>
}

Mute status

When CATS detects a change in mute status, or in response to the mute and unmute dispatch functions, the server sends a frame to the hub of the following form:

{c cats
   :server_response <integer: indicates whether status change was hub-driven>
   :mute_active <integer: indicates mute active state>
}

Recording status

When CATS detects a change in recording status, or in response to the start_recording and stop_recording dispatch functions, the server sends a frame to the hub of the following form:

{c cats
   :server_response <integer: indicates whether status change was hub-driven>
   :record_started <integer: indicates whether recording is started>
   :record_startable <integer: indicates whether recording is startable>
   :audio_resendable <integer: indicates whether audio is resendable>
}

Resend status

When CATS resends the last recorded utterance, or is requested to do so via the resend_audio dispatch function, the server sends a frame to the hub of the following form:

{c cats
   :server_response <integer: indicates whether status change was hub-driven>
   :resend <integer: indicates whether resend succeeded>
}