src/js/rtc_peer_connection_factory.js
//This will handle the idleConnection and quota limits notification from the server
This will handle the idleConnection and quota limits notification from the server
This will handle the idleConnection and quota limits notification from the server
_webSocketManagerOnMessage(event) {
        let content;
        if (event.content) {
            content = JSON.parse(event.content);
        }
        if (content && this._clientId === content.clientId) {
            if (content.jsonRpcMsg.method === "idleConnection") {
                this._clearIdleRtcPeerConnection();
            } else if (content.jsonRpcMsg.method === "quotaBreached") {
                this._logger.log("Number of active sessions are more then allowed limit for the client " + this._clientId);
                this._closeRTCPeerConnection();
                this._publishError("multiple_softphone_active_sessions", "Number of active sessions are more then allowed limit.");
            }
        }
    }
_webSocketManagerOnMessage ( event ) { let content ; if ( event . content ) { content = JSON . parse ( event . content ) ; } if ( content && this . _clientId === content . clientId ) { if ( content . jsonRpcMsg . method === "idleConnection" ) { this . _clearIdleRtcPeerConnection ( ) ; } else if ( content . jsonRpcMsg . method === "quotaBreached" ) { this . _logger . log ( "Number of active sessions are more then allowed limit for the client " + this . _clientId ) ; this . _closeRTCPeerConnection ( ) ; this . _publishError ( "multiple_softphone_active_sessions" , "Number of active sessions are more then allowed limit." ) ; } } }
This will handle the idleConnection and quota limits notification from the server
This will handle the idleConnection and quota limits notification from the server