closeWithHangup() method

If a Session object is created, this method can be run on it by a third participant. It closes the session by calling HANGUP. 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 then the sessionCreated function is called that will hang up the line and close the session after 1 minute. (Code example 1).

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

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

More information