Table of Contents

onError()

wrtc.onError() is an event function called when wrtc_kit has encountered an error.

You can write your own wrtc.onError() function to alert the user about the occurred error.

Arguments

wrtc.onError(obj, err)

errorCode errorMsg Description:
111 "Not enough resources" setting up a new call
112 "Not enough resources" setting up a new call
113 "Already in group call" group call requested but client is already in another group call
115 "Group call not supported" attempting group call (workaround)
151 "001: File transmit aborted" file transmit aborted by sender (err.fileName contains file name)
151 "101: Packet order mismatch" file packets received in wrong order (err.fileName contains file name)
151 "523: File transmit failed" file transmit aborted by IXNX unit, sender and recipient not on same server
191 "Audio output: <error description>" audio output selection failed
201 "browser reports Internet connection error" Internet connection problems
202 "browser reports Internet connection closed" Internet connection problems
203 "browser reports Internet connection timeout" Internet connection problems
281 "media change (new SDP) not supported by your browser" browser does not support change of media during call
281 "media change (new SDP) not supported by remote browser" browser does not support change of media during call
291 "browser reports ICE fail" Internet connection problems
301 "browser reports <error description>" local SDP rejected
311 "dataChannel not supported by browser" data channel could not be added to call
351 "browser reports <error description>" received SDP rejected
352 "Offer with invalid group ID <ID> from <caller>" wrtc.inviteGroup()
400 "Incorrect joingroup link" supplied gid and gc_gid doesn't match
401 "browser reports <error description>" SDP to be sent could not be created
451 "browser reports <error description>" answer SDP could not be created
502 "ICE fail reported by browser confirmed" Internet connection problems
503 "Voice Bridge not found, group call not possible" could not connect to group call server
603 "group call request but not in call with <user>" a user we are not in call with requested a group call
703 "browser reports getScreen not available" wrtc.getScreen()
other error messages may also occur

Return value

Ignored.

Example

wrtc.onError = function(obj, err) {
  if (err.errorCode > 0)
    window.alert("ERROR " + err.errorCode + ": " + err.errorMsg);
}

Advanced

Errors from call object with error numbers higher than 300 are considered to be fatal, call cannot continue. You should end the call.

wrtc.onError = function(obj, err) {
  if (err.errorCode > 0)
    window.alert("ERROR " + err.errorCode + ": " + err.errorMsg);
  if ((err.errorCode > 300) && (obj) && (obj.objType == "call"))
    obj.denyCall();
}

ICE fail

Error ICE fail means no media connection could be established through a firewall (usually at the other end of the connection). There are three different errors that can occur:

If you use the if err.errorCode > 300 rule described in chapter Advanced above the first 291 error will just be displayed, but the final 501 error will cut the call (as it is non-connected anyway).