OnSIP News | OnSIP

Callstats.io: Callstats.io Integration with SIP.js

Written by OnSIP | June 9, 2017 at 4:00 AM

First posted on Callstats.io - June 9, 2017

We are pleased to announce that callstats.io has been integrated with the SIP.js Javascript library. Huge thanks to the team behind SIP.js, especially James Criscuolo from OnSIP for leading the effort and Dan Jenkins from Nimble Ape for doing most of the development work.

Documentation

Callstats.io support landed with v0.7.8 of SIP.js. The full documentation for integrating the callstats-shim is available at: github.com/callstats-io/callstats-sipjs and via your favourite package manager: NPM and bower. The integration steps for SIP.js is very similar to the integration with JsSIP, which has been supported by callstats.io since December 2016.

Integrating in HTML

<!DOCTYPE html>
<html>
  <head>
    <!-- Load callstats.io library (it provides window.callstats) -->
    <script src="https://api.callstats.io/static/callstats.min.js"></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>
  </head>

  <body>
    <!-- your stuff -->
  </body>
</html>

Integrating in app.js

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

// Run the callstats-sipjs library for this UA
callstatssipjs(ua, AppID, AppSecret);

If you have any questions or comments about the integration, you can contact us at support[at]callstats.io.

We have multiple SDKs that have integrated with callstats.io, and any developer or company can integrate their own library with callstats.io. You can find the list of integrations and the integration instructions on our integrations page.