Retrieves the ID of the currently recorded session.

sessionstack("getSessionId", function(sessionId) {
    if (sessionId === null) {
        // No session is being recorded.
    } else {
        // sessionId -> the ID of the currently recorded session.
    }
});

This command receives a callback function as a second argument. The callback function will be invoked with the first parameter being the Id of the currently recorded session. If no session is being recorded, null will be passed instead.