Daniel-Constantin Mierla writes:
It would require C coding to get it nicely, I see
three options:
- try to get the values as in branch_route -- seems complex at first look
- try to get the values via $T_branch(attr) -- sounds simpler now
- try to get a function t_reuse_branch() -- create a new branch from
current one so you can just relay
The latter would, of course, be very user
friendly, but $T_branch(attr)
would be ok too.
As an option to implement now, try using hash
table to store attributes
using keys like:
$sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru) = $ru;
$sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::du) = $du;
I tried
without luck. In branch route I set:
$sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru) = $ru;
xlog("L_INFO", "Set htable value
<$sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru)>\n");
but
xlog("L_INFO", "Got 488 response to
<$sht(t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru)>\n");
in branch-failure route produces null:
Apr 17 09:27:52 siika /usr/sbin/sip-proxy[19529]: INFO: Set htable value
<sip:jh@192.98.102.30:5054;transport=tcp>
Apr 17 09:27:52 siika /usr/sbin/sip-proxy[19583]: INFO: Got 488 response to
<<null>>
Can you print also the htable key to see which of its values
are not
set? Like:
xlog("key is: t=>$T(id_label)::$T(id_index)::$T(branch_index)::ru\n");
in both places.
Cheers,
Daniel
--
Daniel-Constantin Mierla -