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);


-- 
Mit freundlichen Grüssen

-Benoît Panizzon- @ HomeOffice und normal erreichbar
-- 
I m p r o W a r e   A G    -    Leiter Commerce Kunden
______________________________________________________

Zurlindenstrasse 29             Tel  +41 61 826 93 00
CH-4133 Pratteln                Fax  +41 61 826 93 01
Schweiz                         Web  http://www.imp.ch
______________________________________________________
__________________________________________________________
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!

Reply via email to