I'm working on a telecom company. We want to develop a SIP phone wit JsSIP library. But we can't do it. We create a basic form for test like this:
var socket = new JsSIP.WebSocketInterface('*****');
var configuration = {
sockets : [ socket ],
uri : '*****',
password : '*****'
};
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('680', options);
Above code is working. We can call anywhere but calling user's voice isn't come to us. How can i do that? What must we do? Does anyone have a example code for this project?