onsip / SIP.js

A simple, intuitive, and powerful JavaScript signaling library
https://sipjs.com
MIT License
1.84k stars 693 forks source link

SimpleUser sessionManagerOptions delegate onCallReceived parameter should add Invitation #1041

Open minvision opened 1 year ago

minvision commented 1 year ago

when a user receive a call , he/she should know whose call before he answer or decline

the proper mement is delegate onCallReceived which will trigered when receive a invite, when he can get invitation info , he will know it from .

iomariani commented 1 year ago

It already has

https://github.com/onsip/SIP.js/blob/2e1c525279c8d6deebb6ecaf3d14477ab7b63310/src/platform/web/session-manager/session-manager-delegate.ts#L24-L30

https://github.com/onsip/SIP.js/blob/2e1c525279c8d6deebb6ecaf3d14477ab7b63310/src/platform/web/session-manager/session-manager.ts#L225-L227

iomariani commented 1 year ago

My mistake I just realized you said the onCallReceived delegate from the SimpleUser.

From my understanding, SimpleUser only manages one session at a time, so basically, the invitation will be the session set on your SimpleUser instance.