[OpenSER-Users] append_branch and $T_branch_idx behavior
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Fri Mar 7 22:41:48 CET 2008
Hi Ovidiu,
Let me share some of the dark corners of openser :) (not known for most
of the people) :
$T_branch_idx counts the valid (outgoing) branches and not the branch
attempts.
If you have 2 branch attempts and first is discarded, the second will
take the index 1.
regards,
bogdan
Ovidiu Sas wrote:
> Hello,
>
>
> I was playing wit append_branch and I run into this issue.
>
> Here's a snippet of the code:
>
> route[2] {
> $var(uri) = $ru;
> append_branch();
> $ru = $var(uri) + ";transport=udp";
> t_on_branch("2");
> }
>
> branch_route[2] {
> xlog("L_INFO", "entering branch[$T_branch_idx] for $ru\n");
>
> if ($T_branch_idx == 1) {
> xlog("L_INFO", "dropping branch[$T_branch_idx]\n");
> drop();
> }
> }
>
> In the logs, I got:
>
> entering branch[1] for sip:<user>@<IP>;transport=udp
> dropping branch[1]
> entering branch[1] for sip:<user>@<IP>
> dropping branch[1]
> ERROR:tm:t_forward_nonack: failure to add branches
>
>
>
> Is this the expected result?
> It seems that we do have two branches, since we enter twice in the
> branch_route, but the $T_branch_idx doesn't seem to be updated. Or,
> it is supposed to be updated?
> Any hints would be appreciated.
> BTW: this is with 1.3 code base.
>
> Regards,
> Ovidiu Sas
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>
More information about the Users
mailing list