Skip to content

Allow extraHeaders for invitation.accept() #909

Closed

Description

@danvirsen

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.

Activity

  1. danvirsen commented on Feb 22, 2021

    @danvirsen
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions