Comments (4)
Sorry for the slow response. We will leave this issue open, until someone has a chance to investigate.
Scott
from resiprocate.
Hi, IMHO the contact header in responses from the UAS carries the uri to be used in the following requests but only for the current dialog. Due the OPTIONS requests are, by default, out of a dialog, it won't have any sense to answer with a different uri if the first OPTIONS request was able to reach, unless you want to comunicate, for example, a redirection with a 3XX response: https://datatracker.ietf.org/doc/html/rfc3261#section-11.2. In this case, the overwriting of the contact header in responses to OPTIONS might be allowed, therefore the comments: "Contact header is not required for Requests that do not form a dialog" at line 1091 of Dialog.cxx and "in general, this should not create a Contact header since only requests ... " at line 359 of Helper.cxx (Helper::makeResponse method) are nearly a little wrong and maybe it would be possible to do some kind of treatment with the contact header in the response to OPTIONS at that point. Just my 2 cents. Regards.
from resiprocate.
To reiterate, the use case is running from a containerized environment. For example, the UAC sends an OPTIONS request to a K8s NodePort address which get routed to a SIP UAS container application. To allow routing back to the UAC the Contact header in the response must be set to the K8s NodePort address and not the container's address. The latter is not visible to the UAC.
I have worked around the issue by replacing the Contact header with the MasterProfile host and port override:
// Replace the stack generated Contact header with the override
response->header(resip::h_Contacts).front() = resip::NameAddr(m_dum->getMasterProfile()->getOverrideHostAndPort());
I am okay with using the workaround however if this not accepted as a defect I would suggest clarifying the documentation/code comments since the Options response is not entirely based on current MasterProfile settings.
Thank you
from resiprocate.
from resiprocate.
Related Issues (20)
- Optimize the code
- TimerQueue remove HOT 1
- CMake supported? HOT 1
- When is Resiprocate 1.13 going to be released? HOT 1
- Wiki API Docs can't find HOT 1
- Not find contact uisng LocationServer HOT 1
- New release HOT 1
- macos compile error
- Properly linking to reSIProcate
- How can i read and mofify parameter when REGISTER?
- Wiki Tables of Contents (TOCs) Have Bad Anchor Links HOT 3
- assert failed in FdSet.setRead when Socket value is greater than 1024 HOT 3
- all found build instructions seems to be out-of-date HOT 6
- wiki link to docs broken HOT 1
- Does resiprocate support poll on the Android platform?
- Prevent malicious SIP message HOT 2
- Does resip is no longer support autotools in Linux?
- reconnect on connection reset HOT 1
- Drop 'GREY' mark on whitelisting? HOT 3
- Wrong port with SIP TCP transport ? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resiprocate.