SIP.js icon indicating copy to clipboard operation
SIP.js copied to clipboard

onCallReceived should have an invitation instance to accept inbound calls.

Open vp25-tech opened this issue 3 years ago • 1 comments

onCallReceived should have an invitation instance to accept inbound calls. File : simple-user-delegate.ts

onCallReceived?(invitation: Invitation): void;

onCallReceived: (invitation): void => {
    invitation.accept();
}

File : simple-user-delegate.ts

this.delegate.onCallReceived(invitation);

vp25-tech avatar Oct 08 '21 18:10 vp25-tech

onCallReceived should have an invitation instance to accept inbound calls.

vp25-tech avatar Oct 08 '21 18:10 vp25-tech

SimpleUser only supports a single session currently and is attempting to abstract the API away to make things simpler.

  // Supply delegate to handle inbound calls (optional)
  simpleUser.delegate = {
    onCallReceived: async () => {
      await simpleUser.answer();
    }
  };

If you want to handle session/invitation/inviter directly, please use the API interface (see the docs).

john-e-riordan avatar Sep 29 '22 16:09 john-e-riordan

Is it possible to get the ID of the caller when using simpleUser?

SimpleUser only supports a single session currently and is attempting to abstract the API away to make things simpler.

  // Supply delegate to handle inbound calls (optional)
  simpleUser.delegate = {
    onCallReceived: async () => {
      await simpleUser.answer();
    }
  };

mghadam avatar Feb 20 '23 01:02 mghadam

Is it possible to get the ID of the caller when using simpleUser?

SimpleUser only supports a single session currently and is attempting to abstract the API away to make things simpler.

  // Supply delegate to handle inbound calls (optional)
  simpleUser.delegate = {
    onCallReceived: async () => {
      await simpleUser.answer();
    }
  };

Found it, can use simpleUser.session.remoteIdentity.uri.user to get the caller id

mghadam avatar Feb 20 '23 04:02 mghadam