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

Allow +sip.instance in more requests than only REGISTER

Open danvirsen opened this issue 3 years ago • 0 comments

I needed to include instanceId in my INVITE requests and could not find a way to do it in the current API. I shuffled some things around and moved instanceId up so that it's always generated and stored in the UA.

There is now a way to add instanceId in all requests that include the contact header. The instanceId can be automatically generated or manually set. The old behaviour of only sending instanceId in REGISTER requests is the default.

This introduces a breaking change for people who set their own instanceId on their registerer since instanceId is removed from registerer options.

We're using my fork in production right now, but it's a bit of a hassle to handle since the package needs to be built, we can't just point the dependency in package.json to the repository.

So I created this PR to check if this is a change that more people want, and if the implementation looks ok.

danvirsen avatar May 04 '22 07:05 danvirsen