[SR-Users] event_route[tm:branch-failure] question

Daniel-Constantin Mierla miconda at gmail.com
Thu Apr 17 15:09:14 CEST 2014


On 17/04/14 08:31, Juha Heinanen wrote:
> 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 at 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 - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list