[OpenSIPS-Users] parallel forking

stefanoIT stefano at omnianet.it
Mon Feb 2 15:21:39 CET 2009


Hi Bogdan,
I had read about brach this:

3.75 Branch index
$T_branch_idx - the index (starting with 1 for the first branch) of the
branch for which is executed the branch_route[]. If used outside of
branch_route[] block, the value is '0'. This is exported by TM module. 

Is that true?

regards.
stefano



Hi Stefano,

There is no way to extract the URI from the reply; also there is no way 
yo access the internal data structures (like transaction) to get this info.

But what you can do is to use AVPs to store the RURI - use different 
specific numes in order to make difference between branches:

    $ru = "first branch RURI";
    $avp(s:uri1) = $ru;
    append_branch("second branch RURI");
    $avp(s:uri2) = "second branch RURI");
    ....

in onreply route, you can do:

    if ($t_branch_idx==1) {
       xlog("RURI was: $avp(s:uri1) \n");
    }  else ($t_branch_idx==1) {
       xlog("RURI was: $avp(s:uri2) \n");
    }
    ...

I know it is not the nicest or most scalable way to do it, but this is a 
workable solution with what is now available.

Regards,
Bogdan


-- 
View this message in context: http://n2.nabble.com/parallel-forking-tp2257204p2258140.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.




More information about the Users mailing list