Edit in JSFiddle

// control

var messageButton = document.getElementById('messageButton');
messageButton.addEventListener("click", function () {
  if (message.value !== "")
      ua.sendMessage('music@frafos.com', message.value);
}, false);

var message = document.getElementById('message');

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

ua.start();
<input id="message" type="text">
<input id="messageButton" type="button" value="Send">

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

<!-- jssip.js is included by JsFiddle as External Resources -->