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
Comments
0 comments
Please sign in to leave a comment.