|
Function
|
Description/Associated Events
|
|---|
|
adiAcceptCall
|
Directs the TCP to accept an incoming call without answering it. The application can then perform other operations before answering or rejecting the call. The application can accept a call using any of the following methods:
· ADI_ACCEPT_PLAY_RING (works on all trunks)
· ADI_ACCEPT_QUIET (digital trunks only)
· ADI_ACCEPT_USER_AUDIO (digital trunks only)
Associated Events:
· ADIEVN_ACCEPTING_CALL: The TCP is accepting the call, using the specified method.
· ADIEVN_CALL_DISCONNECTED: The remote party hung up while the call was accepted. For all TCPs, if the remote party hangs up at any point during call setup, the reason will be REMOTE_ABANDONED.
· ADIEVN_REJECTING_CALL: (digital trunks only) The application failed to invoke adiAcceptCall within a protocol-specific period of time. The call is automatically rejected. The event value field contains ADI_REJ_HOST_TIMEOUT. When this happens, a tone is played to the network.
|
|
adiAcceptIncomingAddress
(digital trunks only)
|
Directs the TCP to present the incoming call to the application, even if the TCP would normally expect more information.
Note: If the application calls adiAcceptIncomingAddress and the side placing the call hangs up while the TCP is in the process of a compelled sequence (i.e., before the TCP can present ADIEVN_INCOMING_CALL to the application), the TCP sends ADIEVN_PROTOCOL_ERROR to the application with the value set to FALSE_SEIZURE. Upon receiving this event the application should do nothing, but should consider the call setup failed and go back to waiting for the next incoming call.
|
|
adiAnswerCall
|
Directs the TCP to answer a call after a specified number of rings.
Associated Events:
· ADIEVN_ANSWERING_CALL: The TCP is answering the call.
· ADIEVN_CALL_CONNECTED: The telephone network connection is established.
· ADIEVN_CALL_DISCONNECTED: The remote party hung up while the ring tone was being sent. The event value field contains the reason. For all TCPs, if the remote party hangs up at any point during call setup, the reason will be REMOTE_ABANDONED.
· ADIEVN_REJECTING_CALL: (digital trunks only) The application failed to invoke adiAnswerCall within a protocol-specific period of time (this is a race condition). The call is automatically rejected. The event value field contains ADI_REJ_HOST_TIMEOUT.
|
|
adiBlockCalls
|
Directs the TCP to block all incoming calls. The line remains in the blocked state until adiUnBlockCalls is called.
Associated Event:
· ADIEVN_CALLS_BLOCKED: The request has been granted.
|
|
adiGetCallStatus
|
Retrieves the current status of the call (such as caller ID information, if available). It is typically called after ADIEVN_INCOMING_CALL is received, but can also be useful on other occasions.
Associated Events: None.
|
|
adiPlaceCall
|
Directs the TCP to place a call to a specified number, using call placement parameters specified in ADI_PLACECALL_PARMS.
Associated Events:
· ADIEVN_PLACING_CALL: The TCP has seized an outbound trunk and resolved glare, and is dialing the digits.
· ADIEVN_CALL_PROCEEDING: All of the digits have been offered to the telephone network. This is a low-level event which is enabled only if the ADI_CC_REPTPROCEEDING bit is set in the ADI_CALLCTRL_PARMS eventmask passed to adiStartProtocol.
· ADIEVN_REMOTE_ALERTING: The remote party is ringing. This is a low-level event which is enabled only if the ADI_CC_REPTALERTING bit is set in the ADI_CALLCTRL_PARMS eventmask passed to adiStartProtocol.
· ADIEVN_REMOTE_ANSWERED: The remote party has answered.This is a low-level event which is enabled only if the ADI_CC_REPTANSWERED bit is set in the ADI_CALLCTRL_PARMS eventmask passed to adiStartProtocol.
· ADIEVN_CALL_CONNECTED: The call has been answered, and the application has control of the DSPs. It can now play and record voice files, generate and detect DTMF tones. The event value field indicates the reason for achieving the connected state.
· ADIEVN_CALL_DISCONNECTED: The call has been rejected (the line was busy, or the number did not exist), or was never answered (the timer waiting for an answer expired). The event value field contains the reason. For all TCPs, if the remote party hangs up at any point during call setup, the reason will be REMOTE_ABANDONED.
· ADIEVN_STATUSINFO_UPDATE: (digital trunks only) Information has been received regarding the status of the call.
|
|
adiPlaceSecondCall
(analog trunks only)
|
Directs the TCP to place a second call (in preparation for a transfer) via a PBX, Centrex, or Centrex-like switch, to a specified number, using call placement parameters from ADI_PLACECALL_PARMS. It is only valid from the ADI_CC_STATE_CONNECTED state.
Associated Events:
· ADIEVN_PLACING_CALL2: The TCP has seized an outbound trunk and resolved glare, and is dialing the digits.
· ADIEVN_REMOTE_ANSWERED: The second remote party has answered. This is a low-level event which is enabled only if the ADI_CC_REPTANSWERED bit is set in the ADI_CALLCTRL_PARMS eventmask passed to adiStartProtocol (see the source code of inoutcta.c for an example).
· ADIEVN_CALL2_CONNECTED: The call has been answered, and is connected to a new party. The application has control of the DSPs. It can now play and record voice files, generate and detect DTMF tones. The event value field indicates the reason for achieving the connected state. The original call continues to be on hold.
· ADIEVN_CALL2_DISCONNECTED: The call failed (the line was busy, or the number did not exist, or was never answered) and the application is connected to the original caller in the ADI_CC_STATE_CONNECTED state. The event value field contains the reason.
To complete the transfer, call adiReleaseCall, or to return to the original party, call adiReleaseSecondCall.
|
|
adiRejectCall
|
Directs the TCP to reject an incoming call using one of the following methods:
· ADI_REJ_PLAY_RINGTONE (only option on analog trunks)
· ADI_REJ_PLAY_BUSY (digital trunks only)
· ADI_REJ_PLAY_REORDER (digital trunks only)
· ADI_REJ_USER_AUDIO (digital trunks only)
Associated Events:
· ADIEVN_REJECTING_CALL: The reject sequence is initiated, or the application has failed to invoke adiRejectCall within a protocol-specific period of time. The event value field contains the rejection method code, or ADI_REJ_HOST_TIMEOUT if the host timed out.
· ADIEVN_CALL_DISCONNECTED: The remote party has hung up.
|
|
adiReleaseCall
|
Directs the TCP to perform one of the following actions:
· Initiate connection tear down
· Abandon call placement
· Acknowledge a telephone network disconnect event
Associated Event:
· ADIEVN_CALL_RELEASED: The call has been released (hung up).
|
|
adiReleaseSecondCall
(analog trunks only)
|
Directs the TCP to release the second call established with adiPlaceSecondCall. It may also be used to abort the placing of the second call or the transfer of the call (adiTransferCall). It is only valid from the ADI_CC_STATE_CONNECTED2 or ADI_CC_STATE_PLACING_CALL2 states.
Associated Event:
· ADIEVN_CALL2_DISCONNECTED: The second call has been disconnected (the caller hung up).
|
|
adiSetBilling
(digital trunks only)
|
Sets billing information relative to an incoming call (for protocols that support this feature).
Associated Events:
· ADIEVN_BILLING_SET: The billing information was sent to the network. The value field contains the actual call rate.
This event does not indicate whether the requested rate was accepted by the network or not. If the network rejected the request, but did not provide a figure for the rate, the value is set to ADI_BILLINGRATE_DEFAULT.
· ADIEVN_SEQUENCE_ERROR: The TCP was not in a valid state when it received adiSetBilling. The billing rate can be set while the TCP is in the Idle state or the Incoming Call state.
· ADIEVN_CALL_DISCONNECTED: The remote party has hung up during the set billing operation.
· ADIEVN_PROTOCOL_ERROR: The request to set the billing status is not supported by the protocol.
|
|
adiStartProtocol
|
Starts a TCP.
Associated Event:
· ADIEVN_STARTPROTOCOL_DONE: The operation has finished. The event value field describes whether the TCP started successfully. ADI_REASON_FINISHED means a normal completion. Any other value implies an error.
Note: On AG Quad boards using resource management, ADIERR_NOT_ENOUGH_RESOURCES indicates that the adiStartProtocol parameter mediamask was not set to zero. The application must restart the TCP with the mediamask value in the ADICALLCTL_PARMS structure set to zero. Refer to Chapter 4 for further details about starting digital CAS protocols on boards that use resource management.
|
|
adiTransferCall
(analog trunks only)
|
Directs the TCP to transfer a call via a PBX, Centrex, or Centrex-like switch, to a specified number, using call placement parameters from the ADI_PLACECALL_PARMS structure. It is only valid from the ADI_CC_STATE_CONNECTED state.
Associated Events:
· ADIEVN_PLACING_CALL2: The TCP has seized an outbound trunk and resolved glare, and is dialing the digits.
· ADIEVN_CALL_DISCONNECTED: The call has been transferred, the original call is disconnected.
· ADIEVN_REMOTE_ANSWERED: The second remote party has answered. This is a low-level event which is enabled only if the ADI_CC_REPTANSWERED bit is set in the ADI_CALLCTRL_PARMS eventmask passed to adiStartProtocol (see the source code of inoutcta.c for an example).
· ADIEVN_CALL2_DISCONNECTED: The transfer failed (the line was busy, or the number did not exist, or no dialtone was detected). You are connected back to the original caller in the ADI_CC_STATE_CONNECTED state. The event value field contains the reason.
When the transfer is completed, call adiReleaseCall to go back to the idle state.
|
|
adiUnBlockCalls
|
Requests the TCP to stop blocking calls.
Associated Event:
· ADIEVN_CALLS_UNBLOCKED: The request to unblock the line has been granted.
|