CA_Simulate_Hangup()

Purpose

Simulates a hang up.

Libraries

Blueworx Voice Response library (libvae.a)

Custom Server library (libca.a)

Syntax

#include "CA_header.h"
 int  CA_Simulate_Hangup (
 CHANNEL_INFO_ST  *channel_info_sp
);

Description

This subroutine generates an asynchronous hangup event on a given channel. The associated channel process handles this event exactly as if it had come from an external device. This enables the custom server to force a hangup if the conversation appears to have finished. This function is supported only for channel associated signaling protocols that do not detect far-end hangup—namely, FXS or SAS loop start and Remote Extension (RE). For other protocols, the subroutine returns 0, but does not actually do anything.

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().

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_NO_DEVICE
CA_NOT_INIT
CA_INV_CHANNEL
CA_SIGNAL_RECEIVED
CA_TERMINATING

Related information

CA_Simulate_Alphas(), CA_Simulate_Keys().