dispatcher: Add ping_sock as a partition parameter #3527
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.
Summary
This PR enhances the dispatcher module. It adds 'ping_sock' to the partition parameter.
The 'ping_sock' can be used to specify, per partition which interface pings / probes are sent from.
Details
The 'ping_sock' parameter can be used when the OpenSIPS server has multiple interfaces. For example,
when operating as an SBC, the server may have a public interface to communicate with carriers and a private
interface to communicate with proxies. In this scenario partition tables for carriers can have pings / probes use the public
interface and proxies can use the private interface.
Solution
The dispatcher module currently uses a global "probing_sock" interface to ping / probe destinations. There is no ability to define which interface is to be used to ping / probe a particular set of destinations. This works ok when there is just one "pool" of destinations all more or less handling one function such as "carriers". When multiple destination classes exist, and are defined in multiple partitions the 'ping_sock' offers the ability to have each partition ping / probe destinations from a different interface.
The dispatcher tables have a 'sock' column, however this is not used for pinging / probing operations. A future enhancement may be for this 'sock' column to be used for pinging / probing also.
Compatibility
Since this is a new parameter there are no compatibility problems with existing configurations. If the parameter is not specified, the existing flow will continue to be used.
Closing issues