SIP.js
SIP.js copied to clipboard
onCallReceived should have an invitation instance to accept inbound calls.
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);
onCallReceived should have an invitation instance to accept inbound calls.
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).
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(); } };
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