Intel 05-1832-002 IP Phone User Manual


 
418 Voice API for Windows Operating Systems Library Reference — November 2003
dx_stopch( ) — force termination of currently active I/O functions
!
!!
! Cautions
dx_stopch( ) has no effect on a channel that has any of the following functions issued:
dx_dial( ) without call progress analysis enabled
dx_wink( )
The functions will continue to run normally, and dx_stopch( ) will return a success. For
dx_dial( ), the digits specified in the dialstrp parameter will still be dialed.
If dx_stopch( ) is called on a channel dialing with call progress analysis enabled, the call
progress analysis process will stop but dialing will be completed. Any call progress analysis
information collected prior to the stop will be returned by extended attribute functions.
If an I/O function terminates (due to another reason) before dx_stopch( ) is issued, the reason
for termination will not indicate dx_stopch( ) was called.
When calling dx_stopch( ) from a signal handler, mode must be set to EV_ASYNC.
An application can use dx_stopch( ) from within a signal handler to stop the dx_getevt( ) and
dx_wtring( ) functions. To do so, “OR” the mode flag with the EV_STOPGETEVT and
EV_STOPWTRING flags, respectively, to stop these functions. In these cases, dx_getevt( )
will successfully return with the event DE_STOPGETEVT while dx_wtring( ) will fail with a
return value of -1 and the lasterr will be set to EDX_WTRINGSTOP.
!
!!
! Errors
If the function returns -1, use the Standard Runtime Library (SRL) Standard Attribute function
ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive
error message. One of the following error codes may be returned:
EDX_BADPARM
Invalid parameter
Parameter Description
chdev specifies the valid channel device handle obtained when the channel was
opened using dx_open( )
mode a bit mask that specifies the mode:
EV_SYNC – synchronous mode
EV_ASYNC – asynchronous mode. The stop will be issued, but the driver
does not “sleep” and wait for the channel to become idle before
dx_stopch( ) returns.
EV_NOSTOP – if this bit is set and the channel is idle, TDX_NOSTOP
event is generated.
EV_STOPGETEVT – if this bit is set and dx_stopch( ) is issued during
dx_getevt( ), TDX_CST event is generated with reason of
DE_STOPGETEVT.
EV_STOPWTRING – if this bit is set and dx_stopch( ) is issued during
dx_wtring( ), EDX_WTRINGSTOP error is be generated.
IGNORESTATE – ignores the busy/idle state of the channel. Performs a
stop on the channel regardless of whether the channel is busy or idle. If
this flag is used, the function will not check for a busy state on the
channel and will issue a stop even if the channel is busy.