reject() method

If a call object is added to the program, this method can run on it. It is used to reject a call. A call can be rejected if a phone is not picked up yet.

Method usage example

To use it first you need to register to the onIncomingCall event. This is to make sure your webclient knows when it gets an incoming call. If your webclient receives a call then the incoming function is called. In that function you can reject the incoming call (Code example 1).

OzWebClient.onIncomingCall(incoming); //registers to the onIncomingCall event

function incoming(incomingCall) {
   incomingCall.reject(); //rejects the call
}
	
Code example 1 - reject() method example

More information