CA_Close_Channel()

Purpose

Close a voice channel.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
int CA_Close_Channel (
  CHANNEL_INFO_ST *chan_info_sp
)

Description

This subroutine closes a voice channel that is currently open, and was opened using CA_Open_Channel(). No more voice data can be written to or read from this channel. Use this in user functions invoked by PlayVoiceFromHost or RecordVoiceToHost state table actions. The voice channel is specified by the chan_info_sp parameter.

This subroutine does not close channels opened using CA_Open_Music_Channel() or CA_Open_Record_Channel().

Parameters

chan_info_sp
A pointer to a CHANNEL_INFO_ST structure, as returned from a previous call to CA_Open_Channel().

Return codes

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

Error names

CA_CHANNEL_NOT_OPEN
CA_FUNC_FAILED
CA_INTERNAL_FD_ERROR
CA_INTERNAL_CHANNEL_MODE_ERROR
CA_INV_ADDR
CA_INV_CHANNEL
CA_NOT_CHANNEL_OWNER
CA_NOT_INIT
CA_TERMINATING

Related information

CA_Open_Channel(), CA_Play_Voice_Elements(), CA_Play_Voice_Stream(), CA_Poll().