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
usrloc keepalive: with r2 enabled, registrar configured with usrloc keepalives will send OPTIONS to received param of first hop #2447
Comments
Do you have this parameter set? |
Yes:
|
You do not need that to be 1 if you want to use Path for routing, only if you want to bypass the intermediary proxy doing Path. IIRC, the nathelper module has (or had) a mode to spoof source IP and then it could send UDP NAT keepalives pretending to be the intermediary proxy to received address set in this way. |
Indeed the path_use_received was the culprit. Thank you. Before I close this, is it normal that INVITEs do not go directly to the Received attr fetched by lookup()? I mean shouldn't this be consistent for locally generated requests by usrloc module and for forwarded requests via usrloc/lookup()? |
Never mind, this is properly documented in the registrar module docs:
Only question is whether path_use_received=1 should override this behaviour.... |
Description
Consider the following setup: an edge proxy is configured with the path module, double rr is enabled (because the proxy is multihomed), add_path_received() is used to cope with NATted endpoints and the registrar is a separate kamailio instance residing on a private network. Contacts are saved successfully by the registrar, along with path information. INVITEs are first sent to the registrar which performs location lookup, and forwards the request based on the contact's Path. This part works as expected.
However, things seem to fail when using the new keepalive functionality of the usrloc module on the registrar. The OPTIONS request is forwarded to the "received" parameter of the first Route header instead of the URI of the first Route header.
Troubleshooting
SIP Traffic
EXAMPLES (check the first line printed by sngrep for L3/L4 info, public IPs have been censored):
usrloc entries
The location entries for the examples above are as follows:
Possible Solutions
There are two ways I can thing of to mitigate this:
On a sidenote, usrloc locally generated OPTIONS do not seem to be handled by the local-request event route. Is this intentional? AFAICT it would require engaging the tm module which will add some overhead...
Additional Information
kamailio -v
built with this patch: 19128f2
The text was updated successfully, but these errors were encountered: