Edit in JSFiddle

// call controls
var selfView = document.getElementById('selfView');
var remoteView = document.getElementById('remoteView');

var terminateButton = document.getElementById('terminateButton');
terminateButton.addEventListener("click", function () {
    call.terminate();
}, false);


// minimal user agent
var ua = new JsSIP.UA({
    'ws_servers': 'wss://tryit.areteasea.com:8081',
    'uri': 'test@areteasea.com',
    'register': false
});

ua.start();


/* 
 * Call event handlers
 */
var eventHandlers = {
    'failed': function (e) {
        alert('call failed: '+ e.cause);
    },
    'accepted': function (e) {
        // Attach local stream to selfView
        if (call.connection.getLocalStreams().length > 0) {
            localStream = call.connection.getLocalStreams()[0];
            selfView = JsSIP.rtcninja.attachMediaStream(selfView, localStream);
            selfView.volume = 0;
        }
    },
    'addstream': function (e) {
        // Attach remote stream to remoteView
        remoteStream = e.stream;
        remoteView = JsSIP.rtcninja.attachMediaStream(remoteView, remoteStream);
    }
};

var call = ua.call('music@frafos.com', {
    'eventHandlers': eventHandlers
});
<video id="selfView" autoplay muted="true" _hidden=true></video>
<video id="remoteView" autoplay _hidden=true></video>
<button id="terminateButton" type="button">End Call</button>

<!-- Open the browser's JavaScript console to see the logs  -->
<script>JsSIP.debug.enable("*");</script>

<!-- jssip.js is included by JsFiddle as External Resources -->
video {
    border: 1px solid lightgrey;
    width: 300px;
    height: 220px;
}