hold() method

If a Session object is created, this method can be run on it by a third participant. It is used to put a session on hold. The phone can be put back to IN_CALL state with an unHold() method. Can only be used if the connected webclient has the required privilege.

Method usage example

You can register to the onSessionCreated event. If a session is created then the sessionCreated function is called that will hold the sessions everytime. (Code example 1).

//registers to the onSessionCreated event
OzWebClient.onSessionCreated(sessionCreated);

function sessionCreated(session)  {  
	session.hold(); //hold all created sessions
}
	
Code example 1 - hold() method example

More information