-
Notifications
You must be signed in to change notification settings - Fork 939
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
nathelper always sends SIP pings when ping_nated_only is set to 0 #1587
Comments
I added a safety check for sipping_from with the commit referenced above, to be protected better in the future. The sending of SIP request NAT pings for ping_nated_only=0 seems to be a side effect of commit b34cf58, I guess it was designed only for the 4-bytes pings. I am thinking of a solution where one can have either SIP messages or the 4-bytes pings when ping_nated_only=0. |
I ended up by using the combination of ping_nated_only being 0 and setting sipping_flag, assuming that if one wants to ping all contacts with 4-bytes, it doesn't need to set sipping_flag parameter at all. If anyone has another suggestion, just write here. An option that I am somehow considering is to add a new one or rename this parameter for controlling the ping mode, like Testing and reporting the behaviour with the above patch is appreciated. If all ok, then I will backport. |
Hi Daniel, thanks for the quick fix. I just backported those two patches from yesterday and the affected loadbalancers immediately stopped sending out OPTIONS and started sending out 4 bytes packets instead. From my point of view everything is working again as expected. I agree, that the addition of a mode parameter would help understanding the functionality. |
Description
We upgraded from Kamailio 4.4.5 to 5.1.4 today. We have a IPv6-to-v4 loadbalancer which sends out NAT pings to keep the connection through routers alive. So it is not a real NAT scenario.
Kamailio 4.4.5 sent out dummy 4-byte UDP packets. Kamailio 5.1.4 sends out SIP OPTIONS although we didn't even configure sipping_from.
Our configuration:
When looking into the code, Kamailio should not even be able to send out OPTIONS without sipping_from being configured. It does anyhow. This results in broken keepalive packets.
Those packets get rejected by some clients, bringing them offline, effectively.
After adding the sipping_from modparam, those OPTIONS get sent with a correct From header.
Troubleshooting
Reproduction
Our v4-only SIP proxies don't show the behavior, our v6-to-v4 loadbalancers do. I don't know if this can be reproduced with a default installation on a IPv6 setup.
Possible Solutions
Setting the sipping_from parameter at least fixes the OPTIONS packet. But we found no way to send those dummy UDP packets instead of full OPTIONS.
Additional Information
Kamailio branch 5.1 pulled yesterday, 5.1.4
kamailio -v
The text was updated successfully, but these errors were encountered: