How to use the 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 versatica / tryit-jssip / lib / components / Phone.jsx View on Github external
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,