Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 441
wait for rings and report caller ID — dx_wtcallid( )
The dx_wtcallid( ) function is a caller ID convenience function provided to allow applications to
wait for a specified number of rings (as set for the ring event) and returns the calling station’s
Directory Number (DN).
Caller ID information is available for the call from the moment the ring event is generated (if the
ring event is set to occur on or after the second ring (CLASS, ACLIP), or set to occur on or after the
first ring (CLIP, JCLIP) until either of the following occurs:
If the call is answered (the application channel goes off-hook), the caller ID information is
available to the application until the call is disconnected (the application channel goes on-
hook).
If the call is not answered (the application channel remains on-hook), the caller ID information
is available to the application until rings are no longer received from the Central Office
(signaled by ring off event, if enabled).
!
!!
! Cautions
dx_wtcallid( ) changes the event enabled on the channel to DM_RINGS.
If a checksum error occurs on the line, the API functions will fail and return
EDX_CLIDINFO.
Make sure the buffer is large enough to hold the DN returned by the function.
If caller ID is enabled, on-hook digit detection (DTMF, MF, and global tone detection) will not
function.
!
!!
! 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
EDX_BUSY
Channel is busy
timeout specifies the maximum length of time to wait for a ring
Valid values (0.1-second units):
0
-1 waits forever; never times out
If timeout is set to 0 and a ring event does not already exist, the function
returns immediately.
bufferp pointer to buffer where the calling line Directory Number (DN) is to be stored
Note: The application must allocate a buffer large enough to accommodate
the DN.
Parameter Description