CA_Record_Voice_Stream()

Purpose

Record voice data from a specified voice channel.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
#include "CA_access_db.h"
int CA_Record_Voice_Stream (
 RECORD_VOICE_STREAM_PARM_ST *rvs_parm_sp,
 RECORD_VOICE_STREAM_RTN_ST *rvs_rtn_sp
);

Description

This subroutine records digital voice data from a voice channel. Specify the number of records to be recorded and the address of the voice data returned. The voice channel must have been opened in read mode by a call to CA_Open_Channel() or CA_Open_Record_Channel(). You cannot record data from a music channel. You can use CA_Open_Channel() in read mode, but it is recommended that you use CA_Open_Record_Channel().

You can record either compressed or uncompressed voice using synchronous foreground operations (see Using synchronous foreground operations), or uncompressed voice using asynchronous background operations (see Using asynchronous background operation).

A CA_Start_Record_Channel() must have been issued or triggered before any data can be read.

If using this subroutine before using CA_Start_Record_Channel(), or after recording has been terminated because a DTMF event was detected or CA_Stop_Record_Channel() was issued, CA_errno is set to CA_END_OF_DATA_REACHED.

The number of voice data records returned depends on the setting of the wait_flag.

Parameters

rvs_parm_sp
A pointer to a RECORD_VOICE_STREAM_PARM_ST filled in as described in RECORD_VOICE_STREAM_PARM_ST.
rvs_rtn_sp
A pointer to a RECORD_VOICE_STREAM_RTN_ST filled in on return from this subroutine, as described in RECORD_VOICE_STREAM_RTN_ST.

Return codes

0
Successful
-1
Unsuccessful (global error number CA_errno is set to indicate the error)

Error names

CA_CHANNEL_NOT_OPEN
CA_END_OF_DATA_REACHED
CA_FUNC_FAILED
CA_INV_ADDR
CA_INV_CHANNEL
CA_INV_COMPRESSION_TYPE
CA_INV_RECORD_COUNT
CA_NOT_CHANNEL_OWNER
CA_NOT_INIT
CA_TERMINATING

Related information

CA_Close_Channel(), CA_Close_Record_Channel(), CA_Open_Channel(), CA_Open_Record_Channel(), CA_Play_Voice_Elements(), CA_Play_Voice_Stream(), CA_Poll(), CA_Start_Record_Channel(), CA_Stop_Record_Channel().