Author Message
Tanaji_Bhale
Joined: Sep 26, 2016
Messages: 64
Offline
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.
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Hi Tanaji, there are a number oif reasons why ICE negotation could fail. The ICE negotiation happens between the browser and the Avaya Aura Media Server under the control of Breeze. Here are a few questions that might help narrow down the issue:
- What is the environment where Breeze, AAMS and the snap-in are deployed? Is this a Collaboratory setup or is it in your own separate lab or production environment?
- Is AAMS configured to use the TURN relay in the Avaya SBC?
- The TURN relay helps make ICE negotation successful in many cases, but doesn't address all cases.
- Is your browser behind a NAT/Firewall when it fails?
- Certain types of firewalls, particularly symmetric NATs can cause problems with ICE.

One thing that may be useful to you would be to view the webinars that I gave on the WebRTC snap-in. The second of them has some details on how the call flow works, including ICE.
http://www.devconnectprogram.com/site/global/products_resources/avaya_breeze/avaya_snap_ins/webrtc/educational_resources/index.gsp
Go to:   
Mobile view