I can call another user via sipjs.
(我可以通过sipjs呼叫另一个用户。)
I am waiting call via sipjs.(我正在等待通过sipjs打电话。)
But it's not coming.(但这还没到。)
I can registered to server.(我可以注册到服务器。)
No error output on console.(控制台上没有错误输出。)
newRTCSession event is not giving any output.(newRTCSession事件未提供任何输出。)
Browser: Chrome Vue js code
(浏览器:Chrome Vue js代码)
var callOptions = {
mediaConstraints: {
audio: true, // only audio calls
video: false
}
};
var bwPhone = new JsSIP.UA({
‘uri’: ‘sip:sip-user@your-domain.bwapp.bwsip.io’,
‘password’: ‘password’,
‘ws_servers’: ‘wss://webrtc.registration.bandwidth.com:10443’
});
bwPhone.start();
bwPhone.on(“newRTCSession”, function(data){
var session = data.session;
if (session.direction === “incoming”) {
// incoming call here
session.on(“accepted”,function(){
// the call has answered
});
session.on(“confirmed”,function(){
// this handler will be called for incoming calls too
});
session.on(“ended”,function(){
// the call has ended
});
session.on(“failed”,function(){
// unable to establish the call
});
session.on(‘addstream’, function(e){
// set remote audio stream (to listen to remote audio)
// remoteAudio is <audio> element on page
remoteAudio.src = window.URL.createObjectURL(e.stream);
remoteAudio.play();
});
ask by Cem K?y translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…