CA_Get_Voice_Msg()

Purpose

Retrieves voice message data.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
#include "CA_access_db.h"
int CA_Get_Voice_Msg (
 GET_VOICE_MSG_PARM_ST  *get_voice_msg_parm_sp,
 unsigned long          start_element,
 unsigned long          element_count,
 unsigned char          *voice_data
);

Description

This subroutine retrieves the voice message data based on the information provided in the GET_VOICE_MSG_PARM_ST input structure. The calling routine should use the CA_Get_Voice_Msg_Info() routine to determine the size of the buffer required to hold the complete voice message. The calling routine can then specify the starting voice element and the number of elements to retrieve from the database. The calling routine is responsible for passing the appropriate start element number so as to keep the voice data in sequence. The element_count is defined by the calling routine based on the space it previously allocated. Once the voice data is retrieved, it is stored in the previously allocated voice_data buffer.

If the message is annotated, Blueworx Voice Response tries to compensate for the different maximum volume levels unless environment variable, CA_OVERRIDE_DB_COMP=1. (For more information, see Changing the AIX environment of a custom server.)

Parameters

get_voice_msg_parm_sp
A pointer to a GET_VOICE_MSG_PARM_ST input structure that is filled in as described in GET_VOICE_MSG_PARM_ST.
start_element
Starting voice element (range from 1 to total_elements). If you are retrieving the entire voice message with a single call to this routine, the value of start_element will be 1.
element_count
Number of voice elements to retrieve (range from 1 to total_elements). If you are retrieving the entire voice message with a single call to this routine, the value of element_count will be the same as total_elements.
voice_data
Address of the previously declared space to hold the voice data.

Return codes

0
Successful; number of elements retrieved. If not equal to element_count, CA_errno is set to CA_END_OF_DATA_REACHED.
-1
Unsuccessful (global error number CA_errno is set to indicate the error)

Error names

CA_ACCESS_NOBUFS
CA_END_OF_DATA_REACHED
CA_INV_ADDR
CA_INV_COMPRESSION_TYPE
CA_INV_REQUEST
CA_INV_START_ELEMENT
CA_INV_TOTAL_ELEMENTS
CA_NO_MSG_RECV
CA_NOT_INIT
CA_OM_REQ_FAILED
CA_REQ_FAILED
CA_TERMINATING
CA_VOICE_MSG_NOT_FOUND

Related information

CA_Create_Voice_Msg(), CA_Create_Voice_Msg_Id(), CA_Delete_Voice_Msg(), CA_Export_Voice(), CA_Get_Voice_Msg_Info(), CA_Save_Voice_Msg(), CA_Send_Voice_Msg(), CA_Set_Send_Voice_Msg_Defaults().