(Page 3 of 69 in this chapter) Version
adiAcceptIncomingAddress
Description
- Presents an incoming call to the application, regardless of whether all call information has arrived.
Note: This function and all other ADI call control functions have been superseded by the NCC service. For more information, see the Natural Call Control Service Developer's Reference Manual.
Prototype
- DWORD adiAcceptIncomingAddress
( CTAHD ctahd)
- ctahd CTA context handle returned by ctaCreateContext.
Return Values
Events
Details
- adiAcceptIncomingAddress causes a TCP to present an incoming call to the application, regardless of whether all call information (DID or ANI digits, category information, etc.) has arrived. The application receives an ADIEVN_INCOMING_CALL event.
- This function is useful in digital CAS implementations when the number of incoming digits is unknown and the way to determine whether all digits have arrived is to wait for a lengthy timeout period. To avoid this wait, configure the TCP to report individual incoming digits as soon as they arrive. When enough digits have arrived, the application then calls adiAcceptIncomingAddress to process the call without continuing to wait.
- To direct the TCP to report individual digits as they arrive, set the following bits in the ADI_CALLCTL_PARMS eventmask passed to adiStartProtocol
(note that incoming digits are not indicated unless both of these bits are set):
- ADI_CC_REPTSEIZURE - enables the
ADIEVN_SEIZURE_DETECTED event. Digits are not reported
unless this event is enabled.
- For more information about controlling calls under specific TCPs, refer to the AG CAS for ADI Service Installation and Developer's Manual.
See Also
- adiAcceptCall
, adiAnswerCall, adiStartProtocol
Example
switch (nextevent.id)
{
/* ADIEVN_SEIZURE_DETECTED
* expect a seizure event only if we are running a purely inbound
* protocol; otherwise we have already gotten it */
case ADIEVN_SEIZURE_DETECTED:
starttime = nextevent.timestamp;
break;
/* ADIEVN_INCOMING_CALL
* a call is ready to be answered. We can call adiGetCallStatus()
* to get the address and user id digits */
case ADIEVN_INCOMING_CALL: /* an incoming call has arrived */
adiGetCallStatus( cx->ctahd, &status, sizeof(status) );
strcpy( called_digits, status.calledaddr );
strcpy( calling_digits, status.callingaddr );
toll_category = status.tollcategory;
call_received = TRUE;
break;
case ADIEVN_INCOMING_DIGIT:
if (analyze_received_digits ((char)nextevent.value,
dynamic_digit_string,
&receiving_DID) == GOT_IT)
adiAcceptIncomingAddress(cx->ctahd);
break;
case ADIEVN_PROTOCOL_ERROR: /* an error occurred */
log_error (cx, &nextevent,"MyReceiveCall, waiting for ADIEVN_INCOMING_CALL");
if (nextevent.value == ADI_CC_ERR_NO_CS_RESOURCE)
stat.inresrejected++;
return FAILURE;
case ADIEVN_CALL_DISCONNECTED /* a disconnect in this phase */
/* means that the call failed. Simply go wait for another call. */
return FAILURE;
default:
break;
}
if (call_received == TRUE) break; /* exit the loop */
}
(Page 3 of 69 in this chapter) Version
Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights
reserved.