sipjs and free switch don´t work to make a call












0















I am using a simple SIPjs based code with a server with free switch. I am trying to register the user agent and make an invite to create a session, but it doesn´t work. Camera is opened with everything closes after 5 seconds without being able to make the call.



This is the log I obtained from the connection:



Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | configuration parameters after validation: sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · viaHost: "kpp2l67cqloc.invalid" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · uri: sip:1002@serv24.com sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · custom: {} sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · displayName: "" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · password: NOT SHOWN sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registerExpires: 600 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · register: true sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registrarServer: sip:serv24.com sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportConstructor: i sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportOptions: {} sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · userAgentString: "SIP.js/0.11.6" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · noAnswerTimeout: 60000 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackViaTcp: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackIpInContact: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackWssInTransport: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackAllowUnregisteredOptionTags: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactoryOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactName: "8l475d4t" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactTransport: "ws" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · forceRport: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostart: true sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostop: true sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · rel100: "none" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · dtmfType: "info" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · replaces: "none" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactory: function(e,t){var r=e.ua.getLogger("sip.invitecontext.sessionDescriptionHandler",e.id),n=new(i(31))(e,t);return new s(r,n,t)} sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authenticationFactory: undefined sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowLegacyNotifications: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowOutOfDialogRefers: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authorizationUser: "1002" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · instanceId: "ed1d1f6b-e9ba-43a8-b96e-12a257e508b6" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sipjsId: "9h4mc" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hostportParams: "serv24.com" sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | user requested startup... sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | configuration parameters after validation: sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · wsServers: [{"scheme":"WSS","sip_uri":"<sip:edge.sip.onsip.com;transport=ws;lr>","weight":0,"ws_uri":"wss://edge.sip.onsip.com","isError":false}] sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · connectionTimeout: 5 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · maxReconnectionAttempts: 3 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · reconnectionTimeout: 4 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveInterval: 0 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveDebounce: 10 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · traceSip: false sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | connecting to WebSocket wss://edge.sip.onsip.com
Thu Nov 22 2018 09:43:51 GMT+0100 (hora estándar de Europa central) | sip.transport | WebSocket wss://edge.sip.onsip.com connected sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | SessionDescriptionHandlerOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | initPeerConnection sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | New peer connection created sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquiring local media sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquired local media streams sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: gathering sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 63656 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 63657 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 63658 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56756 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56757 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56758 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 56759 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 56760 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 56761 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56762 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56763 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56764 typ host sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 63658 typ srflx raddr 192.168.3.203 rport 63658 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56758 typ srflx raddr 192.168.3.203 rport 56758 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 56761 typ srflx raddr 192.168.3.203 rport 56761 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56764 typ srflx raddr 192.168.3.203 rport 56764 sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceChecking Timeout Triggered after 5000 milliseconds sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.inviteclientcontext | closing INVITE session 9h4mc2g6b5s5sbvvcnd197eq6fdeno sip-0.11.6.min.js:1:8973
Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | closing PeerConnection sip-0.11.6.min.js:1:8973


Could it be a server or freeswitch misconfiguration? I am not able to figure out where is the problem. The SIPjs code is this one:



var userAgent = new SIP.UA({
uri: 'useruri',
wsServers: ['wss://serveraddress'],
authorizationUser: 'username',
password: 'pass',
traceSip: true
});

var options = {
media: {
constraints: {
audio: true,
video: true
},
render: {
remote: document.getElementById('remoteVideo'),
local: document.getElementById('localVideo')
}
}
};

var startButton = document.getElementById('startCall');

startButton.addEventListener("click", function() {
session = userAgent.invite('address', options);
alert("Call Started");
}, false);

session.on('trackAdded', function() {
// We need to check the peer connection to determine which track was added
var pc = session.sessionDescriptionHandler.peerConnection;

// Gets remote tracks
var remoteStream = new MediaStream();

pc.getReceivers().forEach(function(receiver) {
remoteStream.addTrack(receiver.track);
});

remoteVideo.srcObject = remoteStream;
remoteVideo.play();

// Gets local tracks
var localStream = new MediaStream();

pc.getSenders().forEach(function(sender) {
localStream.addTrack(sender.track);
});

localVideo.srcObject = localStream;
localVideo.play();
});









share|improve this question





























    0















    I am using a simple SIPjs based code with a server with free switch. I am trying to register the user agent and make an invite to create a session, but it doesn´t work. Camera is opened with everything closes after 5 seconds without being able to make the call.



    This is the log I obtained from the connection:



    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | configuration parameters after validation: sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · viaHost: "kpp2l67cqloc.invalid" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · uri: sip:1002@serv24.com sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · custom: {} sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · displayName: "" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · password: NOT SHOWN sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registerExpires: 600 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · register: true sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registrarServer: sip:serv24.com sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportConstructor: i sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportOptions: {} sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · userAgentString: "SIP.js/0.11.6" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · noAnswerTimeout: 60000 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackViaTcp: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackIpInContact: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackWssInTransport: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackAllowUnregisteredOptionTags: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactoryOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactName: "8l475d4t" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactTransport: "ws" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · forceRport: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostart: true sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostop: true sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · rel100: "none" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · dtmfType: "info" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · replaces: "none" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactory: function(e,t){var r=e.ua.getLogger("sip.invitecontext.sessionDescriptionHandler",e.id),n=new(i(31))(e,t);return new s(r,n,t)} sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authenticationFactory: undefined sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowLegacyNotifications: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowOutOfDialogRefers: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authorizationUser: "1002" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · instanceId: "ed1d1f6b-e9ba-43a8-b96e-12a257e508b6" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sipjsId: "9h4mc" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hostportParams: "serv24.com" sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | user requested startup... sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | configuration parameters after validation: sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · wsServers: [{"scheme":"WSS","sip_uri":"<sip:edge.sip.onsip.com;transport=ws;lr>","weight":0,"ws_uri":"wss://edge.sip.onsip.com","isError":false}] sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · connectionTimeout: 5 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · maxReconnectionAttempts: 3 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · reconnectionTimeout: 4 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveInterval: 0 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveDebounce: 10 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · traceSip: false sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | connecting to WebSocket wss://edge.sip.onsip.com
    Thu Nov 22 2018 09:43:51 GMT+0100 (hora estándar de Europa central) | sip.transport | WebSocket wss://edge.sip.onsip.com connected sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | SessionDescriptionHandlerOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | initPeerConnection sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | New peer connection created sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquiring local media sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquired local media streams sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: gathering sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 63656 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 63657 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 63658 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56756 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56757 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56758 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 56759 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 56760 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 56761 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56762 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56763 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56764 typ host sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 63658 typ srflx raddr 192.168.3.203 rport 63658 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56758 typ srflx raddr 192.168.3.203 rport 56758 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 56761 typ srflx raddr 192.168.3.203 rport 56761 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56764 typ srflx raddr 192.168.3.203 rport 56764 sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceChecking Timeout Triggered after 5000 milliseconds sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.inviteclientcontext | closing INVITE session 9h4mc2g6b5s5sbvvcnd197eq6fdeno sip-0.11.6.min.js:1:8973
    Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | closing PeerConnection sip-0.11.6.min.js:1:8973


    Could it be a server or freeswitch misconfiguration? I am not able to figure out where is the problem. The SIPjs code is this one:



    var userAgent = new SIP.UA({
    uri: 'useruri',
    wsServers: ['wss://serveraddress'],
    authorizationUser: 'username',
    password: 'pass',
    traceSip: true
    });

    var options = {
    media: {
    constraints: {
    audio: true,
    video: true
    },
    render: {
    remote: document.getElementById('remoteVideo'),
    local: document.getElementById('localVideo')
    }
    }
    };

    var startButton = document.getElementById('startCall');

    startButton.addEventListener("click", function() {
    session = userAgent.invite('address', options);
    alert("Call Started");
    }, false);

    session.on('trackAdded', function() {
    // We need to check the peer connection to determine which track was added
    var pc = session.sessionDescriptionHandler.peerConnection;

    // Gets remote tracks
    var remoteStream = new MediaStream();

    pc.getReceivers().forEach(function(receiver) {
    remoteStream.addTrack(receiver.track);
    });

    remoteVideo.srcObject = remoteStream;
    remoteVideo.play();

    // Gets local tracks
    var localStream = new MediaStream();

    pc.getSenders().forEach(function(sender) {
    localStream.addTrack(sender.track);
    });

    localVideo.srcObject = localStream;
    localVideo.play();
    });









    share|improve this question



























      0












      0








      0








      I am using a simple SIPjs based code with a server with free switch. I am trying to register the user agent and make an invite to create a session, but it doesn´t work. Camera is opened with everything closes after 5 seconds without being able to make the call.



      This is the log I obtained from the connection:



      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | configuration parameters after validation: sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · viaHost: "kpp2l67cqloc.invalid" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · uri: sip:1002@serv24.com sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · custom: {} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · displayName: "" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · password: NOT SHOWN sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registerExpires: 600 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · register: true sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registrarServer: sip:serv24.com sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportConstructor: i sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportOptions: {} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · userAgentString: "SIP.js/0.11.6" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · noAnswerTimeout: 60000 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackViaTcp: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackIpInContact: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackWssInTransport: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackAllowUnregisteredOptionTags: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactoryOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactName: "8l475d4t" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactTransport: "ws" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · forceRport: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostart: true sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostop: true sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · rel100: "none" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · dtmfType: "info" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · replaces: "none" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactory: function(e,t){var r=e.ua.getLogger("sip.invitecontext.sessionDescriptionHandler",e.id),n=new(i(31))(e,t);return new s(r,n,t)} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authenticationFactory: undefined sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowLegacyNotifications: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowOutOfDialogRefers: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authorizationUser: "1002" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · instanceId: "ed1d1f6b-e9ba-43a8-b96e-12a257e508b6" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sipjsId: "9h4mc" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hostportParams: "serv24.com" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | user requested startup... sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | configuration parameters after validation: sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · wsServers: [{"scheme":"WSS","sip_uri":"<sip:edge.sip.onsip.com;transport=ws;lr>","weight":0,"ws_uri":"wss://edge.sip.onsip.com","isError":false}] sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · connectionTimeout: 5 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · maxReconnectionAttempts: 3 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · reconnectionTimeout: 4 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveInterval: 0 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveDebounce: 10 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · traceSip: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | connecting to WebSocket wss://edge.sip.onsip.com
      Thu Nov 22 2018 09:43:51 GMT+0100 (hora estándar de Europa central) | sip.transport | WebSocket wss://edge.sip.onsip.com connected sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | SessionDescriptionHandlerOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | initPeerConnection sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | New peer connection created sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquiring local media sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquired local media streams sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: gathering sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 63656 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 63657 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 63658 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56756 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56757 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56758 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 56759 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 56760 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 56761 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56762 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56763 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56764 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 63658 typ srflx raddr 192.168.3.203 rport 63658 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56758 typ srflx raddr 192.168.3.203 rport 56758 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 56761 typ srflx raddr 192.168.3.203 rport 56761 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56764 typ srflx raddr 192.168.3.203 rport 56764 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceChecking Timeout Triggered after 5000 milliseconds sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.inviteclientcontext | closing INVITE session 9h4mc2g6b5s5sbvvcnd197eq6fdeno sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | closing PeerConnection sip-0.11.6.min.js:1:8973


      Could it be a server or freeswitch misconfiguration? I am not able to figure out where is the problem. The SIPjs code is this one:



      var userAgent = new SIP.UA({
      uri: 'useruri',
      wsServers: ['wss://serveraddress'],
      authorizationUser: 'username',
      password: 'pass',
      traceSip: true
      });

      var options = {
      media: {
      constraints: {
      audio: true,
      video: true
      },
      render: {
      remote: document.getElementById('remoteVideo'),
      local: document.getElementById('localVideo')
      }
      }
      };

      var startButton = document.getElementById('startCall');

      startButton.addEventListener("click", function() {
      session = userAgent.invite('address', options);
      alert("Call Started");
      }, false);

      session.on('trackAdded', function() {
      // We need to check the peer connection to determine which track was added
      var pc = session.sessionDescriptionHandler.peerConnection;

      // Gets remote tracks
      var remoteStream = new MediaStream();

      pc.getReceivers().forEach(function(receiver) {
      remoteStream.addTrack(receiver.track);
      });

      remoteVideo.srcObject = remoteStream;
      remoteVideo.play();

      // Gets local tracks
      var localStream = new MediaStream();

      pc.getSenders().forEach(function(sender) {
      localStream.addTrack(sender.track);
      });

      localVideo.srcObject = localStream;
      localVideo.play();
      });









      share|improve this question
















      I am using a simple SIPjs based code with a server with free switch. I am trying to register the user agent and make an invite to create a session, but it doesn´t work. Camera is opened with everything closes after 5 seconds without being able to make the call.



      This is the log I obtained from the connection:



      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | configuration parameters after validation: sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · viaHost: "kpp2l67cqloc.invalid" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · uri: sip:1002@serv24.com sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · custom: {} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · displayName: "" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · password: NOT SHOWN sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registerExpires: 600 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · register: true sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · registrarServer: sip:serv24.com sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportConstructor: i sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · transportOptions: {} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · userAgentString: "SIP.js/0.11.6" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · noAnswerTimeout: 60000 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackViaTcp: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackIpInContact: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackWssInTransport: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hackAllowUnregisteredOptionTags: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactoryOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactName: "8l475d4t" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · contactTransport: "ws" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · forceRport: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostart: true sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · autostop: true sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · rel100: "none" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · dtmfType: "info" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · replaces: "none" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sessionDescriptionHandlerFactory: function(e,t){var r=e.ua.getLogger("sip.invitecontext.sessionDescriptionHandler",e.id),n=new(i(31))(e,t);return new s(r,n,t)} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authenticationFactory: undefined sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowLegacyNotifications: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · allowOutOfDialogRefers: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · authorizationUser: "1002" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · instanceId: "ed1d1f6b-e9ba-43a8-b96e-12a257e508b6" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · sipjsId: "9h4mc" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | · hostportParams: "serv24.com" sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.ua | user requested startup... sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | configuration parameters after validation: sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · wsServers: [{"scheme":"WSS","sip_uri":"<sip:edge.sip.onsip.com;transport=ws;lr>","weight":0,"ws_uri":"wss://edge.sip.onsip.com","isError":false}] sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · connectionTimeout: 5 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · maxReconnectionAttempts: 3 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · reconnectionTimeout: 4 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveInterval: 0 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · keepAliveDebounce: 10 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | · traceSip: false sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:50 GMT+0100 (hora estándar de Europa central) | sip.transport | connecting to WebSocket wss://edge.sip.onsip.com
      Thu Nov 22 2018 09:43:51 GMT+0100 (hora estándar de Europa central) | sip.transport | WebSocket wss://edge.sip.onsip.com connected sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | SessionDescriptionHandlerOptions: {"constraints":{},"peerConnectionOptions":{}} sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | initPeerConnection sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | New peer connection created sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:53 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquiring local media sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | acquired local media streams sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: gathering sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 63656 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 63657 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 63658 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56756 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56757 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56758 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 1 UDP 2122252543 192.168.56.1 56759 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 1 UDP 2122187007 2a02:121f:6bf:1:105d:48c4:e002:6907 56760 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 1 UDP 2122121471 192.168.3.203 56761 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 1 TCP 2105524479 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 1 TCP 2105458943 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 1 TCP 2105393407 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:0 2 UDP 2122252542 192.168.56.1 56762 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2 2 UDP 2122187006 2a02:121f:6bf:1:105d:48c4:e002:6907 56763 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:4 2 UDP 2122121470 192.168.3.203 56764 typ host sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:6 2 TCP 2105524478 192.168.56.1 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:7 2 TCP 2105458942 2a02:121f:6bf:1:105d:48c4:e002:6907 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:8 2 TCP 2105393406 192.168.3.203 9 typ host tcptype active sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 63658 typ srflx raddr 192.168.3.203 rport 63658 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56758 typ srflx raddr 192.168.3.203 rport 56758 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 1 UDP 1685921791 146.4.10.10 56761 typ srflx raddr 192.168.3.203 rport 56761 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:43:57 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:5 2 UDP 1685921790 146.4.10.10 56764 typ srflx raddr 192.168.3.203 rport 56764 sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | RTCIceChecking Timeout Triggered after 5000 milliseconds sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.inviteclientcontext | closing INVITE session 9h4mc2g6b5s5sbvvcnd197eq6fdeno sip-0.11.6.min.js:1:8973
      Thu Nov 22 2018 09:44:02 GMT+0100 (hora estándar de Europa central) | sip.invitecontext.sessionDescriptionHandler | closing PeerConnection sip-0.11.6.min.js:1:8973


      Could it be a server or freeswitch misconfiguration? I am not able to figure out where is the problem. The SIPjs code is this one:



      var userAgent = new SIP.UA({
      uri: 'useruri',
      wsServers: ['wss://serveraddress'],
      authorizationUser: 'username',
      password: 'pass',
      traceSip: true
      });

      var options = {
      media: {
      constraints: {
      audio: true,
      video: true
      },
      render: {
      remote: document.getElementById('remoteVideo'),
      local: document.getElementById('localVideo')
      }
      }
      };

      var startButton = document.getElementById('startCall');

      startButton.addEventListener("click", function() {
      session = userAgent.invite('address', options);
      alert("Call Started");
      }, false);

      session.on('trackAdded', function() {
      // We need to check the peer connection to determine which track was added
      var pc = session.sessionDescriptionHandler.peerConnection;

      // Gets remote tracks
      var remoteStream = new MediaStream();

      pc.getReceivers().forEach(function(receiver) {
      remoteStream.addTrack(receiver.track);
      });

      remoteVideo.srcObject = remoteStream;
      remoteVideo.play();

      // Gets local tracks
      var localStream = new MediaStream();

      pc.getSenders().forEach(function(sender) {
      localStream.addTrack(sender.track);
      });

      localVideo.srcObject = localStream;
      localVideo.play();
      });






      javascript sip freeswitch






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 9:30









      barbsan

      2,23811222




      2,23811222










      asked Nov 22 '18 at 9:19









      FranFran

      11




      11
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53427497%2fsipjs-and-free-switch-don%25c2%25b4t-work-to-make-a-call%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53427497%2fsipjs-and-free-switch-don%25c2%25b4t-work-to-make-a-call%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          Refactoring coordinates for Minecraft Pi buildings written in Python