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

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 16 20:07:52 CEST 2014


On 16/04/14 18:46, Juha Heinanen wrote:
> Daniel-Constantin Mierla writes:
>
>> Why would you need all attributes of the branch that just failed, do you
>> want to send the request to the same destination again?
> that is exactly the requirement.  the idea is to assign some avps/branch
> flags differently so that mediaproxy-offer in branch route would behave
> the right way.
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

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;
...

Then use them to create the new branch.

But avps are per transaction, not per branch, so if you add one, will be 
visible to all branches (same should be in branch_route).

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