Hi,
From the docs:
"The balancing inside a set is done automatically by the module based on the weight of each RTPEngine from the set. The default weight is 1, if another RTPEngine should be used twice as often as the first one, one would specify the weight 2 for this server, for example."
I am unsure as to what effect such large values as 99999999 might have on this arithmetic.
It seems to me that if what you really want to accomplish is to evenly distribute calls between 22.22.22.22 and 33.33.33.33, with 11.11.11.11 only as a last-resort backup, then you should put the first two into one naive set without any weights, e.g.
modparam("rtpengine_sock", "1 == udp:22.22.22.22:7724 udp:33.33.33.33:7724")
Then put 11.11.11.11 into a set of its own:
modparam("rtpengine_sock", "2 == udp:11.11.11.11:22724")
By default, set 1 should be invoked:
set_rtpengine_set("1");
rtpengine_{offer,manage}("...");
According to the docs, rtpengine_offer() will return a negative value if there is a failure of both:
"The function will return true on success and false (-1) on various failures, like
using rtp_engine_offer() on a SIP MESSAGE request or communication with rtpengine fails."
Presumably, rtpengine_manage() does the same. Accordingly, you can do something like:
set_rtpengine_set("1");
if(!rtpengine_offer("...")) {
if($rc == -1) {
set_rtpengine_set("2");
rtpengine_offer("...");
}
}
Exact details and your mileage may vary.
-- Alex
> On 8 Nov 2023, at 15:33, David Cunningham via sr-users <sr-users@lists.kamailio.org> 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 )
>
> --
> David Cunningham, Voisonics Limited
> http://voisonics.com/
> USA: +1 213 221 1092
> New Zealand: +64 (0)28 2558 3782
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-leave@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe: