在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:versatica/JsSIP开源软件地址:https://github.com/versatica/JsSIP开源编程语言:JavaScript 91.6%开源软件介绍:Overview
NOTEStarting from 3.0.0, JsSIP no longer includes the rtcninja module. However, the jssip-rtcninja package is based on the Support
Getting StartedThe following simple JavaScript code creates a JsSIP User Agent instance and makes a SIP call: // Create our JsSIP instance and run it:
var socket = new JsSIP.WebSocketInterface('wss://sip.myhost.com');
var configuration = {
sockets : [ socket ],
uri : 'sip:[email protected]',
password : 'superpassword'
};
var ua = new JsSIP.UA(configuration);
ua.start();
// Register callbacks to desired call events
var eventHandlers = {
'progress': function(e) {
console.log('call is in progress');
},
'failed': function(e) {
console.log('call failed with cause: '+ e.data.cause);
},
'ended': function(e) {
console.log('call ended with cause: '+ e.data.cause);
},
'confirmed': function(e) {
console.log('call confirmed');
}
};
var options = {
'eventHandlers' : eventHandlers,
'mediaConstraints' : { 'audio': true, 'video': true }
};
var session = ua.call('sip:[email protected]', options); Want to see more? Check the full documentation at https://jssip.net/documentation/. Online DemoCheck our Tryit JsSIP online demo: Website and DocumentationDownload
AuthorsJosé Luis Millán
Iñaki Baz Castillo
Saúl Ibarra Corretgé
LicenseJsSIP is released under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论