[Serusers] looped requests, syn_branch==1 => branch value is repeated for 2 Ts

JF jfkavaka at gmail.com
Thu May 17 14:18:04 CEST 2007


Hi all,

I have observed when looping a request through SER (using
t_relay_to("127.0.0.1", 5060)) that sometimes the via branch parameter
value generated when the request goes out is kept equal to the value
in the previous via (when this request was looped), and two equal vias
go out.
This causes problems with on_reply routes. On_reply routes are then
called only once, instead of two. Since these are 2 independent
transactions, this should happen twice.

Browsing through tm code, it seems that this is caused by the usage of
syn_branch == 1 in main.c (the default), leading to the following
function calls when an initial INVITE loops:

tm/t_fwd.c:
   t_forward_nonack
   add_uac
   print_uac_request

tm/t_msgbuilder.c:
   t_calc_branch

msg_translator.c:
   branch_builder  <-- here, when syn_branch==1, the transaction
'label' value is used for the branch value, but according to
tm/h_table.h, this value is "sequence number within hash collision
slot".

Is this the reason why some times the branch value is the same in two
transactions looped through SER? The label value can perfectly be the
same across 2 transactions not in the same hash slot... right?
Maybe this has nothing to do with the request being looped, or it just
makes this situation more probable?
Anyone else can replicate this behaviour?

Thanks,

João Filipe Plácido
--
PT Inovação



More information about the sr-users mailing list