Hi, > On Dec 9, 2024, at 3:51 am, Benoit Panizzon via sr-users > <[email protected]> wrote: > > Hi List > > With the dispatcher module, you can use different ways of load balanced > and weighted serial or parallel forking. > > Is there a corresponding way to achieve load balanced serial forking to > a destination set loaded from registered locations? > > Use case: > > Customer with a high availability set-up has two redundant PBX > registered to the same AoR. > > Calls can not be sent in parallel as this would generate two concurrent > calls to the end device but call should be distributed evenly between > the two contacts registered with that AoR.
Yes, there is such a use-case, but it does not require `dispatcher`. You may use the mode=1 argument to t_load_contacts() instead, provided the devices are registered with equal q= values. https://kamailio.org/docs/modules/5.8.x/modules/tm.html#idm1307 i.e. route[REGISTRAR_SERIAL_TRY] { if(!lookup("location")) { send_reply("404", "Not Found"); exit; } t_load_contacts(1); t_next_contacts(); # ... # t_on_failure("REGISTRAR_SERIAL_TRY_NEXT"), t_relay(), etc... } failure_route[REGISTRAR_SERIAL_TRY_NEXT] { if(t_is_canceled()) exit; if(!t_next_contacts()) { send_reply("408", "Request Timeout"); exit; } t_on_failure("REGISTRAR_SERIAL_TRY_NEXT"); t_relay(); } -- Alex Balashov Principal Consultant Evariste Systems LLC Web: https://evaristesys.com Tel: +1-706-510-6800 __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
