CA_Init()

Purpose

Attaches the custom server to the Blueworx Voice Response system.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
 int CA_Init (
 char  *application_name
);

Description

This subroutine initializes a custom server, attaching to all the required shared resources. If you use the CA_Set_Options() subroutine to enable or disable custom server runtime options prior to initializing the custom server, CA_Set_Options() must precede this routine.

This subroutine also initializes a signal handler for the SIGINT signal, for the purpose of calling the termination function.

This subroutine sets up a number of static variables in the caller's data segment. These static variables are defined by the custom server library when it is linked into the custom server program. Do not use exec() and similar system calls if you want the new program image to use custom server calls as it destroys the initialized static variables, and when you use a CA_ call you will get a return code of CA_NOT_INIT. To achieve a similar result to exec(), but without destroying existing static data, use the load() system call.

Parameters

application_name
The name of the custom server. A #define for APPL_NAME is provided in the system-generated header file for the custom server. The maximum number of characters allowed in this string is MAX_CA_NAME_LENGTH.

Return codes

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

Error Condition

CA_ENVIRON_MISSING
CA_INIT_FAILED

Related information

CA_Set_Options().