Open a record channel to read digital voice data.
Blueworx Voice Response library (libvae.a)
Custom Server library (libca.a)
#include “CA_header.h” int CA_Open_Record_Channel( short link_id, RECORD_CHANNEL_OPEN_ST * record_open_sp; CHANNEL_INFO_ST * channel_info_sp );
This subroutine opens a connection so that a custom server can read voice data from the telephony channel. Use this subroutine from a user function invoked with the SendData state table action when a call is active. This opens the record channel as a background task, leaving the state table free to continue.
The channel can only be opened once for recording. File descriptors for open channels are not inherited by child processes, so any subsequent actions to start, stop, or close the record channel must be issued by the process which issued the open.
Voice data cannot be read from the record channel once it has been opened. Before any data can be read, you must start the channel using the CA_Start_Record_Channel() subroutine.
You should not add the channel to the CA_Poll() until the channel is started, otherwise CA_Poll() returns immediately to inform the custom server that recording is not yet active.
If the subroutine is issued when the channel process (referenced by the link_id parameter) does not have an active call, this subroutine fails with an appropriate error.
It is the responsibility of the custom server to close the record channel, using CA_Close_Record_Channel(), before it can be used again to record more voice data, for a new call instance on the same trunk and channel.
The record channel can also be used for barge in applications where the associated state table is playing voice while the record channel is running in the background passing voice data to external speech servers awaiting a result.
Open and start the record channel in the background before the play actions are run as foreground tasks controlled by the channel process.
CA_CHANNEL_ALREADY_ALLOCATED
CA_CHANNEL_ALREADY_OPEN
CA_FUNC_FAILED
CA_INV_ADDR
CA_INV_CHANNEL
CA_INV_LINK_ID
CA_INV_MAX_RECORDS
CA_INV_PACK
CA_INV_RECORD_COUNT
CA_INV_VERSION
CA_NOT_INIT
CA_TERMINATING