TELDeflectCall
Deflects an incoming call to another directory number.
pascal TELErr TELDeflectCall ( TELCAHandle hTELCA, ConstStr255Param rmtDN, ConstStr255Param rmtName, ConstStr255Param rmtSubaddress);
hTELCA- A handle to a call appearance structure for the incoming call. You obtain this handle from a
telCAAlertingMsgor atelCAOfferMsgmessage.rmtDN- A pointer to a Pascal-style string containing the directory number to which the call is to be deflected.
rmtName- A pointer to a Pascal-style string containing the name of the party associated with the directory number to which the call is to be deflected. This is an optional parameter--if you don't have the name, set the pointer to
nil.rmtSubaddress- A pointer to a Pascal-style string containing the subaddress, as defined by the ISDN S-Bus specification, of the directory number to which the call is to be deflected. You should set this parameter if the telephone network supports subaddressing. To find out, call the
TELGetInfofunction and check the bithasSubaddressin the telephone structure.- function result
- A result code.
DESCRIPTION
When your call appearance message handler gets atelCAAlertingMsgor atelCAOfferMsgmessage, you can call theTELDeflectCallfunction to redirect the incoming call to another directory number if the call is deflectable. (A call is deflectable when thedeflectablebit is set in theotherFeaturesfield of the call appearance structure.)When
TELDeflectCallreturnsnoErr, the state of the call appearance changes from eithertelCAAlertingStateortelCAOfferStatetotelCAIdleState. When your call appearance message handler gets thetelCAIdleMsgmessage, you should dispose of the call appearance structure by calling theTELCADisposefunction (page 4-52).If
TELDeflectCallreturns an error, your application can either answer the incoming call or ignore it.