On 08/11/2023 15.33, [EXT] David Cunningham via sr-users wrote:
Hello,
We have a Kamailio configuration with the following, however all the load is going to the server at 22.22.22.22 (hiding the real IP obviously) instead of being shared evenly between 22.22.22.22 and 33.33.33.33. Can anyone please tell me why? The rtpengine server at 11.11.11.11 is intended to only receive calls if the other two are offline. Thank you very much.
#!define RTPENGINE_ADDR "udp:11.11.11.11:7724=1 udp:22.22.22.22:7724=99999999 udp:33.33.33.33:7724=99999999"
modparam( "rtpengine", "rtpengine_sock", RTPENGINE_ADDR )
I recall this was discussed on the mailing list before, but of course I can't find the relevant thread.
What happens is that for legacy reasons (read: I don't really know why), if the default hashing algorithm (simple hash over call ID) is used, then the resulting weight is capped at 255. That means that no proxies beyond an accumulated weight of 255 will ever be used.
So either keep the sum of your weights below that, or use a different hashing algorithm (CRC or SHA-1).
Cheers