Skip to content
juzna edited this page Sep 14, 2010 · 1 revision

How to use linphone from JavaScript

First, look at the examples in html/ directory.

Add linphone object to your html page:

<object type="application/x-linphone" id="plugin" width="0" height="0"> </object>

Then you can access it directly from javascript:

var plugin = document.getElementById("plugin");

// Add event listeners, you can find events on this wiki
plugin.addEventListener(‘AuthInfoRequested’, callback, false);

// Start linphone core
plugin.start();

// Add authentication info and proxy (i.e. register to a proxy)
plugin.addAuthInfo(‘johndoe’, ‘’, ’pass’);
plugin.addProxy(‘sip:myprovider.com’, ‘sip:johndoe@myprovider.com’);

// Make a call
plugin.call(‘1800123456’);

Clone this wiki locally