How to use the jssip/lib/JsSIP.WebSocketInterface function in jssip

To help you get started, we’ve selected a few jssip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flowroute / jssip_client / src / FlowrouteClient.js View on Github external
password: 'nopassword',
      extraHeaders: [],
      debug: false,
      intervalOfQualityReport: undefined,
      onUserAgentAction: () => {},
      ...params,
    };

    const urls = FR_POINTS_OF_PRESENCE_DOMAINS[this.params.pointOfPresence];
    const sockets = [
      {
        socket: new WebSocketInterface(`wss://${urls[0]}:4443`),
        weight: 20,
      },
      {
        socket: new WebSocketInterface(`wss://${urls[1]}:4443`),
        weight: 10,
      },
    ];

    this.micMuted = false;
    this.qualityOfServiceEmitter = null;
    this.outputVolume = 1;
    this.isRegistered = false;
    this.onCallAction = () => {};
    this.onUserAgentAction = this.params.onUserAgentAction;
    this.sipUserAgent = new UA({
      sockets,
      uri: `sip:${this.params.callerId}@wss.flowroute.com`,
      password: this.params.password,
      display_name: this.params.displayName,
    });