[OpenSIPS-Users] parallel forking

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Feb 2 15:40:28 CET 2009


yes, it is true:)

Regards,
Bogdan

stefanoIT wrote:
> 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
>
>
>   




More information about the Users mailing list