CA_Simulate_Keys()

Purpose

Simulates pressing keys.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
int  CA_Simulate_Keys (
  CHANNEL_INFO_ST    *channel_info_sp,
  int                key_string_length,
  unsigned char      *key_string_p
);

Description

This subroutine generates simulated key presses on a given channel. The associated channel process handles these key presses exactly as if they had come from an external device.

Parameters

channel_info_sp
A pointer to a CHANNEL_INFO_ST input structure that is filled in as described in CHANNEL_INFO_ST. This should contain the physical card and channel returned from a previous call to CA_Get_Channel_Info().
key_string_length
The number of characters from the string to send.
key_string_p
A pointer to a string of characters to be sent to the given channel. Valid characters are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #, A, B, C, D, and the global character variables CA_ENTER_KEY, CA_PAUSE_KEY, CA_FORWARD_KEY, CA_REVERSE_KEY, CA_STOP_KEY. These variables are provided to the custom server at initialization time, and contain the key values mapped to these functions by the system configuration.
Note: Another global variable, CA_SKIP_SECONDS, defines the time in seconds that the forward or reverse function will skip forward or backward.

Return codes

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

Error names

CA_CALL_ACCESS_DENIED
CA_FUNC_FAILED
CA_INV_KEYS
CA_INV_CHANNEL
CA_NO_DEVICE
CA_NOT_INIT
CA_SIGNAL_RECEIVED
CA_TERMINATING

Related information

CA_Simulate_Alphas(), CA_Simulate_Hangup().