Skip to end of metadata
Go to start of metadata

After the WRTC JS object is created and mapped with the WRTC events you have to initialize WRTC SDK JS object. While Initializing the client SDK, the client SDK specific data are obtained either from Server or Custom web application.  If the WRTC SDK Config  data type is set to client, user can get required client SDK data from web application else the required SDK config data are fetched from WRTC server.

The SDK is initialized by passing other parameters as shown below:

sonus.init(); //Initializes the client SDK
var jsonConfig = {
		"ConfigType": conf_type,
                "WrtcServerIp": server_ip,
                "stunUrl": stun_url,
                "turnUrl": turn_url,
                "turnUserName": turn_user,
                "turnCredential": turn_pwd,
                "ttl": 864000,
                "AckInterval": 30000,
                "DtmfType": "INFO",
                "WebSocketPort": 9080,
                "RestPort": isWebSocketSecure ? 443 : 8088,
                "OauthPort": isWebSocketSecure ? 443 : 8088,
                "SipUsername": sip_Username,
                "SipPassword": sip_Password,
                "StatisticsServerURL": stats_server



turnUrl and stunUrl is the TURN and STUN server URL,

turnCredential TURN server credential,

turnUserName is the TURN server username

RTCPMux is a boolean variable. The value true - rtcpMuxPolicy is set to "require" in RTCPeerConnection object, false - rtcpMuxPolicy is set to "negotiate" in RTCPeerConnection object.

Statistics Server URL is statistics server url to view the media-related statistics

sonus is the WRTC client object created.

The following code snippet shows a sample JSONconfiguration information for server:

var jsonConfig = {

It is expected that you configure the STUN and TURN servers. If you are not configuring the servers it will be assigned with its default values - for STUN server and for TURN server.

  • No labels