Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Notify client building a configuration object example

Log in to subscribe to topics and get notified when content changes.

Notify client building a configuration object example

This example demonstrates how to construct the configuration object needed to instantiate a Notify WebRTC Client object.

The configuration object is a JSON object that specifies properties such as the telephony service provider and caller information, and event handler functions.

This sample code demonstrates how to create a simple configuration object.
var notifyConfig = {
    vendor: SNC.Notify.Vendor.TWILIO, //Pass one of the supported vendor contstants. Supported value is SNC.Notify.Vendor.TWILIO. Do not pass raw string values.
    callerId: '19991231234', //Pass a valid phone number to use as the caller ID. This number is usually provided by your telephony vendor.
    autoReconnect: true, //Pass true to automatically create a new WebRTC vendor session when the current session expires.
    onReady: function() {},
    onOffline: function() {},
    onError: function( message ) {},
    onConnect: function( status ) {},
    onDisconnect: function() {},
    onIncoming: function( {from, to, callSid} ) {},
    onOutgoing: function( callSid ) {},
    onAccept: function() {},
    onMute: function() {},
    onUnmute: function() {},
    onCancel: function() {}