User`s guide

Dialogic
®
System Release 6.0 PCI for Windows
®
Release Update, Rev 62 — January 30, 2008 50
Dialogic Corporation
ec_resetch( )
Description
The ec_resetch( ) function recovers a channel that is “stuck” (busy or hung) and in a recoverable
state, and brings it to an idle and usable state. This function blocks all other functions from
operating on the channel until the function completes. This function recovers both the CSP channel
and the voice channel.
In synchronous mode, 0 is returned if the function completes successfully, and -1 is returned in
case of error.
In asynchronous mode, the TDX_RESET and the TEC_RESET events are generated to indicate
that the channel was recovered and is in an idle and usable state. The TDX_RESETERR and the
TEC_RESETERR events are generated to indicate that the channel is not recoverable. Issuing any
other media calls on this channel will result in an error.
Cautions
The ec_resetch( ) function is intended for use on channels that are stuck and not responding.
Do not use it in place of ec_stopch( ). Use ec_resetch( ) only if you do not receive an event
within 30 seconds of when it’s expected. Overuse of this function creates unnecessary
overhead and may affect system performance.
Name: ec_resetch (chdev, mode)
Inputs: int chdev
valid channel device handle
int mode
mode of operation
Returns: 0 if success
-1 if failure
Includes: srllib.h
eclib.h
Category: I/O
Mode: asynchronous or synchronous
Dialogic
®
Platform:
DM3
Parameter Description
chdev Specifies the valid device handle obtained when the channel was opened
using dx_open( )
mode Specifies the mode of operation:
EV_ASYNC – asynchronous mode. The calling thread returns
immediately so it can process media functionality on other channels.
EV_SYNC – synchronous mode. The calling thread waits until the
channel is recovered or discovers that the channel is not in a
recoverable state.