VoIP News OnSIP News Announcements

OnSIP Developers Release SIP.js 0.6.0 - A SIP JavaScript Stack Built for WebRTC

by Joe DeBari

The OnSIP developers are proud to announce a new release of their SIP Javascript stack, SIP.js. Here are some highlights.

Published: July 8, 2014
SIP.js

The OnSIP developers are proud to announce a new release of their SIP Javascript stack, SIP.js. With over 80+ commits and 46 resolved Github issues during the past two months, SIP.js 0.6.0 is now the most stable, comprehensive version of the library to date. Here are some highlighted improvements:

  • Bower and NPM Packages: Don't like building from source? npm install sip.js or bower install sip.js is all you need to get the SIP.js distributable for your app.
  • 50% smaller: Due to some changes in the build process, we have been able to shrink the (unminified) source code down to half of it's original size.
  • DataChannel Support: You can now incorporate the RTCDataChannel API into your SIP.js apps.
  • MediaHandler Events: The default MediaHandler now gives users the ability to place callbacks on every related media event we could think of. Users can now mangle SDP at any point in the process, have their app give users more accurate feedback, and much more.
  • More Browser Interoperability: The Hacks object continues to be updated with fixes to keep up with the latest changes in browsers.
<span style="color:#080;font-weight:bold">var</span> ua = <span style="color:#080;font-weight:bold">new</span> SIP.<span style="color:#06B;font-weight:bold">UA</span>();
ua.<span style="color:#06B;font-weight:bold">message</span>(
  <span style=" color:#ea4b35;"><span style="color:#710">'</span>will@example.onsip.com<span style="color:#710">'</span></span>,
  <span style=" color:#ea4b35;"><span style="color:#710">'</span>Hello, world!<span style="color:#710">'</span></span>
);

<span style="color:#080;font-weight:bold">var</span> session = ua.<span style="color:#06B;font-weight:bold">invite</span>(<span style=" color:#ea4b35;"><span style="color:#710">'</span>will@example.onsip.com<span style="color:#710">'</span></span>);
session.<span style="color:#06B;font-weight:bold">on</span>(<span style=" color:#ea4b35;"><span style="color:#710">'</span>accepted<span style="color:#710">'</span></span>, function () {
  this.<span style="color:#06B;font-weight:bold">bye</span>();
});
	
SIP.js sample code

We also have some exciting changes planned for our next major release:

  • Android and iOS support: Mobile support has been high on our to-do list, so we look forward to finally releasing this.
  • Grammar Rewrite: A complete overhaul of the SIP.js grammar will give more flexibility towards SIP compliance and create more intuitive source code.
  • Testing Update: The testing framework we use (Jasmine) has released a major update that should allow us to simplify our tests while making them more stable.