Skip to end of metadata
Go to start of metadata

The following function creates a WRTC client JS object:

//Create the object for WRTC Client class:

var sonus = WrtcClient.createInstance();

Binding Callback Functions with WRTC Events

After creating a WRTC JS client object you have to bind it with one of the following callback functions. You can bind only those callbacks functions which you will be implemented in your web application.

sonus.bind("onLoginSuccess", onLoginSuccess);
sonus.bind("onLoginFailed", onLoginFailed);
sonus.bind("onLogout", onLogout);
sonus.bind("onReceiveChat", onReceiveChat);
sonus.bind("onCalling", onCalling);
sonus.bind("onIncomingCall", onIncomingCall);
sonus.bind("onRinging", onRinging);
sonus.bind("onCallAnswered", onCallAnswered);
sonus.bind("onLocalHold", onLocalHold);
sonus.bind("onRemoteHold", onRemoteHold);
sonus.bind("onHangup", onHangup);
sonus.bind("onCancel", onCancel);
sonus.bind("onRejected", onRejected);
sonus.bind("onCallFailed", onCallFailed);
sonus.bind("onUpgradedToConference", onUpgradedToConference);
sonus.bind("onGroupChatRequest", onGroupChatRequest);
sonus.bind("onImMsgReceived", onImMsgReceived);
sonus.bind("onNotify", onNotify);
sonus.bind("onConferenceNotify", onConferenceNotify);
sonus.bind("onUpgradeToGroupChat", onUpgradeToGroupChat);
sonus.bind("onUpgradeRequest", onUpgradeRequest);
sonus.bind("onRetrieve", onRetrieve);
sonus.bind("onSearchBuddy", onSearchBuddy);
sonus.bind("onAddBuddy", onAddBuddy);
sonus.bind("onDeleteBuddy", onDeleteBuddy);
sonus.bind("onModifyBuddy", onModifyBuddy);
sonus.bind("onTagNotifyCallBack", onTagNotify);
sonus.bind("onAPIFailed", onAPIFailed);
sonus.bind("onMediaError", onMediaError);
sonus.bind("onReceiveStream", onReceiveStream);
sonus.bind("onRecieveScreenShare", onRecieveScreenShare);
sonus.bind("onScreenShareAccepted", onScreenShareAccepted);
sonus.bind("onScreenShareRejected", onScreenShareRejected);
sonus.bind("onScreenShareStopped", onScreenShareStopped);
sonus.bind("onReceiveFile", onReceiveFile);
sonus.bind("onFileTransferAccepted", onFileTransferAccepted);
sonus.bind("onFileTransferRejected", onFileTransferRejected);
sonus.bind("onFiletransferCompleted", onFiletransferCompleted);
sonus.bind("onFileTransferStopped", onFileTransferStopped);
sonus.bind("onDataRecieved", onDataRecieved);
sonus.bind("onCallFailMediaError", onCallFailMediaError);
sonus.bind("onSearchCdr", onSearchCdr);
sonus.bind("onGetMediaDevices", onGetMediaDevices);
sonus.bind("onGetSessionIdForIM", onGetSessionIdForIM);
sonus.bind("onRoomBooked", onRoomBooked);
sonus.bind("notifyUser", notifyUser);
sonus.bind("onChatExtablished", onChatExtablished);
sonus.bind("onrejectIMUpgrade", onrejectIMUpgrade);
  • No labels