returns the caller ID cc_ReqANI( )
191
AT&T’s ANI-on-demand service). cc_ReqANI( ) is a non-multitasking function
when the calling party number is received or when the network does not offer an
ANI-on-demand service. Thus, if ANI is already available, the function returns
immediately because it does not have to instruct the interface device to query the
switch.
In EV_ASYNC mode, the function will always return an event. In EV_SYNC
mode, the function will return automatically with the ANI if one is available.
Otherwise, the function will wait for completion of the ANI-on-demand request.
NOTE:
If ANI is always available, use the cc_GetANI( ) function, instead of the
cc_ReqANI( ) function, for a faster return.
!
! !
!
Termination Events
• CCEV_REQANI - indicates that the ANI (caller ID) has been received from
the network. This event occurs only when the ANI-on-demand feature is used.
• CCEV_TASKFAIL - indicates that a request/message was rejected by the
firmware. Typically, this event is triggered by an incorrect function call
during the call.
!
! !
!
Cautions
• Make sure the size of ani_buf is sufficient for the ANI string. Refer to the file
cclib.h for the maximum allowable string.
• The ANI-on-demand feature is available only on the AT&T ISDN network.
• cc_ReqANI( ) may not function in all service-provider environments. Check
whether retrieving billing information is an option with the service provider.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include “srllib.h”
#include “dtilib.h”
#include “cclib.h”
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = “dtiB1T1”;
char ani_buf[CC_ADDRSIZE];