Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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,
});
this.sipUserAgent.on('newRTCSession', this.handleNewRTCSession.bind(this));
this.sipUserAgent.on('registered', (payload) => {
this.isRegistered = true;
this.onUserAgentAction({ type: 'registered', payload });
});
const defaultAgentEventsToHandle = [
'connecting',
'connected',