Thank you for sharing
--- I'm SoCIaL, MayBe
El 13/12/2024 a las 4:50 a. m., Benoît Panizzon via sr-users escribió:
Hi
Short update on that topic...
Daniel hinted me to lookup_to_dset()
Indeed, calling this function multiple time, contrary to lookup(), does not overwrite the branches, but is adding the contacts from each lookup to the destination set.
So this does what I intended for parallel forking and serial forking only needs adding the failure route. I guess creating the branches in performed by t_next_contacts().
$var(i) = 0; while ($xavp(aor[$var(i)]) != $null) { lookup_to_dset($xavp(aor[$var(i)])); $var(i) = $var(i) + 1; } if (!t_load_contacts(0)) { xlog("L_ERR", "$cfg(route): ######### load_contacts failed\n"); sl_send_reply("500", "Server Internal Error - Cannot load contacts"); exit; }
xlog("L_INFO", "$cfg(route): Contacts loaded: $cnt($xavp(tm_contacts))\n");
if (!t_next_contacts()) { send_reply("480", "No contacts registered for any AoR"); exit; } route(RELAY);