Kamailio: add behind NAT multisocket support #2495
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type Of Change
Checklist:
Description
After #2493 KamUsers can have multiple binding sockets.
After #2489 and #2491 those additional sockets may be configured to be advertised as public addresses both in KamUsers and KamTrunks.
This PR adds all the necessary logic in Kamailio to generate a listeners.cfg with such configuration and to call rtpengine_offer() (via rtpengine_manage() of first SDP) with the socket used, using direction= keyword.
With this and with a right configuration of rtpengine interfaces (using SIP signalling addresses as labels, as this is the information that Kamailio will send in direction=), Ivoz Provider can work behind NAT escenarios, using SIP and SDP with advertised addresses or local addresses accordingly.
Additional information
rtpengine.conf interface configuration must be manual (using labels and advertised addresses) at this moment, some PRs may come to handle this via web UI.