(Page 36 of 80 in this chapter)


adiPlaceSecondCall

Description

Places a second call on a PBX, Centrex, or Centrex-like, line.

Prototype

DWORD adiPlaceSecondCall( CTAHD ctahd,
char *digitstr,
ADI_PLACECALL_PARMS *parms )

ctahd Context handle returned by adiOpenPort.

digitstr Address of the party to transfer to (e.g., the party's extension).

parms Pointer to an ADI_PLACECALL_PARMS structure shown below (NULL uses default parameter values):

typedef struct
{     /* passed with adiStartProtocol()            */
 DWORD size;    /* size of this structure               */
 DWORD connectmask;
/* events that transition to connected: */
DWORD disconnectmask;
/* events that transition to disconnected: */
ADI_CALLPROG_PARMS callprog;
/* call progress analysis parameters */
} ADI_PLACECALL_PARMS;
For the ADI_CALLPROG_PARM structure, see the function adiStartCallProgress. See Appendix D for more details and default values.

Return Values

Events

Details

This function is an extension to the standard call control model. It requests the placing of a second call (in preparation for a transfer) via a PBX, Centrex, or Centrex-like switch. It is only valid from the ADI_CC_STATE_CONNECTED state.

This function causes a transition from the ADI_CC_STATE_CONNECTED state to the ADI_CC_STATE_PLACING2, upon receiving the ADIEVN_PLACING_CALL2 event. Once this event is received, you can expect either an ADIEVN_CALL2_CONNECTED (call succeeded and you are connected to a new party) or an ADIEVN_CALL2_DISCONNECTED (the call failed and you are connected back to the original caller in the ADI_CC_STATE_CONNECTED state).

adiPlaceSecondCall is similar to adiTransferCall, except that a successful call placement (i.e., party answers) connects you to the second call. AG Access does not complete the transfer automatically. This allows an interactive supervised transfer, and at this point, you can execute any function that is allowed in the ADI_CC_STATE_CONNECTED state, to interact with the new called party. To complete the transfer, call adiReleaseCall, or to return to the original party, call adiReleaseSecondCall.

Call placement, call transfer, and call control are discussed in detail in the AG Access Developer's Manual.

Note: This function is not available when using the NOCC protocol.

See Also

adiReleaseSecondCall, adiReleaseCall, adiTransferCall, adiPlaceCall

Example

See the xferpbx demonstration program.



(Page 36 of 80 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.