CA_Stop_Record_Channel()

Purpose

Stop recording digital voice data from a record channel.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
int CA_Stop_Record_channel(
  CHANNEL_INFO_ST *chan_info_sp,
  RECORD_CHANNEL_STOP_RTN_ST *record_stop_rtn_sp
)

Description

This subroutine stops any further voice being recorded on the channel, but does not flush the voice data stream which the custom server can still read using CA_Record_Voice_Stream().

Recording is controlled by your custom server and can span multiple state table actions. You can use it as a background record facility for the application.

The record channel must already have been opened using CA_Open_Record_Channel() and started using CA_Start_Record_Channel(). The process calling CA_Stop_Record_Channel() must be the same process as opened the channel.

Use this subroutine:

If the call associated with the channel process has cleared before CA_Stop_Record_Channel() is called, the stop will not be successful.

You can find what stopped the record in record_stop_rtn_sp. This tells you if CA_Stop_Record_Channel() stopped the record, or if a DTMF event was detected on the channel, or if the call was cleared by Blueworx Voice Response or the caller.

Parameters

chan_info_sp
A pointer to a CHANNEL_INFO_ST input structure, as returned from a previous call to CA_Open_Record_Channel().
record_stop_rtn_sp
A pointer to a RECORD_CHANNEL_STOP_RTN_ST output structure (described in  RECORD_CHANNEL_STOP_RTN_ST), which returns the reason why the record channel stopped.

Return codes

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

Error names

CA_CALL_ACCESS_DENIED
CA_CHANNEL_NOT_OPEN
CA_FUNC_FAILED
CA_INTERNAL_FD_ERROR
CA_INV_ADDR
CA_INV_CHANNEL
CA_INV_PACK
CA_NOT_CHANNEL_OWNER
CA_NOT_INIT
CA_NOT_STARTED
CA_SIGNAL_RECEIVED
CA_TERMINATING

Related information

CA_Close_Record_Channel(), CA_Open_Record_Channel(), CA_Poll(), CA_Record_Voice_Stream(), CA_Start_Record_Channel().