(Page 42 of 80 in this chapter)
adiRejectCall
Description
Rejects an incoming call.
Prototype
DWORD
adiRejectCall
(
CTAHD
ctahd
,
unsigned
method
)
ctahd
Context handle returned by
adiOpenPort
.
method
Specifies the trunk protocol action for rejecting the call.
Return Values
SUCCESS
ADIERR_INVALID_CALL_STATE
CTAERR_BAD_ARGUMENT
Invalid
method.
CTAERR_INVALID_CTAHD
CTAERR_INVALID_STATE
Events
ADIEVN_REJECTING_CALL
Generated by AG Access after the rejection method is initiated. The event
value
field contains either the
method
argument that was passed to
adiRejectCall
, or
ADI_REJ_HOST_TIMEOUT
, if the protocol is forced to reject the call because the application did not respond to an incoming call event in time.
ADIEVN_CALL_DISCONNECTED
Generated after the remote caller hangs up.
Details
After receiving an
ADIEVN_INCOMING_CALL
event, the application must invoke either
adiAnswerCall
or
adiRejectCall
.
adiRejectCall
causes the trunk protocol to reject the incoming call and, depending upon the
method
argument, perform one of the following actions:
Method
Description
ADI_REJ_PLAY_REORDER
Play reorder (fast busy) tone.
ADI_REJ_PLAY_BUSY
Play busy tone.
ADI_REJ_PLAY_RINGTONE
Play ring tone.
ADI_REJ_USER_AUDIO
Allows the application to generate any programmable tone and perform voice playback functions.
The generated reject tone is played until the remote party disconnects.
If the method is
ADI_REJ_USER_AUDIO
, then the application can generate any programmable tone and perform voice playback functions. For example, you could generate a SIT (Special Information Tone) message. The application must wait for the
ADIEVN_REJECTING_CALL
event before generating the SIT audio.
Note: If the remote party disconnects while the application rejects the call, then AG Access will only generate an
ADIEVN_CALL_DISCONNECTED
event. In this case, no
ADIEVN_REJECTING_CALL
event is delivered.
Note: This function is not available when using the
NOCC
protocol.
See Also
adiAnswerCall
,
adiPlaceCall
,
adiReleaseCall
Example
See
adiPlaceCall
example.
(Page 42 of 80 in this chapter)
Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.