CA_Get_Channel_Info()

Purpose

Returns the physical card and channel number assigned to the channel process.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
int CA_Get_Channel_Info (
 short            link_id,
 CHANNEL_INFO_ST  *channel_info_sp
);

Description

This subroutine provides the actual physical card and channel. The link_id can be obtained from the DT_MSG_INFO structure, and references the channel process running the application associated with the link_id. This information is needed for the custom server to be able to send asynchronous events to a running application. For example, the custom server could issue CA_Simulate_Hangup() to indicate that the external device is on-hook.

Note: This call will fail if it is used in conjunction with a channel process which does not have an active call. Don't use this subroutine before a MakeCall action or after a Hangup action.

Parameters

link_id
The ID of the channel process
channel_info_sp
A pointer to the caller's memory where this routine should return a CHANNEL_INFO_ST output structure that will be filled in as described in CHANNEL_INFO_ST.

Return codes

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

Error names

CA_CALL_ACCESS_DENIED
CA_INV_CHANNEL
CA_INV_LINK_ID
CA_NO_DEVICE
CA_NOT_INIT
CA_TERMINATING

Related information

CA_Simulate_Alphas(), CA_Simulate_Hangup(), CA_Simulate_Keys().