Intel 05-1832-002 User Manual

Page of 564
258
Voice API for Windows Operating Systems Library Reference — November 2003
dx_gtcallid( ) — return the calling line Directory Number
dx_gtcallid( )
return the calling line Directory Number
!
!
!
Description
The dx_gtcallid( ) function returns the calling line Directory Number (DN) sent by the Central 
Office (CO). On successful completion, a NULL-terminated string containing the caller’s phone 
number (DN) is placed in the buffer. Non-numeric characters (punctuation, space, dash) may be 
included in the number string; however, the string may not be suitable for dialing without 
modification.
Caller ID information is available for the call from the moment the ring event is generated and until 
the call is either disconnected (for answered calls) or until rings are no longer received from the CO 
(for unanswered calls). If the call is answered before caller ID information has been received from 
the CO, caller ID information will not be available.
If the call is not answered and the ring event is received before the caller ID information has been 
received from the CO, caller ID information will not be available until the beginning of the second 
ring (CLASS, ACLIP) or the beginning of the first ring (CLIP, JCLIP).
To determine if caller ID information has been received from the CO before issuing a 
dx_gtcallid( )or 
 caller ID function, check the event data in the event block. When 
the ring event is received, the event data field in the event block is bitmapped and indicates that 
caller ID information is available when bit 0 (LSB) is set to a 1. 
Name:
int dx_gtcallid (chdev, bufferp)
Inputs:
int chdev
valid channel device handle
unsigned char *bufferp
pointer to buffer where calling line Directory Number is returned 
Returns:
0 success
-1 error return code
Includes:
srllib.h
dxxxlib.h
Category:
Caller ID
Mode:
synchronous
Platform:
Springware 
Parameter
Description
chdev 
specifies the valid channel device handle obtained when a channel was opened 
using 
bufferp 
pointer to buffer where calling line Directory Number (DN) is returned
Note: Make sure to allocate a buffer size large enough to accommodate the 
DN returned by this function.