Skip to content

Conversation

@davidtrihy-genesys
Copy link
Collaborator

OpenSIPs assumes when calling loose_route that if the request domain is one of its own domains that when calling loose_route it assumes the path back to itself came through a strict route and regardless of whether the last Route header is an loose router or not it replaces the request URI with that Route header. This is correct behaviour if the server does put itself in the Route path as a strict router according to this RFC https://www.rfc-editor.org/rfc/rfc3261.html#section-16.4

The problem becomes when you don't do that and the request domain is just the Contact domain and in the scenario this fixes it would be where OpenSIPs does a loopback through a proxy that puts itself as a loose router between the OpenSIPs instance.

OpenSIPs advertised contact domain of my.opensips.com -> other proxy -> Back to OpenSIPs, the Contact header will have the same domain between both sides of the call and the Route header ensures sequentials go through that other proxy. Instead OpenSIPs on sequential will match the request domain to itself, assume a strict route, replace the request domain with the other proxies Route header and route using that and the other proxy could not get the request back to OpenSIPs.

This adds a flag for the loose_route function which allows us to specify to loose route when matching ourselves.

@davidtrihy-genesys davidtrihy-genesys merged commit b5158d9 into 3.4-genesys Dec 11, 2025
1 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants