BrowserCall JavaScript Documentation

This is a constructor for the widget. As an input parameter it takes an object with following properties: durationpositionlocalization and jsSipConfig.
duration property determines time of the animation in milliseconds (the default value is 200).
position value determines the position of the widget on a page (its value can be “left”, “right”, “top” or “bottom”).
library value meant that the widget will used as a SIP library. In this case you should write your own widget and configure it, as it shown on the code snippet.
localization contains an object with text, which determines the status of a call.

    duration: 200,
    position: 'right', // left | right | top | bottom | library
    //This property is fixed. Do not change it.
    widgetDomain: '',
    localization: {
        browser_call: 'Browser Call',
        calling: 'Calling',
        failed: 'Failed',
        connected: 'Connected'
    //This property is fixed. Do not change it.
    jsSipConfig: {
        sipAccountUsername: click2call,
        webRTCGatewayDomain: '',
        wsServerUri: 'wss://',
        callerPassword: 'click2call',
        destinationUsername: '5000',
    //Copy the webRtcSourceToken form the portal page
    //This configuration object is optional.
    callbacks: {
        onAccepted: function(e){
        onProgress: function(e){
        onFailed: function(e){
        onEnded: function(e){
    //This properties is mandatory. Use your own CSS selectors.
    selfStreamElem: '.self-streaming-element',
    remoteStreamElem: '.remote-streaming-element',
    callButton: '.call-button',
    cancelButton: '.cancel-button'


The selfStreamElem and remoteStreamElem properties are CSS selectors of the audio HTML tags. They are used for audio streaming. For example, you can use these tags:

<audio autoplay="" hidden="true"class="self-streaming"></audio> 
<audio autoplay="" hidden="true" class="remote-streaming"></audio>

 The callButton and cancelButton properties are CSS selectors of the Call and Cancel. For example: 

<button type="button" class="call-button">Call</button> 
<button type="button" class=" cancel-button">Cancel</button>

 jsSipConfig and widgetDomain are mandatory properties and you must not change them.
Before you call TeniosC2CWidget.init() method be sure that the streaming elements and buttons are rendered in the DOM.
If you want to use our widget as a library be sure that your website is served over the HTTPS protocol.