Skip to end of metadata
Go to start of metadata

The following function creates a Sonus Generic client JS object:

var Client = new sonus.wrtc.client(Config);
var Session = Client.getSessionController();
var Connection = Client.getConnection();
Client.setDebug(true); 

where, Client, Session, and Connection objects are global.

Binding Callback Functions with Sonus Generic Events

After creating a Sonus Generic JS client object you need to bind it with the following callback functions. You must bind the callbacks functions which will be implemented in your web application.

Client.addOnNotifyBuddyList(onNotifyBuddyList);
Client.addOnNotifyPresence(onNotifyPresence);
Client.addOnNotifyOwnPresence(onNotifyOwnPresence);
Client.addOnIncomingCall(onIncomingCall);
Client.addOnIncomingCallCanceled(onIncomingCallCanceled);
Client.addOnIncomingChat(onIncomingChat);
Client.addOnInstantMessageReceived(onInstantMsgReceived);
Client.addOnModifyCall(onModifyCall);


  • No labels