-
Notifications
You must be signed in to change notification settings - Fork 6
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
Is there a way to set headers in the CANCELs emitted by the simringer #7
Comments
Well, I'd love a pull request on this. It should be a simple matter of adding the header here: |
Hi @davehorton , Very happy to give it a go, but there's no way to pass headers into cancel function on a request, and I can't figure out how else to do it? https://github.com/davehorton/drachtio-srf/blob/44f9848a43dba3faedb043255e2d86d87af6fe32/lib/request.js#L70 is the cancel on Request. It delegates the cancel to _agent though to me its not clear who this agent is and where to look next. Can you get me on track? Thanks, |
ah, good point!. I will have to push a change to drachtio-srf to allow the standard opts on a cancel. |
@davehorton is that just a standard someone else can do a PR for? Or will there be underlying changes needed to drachtio-server? |
This is a change only to drachtio-srf. No changes required to drachtio server. I'm actually testing it now should be in shortly... |
hmm, scratch that. It looks like changes may be needed to drachtio server as well.. |
ok as of: [email protected], and you can now attach headers to a cancel request, e.g.
So please test, and if it looks good send me a PR for the simring change |
Hi @davehorton ,
We use simringer.
When one of the forks answers, I'd like to be able to add a "Reason" header to all the cancels sent on the other legs, viz 'Reason: SIP;cause=200;text="Call completed elsewhere"'.
This is so the client devices can adjust how they show the "missed" invite. Kamailio includes such a header, at least in our configuration.
My skim through the code here shows calls to req.cancel() and I don't see any place for something to set the headers for the cancel sent.
In related news if I receive a CANCEL from the upstream (caller) side, then I want to proxy the Reason: header from the incoming cancel to my outgoing cancels. Not sure if there's a way to do that - I added 'reason' to my proxyRequestHeaders which I will try now but its just a guess as to what to do.
Thanks,
Steve
The text was updated successfully, but these errors were encountered: