I finally worked it out.

$var(c) = 0; Branch Count

looping through the ul:

append_branch($(ulc(aor=>addr)[$var(i)]));
$(branch(dst_uri)[-1]) = $(ulc(aor=>received)[$var(i)]);
$(branch(send_socket)[-1]) = $(ulc(aor=>socket)[$var(i)]);
$avp(ua) = $(ulc(aor=>user_agent)[$var(i)]);
$var(c) = $var(c) + 1;

branch_route[BR_T]
{
        $var(uax) = $var(c) - $T_branch_idx - 1;
        xlog("L_INFO", "$cfg(route): BR_idx: $T_branch_idx UAX: $var(uax) User 
Agent: $(avp(ua)[$var(uax)]) \n");
        route(FILTER_USERAGENT); # Do user_agent specific stuff.
}

I hope append_branch works by adding at the end of the index and never 
inserting a branch in between.

-- 
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
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to