Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow extraHeaders for invitation.accept() #909

Closed
danvirsen opened this issue Feb 20, 2021 · 1 comment
Closed

Allow extraHeaders for invitation.accept() #909

danvirsen opened this issue Feb 20, 2021 · 1 comment

Comments

@danvirsen
Copy link
Contributor

danvirsen commented Feb 20, 2021

Is your feature request related to a problem? Please describe.
Yes, I'm currently upgrading from 0.11 to 0.19 and this is something that we used in that version.
We have proprietary headers that are sent with an INVITE from a legacy client. The client that uses SIP.js needs to answer with matching headers if the headers were part of an incoming INVITE.

Describe the solution you'd like
Add support to supply extra headers when accepting an incoming invite.
Both InvitationProgressOptions and InvitationRejectOptions contain extraHeaders, but not InvitationAcceptOptions.
Is there a reason why the option to add extra headers to the 200 Ok on an incoming invite was removed? I can't find anything in any changelogs (although I can't say I've read every commit message, so I might have missed it).

Describe alternatives you've considered
I posted a question in the Google Group and got an answer with a suggestion, but sadly that workaround won't work since the property that I would need to override (Invitation.autoSendAnInitialProvisionalResponse) is readonly.
I could simply trigger another Invitation.progress() with the extra headers, but that still wouldn't help in my case since the other clients, which I have no control over, only checks the headers on the 200 Ok.
Even if it would work, it seems pretty hacky.

Edit: It's possible to override sendInitialProvisionalResponse on the UserAgent instead, and manually trigger a progress on invitations with the extra headers. But as I mentioned before it still doesn't solve my issue since I need the headers on the 200 Ok instead.

@danvirsen
Copy link
Contributor Author

Thanks for the quick reply @james-criscuolo !
I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant