CA_Get_Greeting()

Purpose

Retrieves a greeting.

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_Greeting (
 GREETING_PARM_ST  *greeting_parm_sp,
 unsigned long     start_element,
 unsigned long     element_count,
 unsigned char     *voice_data
);

Description

This subroutine retrieves a greeting from the Blueworx Voice Response database based on the information provided in the GREETING_PARM_ST input structure.

The calling routine should first use the CA_Get_Greeting_Info() subroutine to determine the size of buffer required to hold the complete greeting in the format in which it was recorded. For information on how to calculate the size of buffer required, see GREETING_INFO_ST. Note that an uncompressed greeting occupies approximately 5 times more space than it would do if it was compressed.

The calling routine can then specify the starting voice element and the number of voice elements to retrieve from the database. The calling routine is responsible for passing the appropriate start element number so that the voice data is kept in sequence.

Parameters

greeting_parm_sp
A pointer to a GREETING_PARM_ST input structure that is filled in as described in GREETING_PARM_ST.
start_element
The number of the first voice element. You can specify any integer from 1 through total_elements (see GREETING_INFO_ST).

To retrieve the entire greeting with a single call to this subroutine, specify the value 1.

element_count
The number of voice elements to retrieve. You can specify any integer from 1 through total_elements (see GREETING_INFO_ST).

To retrieve the entire greeting with a single call to this subroutine, specify the same as the value of total_elements.

voice_data
Address of the previously declared space to hold the voice data.

Return codes

0
Successful; number of voice 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_GREETING_NOT_FOUND
CA_INV_ADDR
CA_INV_COMPRESSION_TYPE
CA_INV_PROFILE_ID
CA_INV_ELEMENT_COUNT
CA_INV_REQUEST
CA_INV_START_ELEMENT
CA_NO_MSG_RECV
CA_NOT_INIT
CA_OM_REQ_FAILED
CA_REQ_FAILED
CA_TERMINATING

Related information

CA_Create_Greeting(), CA_Delete_Greeting(), CA_Export_Voice(), CA_Get_Greeting_Info().