How to use the jssip.UA 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,
					'session_timers'      : settings.session_timers,
					'use_preloaded_route' : settings.use_preloaded_route
				});

			// TODO: For testing.
			window.UA = this._ua;
		}
github bipbop / harlan / src / js / internals / modules / softphone.js View on Github external
controller.call('softphone::configuration', configuration => {
            useragent = new JsSIP.UA(configuration);
            let events = ['connected', 'disconnected', 'registered', 'unregistered', 'registrationFailed', 'newSession', 'newMessage'];
            for (let event of events) {
                useragent.on(event, function(...args) {
                    controller.trigger(`softphone::${event}`, Array.from(args));
                });
            }
            runningConfiguration = configuration;
            useragent.start();
        });
    });