Skip to content

tsudot/JsSIP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Getting Started

The following simple JavaScript code creates a JsSIP User Agent instance and makes a SIP call:

// Create our JsSIP instance and run it:

var configuration = {
  'outbound_proxy_set': 'ws://sip-ws.example.com',
  'uri':                'sip:alice@example.com',
  'password':           'superpassword'
};

var coolPhone = new JsSIP.UA(configuration);

coolPhone.start();


// Make an audio/video call:

var useAudio = true;
var useVideo = true;

// id attribute of existing HTML5 <video> elements in which local and remote video will be shown
var views = {
  'localView':  "my-cam",
  'remoteView': "peer-cam"
};

var eventHandlers = {
  'connecting': function(e){ // Your code here },
  'progress':   function(e){ // Your code here },
  'failed':     function(e){ // Your code here },
  'started':    function(e){ // Your code here },
  'ended':      function(e){ // Your code here }
};

coolPhone.call('sip:bob@example.com', useAudio, useVideo, eventHandlers, views);

Want to see more? Check the full Getting Started section in the project website and our nice demos.

Website and Documentation

Download

Authors

Main Author

Contributors

License

JsSIP is released under the MIT license.

About

JsSIP, the JavaScript SIP library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%