hold() method

If a call object is added to the program, this method can run on it. It is used to put a call on hold. The phone can be put back to IN_CALL state with an unHold() method.

Method usage example

You can register to the onIncomingCall event. If the webphone receives a call then the incoming function is called that will hold the old call and accept the new call (Code example 1).

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

function incoming(newCall) {
   oldCall.hold(); //hold the old call
   newCall.accept(); //accepts the new call
}
	
Code example 1 - hold() method example

More information