SIP.js is a JavaScript library that helps developers add a full SIP signaling stack to their WebRTC applications. Originally developed by the OnSIP team on top of jsSIP, SIP.js remains an open source project open for further contributions.

Integration steps

The full documentation for integrating the callstats-shim is available here:

Integrating in HTML

<!DOCTYPE html>
  <!-- Load library (it provides window.callstats) -->
  <script src=""></script>
  <!-- Load SIPjs library -->
  <script src="js/sipjs.js"></script>
  <!-- Load callstats-sipjs library (it provides window.callstatssipjs) -->
  <script src="js/callstats-sipjs.js"></script>
  <!-- Load our app code -->
  <script src="js/app.js"></script>
  <!-- your stuff -->

Integrating in app.js

// Create a SIP.UA instance
var ua = new SIP.UA(config);

// Run the callstats-sipjs library for this UA
var callstats = callstatssipjs(ua, AppID, AppSecret, localUserID, csInitCallback, csStatsCallback, configParams);