An IRAPI application can place an outbound call by using irCall(3IRAPI). Typically, an IRAPI application receives an IRE_EXTERNAL event requesting it to place a call or it is irExec(3IRAPI)'ed or irSubProg(3IRAPI)'ed when the application is to place a call. After the request to place a call has been made, the IRAPI application must gain ownership of a channel via irInit(3IRAPI) or irInitGroup(3IRAPI). Once the channel has been granted to the IRAPI application, it then may place the call via irCall.
irCall supports multiple types of CCA to determine the disposition of an outbound call. The type of CCA identified by the IRP_OUTCALL_CCALEVEL is used automatically to determine the results of the call attempt.
irCall uses the following library parameters to control the behavior of the call attempt:
The completed call disposition is reported via an IRE_CALL_DONE event. The event modifiers indicate the disposition (for example, answered, busy, etc.). The IRE_CALL_DONE event indicates whether the call attempt via irCall was successful. If the event modifiers indicate that the call was successfully completed, the application proceeds to another activity on the channel (for example, initiate playing of speech via irPlay).
A process must always call irDisconnect(3IRAPI), irDeinit(3IRAPI), or irReturn(3IRAPI) if an IRE_CALL_DONE indicates an error or failure occurred. In general, the IRAPI leaves the channel in the IRD_ACTIVE service state even if the call attempt failed.
In addition to the IRE_CALL_DONE event, an application also may receive one or more IRE_CALL_PROG events. This event reports intermediate events before or after the IRAPI determines that the call attempt is complete.