Events

Every event handler in JsSIP is fired with a single argument, being this a data Object defined by the class emitting the event. See the corresponding event definition for further information about its data Object.

The event handlers are fired with the event emitter instance as this value (this is, the same object or instance on which the listener was installed via the on() method).

Example

var ua = new JsSIP.UA( ... );

ua.on('newRTCSession', function(data) {
  var originator = data.originator;
  var session = data.session;
  var request = data.request;

  // Stop the UA. Note that `this` is bound to the `ua` instance.
  this.stop();
});