TELRejectCall
Rejects an incoming call.
pascal TELErr TELRejectCall (TELCAHandle hTELCA, short reason);
hTELCA- A handle to a call appearance structure for an incoming call. You obtain this handle from a
telCAAlertingMsgor atelCAOfferMsgmessage.reason- Reserved.
- function result
- A result code.
DESCRIPTION
When your call appearance message handler gets atelCAAlertingMsgor atelCAOfferMsgmessage, you can call theTELRejectCallfunction to reject an incoming call if it is rejectable.A call is rejectable when the
rejectablebit in theotherFeaturesfield of the call appearance structure is set. If the call is not rejectable, you can ignore the call or call theTELAnswerCallfunction (page 4-30) to answer it.If
TELRejectCallreturnsnoErr, 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).You can use
TELRejectCallto provide call screening. For instance, if the telephone tool and telephone switch support the caller ID feature, your application can obtain from the user those directory numbers from which the user does not want to receive calls. You can useTELRejectCallto refuse calls from directory numbers the user specifies.