Hi team,
I am very new to WebRTC library and need help on below error,
2017-3-8 19:29:25.239 INFO - Call::onIceConnectionStateChange: -- PeerConnection ICE connection state change callback, state:failed
avayawebrtc-client.js:1575 2017-3-8 19:29:25.242 INFO - Call::onIceConnectionStateChange: -- drop call on peer connection ice failure.
Sometimes my Webrtc call work but when i get this log saying ICE connection state failed, then call automatically get dropped.
Can someone please guide me on this?
Initiate client function:
$window.onload = function() {
console.log("registering WebRTC client");
//on document loaded first time, we create client object to be used globally
$rootScope.client = new avayaWebRTC.Client();
$rootScope.client.enableLogs = avayaWebRTC.LOG_ENABLE_FULL;
//register callback
$rootScope.client.onCallErrorCB = WebrtcService.onCallErrorCB;
$rootScope.client.onConnectedCB = WebrtcService.connectedCB;
//connect webrtc client
$rootScope.client.webRTCHTTPAddress = "https://..webrtcc-server../services/WebRTC/WebRtcServlet";
$rootScope.client.securityToken = document.getElementById('hidToken').value;
$rootScope.client.username = "customer";
$rootScope.client.domain = "collaboratory.avaya.com";
$rootScope.client.connect();
};
Initiate Call function:
$scope.initiateCall = function(){
$rootScope.client.username = $scope.callerAddr;
$rootScope.theCall = new avayaWebRTC.Call($rootScope.client);
var basicUrl = location.protocol + '//' + location.host + location.pathname.substring(0, location.pathname.lastIndexOf("/"));
$rootScope.theCall.ringingFileUrl = basicUrl + '/resources/images/ringout.wav';
$rootScope.theCall.destinationAddress = $scope.agentExt;
$rootScope.theCall.ContextID = null;
$rootScope.theCall.initiate();
}
Thanks,
Tanaji Bhale.