// main.js (function () { //Creates the anonymous user agent so that you can send messages var userAgent = new SIP.UA(); // send the message when the button is clicked document.getElementById('send').addEventListener("click", function() { userAgent.message("[email protected]", "Hello Bryan!");}, false); }) ();
<!DOCTYPE html> <html> <body> <button id="send">Send Message</button> <script src="sip-devel.min.js"></script> <script src="main.js"></script> </body> </html>