On 10/04/15 15:38, Juha Heinanen wrote:
Richard Fuchs writes:
The default weight is 1. If you wanted the second
RTP proxy to be used
twice as often as the first one, you would specify
modparam("rtpengine", "rtpengine_sock",
"1 == udp:localhost:12221 udp:localhost:12222=2")
thanks, i added
weights to one of the rtpengine_sock examples.
How is the selection algorithm done in this case? Iirc, with the
rtpproxy is hashing over the call-id, which can't really be used for
ensuring any weight. Does rtpengine has different algorithms to select
which instace of a rtpengine daemon to be used for a call?
That code is unchanged from rtpproxy. In this example, it would
calculate the hash of the call-id mod 3. If the result is 0 then the
first proxy is used, or if the result is 1 or 2 then the second proxy is
used.
Cheers