close() method

If a Session object is created, this method can be run on it by a third participant. It closes the session, terminates the call. It 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, the sessionCreated function is called that will terminate the session after 1 minute. (Code example 1).

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

function sessionCreated(session)  {  
	setTimeout('session.close()', 60000);  // terminate the session after 1 minute
}
	
Code example 1 - close() method example

More information