Dispatch Functions

reinitialize

reinitialize responds to a hub connection request to CATS, initializing default server behavior according to the following input keys:

Table 2. reinitialize input keys

parametertypeoptionaldepends ondescription/constraints
:encodingstringYesN/ASample encoding. Same options as listed in command line arguments.
:sample_rateintegerYesN/ASample rate.
:sample_size_in_bitsintegerYesN/ASample size in bits.
:channelsintegerYesN/ASample channels.
:frame_sizeintegerYesN/AFrame size in bytes.
:frame_rateintegerYesN/AFrame rate, frames per second.
:big_endianstringYesN/ABig endian byte ordering indicator; recognized values are "true" and "false".

reinitialize causes CATS to issue a server status message. This function returns a frame.

receive_audio

receive_audio handles incoming audio broker requests, and places receive audio data in a playback queue.

Table 3. receive_audio input keys

parametertypeoptionaldepends ondescription/constraints
:binary_hoststringNoN/ABroker server host.
:binary_portintegerNoN/ABroker server port.
:call_idstringNoN/ACall ID string.
:binary_proxybroker proxy (4.0 only)NoN/AIf :binary_host and :binary_port are present, CATS will attempt to access the audio data via a broker. In 4.0, if :binary_proxy is present, CATS will use the specified proxy as the audio source if :binary_host and :binary_port are absent.
:encodingstringYesN/ASample encoding. Same options as listed in command line arguments.
:sample_rateintegerYesN/ASample rate.
:sample_size_in_bitsintegerYesN/ASample size in bits.
:channelsintegerYesN/ASample channels.
:frame_sizeintegerYesN/AFrame size in bytes.
:frame_rateintegerYesN/AFrame rate, frames per second.
:big_endianstringYesN/ABig endian byte ordering indicator; recognized values are "true" and "false".

This function returns a frame.

off_hook

off_hook implements a hub-driven "off hook" request to CATS, which responds to this request by issuing an off hook message. This function returns a frame.

on_hook

on_hook implements a hub-driven "on hook" request to CATS, which responds to this request by issuing an on hook message. This function returns a frame.

touchtone

touchtone causes CATS to behave as though a keypad were being pressed, causing the server to generatetouch tone messages. This function returns a frame.

mute

mute implements hub-driven muting of input audio. CATS responds by issuing a mute status message. This function returns a frame.

unmute

unmute implements hub-driven unmuting of input audio. CATS responds by issuing a mute status message. This function returns a frame.

start_recording

start_recording implements a hub-driven request to start recording. CATS responds by issuing a recording status message. This function returns a frame.

stop_recording

stop_recording implements a hub-driven request to stop recording. CATS responds by issuing a recording status message. This function returns a frame.

resend_audio

resend_audio implements a hub-driven request to resend the last recorded utterance. CATS responds by issuing a resend status message. This function returns a frame.

query_status

query_status implements a hub-driven query status request to CATS, which responds to this request by issuing a server status message. This function returns a frame.