Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount()
{
this._mounted = true;
const settings = this.props.settings;
const socket = new JsSIP.WebSocketInterface(settings.socket.uri);
if (settings.socket['via_transport'] !== 'auto')
socket['via_transport'] = settings.socket['via_transport'];
try
{
this._ua = new JsSIP.UA(
{
uri : settings.uri,
password : settings.password,
'display_name' : settings.display_name,
sockets : [ socket ],
'registrar_server' : settings.registrar_server,
'contact_uri' : settings.contact_uri,
'authorization_user' : settings.authorization_user,
'instance_id' : settings.instance_id,